You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "jiangfucheng (via GitHub)" <gi...@apache.org> on 2023/07/16 15:56:18 UTC
[GitHub] [apisix] jiangfucheng opened a new pull request, #9846: refactor: access customized config directly
jiangfucheng opened a new pull request, #9846:
URL: https://github.com/apache/apisix/pull/9846
### Description
<!-- Please include a summary of the change and which issue is fixed. -->
<!-- Please also include relevant motivation and context. -->
Fixes https://github.com/apache/apisix/issues/9842
Discussion in https://github.com/apache/apisix/pull/9521#discussion_r1201718431
### Checklist
- [x] I have explained the need for this PR and the problem it solves
- [x] I have explained the changes or the new features added to this PR
- [x] I have added tests corresponding to this change
- [ ] I have updated the documentation to reflect this change
- [x] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
<!--
Note
1. Mark the PR as draft until it's ready to be reviewed.
2. Always add/update tests for any changes unless you have a good reason.
3. Always update the documentation to reflect the changes made in the PR.
4. Make a new commit to resolve conversations instead of `push -f`.
5. To resolve merge conflicts, merge master instead of rebasing.
6. Use "request review" to notify the reviewer after making changes.
7. Only a reviewer can mark a conversation as resolved.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #9846: refactor: access customized config directly
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on code in PR #9846:
URL: https://github.com/apache/apisix/pull/9846#discussion_r1266544652
##########
t/cli/test_cmd.sh:
##########
@@ -101,37 +101,71 @@ deployment:
admin_ssl_cert_key: '../t/certs/apisix_admin_ssl.key'
" > conf/customized_config.yaml
-cp conf/config.yaml conf/config_original.yaml
-
make init
if ./bin/apisix start -c conf/not_existed_config.yaml; then
echo "failed: apisix still start with invalid customized config.yaml"
exit 1
fi
+
./bin/apisix start -c conf/customized_config.yaml
-if cmp -s "conf/config.yaml" "conf/config_original.yaml"; then
- rm conf/config_original.yaml
- echo "failed: customized config.yaml copied failed"
+if [ ! -e conf/.config_path ]; then
+ rm conf/customized_config.yaml
+ echo ".config_path file should exits"
exit 1
fi
code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} https://127.0.0.1:9180/apisix/admin/routes -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1')
if [ ! $code -eq 200 ]; then
- rm conf/config_original.yaml conf/customized_config.yaml
+ rm conf/customized_config.yaml
echo "failed: customized config.yaml not be used"
exit 1
fi
make stop
-if ! cmp -s "conf/config.yaml" "conf/config_original.yaml"; then
- rm conf/config_original.yaml conf/customized_config.yaml
- echo "failed: customized config.yaml reverted failed"
+if [ -e conf/.config_path ]; then
+ rm conf/customized_config.yaml
+ echo ".config_path file should be removed"
+ exit 1
+fi
+
+
+echo "
+deployment:
+ admin:
+ admin_listen:
+ port: 9180
+ https_admin: true
+ admin_api_mtls:
+ admin_ssl_cert: '../t/certs/apisix_admin_ssl.crt'
+ admin_ssl_cert_key: '../t/certs/apisix_admin_ssl.key'
+ etcd:
+ host:
+ - "http://127.0.0.1:22379"
+" > conf/customized_config.yaml
+
+
+if ./bin/apisix start -c conf/customized_config.yaml ; then
+ rm conf/customized_config.yaml
+ echo "start should be failed"
+ exit 1
+fi
+
+
+./bin/apisix start
+
+code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1')
Review Comment:
This test case is the same with the one above?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 commented on pull request #9846: refactor: access customized config directly
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #9846:
URL: https://github.com/apache/apisix/pull/9846#issuecomment-1640647623
Please fix the code lint
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] jiangfucheng commented on pull request #9846: refactor: access customized config directly
Posted by "jiangfucheng (via GitHub)" <gi...@apache.org>.
jiangfucheng commented on PR #9846:
URL: https://github.com/apache/apisix/pull/9846#issuecomment-1640297671
@monkeyDluffy6017 Please take a look again, thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] jiangfucheng commented on pull request #9846: refactor: access customized config directly
Posted by "jiangfucheng (via GitHub)" <gi...@apache.org>.
jiangfucheng commented on PR #9846:
URL: https://github.com/apache/apisix/pull/9846#issuecomment-1640296447
> Could you add a test case to cover #9171?
Added.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #9846: refactor: access customized config directly
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on code in PR #9846:
URL: https://github.com/apache/apisix/pull/9846#discussion_r1267083941
##########
apisix/cli/ops.lua:
##########
@@ -817,21 +828,25 @@ local function start(env, ...)
local customized_yaml = args["config"]
if customized_yaml then
- profile.apisix_home = env.apisix_home .. "/"
- local local_conf_path = profile:yaml_path("config")
- local local_conf_path_bak = local_conf_path .. ".bak"
+ local customized_config_path
+ local idx = str_find(customized_yaml, "/")
+ if idx and idx == 1 then
+ customized_config_path = customized_yaml
+ else
+ local cur_dir, err = lfs.currentdir()
+ if err then
+ util.die("failed to get current directory")
+ end
+ customized_config_path = cur_dir .. "/" .. customized_yaml
+ end
- local ok, err = os_rename(local_conf_path, local_conf_path_bak)
- if not ok then
- util.die("failed to backup config, error: ", err)
+ if not util.file_exists(customized_config_path) then
+ util.die("customized config file not exists, path: " .. customized_config_path)
Review Comment:
LGTM
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Revolyssup commented on a diff in pull request #9846: refactor: access customized config directly
Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on code in PR #9846:
URL: https://github.com/apache/apisix/pull/9846#discussion_r1264937436
##########
apisix/cli/file.lua:
##########
@@ -223,7 +223,12 @@ function _M.read_yaml_conf(apisix_home)
return nil, "invalid config-default.yaml file"
end
- local_conf_path = profile:yaml_path("config")
+ local customized_conf_path = profile:customized_config_path()
+ if customized_conf_path then
+ local_conf_path = customized_conf_path
Review Comment:
instead of creating another variable `customized_conf_path`
Can you not directly do here `local_conf_path = profile:customized_config_path()`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Revolyssup commented on pull request #9846: refactor: access customized config directly
Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on PR #9846:
URL: https://github.com/apache/apisix/pull/9846#issuecomment-1637495200
> @Revolyssup Please help to check this, to see if it works
I can confirm that this issue- https://github.com/apache/apisix/issues/9171 doesn't come up on this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 merged pull request #9846: refactor: access customized config directly
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 merged PR #9846:
URL: https://github.com/apache/apisix/pull/9846
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #9846: refactor: access customized config directly
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on code in PR #9846:
URL: https://github.com/apache/apisix/pull/9846#discussion_r1266523976
##########
apisix/cli/ops.lua:
##########
@@ -753,7 +753,18 @@ local function init_etcd(env, args)
end
+local function cleanup(env)
+ os_remove(env.apisix_home .. "/conf/.config_path")
Review Comment:
Is `/conf/.customized_config_path` better?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 commented on pull request #9846: refactor: access customized config directly
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #9846:
URL: https://github.com/apache/apisix/pull/9846#issuecomment-1637261811
@Revolyssup Please help to check this, to see if it works
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] jiangfucheng commented on pull request #9846: refactor: access customized config directly
Posted by "jiangfucheng (via GitHub)" <gi...@apache.org>.
jiangfucheng commented on PR #9846:
URL: https://github.com/apache/apisix/pull/9846#issuecomment-1637126530
More test cases will be added.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #9846: refactor: access customized config directly
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on code in PR #9846:
URL: https://github.com/apache/apisix/pull/9846#discussion_r1266537450
##########
t/cli/test_cmd.sh:
##########
@@ -101,37 +101,71 @@ deployment:
admin_ssl_cert_key: '../t/certs/apisix_admin_ssl.key'
" > conf/customized_config.yaml
-cp conf/config.yaml conf/config_original.yaml
-
make init
if ./bin/apisix start -c conf/not_existed_config.yaml; then
echo "failed: apisix still start with invalid customized config.yaml"
exit 1
fi
+
Review Comment:
One blank is needed here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #9846: refactor: access customized config directly
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on code in PR #9846:
URL: https://github.com/apache/apisix/pull/9846#discussion_r1266544652
##########
t/cli/test_cmd.sh:
##########
@@ -101,37 +101,71 @@ deployment:
admin_ssl_cert_key: '../t/certs/apisix_admin_ssl.key'
" > conf/customized_config.yaml
-cp conf/config.yaml conf/config_original.yaml
-
make init
if ./bin/apisix start -c conf/not_existed_config.yaml; then
echo "failed: apisix still start with invalid customized config.yaml"
exit 1
fi
+
./bin/apisix start -c conf/customized_config.yaml
-if cmp -s "conf/config.yaml" "conf/config_original.yaml"; then
- rm conf/config_original.yaml
- echo "failed: customized config.yaml copied failed"
+if [ ! -e conf/.config_path ]; then
+ rm conf/customized_config.yaml
+ echo ".config_path file should exits"
exit 1
fi
code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} https://127.0.0.1:9180/apisix/admin/routes -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1')
if [ ! $code -eq 200 ]; then
- rm conf/config_original.yaml conf/customized_config.yaml
+ rm conf/customized_config.yaml
echo "failed: customized config.yaml not be used"
exit 1
fi
make stop
-if ! cmp -s "conf/config.yaml" "conf/config_original.yaml"; then
- rm conf/config_original.yaml conf/customized_config.yaml
- echo "failed: customized config.yaml reverted failed"
+if [ -e conf/.config_path ]; then
+ rm conf/customized_config.yaml
+ echo ".config_path file should be removed"
+ exit 1
+fi
+
+
+echo "
+deployment:
+ admin:
+ admin_listen:
+ port: 9180
+ https_admin: true
+ admin_api_mtls:
+ admin_ssl_cert: '../t/certs/apisix_admin_ssl.crt'
+ admin_ssl_cert_key: '../t/certs/apisix_admin_ssl.key'
+ etcd:
+ host:
+ - "http://127.0.0.1:22379"
+" > conf/customized_config.yaml
+
+
+if ./bin/apisix start -c conf/customized_config.yaml ; then
+ rm conf/customized_config.yaml
+ echo "start should be failed"
+ exit 1
+fi
+
+
+./bin/apisix start
+
+code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1')
Review Comment:
This test case is the same with the one above?
Could you add a title describe what do you test?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] jiangfucheng commented on a diff in pull request #9846: refactor: access customized config directly
Posted by "jiangfucheng (via GitHub)" <gi...@apache.org>.
jiangfucheng commented on code in PR #9846:
URL: https://github.com/apache/apisix/pull/9846#discussion_r1265399049
##########
apisix/cli/ops.lua:
##########
@@ -817,21 +828,25 @@ local function start(env, ...)
local customized_yaml = args["config"]
if customized_yaml then
- profile.apisix_home = env.apisix_home .. "/"
- local local_conf_path = profile:yaml_path("config")
- local local_conf_path_bak = local_conf_path .. ".bak"
+ local customized_config_path
+ local idx = str_find(customized_yaml, "/")
+ if idx and idx == 1 then
+ customized_config_path = customized_yaml
+ else
+ local cur_dir, err = lfs.currentdir()
+ if err then
+ util.die("failed to get current directory")
+ end
+ customized_config_path = cur_dir .. "/" .. customized_yaml
+ end
- local ok, err = os_rename(local_conf_path, local_conf_path_bak)
- if not ok then
- util.die("failed to backup config, error: ", err)
+ if not util.file_exists(customized_config_path) then
+ util.die("customized config file not exists, path: " .. customized_config_path)
Review Comment:
In this PR, we don't need to check the result of `init()` method or other failures in `apisix start`, we just remove the`.config_path` file before start is enough.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #9846: refactor: access customized config directly
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on code in PR #9846:
URL: https://github.com/apache/apisix/pull/9846#discussion_r1266545922
##########
t/cli/test_cmd.sh:
##########
@@ -101,37 +101,71 @@ deployment:
admin_ssl_cert_key: '../t/certs/apisix_admin_ssl.key'
" > conf/customized_config.yaml
-cp conf/config.yaml conf/config_original.yaml
-
make init
if ./bin/apisix start -c conf/not_existed_config.yaml; then
echo "failed: apisix still start with invalid customized config.yaml"
exit 1
fi
+
./bin/apisix start -c conf/customized_config.yaml
-if cmp -s "conf/config.yaml" "conf/config_original.yaml"; then
- rm conf/config_original.yaml
- echo "failed: customized config.yaml copied failed"
+if [ ! -e conf/.config_path ]; then
+ rm conf/customized_config.yaml
+ echo ".config_path file should exits"
exit 1
fi
code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} https://127.0.0.1:9180/apisix/admin/routes -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1')
if [ ! $code -eq 200 ]; then
- rm conf/config_original.yaml conf/customized_config.yaml
+ rm conf/customized_config.yaml
echo "failed: customized config.yaml not be used"
exit 1
fi
make stop
-if ! cmp -s "conf/config.yaml" "conf/config_original.yaml"; then
- rm conf/config_original.yaml conf/customized_config.yaml
- echo "failed: customized config.yaml reverted failed"
+if [ -e conf/.config_path ]; then
+ rm conf/customized_config.yaml
+ echo ".config_path file should be removed"
+ exit 1
+fi
+
+
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 commented on pull request #9846: refactor: access customized config directly
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #9846:
URL: https://github.com/apache/apisix/pull/9846#issuecomment-1639922553
Please fix the code lint
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 commented on pull request #9846: refactor: access customized config directly
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #9846:
URL: https://github.com/apache/apisix/pull/9846#issuecomment-1639946867
Could you add a test case to cover https://github.com/apache/apisix/issues/9171?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Revolyssup commented on a diff in pull request #9846: refactor: access customized config directly
Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on code in PR #9846:
URL: https://github.com/apache/apisix/pull/9846#discussion_r1264945044
##########
apisix/cli/ops.lua:
##########
@@ -817,21 +828,25 @@ local function start(env, ...)
local customized_yaml = args["config"]
if customized_yaml then
- profile.apisix_home = env.apisix_home .. "/"
- local local_conf_path = profile:yaml_path("config")
- local local_conf_path_bak = local_conf_path .. ".bak"
+ local customized_config_path
+ local idx = str_find(customized_yaml, "/")
+ if idx and idx == 1 then
+ customized_config_path = customized_yaml
+ else
+ local cur_dir, err = lfs.currentdir()
+ if err then
+ util.die("failed to get current directory")
+ end
+ customized_config_path = cur_dir .. "/" .. customized_yaml
+ end
- local ok, err = os_rename(local_conf_path, local_conf_path_bak)
- if not ok then
- util.die("failed to backup config, error: ", err)
+ if not util.file_exists(customized_config_path) then
+ util.die("customized config file not exists, path: " .. customized_config_path)
Review Comment:
@jiangfucheng Just a note that in my PR here[1], I have moved out all util.Die outside the start function by returning errors.
1. https://github.com/apache/apisix/pull/9701
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #9846: refactor: access customized config directly
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on code in PR #9846:
URL: https://github.com/apache/apisix/pull/9846#discussion_r1266529806
##########
apisix/core/profile.lua:
##########
@@ -48,4 +50,18 @@ function _M.yaml_path(self, file_name)
end
+function _M.customized_config_index(self)
+ return self.apisix_home .. "/conf/.config_path"
+end
+
+
+function _M.customized_config_path(self)
Review Comment:
Is `customized_config_path` better?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #9846: refactor: access customized config directly
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on code in PR #9846:
URL: https://github.com/apache/apisix/pull/9846#discussion_r1266529309
##########
apisix/core/profile.lua:
##########
@@ -48,4 +50,18 @@ function _M.yaml_path(self, file_name)
end
+function _M.customized_config_index(self)
Review Comment:
Is `customized_yaml_index` better?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #9846: refactor: access customized config directly
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on code in PR #9846:
URL: https://github.com/apache/apisix/pull/9846#discussion_r1266521450
##########
apisix/cli/ops.lua:
##########
@@ -817,21 +828,25 @@ local function start(env, ...)
local customized_yaml = args["config"]
if customized_yaml then
- profile.apisix_home = env.apisix_home .. "/"
- local local_conf_path = profile:yaml_path("config")
- local local_conf_path_bak = local_conf_path .. ".bak"
+ local customized_config_path
Review Comment:
Is `customized_yaml_path` better? keep consistent with `customized_yaml`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org