Skip to content

Extract breeze setup to composite action - #27369

Merged
potiuk merged 1 commit into
mainfrom
extract-breeze-setup-to-composite-action
Oct 30, 2022
Merged

potiuk merged 1 commit into
mainfrom
extract-breeze-setup-to-composite-action

Conversation

@potiuk

@potiuk potiuk commented Oct 29, 2022 •

Copy link
Copy Markdown
Member

We've been long waiting for an opportunity to simplify our
workflows by extracting some steps of the workflow and waiting
for something like yaml anchor supoprt... But the solution was
under our noses for quite some time.

No idea how I missed that - since August 2021 we should be
able to use composite actions to simplify our GitHub Actions.

The only explanation I have is that I have not connected two
facts:

  • you can have composite actions defined as separate workflows you
    can use as step in your Job

  • the documentation for composite actions does not mention the
    case that your action can be INSIDE your repository. All the
    examples refer to an action defined in ANOTHER repository.
    That made it confusing to understand that you can actually do
    it all as an action inside your repo.

Let me rectify the mistake and extract some of the common yaml
entries one-by-one - first is Installing Breeze which is pretty
common and most of the jobs use it.

This one will be followed up with some other jobs simplified in
the same matter.


^ 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

I've - finally - found out that our workflows can be simplified by extracting common steps to "composite-actions" embedded in our repository. Better late than never - but it's a 🤦 that I have not seen it this can be done before.

This PR is based on #27368 - so that one should be merged first (and you can look only at the last PR).

More of those to follow - this one is -200 lines of yaml but I guess we can have -300/400 if we apply it to other parts :)

@potiuk

potiuk commented Oct 29, 2022

Copy link
Copy Markdown
Member Author

This one will also have the side effect that breeze will be installed much faster for every step - I've added caching step (now that Breeze installation is in one place only it was way easier)

@potiuk
potiuk force-pushed the extract-breeze-setup-to-composite-action branch from c69f7ea to 8c99fe8 Compare October 30, 2022 01:43
@potiuk
potiuk force-pushed the extract-breeze-setup-to-composite-action branch from 8c99fe8 to 436d549 Compare October 30, 2022 02:14
We've been long waiting for an opportunity to simplify our
workflows by extracting some steps of the workflow and waiting
for something like yaml anchor supoprt... But the solution was
under our noses for quite some time.

No idea how I missed that - since August 2021 we should be
able to use composite actions to simplify our GitHub Actions.

The only explanation I have is that I have not connected two
facts:

* you can have composite actions defined as separate workflows you
  can use as step in your Job

* the documentation for composite actions does not mention the
  case that your action can be INSIDE your repository. All the
  examples refer to an action defined in ANOTHER repository.
  That made it confusing to understand that you can actually do
  it all as an action inside your repo.

Let me rectify the mistake and extract some of the common yaml
entries one-by-one - first is Installing Breeze which is pretty
common and most of the jobs use it.

This one will be followed up with some other jobs simplified in
the same matter.
@potiuk
potiuk force-pushed the extract-breeze-setup-to-composite-action branch from 436d549 to 4d6be32 Compare October 30, 2022 02:57
@potiuk
potiuk merged commit 42a94fb into main Oct 30, 2022
potiuk added a commit to potiuk/airflow that referenced this pull request Oct 30, 2022
This change is a follow-up after apache#27369 - it extracts test steps to
a composite action.
potiuk added a commit to potiuk/airflow that referenced this pull request Oct 30, 2022
This change is a follow-up after apache#27369 - it extracts test steps to
a composite action.
potiuk added a commit to potiuk/airflow that referenced this pull request Oct 30, 2022
This change is a follow-up after apache#27369 - it extracts test steps to
a composite action.
potiuk added a commit to potiuk/airflow that referenced this pull request Oct 30, 2022
This change is a follow-up after apache#27369 - it extracts test steps to
a composite action.
potiuk added a commit that referenced this pull request Oct 30, 2022
This change is a follow-up after #27369 - it extracts test steps to
a composite action.
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)
@potiuk
potiuk deleted the extract-breeze-setup-to-composite-action branch May 6, 2023 10:19
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