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 2020/02/21 08:57:35 UTC

[GitHub] [incubator-apisix] qiujiayu opened a new pull request #1147: add profile

qiujiayu opened a new pull request #1147: add profile
URL: https://github.com/apache/incubator-apisix/pull/1147
 
 
   Fix #1123

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis commented on a change in pull request #1147: add profile

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1147: add profile
URL: https://github.com/apache/incubator-apisix/pull/1147#discussion_r383219397
 
 

 ##########
 File path: lua/apisix/core/profile.lua
 ##########
 @@ -0,0 +1,34 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local _M = {
+    version = 0.1,
+    profile = os.getenv("APISIX_PROFILE"),
+    apisix_home = ngx and ngx.config.prefix()
 
 Review comment:
   Do we need to set a default path if the `profile.lua` was not running in OpenResty ENV.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis commented on issue #1147: add profile

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1147: add profile
URL: https://github.com/apache/incubator-apisix/pull/1147#issuecomment-590628084
 
 
   Looks good to me, we can merge it soon.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis merged pull request #1147: add profile

Posted by GitBox <gi...@apache.org>.
membphis merged pull request #1147: add profile
URL: https://github.com/apache/incubator-apisix/pull/1147
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] moonming commented on issue #1147: add profile

Posted by GitBox <gi...@apache.org>.
moonming commented on issue #1147: add profile
URL: https://github.com/apache/incubator-apisix/pull/1147#issuecomment-590158691
 
 
   @qiujiayu please take a look at CI, thx

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis commented on issue #1147: add profile

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1147: add profile
URL: https://github.com/apache/incubator-apisix/pull/1147#issuecomment-592261120
 
 
   @qiujiayu Thank you very much, it has been merged.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] qiujiayu commented on a change in pull request #1147: add profile

Posted by GitBox <gi...@apache.org>.
qiujiayu commented on a change in pull request #1147: add profile
URL: https://github.com/apache/incubator-apisix/pull/1147#discussion_r383297870
 
 

 ##########
 File path: lua/apisix/core/profile.lua
 ##########
 @@ -0,0 +1,34 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local _M = {
+    version = 0.1,
+    profile = os.getenv("APISIX_PROFILE"),
+    apisix_home = ngx and ngx.config.prefix()
 
 Review comment:
   Ok, I have been set the value `(ngx and ngx.config.prefix()) or ""` for the var apisix_home

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services