-
Notifications
You must be signed in to change notification settings - Fork 613
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
Add ServiceName to TMDE v4 TaskResponse #3362
Conversation
can you update the description with a summary of the changes and also talk about how this was tested? |
Yeah, updated the description. Should have marked the PR WIP. :) |
seelog.Infof("V4 taskMetadata handler: Writing response for task '%s'", taskArn) | ||
|
||
taskResponse, err := NewTaskResponse(taskArn, state, ecsClient, cluster, az, containerInstanceArn, propagateTags) | ||
taskResponse, err := NewTaskResponse(taskArn, state, ecsClient, cluster, | ||
az, containerInstanceArn, task.ServiceName, propagateTags) |
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.
can we check that task.ServiceName exists outside the generation of the NewTaskResponse? I see that it's json output is set as omitempty
but I still want to be assert that the ServiceName
field exists outside this object creation.
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.
Never mind -- The zero string value is ""
for string type so this will always exist.
ServiceName string `json:"ServiceName,omitempty"`
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.
yeah, we are using empty string to indicate absence of serviceName
.
seelog.Infof("V4 taskMetadata handler: Writing response for task '%s'", taskArn) | ||
|
||
taskResponse, err := NewTaskResponse(taskArn, state, ecsClient, cluster, az, containerInstanceArn, propagateTags) | ||
taskResponse, err := NewTaskResponse(taskArn, state, ecsClient, cluster, | ||
az, containerInstanceArn, task.ServiceName, propagateTags) |
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.
Never mind -- The zero string value is ""
for string type so this will always exist.
ServiceName string `json:"ServiceName,omitempty"`
a60c2b9
3aa47fb
to
a60c2b9
Compare
Summary
Add
ServiceName
field to TMDE v4 task responses.Implementation details
ServiceName
field is available inTask
, so just copying it to TMDE v4TaskResponse
type.Testing
Tested on an EC2 instance registered under a Gamma cluster.
ServiceName
field has not yet been added to ACS Task Payload in Production, so the tests have been performed against Gamma environment.Only v4 Task Responses included
ServiceName
, v3 responses did not.New tests cover the changes: Yes
Description for the changelog
Add ServiceName to TMDE v4 Task Responses.
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.