You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/06/12 18:39:27 UTC
[GitHub] [apisix] sunhao-java opened a new pull request, #7240: Fix the issue #7216.
sunhao-java opened a new pull request, #7240:
URL: https://github.com/apache/apisix/pull/7240
### Description
When APISIX_PROFILE is set to empty string, the configuration file name is set to config-.yaml
Fixes # 7216
--
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] sunhao-java commented on pull request #7240: feat: allow APISIX_PROFILE to be an empty string
Posted by GitBox <gi...@apache.org>.
sunhao-java commented on PR #7240:
URL: https://github.com/apache/apisix/pull/7240#issuecomment-1154634459
> we should update docs:https://github.com/apache/apisix/blob/master/docs/en/latest/profile.md, and add test case, like: https://github.com/apache/apisix/blob/master/t/core/profile.t
Is there some documentation that can help me to write unit test cases
--
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] tzssangglass commented on pull request #7240: feat: allow APISIX_PROFILE to be an empty string
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on PR #7240:
URL: https://github.com/apache/apisix/pull/7240#issuecomment-1153912568
we should update docs:https://github.com/apache/apisix/blob/master/docs/en/latest/profile.md, and add test case, like: https://github.com/apache/apisix/blob/master/t/core/profile.t
--
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] tzssangglass commented on pull request #7240: feat: allow APISIX_PROFILE to be an empty string
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on PR #7240:
URL: https://github.com/apache/apisix/pull/7240#issuecomment-1154751869
> Is there some documentation that can help me to write unit test cases
https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md
--
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] github-actions[bot] commented on pull request #7240: feat: allow APISIX_PROFILE to be an empty string
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7240:
URL: https://github.com/apache/apisix/pull/7240#issuecomment-1220492787
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.
--
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] spacewander merged pull request #7240: feat: allow APISIX_PROFILE to be an empty string
Posted by GitBox <gi...@apache.org>.
spacewander merged PR #7240:
URL: https://github.com/apache/apisix/pull/7240
--
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] sunhao-java commented on a diff in pull request #7240: feat: allow APISIX_PROFILE to be an empty string
Posted by GitBox <gi...@apache.org>.
sunhao-java commented on code in PR #7240:
URL: https://github.com/apache/apisix/pull/7240#discussion_r955127601
##########
t/core/profile.t:
##########
@@ -32,3 +32,19 @@ __DATA__
--- request
GET /t
--- error_code: 404
+
+=== TEST 2: set env "APISIX_PROFILE" to Empty String
+--- config
+ location /t {
+ content_by_lua_block {
+ local profile = require("apisix.core.profile")
+ profile.apisix_home = "./test/"
+ profile.profile = ""
Review Comment:
> We can check if `profile.profile` is equal to `""` here?
`profile.profile = ""` means we set env `"APISIX_PROFILE"` to empty string.
This is just to simulate a scenario where the environment variable is empty string.
--
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] sunhao-java commented on a diff in pull request #7240: feat: allow APISIX_PROFILE to be an empty string
Posted by GitBox <gi...@apache.org>.
sunhao-java commented on code in PR #7240:
URL: https://github.com/apache/apisix/pull/7240#discussion_r955127601
##########
t/core/profile.t:
##########
@@ -32,3 +32,19 @@ __DATA__
--- request
GET /t
--- error_code: 404
+
+=== TEST 2: set env "APISIX_PROFILE" to Empty String
+--- config
+ location /t {
+ content_by_lua_block {
+ local profile = require("apisix.core.profile")
+ profile.apisix_home = "./test/"
+ profile.profile = ""
Review Comment:
> We can check if `profile.profile` is equal to `""` here?
profile.profile = "" means we set env "APISIX_PROFILE" to empty string.
This is just to simulate a scenario where the environment variable is empty string.
--
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] sunhao-java commented on a diff in pull request #7240: feat: allow APISIX_PROFILE to be an empty string
Posted by GitBox <gi...@apache.org>.
sunhao-java commented on code in PR #7240:
URL: https://github.com/apache/apisix/pull/7240#discussion_r955126140
##########
t/core/profile.t:
##########
@@ -32,3 +32,19 @@ __DATA__
--- request
GET /t
--- error_code: 404
+
+=== TEST 2: set env "APISIX_PROFILE" to Empty String
+--- config
+ location /t {
+ content_by_lua_block {
+ local profile = require("apisix.core.profile")
+ profile.apisix_home = "./test/"
+ profile.profile = ""
Review Comment:
`profile.profile = ""` means we set env "APISIX_PROFILE" to empty string.
This is just to simulate a scenario where the environment variable is empty string.
--
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] spacewander commented on a diff in pull request #7240: feat: allow APISIX_PROFILE to be an empty string
Posted by GitBox <gi...@apache.org>.
spacewander commented on code in PR #7240:
URL: https://github.com/apache/apisix/pull/7240#discussion_r954530911
##########
t/core/profile.t:
##########
@@ -32,3 +32,19 @@ __DATA__
--- request
GET /t
--- error_code: 404
+
+=== TEST 2: set env "APISIX_PROFILE" to Empty String
+--- config
+ location /t {
+ content_by_lua_block {
+ local profile = require("apisix.core.profile")
+ profile.apisix_home = "./test/"
+ profile.profile = ""
Review Comment:
We can check if `profile.profile` is equal to `""` 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