Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

ECS deployment destroys not deleting target groups #4745

Closed
senortroll opened this issue May 25, 2023 · 6 comments
Closed

ECS deployment destroys not deleting target groups #4745

senortroll opened this issue May 25, 2023 · 6 comments
Labels
bug Something isn't working plugin/ecs

Comments

@senortroll
Copy link

Describe the bug
When deleting deployments, either manually or as release pruning, I get this error:

! failed to destroy all resources for deployment: rpc error: code =
  FailedPrecondition desc = only one target group should be returned for ARN
  "arn:aws:elasticloadbalancing:us-east-1:028670054117:targetgroup/subscriptions-01GQJET42JTRHEW7B6/bbfe44119fcd5c25",
  but found 1 matching target groups

Steps to Reproduce
run a waypoint deployment delete with an ECS deployment

Expected behavior
This should delete the unused target groups, along with all the other resources.

Waypoint Platform Versions

  • Waypoint CLI Version: 0.11.1
  • Waypoint Server Platform and Version: nomad, 0.11.1
  • Waypoint Plugin: aws/ecs

Additional context
I think this has to do with this PR merged in 0.11.1: #4497
Specifically line 1352:

} else if len(groups.TargetGroups) > 0 {
		return status.Errorf(codes.FailedPrecondition, "only one target group should be returned for ARN %q, but found %d matching target groups", state.Arn, len(groups.TargetGroups))
	}

If I'm reading that correctly, it will (and does) return an error if there is 1 target group... I think that should be a len(groups.TargetGroups) != 1

@senortroll senortroll added the new label May 25, 2023
@bchewy
Copy link

bchewy commented May 30, 2023

this is happening for me too waypoint destroy for me

I'm wondering if there is a way to disable pruning old deployments on waypoint deploy. I have to manually delete the target groups each time, and it'd be nice to disable the pruning on old deployments

@pcjun97
Copy link

pcjun97 commented May 31, 2023

My team and I bumped into this as well. We wrote custom hooks to check and perform any additional pruning.

I'm wondering if there is a way to disable pruning old deployments

@bchewy there is a flag for that: https://developer.hashicorp.com/waypoint/commands/deploy#prune

@bchewy
Copy link

bchewy commented May 31, 2023

Thanks for sharing!

@catsby
Copy link
Member

catsby commented May 31, 2023

Hey @senortroll (and others) thanks for reporting this - it looks like we have a PR that should address this (#4742), we'll work to get that merged in

@catsby catsby added plugin/ecs bug Something isn't working and removed new labels May 31, 2023
@catsby
Copy link
Member

catsby commented May 31, 2023

4742 was just merged so hopefully we'll get this out in a point release soon!

@paladin-devops
Copy link
Contributor

This will be released with v0.11.2!

#4757

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working plugin/ecs
Projects
None yet
Development

No branches or pull requests

5 participants