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

expose availabilityZone to ECS metadata file #1675

Merged
merged 1 commit into from
Nov 13, 2018
Merged

expose availabilityZone to ECS metadata file #1675

merged 1 commit into from
Nov 13, 2018

Conversation

cyastella
Copy link
Contributor

@cyastella cyastella commented Nov 6, 2018

Summary

we also want to expose availabilityZone to the ECS metadata file.

Implementation details

set availabilityZone to the containermetadata manager and pass it to the ECS metadata file after agent start.

Testing

  • Builds on Linux (make release)
  • Builds on Windows (go build -out amazon-ecs-agent.exe ./agent)
  • Unit tests on Linux (make test) pass
  • Unit tests on Windows (go test -timeout=25s ./agent/...) pass
  • Integration tests on Linux (make run-integ-tests) pass
  • Integration tests on Windows (.\scripts\run-integ-tests.ps1) pass
  • Functional tests on Linux (make run-functional-tests) pass
  • Functional tests on Windows (.\scripts\run-functional-tests.ps1) pass

New tests cover the changes:

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.

@cyastella cyastella requested review from petderek and a team November 6, 2018 19:59
@haikuoliu
Copy link
Contributor

I didn't see where you actually add az to metadata manager, I think this PR can be completed after your another PR is merged. You can add a [WIP] in the tile or add a TODO in the summary.

@cyastella cyastella changed the title expose availabilityZone to ECS metadata file [WIP]expose availabilityZone to ECS metadata file Nov 8, 2018
@cyastella cyastella changed the title [WIP]expose availabilityZone to ECS metadata file expose availabilityZone to ECS metadata file Nov 9, 2018
}

// setAvailabilityZone indicates an expected call of setAvailabilityZone
func (mr *MockDockerMetadataClientMockRecorder) setAvailabilityZone(arg0 interface{}) *gomock.Call {
Copy link
Contributor

Choose a reason for hiding this comment

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

is this added by mistake?

Copy link
Contributor Author

@cyastella cyastella Nov 10, 2018

Choose a reason for hiding this comment

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

these two functions are auto generated when I ran go generate.

@@ -65,7 +66,8 @@ func setup(t *testing.T) (*gomock.Controller,
*mock_api.MockECSClient,
*mock_dockerapi.MockDockerClient,
*mock_factory.MockStateManager,
*mock_factory.MockSaveableOption) {
*mock_factory.MockSaveableOption,
*mock_containermetadata.MockManager) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you need to mock container metadata manager?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

remove it and add a separate test to test set availabilityZone.

@cyastella cyastella merged commit 0b8f1e4 into aws:dev Nov 13, 2018
@yumex93 yumex93 added this to the 1.23.0 milestone Dec 4, 2018
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.

4 participants