Fix bundle plan to not create workspace objects or upload the files#3442
Fix bundle plan to not create workspace objects or upload the files#3442andrewnester merged 17 commits intomainfrom
bundle plan to not create workspace objects or upload the files#3442Conversation
| terraform.CheckRunningResource(), | ||
|
|
||
| // artifacts.CleanUp() is there because I'm not sure if it's safe to move to later stage. | ||
| artifacts.CleanUp(), |
There was a problem hiding this comment.
We call CleanUp later now, but before doing libraries.Upload. This appears to be safe because we do not rely on the remote artifacts folder anywhere before we call libraries.Upload(),
|
) ## Changes Convert artifacts_test and upload_test into acceptance tests ## Why Needed for #3442 <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
| @@ -0,0 +1,20 @@ | |||
| bundle: | |||
There was a problem hiding this comment.
For more comprehensive test, can we add "bundle plan" + request recording to default-python various local and integration tests and check that there are no side effects there?
There was a problem hiding this comment.
I tried to include bundle plan in default-python template tests but it appeared not trivial as these are quite complex tests and adding bundle plan added additional output just as bundle.tf.json and terraform.lock files. Will follow up with these tests afterwards not to block this PR.
| } | ||
|
|
||
| uploadPath := path.Join(b.Config.Workspace.ArtifactPath, InternalDirName) | ||
| uploadPath = ensureWorkspaceOrVolumesPrefix(uploadPath) |
There was a problem hiding this comment.
Could you add a comment why this is needed? Unclear why we would be missing prefix now.
There was a problem hiding this comment.
Added, it's not that we miss it now, I just moved it from the other place to here, but I added the comment to the function
Changes
Refactored
deployPrepareto make it non-mutative. Moved artifact folder cleanup and libraries upload touploadLibraries, which is only used by deploy.Why
This makes
bundle plannon-mutative and safe to use to preview bundle changes.Tests
Added acceptance test