Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Oct 17, 2023

We generate constraints for preview right after images are build, in order to be able to see the output and to diagnose which dependencies have been updated later in the process.

So far we were doing it in CI workflow and When constraints generation failed however (for example because pip backtracking takes a log ot time), it faied build image workflow and did not allow tests to complete.

This PR extracts constraint generation to CI separate job which does not block tests from running in case constraints generation fails or times out.

It also moves out the steps from the composite action which allows to better see which step failed and allows to see the constraints used in each job more easily.


^ 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
Copy link
Member Author

potiuk commented Oct 17, 2023

This one should prevent the case we had few days ago - which prevented tests from running few days ago (workarounded by #34918).

After new providers have been released today by @eladkal, PyPI constraints generation has a chance to succeed today - the "preview-constraints" job in this PR will be green if it does, then i will also restore the actual constraints generation in the final step.

@potiuk potiuk force-pushed the move-early-constrints-generation-to-separate-steps branch 2 times, most recently from ed8282f to c158122 Compare October 17, 2023 11:45
Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1

@potiuk
Copy link
Member Author

potiuk commented Oct 17, 2023

Yes. It looks like releasing the new providers unblocked pypi constraints generation. So I will uncomment the actual constraints generation at the end and re-push

@potiuk potiuk force-pushed the move-early-constrints-generation-to-separate-steps branch 2 times, most recently from 8f8a9b6 to f35c9b3 Compare October 17, 2023 15:51
@potiuk
Copy link
Member Author

potiuk commented Oct 17, 2023

Yes. It looks like releasing the new providers unblocked pypi constraints generation. So I will uncomment the actual constraints generation at the end and re-push

Well. Not really - I need to look further :(

@potiuk potiuk force-pushed the move-early-constrints-generation-to-separate-steps branch 2 times, most recently from 49c8cda to 25b7ad6 Compare October 17, 2023 18:56
We generate constraints for preview right after images are build, in
order to be able to see the output and to diagnose which dependencies
have been updated later in the process.

So far we were doing it in CI workflow and When constraints generation
failed however (for example because pip backtracking takes a log ot
time), it faied build image workflow and did not allow tests to
complete.

This PR extracts constraint generation to CI separate job which
does not block tests from running in case constraints generation
fails or times out.

It also moves out the steps from the composite action which allows
to better see which step failed and allows to see the constraints
used in each job more easily.
@potiuk potiuk force-pushed the move-early-constrints-generation-to-separate-steps branch from 25b7ad6 to d68f6cb Compare October 17, 2023 20:11
@potiuk
Copy link
Member Author

potiuk commented Oct 17, 2023

Seems I got it fixed. For whatever reason pip goes into backtracking loop on Python 3.11 triggered by grpcio-status dependency coming from some extra, and setting grpcio-status > 1.55 seems to "cures" it.

Not obvious at all, but at least the outputs we get when similart things happen in the future should be more readable and it should not block the PRs.

@potiuk potiuk merged commit a450b81 into main Oct 17, 2023
potiuk added a commit to potiuk/airflow that referenced this pull request Oct 18, 2023
The PROD image uses source constraints to get built. The apache#34990
had moved the constraint generation to CI workflow which works
for main builds, but for regular PRs we also need to upload them
in the build-image workflow - otherwise PROD image build cannot
find them as artifacts.

This PR restores only source constraints upload as artifacts (this
is very fast)
potiuk added a commit to potiuk/airflow that referenced this pull request Oct 18, 2023
…#35004)

The PROD image uses source constraints to get built. The apache#34990
had moved the constraint generation to CI workflow which works
for main builds, but for regular PRs we also need to upload them
in the build-image workflow - otherwise PROD image build cannot
find them as artifacts.

This PR restores only source constraints upload as artifacts (this
is very fast)
@ephraimbuddy ephraimbuddy added this to the Airflow 2.7.3 milestone Oct 27, 2023
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Oct 27, 2023
potiuk added a commit that referenced this pull request Oct 29, 2023
We generate constraints for preview right after images are build, in
order to be able to see the output and to diagnose which dependencies
have been updated later in the process.

So far we were doing it in CI workflow and When constraints generation
failed however (for example because pip backtracking takes a log ot
time), it faied build image workflow and did not allow tests to
complete.

This PR extracts constraint generation to CI separate job which
does not block tests from running in case constraints generation
fails or times out.

It also moves out the steps from the composite action which allows
to better see which step failed and allows to see the constraints
used in each job more easily.

(cherry picked from commit a450b81)
potiuk added a commit that referenced this pull request Oct 29, 2023
The PROD image uses source constraints to get built. The #34990
had moved the constraint generation to CI workflow which works
for main builds, but for regular PRs we also need to upload them
in the build-image workflow - otherwise PROD image build cannot
find them as artifacts.

This PR restores only source constraints upload as artifacts (this
is very fast)

(cherry picked from commit 40b9d2b)
@potiuk potiuk deleted the move-early-constrints-generation-to-separate-steps branch November 17, 2023 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants