Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Dec 10, 2023

Historically constraints generation (like most in-container scripts)
were written in Bash. But since then we rewrote all of the scripts
that had some logic to Python - generating constraints was the last
one to rewrite (all the other scripts are simple and probably makes
sense to keep them in Bash.

The scripts have a bit improved diagnostics and output now.

Fixes: #26019


^ 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 force-pushed the rewrite-generate-constraints-in-python branch from c8f3e7d to c85da98 Compare December 10, 2023 21:21
@potiuk potiuk force-pushed the rewrite-generate-constraints-in-python branch 3 times, most recently from 12a3908 to 46d7fad Compare December 10, 2023 22:34
@potiuk potiuk force-pushed the rewrite-generate-constraints-in-python branch 3 times, most recently from adc72ba to 5b115da Compare December 10, 2023 23:56
Historically constraints generation (like most in-container scripts)
were written in Bash. But since then we rewrote all of the scripts
that had some logic to Python - generating constraints was the last
one to rewrite (all the other scripts are simple and probably makes
sense to keep them in Bash.

The scripts have a bit improved diagnostics and output now.

Fixes: #26019
@potiuk potiuk force-pushed the rewrite-generate-constraints-in-python branch from 5b115da to 501bd4e Compare December 10, 2023 23:59
@potiuk potiuk merged commit f39cdcc into main Dec 11, 2023
potiuk added a commit to potiuk/airflow that referenced this pull request Dec 11, 2023
The new constraints generation implemented in apache#36158 had a bug that
constraint files have not been generated when there was no changes
(wrong file has been deleted). This resulted in PROD files generation
failing when there were no new releases to one of 670 dependencies.

This PR fixes it and improves the diagnostics of comstraints
generation:

* more information printed about generated files
* using shorten method wnen running commands (will add ellipsis if
  longer)
* failing when there are not constraints to upload - indicating
  a bug in the processs of constraints generation rather than when
  downloaded constraints are missing.
potiuk added a commit that referenced this pull request Dec 11, 2023
The new constraints generation implemented in #36158 had a bug that
constraint files have not been generated when there was no changes
(wrong file has been deleted). This resulted in PROD files generation
failing when there were no new releases to one of 670 dependencies.

This PR fixes it and improves the diagnostics of comstraints
generation:

* more information printed about generated files
* using shorten method wnen running commands (will add ellipsis if
  longer)
* failing when there are not constraints to upload - indicating
  a bug in the processs of constraints generation rather than when
  downloaded constraints are missing.
potiuk added a commit that referenced this pull request Dec 15, 2023
Historically constraints generation (like most in-container scripts)
were written in Bash. But since then we rewrote all of the scripts
that had some logic to Python - generating constraints was the last
one to rewrite (all the other scripts are simple and probably makes
sense to keep them in Bash.

The scripts have a bit improved diagnostics and output now.

Fixes: #26019
(cherry picked from commit f39cdcc)
potiuk added a commit that referenced this pull request Dec 15, 2023
The new constraints generation implemented in #36158 had a bug that
constraint files have not been generated when there was no changes
(wrong file has been deleted). This resulted in PROD files generation
failing when there were no new releases to one of 670 dependencies.

This PR fixes it and improves the diagnostics of comstraints
generation:

* more information printed about generated files
* using shorten method wnen running commands (will add ellipsis if
  longer)
* failing when there are not constraints to upload - indicating
  a bug in the processs of constraints generation rather than when
  downloaded constraints are missing.

(cherry picked from commit 20a7f92)
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Dec 15, 2023
@Taragolis Taragolis deleted the rewrite-generate-constraints-in-python branch December 27, 2023 10:33
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.

Rewrite the in-container scripts in Python

4 participants