-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
12437: backend/filestate: Re-add project support r=abhinav a=abhinav This re-adds project support back to the filestate backend by implementing a new referenceStore: projectReferenceStore. We will use this reference store for all new filestate stores. Existing states will continue to use the legacyReferenceStore. To accomplish this, and to plan for the future, we introduce a 'meta.yaml' file inside the .pulumi directory. This file contains metadata about the storage state. Currently, this only holds a version number: # .pulumi/meta.yaml version: 1 Version 1 is the number we've chosen for the initial release of project support. If we ever need to make breaking changes to the storage protocol we can bump the format version. Notes: - Stack references produced by filestate will shorten to just the stack name if the project name for the stack matches the currently selected project. Testing: Besides included unit tests, we duplicate some existing tests that operate on fresh stores to also run for legacy stores by emulating a pre-existing store. Environment variables: This adds two new environment variables that affect behavior: - PULUMI_SELF_MANAGED_STATE_NO_LEGACY_WARNING: Suppresses the warning printed if a bucket contains both, project-scoped and legacy stack files. - PULUMI_SELF_MANAGED_STATE_LEGACY_LAYOUT: Uses the legacy layout for new buckets even if they're empty instead of project-scoped stacks. Extracted from #12134 --- **Commits are split for reviewability.** Co-authored-by: Abhinav Gupta <abhinav@pulumi.com> Co-authored-by: Fraser Waters <fraser@pulumi.com>
- Loading branch information
Showing
18 changed files
with
1,563 additions
and
42 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
...0230128--backend-filestate--the-filestate-backend-now-supports-project-scoped-stacks.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
changes: | ||
- type: feat | ||
scope: backend/filestate | ||
description: | | ||
Add support for project-scoped stacks. | ||
Newly initialized storage will automatically use this mode. | ||
Set PULUMI_SELF_MANAGED_STATE_LEGACY_LAYOUT=1 to opt-out of this. | ||
This mode needs write access to the root of the .pulumi directory; | ||
if you're using a cloud storage, be sure to update your ACLs. |
6 changes: 6 additions & 0 deletions
6
...-filestate--print-a-warning-if-a-project-scoped-storage-has-non-project-stacks-in-it.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
changes: | ||
- type: chore | ||
scope: backend/filestate | ||
description: | | ||
Print a warning if a project-scoped storage has non-project stacks in it. | ||
Disable this warning by setting PULUMI_SELF_MANAGED_STATE_NO_LEGACY_WARNING=1. |
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
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
Oops, something went wrong.