Skip to content

Commit

Permalink
Fix ref to taskDefinition in describe_task_definition response (#5)
Browse files Browse the repository at this point in the history
The response for `describe_task_definition` contains several top-level
keys, one of which is `taskDefinition`. In order to get task definition
specific attributes (e.g., `networkMode`), the top-level
`taskDefinition` key needs to be retrieved and assigned to `task_def`.
  • Loading branch information
hectcastro authored Apr 29, 2019
1 parent 280b659 commit fed9f95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Fixed reference to taskDefinition in describe_task_definition response [#5](https://github.com/azavea/django-ecsmanage/pull/5)

## [0.1.0] - 2019-04-10
### Added
- Update PyPi credentials [\#4](https://github.com/azavea/django-ecsmanage/pull/4)
- Initialize Django module for one-off management commands [\#2](https://github.com/azavea/django-ecsmanage/pull/2)
- Update PyPi credentials [#4](https://github.com/azavea/django-ecsmanage/pull/4)
- Initialize Django module for one-off management commands [#2](https://github.com/azavea/django-ecsmanage/pull/2)

[Unreleased]: https://github.com/azavea/django-ecsmanage/compare/0.1.0...HEAD
[unreleased]: https://github.com/azavea/django-ecsmanage/compare/0.1.0...HEAD
[0.1.0]: https://github.com/azavea/django-ecsmanage/releases/tag/0.1.0
4 changes: 3 additions & 1 deletion ecsmanage/management/commands/ecsmanage.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ def run_task(self, config, task_def_arn, security_group_id, subnet_id, cmd):
"""
overrides = {"containerOverrides": [{"name": "django", "command": cmd}]}

task_def = self.ecs_client.describe_task_definition(taskDefinition=task_def_arn)
task_def = self.ecs_client.describe_task_definition(
taskDefinition=task_def_arn
)["taskDefinition"]

# Only the awsvpc network mode supports the networkConfiguration
# input value.
Expand Down

0 comments on commit fed9f95

Please # to comment.