You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/11/18 18:48:48 UTC

[GitHub] [airflow] tomasgatial opened a new pull request #19689: add redis runAsUser option (#19681)

tomasgatial opened a new pull request #19689:
URL: https://github.com/apache/airflow/pull/19689


   closes: #19681
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #19689: add redis runAsUser option (#19681)

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#discussion_r752542302



##########
File path: chart/values.schema.json
##########
@@ -2856,6 +2856,11 @@
                     "type": "array",
                     "default": []
                 },
+                "uid": {

Review comment:
       I believe this should come as part of .Values.redis.uid parameter ? 
   
   For compatibiity with previous version also I tihnk this should have `None` default and the whole `security-context` section should be conditional based on the uid set, I think because someone upgrading the chart will already have a root-owned db in /data abwhen persistence is enabled and it might get non-accessible if "runAsUser" is used. 




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] tomasgatial commented on a change in pull request #19689: add redis runAsUser option (#19681)

Posted by GitBox <gi...@apache.org>.
tomasgatial commented on a change in pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#discussion_r752560842



##########
File path: chart/values.schema.json
##########
@@ -2856,6 +2856,11 @@
                     "type": "array",
                     "default": []
                 },
+                "uid": {

Review comment:
       Of course `.Values.redis.uid` , that was an oversight. 
   
   I see the issue with upgrading with existing redis data. What do you think of the solution below? 




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #19689: Chart: Allow overriding redis's ``runAsUser`` option (#19681)

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#issuecomment-991047671


   The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #19689: add redis runAsUser option (#19681)

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#issuecomment-986327109


   Sorry - needs rebase again (but we had some intermittent problems that should nearly be gone - so please - rebase).


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #19689: add redis runAsUser option (#19681)

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#discussion_r752565596



##########
File path: chart/values.schema.json
##########
@@ -2856,6 +2856,11 @@
                     "type": "array",
                     "default": []
                 },
+                "uid": {

Review comment:
       And I also recommend installing pre-commit - I think it will then generate documentation automatically from the schema (see https://github.com/apache/airflow/blob/main/STATIC_CODE_CHECKS.rst#pre-commit-hooks)
   This will avoid unnecessary CI iterations.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on a change in pull request #19689: add redis runAsUser option (#19681)

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#discussion_r766616345



##########
File path: chart/values.yaml
##########
@@ -1153,6 +1153,8 @@ redis:
   affinity: {}
   tolerations: []
 
+  uid: null

Review comment:
       ```suggestion
     uid: ~
   ```
   
   might work as null ? @jedcunningham @dstandish WDYT ?




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] tomasgatial commented on a change in pull request #19689: add redis runAsUser option (#19681)

Posted by GitBox <gi...@apache.org>.
tomasgatial commented on a change in pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#discussion_r752560842



##########
File path: chart/values.schema.json
##########
@@ -2856,6 +2856,11 @@
                     "type": "array",
                     "default": []
                 },
+                "uid": {

Review comment:
       Of course `.Values.redis.uid` , that was an oversight. 
   
   I see the issue with upgrading with existing redis persistence. What do you think of solution below? 




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] tomasgatial commented on a change in pull request #19689: add redis runAsUser option (#19681)

Posted by GitBox <gi...@apache.org>.
tomasgatial commented on a change in pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#discussion_r766629346



##########
File path: chart/values.yaml
##########
@@ -1153,6 +1153,8 @@ redis:
   affinity: {}
   tolerations: []
 
+  uid: null

Review comment:
       Sure, http://yaml.org/spec/1.2-old/spec.html#id2805071




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] closed pull request #19689: Chart: Allow overriding redis's ``runAsUser`` option (#19681)

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #19689:
URL: https://github.com/apache/airflow/pull/19689


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #19689: Chart: Allow overriding redis's ``runAsUser`` option (#19681)

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#issuecomment-1053733884


   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. 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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #19689: add redis runAsUser option (#19681)

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#discussion_r752542302



##########
File path: chart/values.schema.json
##########
@@ -2856,6 +2856,11 @@
                     "type": "array",
                     "default": []
                 },
+                "uid": {

Review comment:
       I believe this should come as  .Values.redis.uid parameter ? 
   
   For compatibiity with previous version also I tihnk this should have `None` default and the whole `security-context` section should be conditional based on the uid set, I think because someone upgrading the chart will already have a root-owned db in /data abwhen persistence is enabled and it might get non-accessible if "runAsUser" is used. 

##########
File path: chart/values.schema.json
##########
@@ -2856,6 +2856,11 @@
                     "type": "array",
                     "default": []
                 },
+                "uid": {

Review comment:
       I believe this should come as  `.Values.redis.uid` parameter ? 
   
   For compatibiity with previous version also I tihnk this should have `None` default and the whole `security-context` section should be conditional based on the uid set, I think because someone upgrading the chart will already have a root-owned db in /data abwhen persistence is enabled and it might get non-accessible if "runAsUser" is used. 




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on pull request #19689: add redis runAsUser option (#19681)

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#issuecomment-973157587


   Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
   Here are some useful points:
   - Pay attention to the quality of your code (flake8, mypy and type annotations). Our [pre-commits]( https://github.com/apache/airflow/blob/main/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks) will help you with that.
   - In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/docs/apache-airflow/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
   - Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/BREEZE.rst) for testing locally, itโ€™s a heavy docker but it ships with a working Airflow and a lot of integrations.
   - Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
   - Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
   - Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#coding-style-and-best-practices).
   Apache Airflow is a community-driven project and together we are making it better ๐Ÿš€.
   In case of doubts contact the developers at:
   Mailing List: dev@airflow.apache.org
   Slack: https://s.apache.org/airflow-slack
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #19689: add redis runAsUser option (#19681)

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#discussion_r752565596



##########
File path: chart/values.schema.json
##########
@@ -2856,6 +2856,11 @@
                     "type": "array",
                     "default": []
                 },
+                "uid": {

Review comment:
       And I also recommend installing pre-commit - I think it will then generate documentation automatically from the schema (see https://github.com/apache/airflow/blob/main/STATIC_CODE_CHECKS.rst#pre-commit-hooks)




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #19689: add redis runAsUser option (#19681)

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#discussion_r752564631



##########
File path: chart/values.schema.json
##########
@@ -2856,6 +2856,11 @@
                     "type": "array",
                     "default": []
                 },
+                "uid": {

Review comment:
       Looks good. One more thing - we also have unit tests for the chart (chart/tests) - they are rather simple - you pass parameters and check if the rendered templates are as expected. It would be great to add tests for this change there.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] tomasgatial commented on a change in pull request #19689: add redis runAsUser option (#19681)

Posted by GitBox <gi...@apache.org>.
tomasgatial commented on a change in pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#discussion_r752560842



##########
File path: chart/values.schema.json
##########
@@ -2856,6 +2856,11 @@
                     "type": "array",
                     "default": []
                 },
+                "uid": {

Review comment:
       Of course `.Values.redis.uid` , that was an oversight. 
   
   I see the issue with upgrading with existing redis data. What do you think of solution below? 




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] jedcunningham commented on pull request #19689: add redis runAsUser option (#19681)

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#issuecomment-973242274


   This should probably be added after #18249 is merged so we have one less deprecation to deal with.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] jedcunningham commented on pull request #19689: Chart: Allow overriding redis's ``runAsUser`` option (#19681)

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on pull request #19689:
URL: https://github.com/apache/airflow/pull/19689#issuecomment-996944936


   @tomasgatial, #18249 has been merged. Can you refactor this to support both `uid` and a complete `securityContext`?


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org