-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cargo: use the correct path when checking installation status fixing idempotency issue. #7970
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! Can you please add a changelog fragment? Thanks!
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Felix Fontein <felix@fontein.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If nobody objects, I'll merge this on the weekend.
Backport to stable-7: 💚 backport PR created✅ Backport PR branch: Backported as #8018 🤖 @patchback |
…idempotency issue. (#7970) * cargo: use the correct path when checking installation status * Add changelog fragment * Update changelogs/fragments/7970-fix-cargo-path-idempotency.yaml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 9510988)
Backport to stable-8: 💚 backport PR created✅ Backport PR branch: Backported as #8019 🤖 @patchback |
@rbomze thanks for your contribution! |
…idempotency issue. (#7970) * cargo: use the correct path when checking installation status * Add changelog fragment * Update changelogs/fragments/7970-fix-cargo-path-idempotency.yaml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 9510988)
…en checking installation status fixing idempotency issue. (#8018) cargo: use the correct path when checking installation status fixing idempotency issue. (#7970) * cargo: use the correct path when checking installation status * Add changelog fragment * Update changelogs/fragments/7970-fix-cargo-path-idempotency.yaml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 9510988) Co-authored-by: rbomze <14312790+rbomze@users.noreply.github.com>
…en checking installation status fixing idempotency issue. (#8019) cargo: use the correct path when checking installation status fixing idempotency issue. (#7970) * cargo: use the correct path when checking installation status * Add changelog fragment * Update changelogs/fragments/7970-fix-cargo-path-idempotency.yaml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 9510988) Co-authored-by: rbomze <14312790+rbomze@users.noreply.github.com>
Although it were just 3 lines of code it was an honor to contribute to this great project. |
…idempotency issue. (ansible-collections#7970) * cargo: use the correct path when checking installation status * Add changelog fragment * Update changelogs/fragments/7970-fix-cargo-path-idempotency.yaml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
SUMMARY
There is a problem when using the optional 'path' parameter. The initial installation works fine, but when running the module again the get_installed function, which is supposed to check the installation state does not use the parameter, thus a new installation is attempted, this again is registered by cargo install itself, but leads to a false 'changed' status, breaking ansibles' idempotency.
A similar problem occurs when removing packages.
This fix makes the get_installed function aware of the optional 'path' parameter.
ISSUE TYPE
COMPONENT NAME
cargo