Restore "iffy" solution for skipping tasks for in-workflow build#38077
Merged
potiuk merged 1 commit intoapache:mainfrom Mar 12, 2024
Merged
Conversation
potiuk
commented
Mar 12, 2024
aritra24
approved these changes
Mar 12, 2024
Collaborator
aritra24
left a comment
There was a problem hiding this comment.
Hmm, quite interesting 🤔. Looks good to me
8f242db to
b50ea27
Compare
Member
Author
Indeed. I thought I found a clever way to workaround the limitation, but I was wrong. |
Member
Author
|
I added a nicer indication now - when we build and when skip in-workflow builds. |
GitHub actions has strange and complex way of getting conditional jobs. When you want a job to depend on another job to be running when it is either successful of fully skipped, you have to write a rather peculiar condition: ``` always() && !failure() && !cancelled() ``` However, it turned out that this condition does not propoagate to to task that depends on the downstream tasks - for example if "wait-for-ci-images" had this condition and preceding "build-ci-images" was skipped, the "wait-for-ci-images" was happily running, but any of the other jobs that depended on "wait-for-ci-images" has been skipped :(. Simply - skipping tasks immediately propagates to all the downstream tasks and we cannot easily mitigate it. This means that we have to come back to a solution that was implemented before apache#38057 - where instead of skipping the whole job, we skip all the steps in this kob. That makes it a little more clunky but makes the skipping status not propagate to downstream jobs.
b50ea27 to
d03ad4d
Compare
Taragolis
approved these changes
Mar 12, 2024
Member
Author
|
Uff :) |
drajguru
pushed a commit
to drajguru/airflow
that referenced
this pull request
Mar 14, 2024
…che#38077) GitHub actions has strange and complex way of getting conditional jobs. When you want a job to depend on another job to be running when it is either successful of fully skipped, you have to write a rather peculiar condition: ``` always() && !failure() && !cancelled() ``` However, it turned out that this condition does not propoagate to to task that depends on the downstream tasks - for example if "wait-for-ci-images" had this condition and preceding "build-ci-images" was skipped, the "wait-for-ci-images" was happily running, but any of the other jobs that depended on "wait-for-ci-images" has been skipped :(. Simply - skipping tasks immediately propagates to all the downstream tasks and we cannot easily mitigate it. This means that we have to come back to a solution that was implemented before apache#38057 - where instead of skipping the whole job, we skip all the steps in this kob. That makes it a little more clunky but makes the skipping status not propagate to downstream jobs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub actions has strange and complex way of getting conditional jobs. When you want a job to depend on another job to be running when it is either successful of fully skipped, you have to write a rather peculiar condition:
However, it turned out that this condition does not propoagate to to task that depends on the downstream tasks - for example if "wait-for-ci-images" had this condition and preceding "build-ci-images" was skipped, the "wait-for-ci-images" was happily running, but any of the other jobs that depended on "wait-for-ci-images" has been skipped :(. Simply - skipping tasks immediately propagates to all the downstream tasks and we cannot easily mitigate it.
This means that we have to come back to a solution that was implemented before #38057 - where instead of skipping the whole job, we skip all the steps in this kob. That makes it a little more clunky but makes the skipping status not propagate to downstream jobs.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.