-
Notifications
You must be signed in to change notification settings - Fork 37
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
sequencer: only load project vars in adopting part (#509) #516
Merged
cmatsuoka
merged 1 commit into
canonical:hotfix/1.23.1
from
cmatsuoka:1.23.1/project-vars-restricted-to-part
Aug 15, 2023
Merged
sequencer: only load project vars in adopting part (#509) #516
cmatsuoka
merged 1 commit into
canonical:hotfix/1.23.1
from
cmatsuoka:1.23.1/project-vars-restricted-to-part
Aug 15, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tigarmo
approved these changes
Aug 9, 2023
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.
This is just a cherry-pick right? LGTM
lengau
approved these changes
Aug 10, 2023
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.
cmatsuoka
force-pushed
the
1.23.1/project-vars-restricted-to-part
branch
from
August 14, 2023 13:39
b2c7a7a
to
d49cc77
Compare
Rebased on top of hotfix/1.23.1 |
Project variables exist only in the part scope and should be ignored in other parts' states. In the existing implementation these values are persisted in each part, which leads to double assignment errors when a step is executed for parts in a order that's different from the previous execution (see example in LP #1831135). There are different ways to address this issue, the current fix tries to be minimally disruptive by just ignoring persisted values when reloading the state. We can refactor this code later to have a cleaner implementation. Signed-off-by: Claudio Matsuoka <[email protected]>
cmatsuoka
force-pushed
the
1.23.1/project-vars-restricted-to-part
branch
from
August 15, 2023 12:33
d49cc77
to
bc59225
Compare
syu-w
referenced
this pull request
in canonical/charmcraft
Sep 15, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [craft-cli](https://togithub.com/canonical/craft-cli) | `==2.0.1` -> `==2.1.0` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/craft-cli/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/craft-cli/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/craft-cli/2.0.1/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/craft-cli/2.0.1/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [craft-parts](https://togithub.com/canonical/craft-parts) | `==1.23.0` -> `==1.24.1` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/craft-parts/1.24.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/craft-parts/1.24.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/craft-parts/1.23.0/1.24.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/craft-parts/1.23.0/1.24.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [snap-helpers](https://togithub.com/albertodonato/snap-helpers) ([changelog](https://togithub.com/albertodonato/snap-helpers/blob/main/CHANGES.rst)) | `==0.4.0` -> `==0.4.2` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/snap-helpers/0.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/snap-helpers/0.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/snap-helpers/0.4.0/0.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/snap-helpers/0.4.0/0.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>canonical/craft-cli (craft-cli)</summary> ### [`v2.1.0`](https://togithub.com/canonical/craft-cli/releases/tag/2.1.0) [Compare Source](https://togithub.com/canonical/craft-cli/compare/2.0.1...2.1.0) Special thanks to the contributors that made this release happen: [@​lengau](https://togithub.com/lengau) and [@​tigarmo](https://togithub.com/tigarmo) ##### Full list of changes - tests: move test module from unit/ to integration/ [@​tigarmo](https://togithub.com/tigarmo) ([#​167](https://togithub.com/canonical/craft-cli/issues/167)) - ci: fix renovate schedule [@​lengau](https://togithub.com/lengau) ([#​168](https://togithub.com/canonical/craft-cli/issues/168)) - emitter: add "streaming brief" feature [@​tigarmo](https://togithub.com/tigarmo) ([#​166](https://togithub.com/canonical/craft-cli/issues/166)) </details> <details> <summary>canonical/craft-parts (craft-parts)</summary> ### [`v1.24.1`](https://togithub.com/canonical/craft-parts/compare/1.24.0...1.24.1) [Compare Source](https://togithub.com/canonical/craft-parts/compare/1.24.0...1.24.1) ### [`v1.24.0`](https://togithub.com/canonical/craft-parts/releases/tag/1.24.0) [Compare Source](https://togithub.com/canonical/craft-parts/compare/1.23.1...1.24.0) ##### What's Changed - Release 1.19.6 by [@​cmatsuoka](https://togithub.com/cmatsuoka) in [https://github.com/canonical/craft-parts/pull/473](https://togithub.com/canonical/craft-parts/pull/473) - partitions: add feature and validation by [@​mr-cal](https://togithub.com/mr-cal) in [https://github.com/canonical/craft-parts/pull/489](https://togithub.com/canonical/craft-parts/pull/489) - tests: add jammy packages to stage package apt cache by [@​mr-cal](https://togithub.com/mr-cal) in [https://github.com/canonical/craft-parts/pull/494](https://togithub.com/canonical/craft-parts/pull/494) - partitions: validate usage of partitions in parts by [@​mr-cal](https://togithub.com/mr-cal) in [https://github.com/canonical/craft-parts/pull/493](https://togithub.com/canonical/craft-parts/pull/493) - deps: freeze pydantic-yaml <1.0.0 by [@​lengau](https://togithub.com/lengau) in [https://github.com/canonical/craft-parts/pull/498](https://togithub.com/canonical/craft-parts/pull/498) - docs: update Sphinx theme by [@​dboddie](https://togithub.com/dboddie) in [https://github.com/canonical/craft-parts/pull/501](https://togithub.com/canonical/craft-parts/pull/501) - docs: fix product page URL by [@​dboddie](https://togithub.com/dboddie) in [https://github.com/canonical/craft-parts/pull/506](https://togithub.com/canonical/craft-parts/pull/506) - deps: freeze pydantic version by [@​lengau](https://togithub.com/lengau) in [https://github.com/canonical/craft-parts/pull/511](https://togithub.com/canonical/craft-parts/pull/511) - tests: add jammy packages to stage package apt cache ([#​494](https://togithub.com/canonical/craft-parts/issues/494)) by [@​lengau](https://togithub.com/lengau) in [https://github.com/canonical/craft-parts/pull/512](https://togithub.com/canonical/craft-parts/pull/512) - partitions: add utility to make partition compatible filepaths by [@​mr-cal](https://togithub.com/mr-cal) in [https://github.com/canonical/craft-parts/pull/497](https://togithub.com/canonical/craft-parts/pull/497) - sequencer: only load project vars in adopting part by [@​cmatsuoka](https://togithub.com/cmatsuoka) in [https://github.com/canonical/craft-parts/pull/509](https://togithub.com/canonical/craft-parts/pull/509) - Release 1.19.7 by [@​cmatsuoka](https://togithub.com/cmatsuoka) in [https://github.com/canonical/craft-parts/pull/515](https://togithub.com/canonical/craft-parts/pull/515) - docs: disable pdf in .readthedocs.yml by [@​sergiusens](https://togithub.com/sergiusens) in [https://github.com/canonical/craft-parts/pull/510](https://togithub.com/canonical/craft-parts/pull/510) - executor: add prologue INFO-level log messages by [@​tigarmo](https://togithub.com/tigarmo) in [https://github.com/canonical/craft-parts/pull/518](https://togithub.com/canonical/craft-parts/pull/518) - feature: add partitions by [@​lengau](https://togithub.com/lengau) in [https://github.com/canonical/craft-parts/pull/517](https://togithub.com/canonical/craft-parts/pull/517) - Merge/1.19.7 by [@​cmatsuoka](https://togithub.com/cmatsuoka) in [https://github.com/canonical/craft-parts/pull/522](https://togithub.com/canonical/craft-parts/pull/522) - docs: make Python plugin reference reusable by [@​dboddie](https://togithub.com/dboddie) in [https://github.com/canonical/craft-parts/pull/505](https://togithub.com/canonical/craft-parts/pull/505) - ci: fix renovate scheduling by [@​lengau](https://togithub.com/lengau) in [https://github.com/canonical/craft-parts/pull/523](https://togithub.com/canonical/craft-parts/pull/523) - Merge 1.23.1 by [@​cmatsuoka](https://togithub.com/cmatsuoka) in [https://github.com/canonical/craft-parts/pull/527](https://togithub.com/canonical/craft-parts/pull/527) - chore: fix doc and yaml linting by [@​lengau](https://togithub.com/lengau) in [https://github.com/canonical/craft-parts/pull/529](https://togithub.com/canonical/craft-parts/pull/529) - lint: update and freeze pyright by [@​lengau](https://togithub.com/lengau) in [https://github.com/canonical/craft-parts/pull/531](https://togithub.com/canonical/craft-parts/pull/531) - partitions: make partitions optional in ProjectDirs by [@​lengau](https://togithub.com/lengau) in [https://github.com/canonical/craft-parts/pull/528](https://togithub.com/canonical/craft-parts/pull/528) - docs: fix tox documentation builds by [@​dboddie](https://togithub.com/dboddie) in [https://github.com/canonical/craft-parts/pull/502](https://togithub.com/canonical/craft-parts/pull/502) - environment: add build-on and build-for architectures by [@​cmatsuoka](https://togithub.com/cmatsuoka) in [https://github.com/canonical/craft-parts/pull/532](https://togithub.com/canonical/craft-parts/pull/532) - autotools plugin: support bootstrap parameters by [@​sergiusens](https://togithub.com/sergiusens) in [https://github.com/canonical/craft-parts/pull/533](https://togithub.com/canonical/craft-parts/pull/533) - Release 1.24.0 by [@​cmatsuoka](https://togithub.com/cmatsuoka) in [https://github.com/canonical/craft-parts/pull/534](https://togithub.com/canonical/craft-parts/pull/534) **Full Changelog**: canonical/craft-parts@1.23.1...1.24.0 ### [`v1.23.1`](https://togithub.com/canonical/craft-parts/releases/tag/1.23.1) [Compare Source](https://togithub.com/canonical/craft-parts/compare/1.23.0...1.23.1) ##### What's Changed - deps: freeze pydantic-yaml <1.0.0 ([#​498](https://togithub.com/canonical/craft-parts/issues/498)) by [@​lengau](https://togithub.com/lengau) in [https://github.com/canonical/craft-parts/pull/519](https://togithub.com/canonical/craft-parts/pull/519) - tests: add jammy packages to stage package apt cache ([#​494](https://togithub.com/canonical/craft-parts/issues/494)) by [@​lengau](https://togithub.com/lengau) in [https://github.com/canonical/craft-parts/pull/520](https://togithub.com/canonical/craft-parts/pull/520) - sequencer: only load project vars in adopting part ([#​509](https://togithub.com/canonical/craft-parts/issues/509)) by [@​cmatsuoka](https://togithub.com/cmatsuoka) in [https://github.com/canonical/craft-parts/pull/516](https://togithub.com/canonical/craft-parts/pull/516) - Release 1.23.1 by [@​cmatsuoka](https://togithub.com/cmatsuoka) in [https://github.com/canonical/craft-parts/pull/526](https://togithub.com/canonical/craft-parts/pull/526) **Full Changelog**: canonical/craft-parts@1.23.0...1.23.1 </details> <details> <summary>albertodonato/snap-helpers (snap-helpers)</summary> ### [`v0.4.2`](https://togithub.com/albertodonato/snap-helpers/blob/HEAD/CHANGES.rst#v042---2023-08-06) [Compare Source](https://togithub.com/albertodonato/snap-helpers/compare/0.4.1...0.4.2) \=================== - Rebuild to fix version ### [`v0.4.1`](https://togithub.com/albertodonato/snap-helpers/blob/HEAD/CHANGES.rst#v041---2023-08-06) [Compare Source](https://togithub.com/albertodonato/snap-helpers/compare/0.4.0...0.4.1) \=================== - Add missing py.typed marker to package - \[docs] Fix ReadTheDocs setup </details> --- ### Configuration 📅 **Schedule**: Branch creation - "every weekend" in timezone Etc/UTC, Automerge - "before 07:00" in timezone Etc/UTC. 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/canonical/charmcraft). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi44My4wIiwidXBkYXRlZEluVmVyIjoiMzYuODMuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Project variables exist only in the part scope and should be ignored
in other parts' states. In the existing implementation these values
are persisted in each part, which leads to double assignment errors
when a step is executed for parts in a order that's different from
the previous execution (see example in LP #1831135).
There are different ways to address this issue, the current fix
tries to be minimally disruptive by just ignoring persisted values
when reloading the state. We can refactor this code later to have
a cleaner implementation.
Signed-off-by: Claudio Matsuoka [email protected]