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

adds support for lookup a task using the short docker Id #813

Merged
merged 1 commit into from
May 25, 2017

Conversation

aaronwalker
Copy link
Contributor

@aaronwalker aaronwalker commented May 18, 2017

Summary

Adds the ability to lookup a task via the introspection service using the short version of the docker Id. Use case is for a container to be able to discover this own task arn and other task related metadata

addresses feature-request #770

Supersedes PR #775

Implementation details

A function TaskByShortID and GetAllContainerIDs have been added to TaskEngineState interface to find the first matching Tasks who's container id started with the given short id. The tasksV1RequestHandlerMaker was then updated to call either the TaskByID or TaskByShortID depending on the length of the dockerId request param

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: yesy

Description for the changelog

Feature - Filter tasks returned by introspection API by short container ID

Licensing

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

@aaronwalker
Copy link
Contributor Author

@samuelkarp @aaithal Closed PR 775 and replaced with this one based on feedback. Also Squashed into single commit. Can you please review

Copy link
Contributor

@samuelkarp samuelkarp left a comment

Choose a reason for hiding this comment

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

LGTM. @aaithal can you review too?

@samuelkarp samuelkarp requested a review from aaithal May 25, 2017 00:04
@samuelkarp samuelkarp merged commit 8a13b6b into aws:dev May 25, 2017
@samuelkarp
Copy link
Contributor

@aaronwalker Thanks!

@samuelkarp samuelkarp added this to the 1.14.2 milestone May 25, 2017
@aaithal aaithal mentioned this pull request May 26, 2017
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