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 2020/11/24 22:16:09 UTC

[GitHub] [airflow] kaxil opened a new pull request #12599: Restrict "build images" workflow to certain branches

kaxil opened a new pull request #12599:
URL: https://github.com/apache/airflow/pull/12599


   Currently, since we don't restrict it, on forks this runs the build step on all branches
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/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/master/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.

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



[GitHub] [airflow] potiuk commented on pull request #12599: Restrict "build images" workflow to certain branches

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


    
   > Updated in [ef121f8](https://github.com/apache/airflow/commit/ef121f84497c0bf4b523df7b45c40227267583d2) to only run it on pull_request.
   > 
   > The problem currently is that this build is trying to run on all branches where we don't expect users to create PRs too and it is running on `pushes` on branch too
   
   Not good either - the workflow run is also used to build images for direct pushes to master/v1-10-test/v1-10-stable. 
   
   I think it should be "if" check on (event_type=="push" and "branch" not in ("master". "v1-10-test'" , "v1-10-stable')) so that we can continue testing pushes in our forks for the same branches as in apache/airflow
   


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



[GitHub] [airflow] github-actions[bot] closed pull request #12599: Restrict "build images" workflow to certain branches

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


   


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



[GitHub] [airflow] potiuk edited a comment on pull request #12599: Restrict "build images" workflow to certain branches

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on pull request #12599:
URL: https://github.com/apache/airflow/pull/12599#issuecomment-733755212


   Sorry - been distracted yesterday. 
   
   I looked up the specification https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_run and I think it should be simply limited via "branches" not based on event type relly. The "worklfow_run" can be triggered by:
   
   1) push
   2) pull 
   3) schedule 
   
   From the docs, it seems that this can be achieved by simply adding  "branches" without specifying the event that triggers it. We are already limited to those three triggering events because the depending "workflow" only runs on PR/Push/Schedule:: 
   
   ```
   on:
     workflow_run:
       workflows: ["Run Tests"]
       branches: [main]
       types: 
         - completed
         - requested
   
   ```
   
   But I think it should be tested. The best way (and the way I tested it ) was to push it to my own fork and test it 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.

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



[GitHub] [airflow] kaxil commented on pull request #12599: Restrict "build images" workflow to certain branches

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


   > And I believe it should. Otherwise images will not build for any PRs that someone runs on their own branch. Is there any problem with that?
   
   Updated in https://github.com/apache/airflow/pull/12599/commits/ef121f84497c0bf4b523df7b45c40227267583d2 to only run it on pull_request.
   
   The problem currently is that this build is trying to run on all branches where we don't expect users to create PRs too


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



[GitHub] [airflow] potiuk commented on pull request #12599: Restrict "build images" workflow to certain branches

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


   And I believe it should. Otherwise images will not build for any PRs that someone runs on their own branch. Is there any problem with that? 


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



[GitHub] [airflow] potiuk commented on pull request #12599: Restrict "build images" workflow to certain branches

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


   What I usually test it with: 
   
   1) schedule
   2) PR from own repo
   3) PR from fork of your fork
   4) direct push to "master"/"v1-10-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.

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



[GitHub] [airflow] github-actions[bot] commented on pull request #12599: Restrict "build images" workflow to certain branches

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


   [The Workflow run](https://github.com/apache/airflow/actions/runs/382215131) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


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



[GitHub] [airflow] potiuk edited a comment on pull request #12599: Restrict "build images" workflow to certain branches

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on pull request #12599:
URL: https://github.com/apache/airflow/pull/12599#issuecomment-733755212


   Sorry - been distracted yesterday. 
   
   I look up the specification https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_run and I think it should be simply limited via "branches" not based on event type relly. The "worklfow_run" can be triggered by:
   
   1) push
   2) pull 
   3) schedule 
   
   From the docs, it seems that this can be achieved by simply adding  "branches" without specifying the event that triggers it. We are already limited to those three triggering events because the depending "workflow" only runs on PR/Push/Schedule:: 
   
   ```
   on:
     workflow_run:
       workflows: ["Run Tests"]
       branches: [main]
       types: 
         - completed
         - requested
   
   ```
   
   But I think it should be tested. The best way (and the way I tested it ) was to push it to my own fork and test it 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.

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



[GitHub] [airflow] kaxil commented on pull request #12599: Restrict "build images" workflow to certain branches

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


   > What I usually test it with:
   > 
   > 1. schedule
   > 2. PR from own repo
   > 3. PR from fork of your fork
   > 4. direct push to "master"/"v1-10-test"
   
   Yeah I tested the 1st commit: https://github.com/apache/airflow/pull/12599/commits/364544ca788797c626fa716737ebdf6d92f2edb2 with direct pushes to different branches and master/v1-10-test but will further test with PRs on those branches


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



[GitHub] [airflow] potiuk commented on pull request #12599: Restrict "build images" workflow to certain branches

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


   Sorry - been distracted yesterday. 
   
   I look up the specification https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_run and I think it should be simply limited via "branches" not based on event type relly. The "worklfow_run" can be triggered by:
   
   1) push
   2) pull 
   3) schedule 
   
   From the docs, it seems that this can be achieved by simply adding  "branches" without specifying the event that triggers it. We are already limited to those three triggering events because the depending "workflow" only runs on PR/Push/Schedule:: 
   
   ```
   on:
     workflow_run:
       workflows: ["Run Tests"]
       branches: [main]
       types: 
         - completed
         - requested
   
   ```
   
   But I think it should be tested. The best way (and thje way I tested it ) was to push it to my own fork and test it 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.

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



[GitHub] [airflow] github-actions[bot] commented on pull request #12599: Restrict "build images" workflow to certain branches

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


   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.

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



[GitHub] [airflow] kaxil edited a comment on pull request #12599: Restrict "build images" workflow to certain branches

Posted by GitBox <gi...@apache.org>.
kaxil edited a comment on pull request #12599:
URL: https://github.com/apache/airflow/pull/12599#issuecomment-733339132


   > And I believe it should. Otherwise images will not build for any PRs that someone runs on their own branch. Is there any problem with that?
   
   Updated in https://github.com/apache/airflow/pull/12599/commits/ef121f84497c0bf4b523df7b45c40227267583d2 to only run it on pull_request.
   
   The problem currently is that this build is trying to run on all branches where we don't expect users to create PRs too and it is running on `pushes` on branch too


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



[GitHub] [airflow] kaxil commented on pull request #12599: Restrict "build images" workflow to certain branches

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


   
   > I think it should be "if" check on (event_type=="push" and "branch" not in ("master". "v1-10-test'" , "v1-10-stable')) so that we can continue testing pushes in our forks for the same branches as in apache/airflow
   
   You mean "if" check on (event_type=="push" and "branch" ~not~ in ("master". "v1-10-test'" , "v1-10-stable'))
   
   right? I pushed https://github.com/apache/airflow/pull/12599/commits/ec5219b05c3d15be5920b79799c1b02970bb2dd3 ,  can you verify if that is what you meant?


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



[GitHub] [airflow] kaxil closed pull request #12599: Restrict "build images" workflow to certain branches

Posted by GitBox <gi...@apache.org>.
kaxil closed pull request #12599:
URL: https://github.com/apache/airflow/pull/12599


   


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