Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented 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.

^ 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 fix-constraint-generation-failing branch from eae7e67 to 7c1a17f Compare December 11, 2023 14:25
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 potiuk force-pushed the fix-constraint-generation-failing branch from 7c1a17f to 4c3a0b4 Compare December 11, 2023 14:49
@potiuk potiuk marked this pull request as ready for review December 11, 2023 14:49
@potiuk potiuk changed the title Fix constraints generation in main Fix constraints generation when there are no differences Dec 11, 2023
console.print("[green]No changes in constraints files. exiting")
config_params.current_constraints_file.unlink(missing_ok=True)
sys.exit(0)
config_params.constraints_diff_file.unlink(missing_ok=True)
Copy link
Member Author

Choose a reason for hiding this comment

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

This was the error. Wrong file was removed :(

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.

Generally looks good 👍

@potiuk
Copy link
Member Author

potiuk commented Dec 11, 2023

All works now :)

Screenshot 2023-12-11 at 16 10 57

@potiuk potiuk merged commit 20a7f92 into apache:main Dec 11, 2023
@potiuk potiuk deleted the fix-constraint-generation-failing branch December 11, 2023 15:11
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
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