Skip to content
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

fix: Fix stack creation for non ecr-autocreation apps #3142

Merged
merged 5 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/COVERAGE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15.38
15.37
11 changes: 6 additions & 5 deletions cli/cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,6 @@ func validateStackExists(ctx context.Context, stackName string, happyClient *Hap
}

func updateStack(ctx context.Context, cmd *cobra.Command, stack *stackservice.Stack, forceFlag bool, happyClient *HappyClient) error {
stackInfo, err := stack.GetStackInfo(ctx)
if err != nil {
return errors.Wrap(err, "unable to get stack info")
}

// 1.) update the workspace's meta variables
stackMeta, err := updateStackMeta(ctx, stack.Name, happyClient)
if err != nil {
Expand Down Expand Up @@ -163,6 +158,12 @@ func updateStack(ctx context.Context, cmd *cobra.Command, stack *stackservice.St

// Remove images with the previous tag from all ECRs, unless the previous tag is the same as the current tag
found := false

stackInfo, err := stack.GetStackInfo(ctx)
if err != nil {
return errors.Wrap(err, "unable to get stack info")
}

for _, tag := range happyClient.ArtifactBuilder.GetTags() {
if tag == stackInfo.StackMetadata.Tag {
found = true
Expand Down
Loading