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

Migrate ManagedAgent state change to task #2758

Merged
merged 1 commit into from
Dec 14, 2020

Conversation

fierlion
Copy link
Member

@fierlion fierlion commented Dec 5, 2020

Summary

This migrates the ManagedAgent state change events from the Container state change events to the Task-level state change events to support bugfix model changes.

Implementation details

This adds batched ManagedAgent events to the Task event

Testing

I tested manually by building agent/init on an exec-capable container-instance and running 2 separate tasks, one with a single container and another with 3 containers

aws ecs start-task \
    --endpoint-url <gamma endpoint> 
    --cluster gammaDefault \
    --task-definition exec-task:2 \
    --container-instances <instance-id> \
    --enable-execute-command

followed by:

aws ecs describe-tasks \
    --cluster gammaDefault \
    --endpoint-url <gamma endpoint> \
    --tasks <task-id> \
    --debug

I got the following output:

                    "managedAgents": [
                        {
                            "lastStartedAt": 1607631456.641,
                            "lastStatus": "RUNNING",
                            "name": "ExecuteCommandAgent",
                            "reason": "Execute Command Agent started"
                        }
                    ],

New tests cover the changes: Yes.

Description for the changelog

Migrate ManagedAgent state change from container to task event.

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@fierlion fierlion force-pushed the statechange_migrate branch 9 times, most recently from 1394f48 to d0b1e86 Compare December 10, 2020 00:10
@fierlion fierlion force-pushed the statechange_migrate branch from d0b1e86 to ddff5bf Compare December 10, 2020 20:04
@fierlion fierlion force-pushed the statechange_migrate branch from ddff5bf to 3f586ba Compare December 10, 2020 23:17
@fierlion fierlion changed the title Statechange migrate [WIP] Migrate ManagedAgent state change to task Dec 10, 2020
@fierlion fierlion force-pushed the statechange_migrate branch from 3f586ba to 9d691c2 Compare December 10, 2020 23:31
@fierlion fierlion force-pushed the statechange_migrate branch from 9d691c2 to 6aebb11 Compare December 10, 2020 23:40
@fierlion fierlion requested a review from sharanyad December 11, 2020 17:45
@fierlion fierlion force-pushed the statechange_migrate branch from 93499c0 to 96b5e3b Compare December 11, 2020 21:41
@fierlion fierlion merged commit de5c1b3 into aws:feature/ecs_exec Dec 14, 2020
@fierlion fierlion deleted the statechange_migrate branch December 14, 2020 22:34
angelcar pushed a commit to angelcar/amazon-ecs-agent that referenced this pull request Dec 29, 2020
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