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

Service connect ENI bug #78

Merged
merged 2 commits into from
Feb 6, 2023
Merged

Service connect ENI bug #78

merged 2 commits into from
Feb 6, 2023

Conversation

awlawl
Copy link

@awlawl awlawl commented Feb 3, 2023

When a service had ECS Service Connect enabled, it listed an extra item in the Attachments struct. The code was specifically only expecting one item. Now it can handle more than one Attachment and correctly pick the network interface values. At the moment AWS only allows one network interface, so the new method should work and in the future will just return the last one listed in Attachments:

https://docs.aws.amazon.com/AmazonECS/latest/userguide/fargate-task-networking.html

I refactored the code that determines the networking details into its own function and added 3 unit tests for the various situations.

I know that there is not an easy way to spin up a fargate cluster with Service Connect just for testing, but anyone helping with testing should at least make sure that any existing functionality still works. This code is used by service info and service ps in particular.

@awlawl awlawl marked this pull request as ready for review February 3, 2023 16:53
Copy link

@mjreed-wbd mjreed-wbd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@chjones chjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appears to work as expected against services that do not have Service Connect enabled, but I am not aware of any services with that setting enabled to test against.

@awlawl awlawl merged commit a51d57e into master Feb 6, 2023
@awlawl awlawl deleted the service-connect-eni branch February 6, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants