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/17 09:49:52 UTC

[GitHub] [incubator-apisix] qiujiayu opened a new pull request #1131: support distinguish configuration of different environments by environment variables

qiujiayu opened a new pull request #1131: support distinguish configuration of different environments by environment variables
URL: https://github.com/apache/incubator-apisix/pull/1131
 
 
   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 #1131: support distinguish configuration of different environments by environment variables

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1131: support distinguish configuration of different environments by environment variables
URL: https://github.com/apache/incubator-apisix/pull/1131#discussion_r380688192
 
 

 ##########
 File path: lua/apisix/core/profile.lua
 ##########
 @@ -0,0 +1,33 @@
+--
+-- 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.2,
 
 Review comment:
   first version, it should be `0.1`

----------------------------------------------------------------
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 #1131: support distinguish configuration of different environments by environment variables

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1131: support distinguish configuration of different environments by environment variables
URL: https://github.com/apache/incubator-apisix/pull/1131#issuecomment-589500167
 
 
   @qiujiayu I think you can create a new PR with your commits if you do not know how to fix the wrong commit log.

----------------------------------------------------------------
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 issue #1131: support distinguish configuration of different environments by environment variables

Posted by GitBox <gi...@apache.org>.
qiujiayu commented on issue #1131: support distinguish configuration of different environments by environment variables
URL: https://github.com/apache/incubator-apisix/pull/1131#issuecomment-589478859
 
 
   > @qiujiayu https://apisix.dev/d/1-apache-apisix/10
   > 
   > I think you can join this event.
   
   joined

----------------------------------------------------------------
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 #1131: support distinguish configuration of different environments by environment variables

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1131: support distinguish configuration of different environments by environment variables
URL: https://github.com/apache/incubator-apisix/pull/1131#issuecomment-587225153
 
 
   please pay attention at the  Travis outputs: https://travis-ci.org/apache/incubator-apisix/jobs/651568717#L682
   
   we need to add a test case for this feature, you can take a look at another PR: https://github.com/apache/incubator-apisix/pull/1133

----------------------------------------------------------------
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 #1131: support distinguish configuration of different environments by environment variables

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1131: support distinguish configuration of different environments by environment variables
URL: https://github.com/apache/incubator-apisix/pull/1131#issuecomment-586924710
 
 
   @qiujiayu you should use `git rebase` to update your working branch.

----------------------------------------------------------------
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 #1131: support distinguish configuration of different environments by environment variables

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1131: support distinguish configuration of different environments by environment variables
URL: https://github.com/apache/incubator-apisix/pull/1131#issuecomment-588624665
 
 
   @qiujiayu please rebase your branch, I updated the code style check tools.

----------------------------------------------------------------
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 #1131: support distinguish configuration of different environments by environment variables

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1131: support distinguish configuration of different environments by environment variables
URL: https://github.com/apache/incubator-apisix/pull/1131#issuecomment-589124302
 
 
   @qiujiayu https://apisix.dev/d/1-apache-apisix/10
   
   I think you can join this event. 

----------------------------------------------------------------
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 closed pull request #1131: support distinguish configuration of different environments by environment variables

Posted by GitBox <gi...@apache.org>.
qiujiayu closed pull request #1131: support distinguish configuration of different environments by environment variables
URL: https://github.com/apache/incubator-apisix/pull/1131
 
 
   

----------------------------------------------------------------
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 #1131: support distinguish configuration of different environments by environment variables

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1131: support distinguish configuration of different environments by environment variables
URL: https://github.com/apache/incubator-apisix/pull/1131#issuecomment-587275797
 
 
   @qiujiayu https://github.com/apache/incubator-apisix/pull/1133 had been merged, you can add new test case after you rebase your branch.

----------------------------------------------------------------
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 #1131: support distinguish configuration of different environments by environment variables

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1131: support distinguish configuration of different environments by environment variables
URL: https://github.com/apache/incubator-apisix/pull/1131#discussion_r380686874
 
 

 ##########
 File path: lua/apisix/core/config_local.lua
 ##########
 @@ -28,6 +30,7 @@ local _M = {
 }
 
 
+
 
 Review comment:
   useless blank line, please remove it

----------------------------------------------------------------
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 #1131: support distinguish configuration of different environments by environment variables

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1131: support distinguish configuration of different environments by environment variables
URL: https://github.com/apache/incubator-apisix/pull/1131#discussion_r380688837
 
 

 ##########
 File path: lua/apisix/core/profile.lua
 ##########
 @@ -0,0 +1,33 @@
+--
+-- 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.2,
+    profile = os.getenv("APISIX_PROFILE")
+}
+
+
+function _M.build_yaml_config_file(self, file_path)
+    if self.profile then
 
 Review comment:
   here is a better style:
   
   ```lua
   if self.profile then
       return ... ...
   end
   
   return ... ...
   ```

----------------------------------------------------------------
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