-
Notifications
You must be signed in to change notification settings - Fork 618
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
v3 metadata networks response for non-awsvpc tasks #1833
Conversation
looks like a windows integ test(flakey, haven't seen this one before) failed - |
|
||
// GetContainerResponse gets container response for v3 metadata | ||
func GetContainerResponse(containerID string, state dockerstate.TaskEngineState) (*v2.ContainerResponse, error) { | ||
containerResponse, err := v2.NewContainerResponse(containerID, state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for my understanding -
why aren't we keeping the logic to build up the responses in response.go
where the rest of the structure is constructed? it's not obvious to me why we are appending this metadata a layer above.
same question for the task response structure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the network information is populated in v2's response.go
only if the task has an ENI, since it should work only for awsvpc tasks. So I added logic here to add network response for non awsvpc tasks. let me know if that makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for explaining the reponse.go
thing
Protocol: apicontainer.TransportProtocolTCP, | ||
}, | ||
}, | ||
NetworkModeUnsafe: bridgeMode, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: did you run go fmt
on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did and doesn't report of anything different
Summary
v3 metadata networks response for non-awsvpc tasks was empty. Add networks response for all modes.
Implementation details
adding network metadata to v2 task/container metadata responses
Testing
make release
)go build -out amazon-ecs-agent.exe ./agent
)make test
) passgo test -timeout=30s ./agent/...
) passmake run-integ-tests
) pass.\scripts\run-integ-tests.ps1
) passmake run-functional-tests
) pass.\scripts\run-functional-tests.ps1
) passNew tests cover the changes: yes
manual testing:
Description for the changelog
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.