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

Fix the bug where container state change was not submitted under race condition #1067

Merged
merged 1 commit into from
Nov 10, 2017

Conversation

richardpen
Copy link

@richardpen richardpen commented Nov 10, 2017

Summary

Fix the issue where container state change wasn't submitted to backend.

Implementation details

Initially container change with task status in <RUNNING state won't be submitted, this pr changes the logic to also send container statechange event the tasks status is in pending.

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
  • Manually tests
    New tests cover the changes:
    yes

Description for the changelog

Licensing

This contribution is under the terms of the Apache 2.0 License:
yes

@@ -696,3 +695,42 @@ func TestSubmitTaskStateChangeWithoutAttachments(t *testing.T) {
})
assert.NoError(t, err, "Unable to submit task state change with no attachments")
}

// TestSubmitContainerStateChangeWhileTaskInPending tests the container state chagne was submitted
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: s/chagne/change

@nmeyerhans nmeyerhans added this to the 1.15.1 milestone Nov 10, 2017
@richardpen richardpen merged commit bc5b117 into aws:v1.15.x Nov 10, 2017
@richardpen richardpen deleted the statechange-fix branch November 21, 2017 01:03
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.

5 participants