Skip to content

Extract tests to composite actions - #27371

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:extract-tests-to-composite-actions
Oct 30, 2022
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:extract-tests-to-composite-actions

Conversation

@potiuk

@potiuk potiuk commented Oct 29, 2022

Copy link
Copy Markdown
Member

Extract tests to composite actions in CI

This change is a follow-up after #27369 - it extracts test steps to
a composite action.


^ 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.rst or {issue_number}.significant.rst, in newsfragments.

@potiuk

potiuk commented Oct 29, 2022 •

Copy link
Copy Markdown
Member Author

Should be merged after #27369 and #27368 -> so only last commit counts.

But this one makes extracts common "test" steps into composite action. Another round of -150 lines of yml.

@potiuk
potiuk force-pushed the extract-tests-to-composite-actions branch 2 times, most recently from 07be44f to 726efb5 Compare October 30, 2022 00:46
@potiuk
potiuk force-pushed the extract-tests-to-composite-actions branch from 726efb5 to a300133 Compare October 30, 2022 00:56
@potiuk
potiuk force-pushed the extract-tests-to-composite-actions branch from a300133 to c6371e7 Compare October 30, 2022 01:44
@potiuk
potiuk force-pushed the extract-tests-to-composite-actions branch from c6371e7 to 1096a92 Compare October 30, 2022 02:15
@potiuk
potiuk force-pushed the extract-tests-to-composite-actions branch from 1096a92 to 4af36fc Compare October 30, 2022 02:54
@potiuk
potiuk force-pushed the extract-tests-to-composite-actions branch from 4af36fc to 99ee99e Compare October 30, 2022 02:57
@potiuk
potiuk force-pushed the extract-tests-to-composite-actions branch from 99ee99e to 1bad081 Compare October 30, 2022 08:39
@potiuk
potiuk force-pushed the extract-tests-to-composite-actions branch 3 times, most recently from fd5e08e to 22b22d8 Compare October 30, 2022 10:14
@potiuk
potiuk force-pushed the extract-tests-to-composite-actions branch 7 times, most recently from b24eec6 to 2748e4b Compare October 30, 2022 16:17
@potiuk potiuk removed the full tests needed We need to run full set of tests for this PR to merge label Oct 30, 2022
@potiuk
potiuk force-pushed the extract-tests-to-composite-actions branch 2 times, most recently from 9428016 to 2c151c4 Compare October 30, 2022 16:42
This change is a follow-up after apache#27369 - it extracts test steps to
a composite action.
@potiuk
potiuk force-pushed the extract-tests-to-composite-actions branch from 2c151c4 to 4fbfa5b Compare October 30, 2022 17:46
@potiuk

potiuk commented Oct 30, 2022

Copy link
Copy Markdown
Member Author

I think this one is ready to go. It has test execution extracted to a separate composite actiions and overall the ci.yml is way simpler and straightforward with - a lot less code duplication.

@potiuk

potiuk commented Oct 30, 2022 •

Copy link
Copy Markdown
Member Author

Also - I run a build in my own fork -running PR from 2nd fork :) to see that it works fine also in this scenario: https://github.com/potiuk/airflow/actions/runs/3356444919/jobs/5561698534

I also reviewed and corrected couple of places where output was not as good any more after extraction to composite actions (one of the drawbacks of composite actions is that they all run in one step in CI and I had to modify some of the output to be actually usable when there are arrors - only surfacing important information.

@potiuk
potiuk merged commit 9c33ed3 into apache:main Oct 30, 2022
@potiuk
potiuk deleted the extract-tests-to-composite-actions branch October 30, 2022 19:11
potiuk added a commit to potiuk/airflow that referenced this pull request Oct 30, 2022
potiuk added a commit that referenced this pull request Oct 30, 2022
potiuk added a commit to potiuk/airflow that referenced this pull request Dec 9, 2022
When we separated actions into composite workflows in apache#27369 and
the apache#27371 we missed the fact that there was a step passing the
host python version to static checks - to make sure we start with
a fresh cache every time new python version is changed (this
caused problems in the past)

The "host-python-version" was therefore empty and not really used
in the cache key determining.

This has no bad effect when Python version does not change but
when there is an upgrade of Python, the symbolic links in stored
cache get broken, and next time new Python version is used in
the AMIs, we might get them broken, so better to fix it now.
potiuk added a commit that referenced this pull request Dec 10, 2022
When we separated actions into composite workflows in #27369 and
the #27371 we missed the fact that there was a step passing the
host python version to static checks - to make sure we start with
a fresh cache every time new python version is changed (this
caused problems in the past)

The "host-python-version" was therefore empty and not really used
in the cache key determining.

This has no bad effect when Python version does not change but
when there is an upgrade of Python, the symbolic links in stored
cache get broken, and next time new Python version is used in
the AMIs, we might get them broken, so better to fix it now.
ephraimbuddy pushed a commit that referenced this pull request Jan 12, 2023
When we separated actions into composite workflows in #27369 and
the #27371 we missed the fact that there was a step passing the
host python version to static checks - to make sure we start with
a fresh cache every time new python version is changed (this
caused problems in the past)

The "host-python-version" was therefore empty and not really used
in the cache key determining.

This has no bad effect when Python version does not change but
when there is an upgrade of Python, the symbolic links in stored
cache get broken, and next time new Python version is used in
the AMIs, we might get them broken, so better to fix it now.

(cherry picked from commit 0db5e46)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants