Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented May 8, 2022

Previously we generated output of all the commands from Breeze always,
hoping that they will be the same, but rich already had two changes
in the format of the SVG files which made the output different and
breaking our PRs.

Temporarily we pinned rich to fix the output, but better solution is
to get the hash of all the configuration options and see if it changed,
and only run generation when it did. This way we keep automated
generation on pre-commit but we are protected from accidental change
of the output.

We also remove the rich limitations.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 newsfragement file, named {pr_number}.significant.rst, in newsfragments.

@potiuk potiuk requested review from dstandish and eladkal May 8, 2022 15:12
@potiuk potiuk force-pushed the only-generate-images-when-any-command-changes branch 2 times, most recently from 52ddecd to bd369f2 Compare May 8, 2022 19:08
@potiuk
Copy link
Member Author

potiuk commented May 8, 2022

Also - as a side effect - we have much nicer and cleaner SVG output of the breeze commands with Rich 12.4.0:

Screenshot 2022-05-08 at 21 10 21

@potiuk potiuk force-pushed the only-generate-images-when-any-command-changes branch from bd369f2 to bae707c Compare May 8, 2022 19:43
@potiuk potiuk marked this pull request as draft May 8, 2022 20:17
@potiuk potiuk force-pushed the only-generate-images-when-any-command-changes branch 3 times, most recently from d9b96cc to f0f6d7a Compare May 9, 2022 00:56
@potiuk potiuk marked this pull request as ready for review May 9, 2022 07:56
@potiuk potiuk force-pushed the only-generate-images-when-any-command-changes branch from f0f6d7a to 42a97f0 Compare May 9, 2022 07:56
@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label May 9, 2022
@github-actions
Copy link

github-actions bot commented May 9, 2022

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

Previously we generated output of all the commands from Breeze always,
hoping that they will be the same, but rich already had two changes
in the format of the SVG files which made the output different and
breaking our PRs.

Temporarily we pinned rich to fix the output, but better solution is
to get the hash of all the configuration options and see if it changed,
and only run generation when it did. This way we keep automated
generation on pre-commit but we are protected from accidental change
of the output.

We also remove the rich limits and regenerated all svg files to ones
generated by 12.4.0. Also found a way to run the check if we should
run generation at all in pre-commit without prior installing breeze.

Fixes: apache#22908
@potiuk potiuk force-pushed the only-generate-images-when-any-command-changes branch from 42a97f0 to 80d6e41 Compare May 9, 2022 09:07
@potiuk
Copy link
Member Author

potiuk commented May 9, 2022

Jsut random test refused to start.

@potiuk
Copy link
Member Author

potiuk commented May 9, 2022

Merging.

@potiuk potiuk merged commit 7c7b001 into apache:main May 9, 2022
@potiuk potiuk deleted the only-generate-images-when-any-command-changes branch May 9, 2022 09:59
potiuk added a commit that referenced this pull request May 12, 2022
…23570)

Previously we generated output of all the commands from Breeze always,
hoping that they will be the same, but rich already had two changes
in the format of the SVG files which made the output different and
breaking our PRs.

Temporarily we pinned rich to fix the output, but better solution is
to get the hash of all the configuration options and see if it changed,
and only run generation when it did. This way we keep automated
generation on pre-commit but we are protected from accidental change
of the output.

We also remove the rich limits and regenerated all svg files to ones
generated by 12.4.0. Also found a way to run the check if we should
run generation at all in pre-commit without prior installing breeze.

Fixes: #22908
(cherry picked from commit 7c7b001)
@ephraimbuddy ephraimbuddy added this to the Airflow 2.3.1 milestone May 19, 2022
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label May 19, 2022
ephraimbuddy pushed a commit that referenced this pull request May 21, 2022
…23570)

Previously we generated output of all the commands from Breeze always,
hoping that they will be the same, but rich already had two changes
in the format of the SVG files which made the output different and
breaking our PRs.

Temporarily we pinned rich to fix the output, but better solution is
to get the hash of all the configuration options and see if it changed,
and only run generation when it did. This way we keep automated
generation on pre-commit but we are protected from accidental change
of the output.

We also remove the rich limits and regenerated all svg files to ones
generated by 12.4.0. Also found a way to run the check if we should
run generation at all in pre-commit without prior installing breeze.

Fixes: #22908
(cherry picked from commit 7c7b001)
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..) full tests needed We need to run full set of tests for this PR to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants