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

(awselasticloadbalancingv2): No load balancers found with NetworkLoadBalancer lookup method after 2.167.0 #32161

Closed
rishi-kulkarni opened this issue Nov 17, 2024 · 3 comments · Fixed by #32164
Labels
bug This issue is a bug. management/tracking Issues that track a subject or multiple issues p0 package/tools Related to AWS CDK Tools or CLI sdk-v3-upgrade Tag issues that are associated to SDK V3 upgrade. Not limited to CR usage of SDK only.

Comments

@rishi-kulkarni
Copy link

rishi-kulkarni commented Nov 17, 2024

Describe the bug

I had three CI pipelines fail with the following error starting today using both Go and Python cdk:

Runtime process exited abnormally: waitid: no child processes[Error at /***-***-scorer-ecs-stack] 
No load balancers found matching {"dummyValue":{"ipAddressType":"dualstack","loadBalancerArn":"arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/network/my-load-balancer/50dc6c495c0c9188","loadBalancerCanonicalHostedZoneId":"Z3DZXE0EXAMPLE","loadBalancerDnsName":"my-load-balancer-1234567890.us-west-2.elb.amazonaws.com","securityGroupIds":["sg-1234"],"vpcId":"vpc-12345"},"account":"***","region":"us-east-1","loadBalancerTags":[{"key":"Name","value":"***-ds-apigtwy"}],"loadBalancerType":"network","lookupRoleArn":"arn:aws:iam::***:role/cdk-hnb659fds-lookup-role-***-us-east-1"}
[Error at /***-REX/***-REX-API-Gateway-V2] No load balancers found matching 
{"account":"***","region":"us-east-1","loadBalancerTags":[{"key":"Name","value":"***-ds-apigtwy"}],"loadBalancerType":"network","lookupRoleArn":"arn:aws:iam::***:role/cdk-hnb659fds-lookup-role-***-us-east-1"}

Pinning the aws-cdk CLI to npm install -g aws-cdk@2.166.0 resolved the issue in all pipelines. Perhaps could be related to the new Zonal Shift feature?

Regression Issue

Confirmed Regression

Last Known Working CDK Version

2.166.0

Expected Behavior

Looking up a still-existing Network Load Balancer by tag should work.

Current Behavior

The Network Load Balancer lookup fails to resolve.

Reproduction Steps

  • Create a network load balancer in an account with a tag
  • Attempt to look it up by tag

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.167.1

Framework Version

No response

Node.js Version

22

OS

Linux

Language

Python, Go

Language Version

Python 3.11 | Go 1.23.2

Other information

No response

@rishi-kulkarni rishi-kulkarni added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 17, 2024
@github-actions github-actions bot added @aws-cdk/aws-elasticloadbalancingv2 Related to Amazon Elastic Load Balancing V2 potential-regression Marking this issue as a potential regression to be checked by team member labels Nov 17, 2024
@otaviomacedo
Copy link
Contributor

Working hypothesis: the load balancer context provider is now requiring that the load balancer have the same set of tags as the query:

tagDescription.Tags?.length === this.filter.loadBalancerTags?.length &&

whereas before it only required that the query was a subset of the load balancer's tags.

@rishi-kulkarni can you please confirm that this is your case?

@rishi-kulkarni
Copy link
Author

Aha, very interesting. Yes, I can confirm that looking up all tags resolves the NLB, but looking up any subset does not. Thanks for the quick investigation and PR!

@mrgrain mrgrain added p0 management/tracking Issues that track a subject or multiple issues sdk-v3-upgrade Tag issues that are associated to SDK V3 upgrade. Not limited to CR usage of SDK only. and removed needs-triage This issue or PR still needs to be triaged. labels Nov 17, 2024
@github-actions github-actions bot removed the potential-regression Marking this issue as a potential regression to be checked by team member label Nov 17, 2024
@mrgrain mrgrain added contribution/core This is a PR that came from AWS. @aws-cdk/core Related to core CDK functionality and removed @aws-cdk/aws-elasticloadbalancingv2 Related to Amazon Elastic Load Balancing V2 contribution/core This is a PR that came from AWS. labels Nov 17, 2024
mrgrain added a commit that referenced this issue Nov 17, 2024
… a subset of tags (#32164)

There was a regression in the load balancer lookup, in which we started
requiring that the set of tags in the query is strictly the same as the
set of tags in the load balancer (rather than merely a subset of it).

Remove the length equality constraint and also simplify the code to make
the intent clearer.

Fixes #32161.

### Checklist
- [ ] My code adheres to the [CONTRIBUTING
GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and
[DESIGN
GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license*

Co-authored-by: Momo Kornher <kornherm@amazon.co.uk>
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2024
iliapolo pushed a commit that referenced this issue Nov 18, 2024
… a subset of tags (#32164)

There was a regression in the load balancer lookup, in which we started
requiring that the set of tags in the query is strictly the same as the
set of tags in the load balancer (rather than merely a subset of it).

Remove the length equality constraint and also simplify the code to make
the intent clearer.

Fixes #32161.

### Checklist
- [ ] My code adheres to the [CONTRIBUTING
GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and
[DESIGN
GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license*

Co-authored-by: Momo Kornher <kornherm@amazon.co.uk>
@iliapolo iliapolo added package/tools Related to AWS CDK Tools or CLI and removed @aws-cdk/core Related to core CDK functionality labels Nov 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. management/tracking Issues that track a subject or multiple issues p0 package/tools Related to AWS CDK Tools or CLI sdk-v3-upgrade Tag issues that are associated to SDK V3 upgrade. Not limited to CR usage of SDK only.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants