Skip to content

Sort "opts" element in click option dictionary before hashing#45156

Merged
potiuk merged 1 commit intoapache:mainfrom
potiuk:sort-opts-in-click-commands
Dec 22, 2024
Merged

Sort "opts" element in click option dictionary before hashing#45156
potiuk merged 1 commit intoapache:mainfrom
potiuk:sort-opts-in-click-commands

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Dec 22, 2024

Some impleemntation details of click 8.1.8 caused instability in configuration directories that are produced by click config - the instability is in sequence of generated "opts" list - the sequence of options in it is random.

While it can be likely fixed in later versions, better is to protect from it and sort the opts list before hashing the dict.


^ 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.

Some impleemntation details of click 8.1.8 caused instability in
configuration directories that are produced by click config - the
instability is in sequence of generated "opts" list - the sequence
of options in it is random.

While it can be likely fixed in later versions, better is to
protect from it and sort the opts list before hashing the dict.
@potiuk potiuk force-pushed the sort-opts-in-click-commands branch from 521d569 to abd5a64 Compare December 22, 2024 16:56
Copy link
Member

@gopidesupavan gopidesupavan left a comment

Choose a reason for hiding this comment

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

cool :) finally cracked.. thank you for the fix..

Copy link
Contributor

@shubhamraj-git shubhamraj-git left a comment

Choose a reason for hiding this comment

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

Looks good! Must needed fix, thanks!

@potiuk
Copy link
Member Author

potiuk commented Dec 22, 2024

The failing test is intermittent

@potiuk potiuk merged commit 1796c40 into apache:main Dec 22, 2024
@potiuk potiuk deleted the sort-opts-in-click-commands branch December 22, 2024 17:27
@github-actions
Copy link

Backport failed to create: v2-10-test. View the failure log Run details

Status Branch Result
v2-10-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 1796c40 v2-10-test

This should apply the commit to the v2-10-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

@potiuk potiuk mentioned this pull request Dec 22, 2024
potiuk added a commit to potiuk/airflow that referenced this pull request Dec 22, 2024
…shing (apache#45156)

Some impleemntation details of click 8.1.8 caused instability in
configuration directories that are produced by click config - the
instability is in sequence of generated "opts" list - the sequence
of options in it is random.

While it can be likely fixed in later versions, better is to
protect from it and sort the opts list before hashing the dict.
(cherry picked from commit 1796c40)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
potiuk added a commit to potiuk/airflow that referenced this pull request Dec 22, 2024
…shing (apache#45156)

Some impleemntation details of click 8.1.8 caused instability in
configuration directories that are produced by click config - the
instability is in sequence of generated "opts" list - the sequence
of options in it is random.

While it can be likely fixed in later versions, better is to
protect from it and sort the opts list before hashing the dict.
(cherry picked from commit 1796c40)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
potiuk added a commit that referenced this pull request Dec 22, 2024
…shing (#45156) (#45161)

Some impleemntation details of click 8.1.8 caused instability in
configuration directories that are produced by click config - the
instability is in sequence of generated "opts" list - the sequence
of options in it is random.

While it can be likely fixed in later versions, better is to
protect from it and sort the opts list before hashing the dict.
(cherry picked from commit 1796c40)
potiuk added a commit to potiuk/airflow that referenced this pull request Dec 22, 2024
…#45156)

Some impleemntation details of click 8.1.8 caused instability in
configuration directories that are produced by click config - the
instability is in sequence of generated "opts" list - the sequence
of options in it is random.

While it can be likely fixed in later versions, better is to
protect from it and sort the opts list before hashing the dict.

(cherry picked from commit 1796c40)
potiuk added a commit that referenced this pull request Dec 22, 2024
#45169)

Some impleemntation details of click 8.1.8 caused instability in
configuration directories that are produced by click config - the
instability is in sequence of generated "opts" list - the sequence
of options in it is random.

While it can be likely fixed in later versions, better is to
protect from it and sort the opts list before hashing the dict.

(cherry picked from commit 1796c40)
potiuk added a commit to potiuk/airflow that referenced this pull request Dec 23, 2024
Click introduced breaking change for breeze opts behaviour
fixed in apache#45156 however it did not force breeze image to upgrade
click to newer version and it could have caused out-dated
images to use older click version even if the image has been
rebuilt.

This PR also updates click version in the breeze image.
potiuk added a commit that referenced this pull request Dec 23, 2024
Click introduced breaking change for breeze opts behaviour
fixed in #45156 however it did not force breeze image to upgrade
click to newer version and it could have caused out-dated
images to use older click version even if the image has been
rebuilt.

This PR also updates click version in the breeze image.
github-actions bot pushed a commit that referenced this pull request Dec 23, 2024
…5177)

Click introduced breaking change for breeze opts behaviour
fixed in #45156 however it did not force breeze image to upgrade
click to newer version and it could have caused out-dated
images to use older click version even if the image has been
rebuilt.

This PR also updates click version in the breeze image.
(cherry picked from commit a2b18d8)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
potiuk added a commit that referenced this pull request Jan 11, 2025
…5177)

Click introduced breaking change for breeze opts behaviour
fixed in #45156 however it did not force breeze image to upgrade
click to newer version and it could have caused out-dated
images to use older click version even if the image has been
rebuilt.

This PR also updates click version in the breeze image.
(cherry picked from commit a2b18d8)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
got686-yandex pushed a commit to got686-yandex/airflow that referenced this pull request Jan 30, 2025
…#45156)

Some impleemntation details of click 8.1.8 caused instability in
configuration directories that are produced by click config - the
instability is in sequence of generated "opts" list - the sequence
of options in it is random.

While it can be likely fixed in later versions, better is to
protect from it and sort the opts list before hashing the dict.
got686-yandex pushed a commit to got686-yandex/airflow that referenced this pull request Jan 30, 2025
Click introduced breaking change for breeze opts behaviour
fixed in apache#45156 however it did not force breeze image to upgrade
click to newer version and it could have caused out-dated
images to use older click version even if the image has been
rebuilt.

This PR also updates click version in the breeze image.
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.

5 participants