Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Bump django-ecsmanage to version 2.0.0 #1129

Merged
merged 1 commit into from
Oct 13, 2020
Merged

Conversation

hectcastro
Copy link
Contributor

@hectcastro hectcastro commented Oct 10, 2020

Overview

Adds support for overriding target container name and Fargate platform version.

Notes

This PR aids in testing the changes in the following PRs:

Testing Instructions

$ ./scripts/manage ecsmanage showmigrations
  • Applying the following patch to the changes in this branch
diff --git a/src/django/oar/settings.py b/src/django/oar/settings.py
index 6674642..61c71d6 100644
--- a/src/django/oar/settings.py
+++ b/src/django/oar/settings.py
@@ -301,7 +301,7 @@ WATCHMAN_CHECKS = (
 ECSMANAGE_ENVIRONMENTS = {
     'default': {
         'TASK_DEFINITION_NAME': 'StagingAppCLI',
-        'CONTAINER_NAME': 'django',
+        'CONTAINER_NAME': 'test',
         'CLUSTER_NAME': 'ecsStagingCluster',
         'LAUNCH_TYPE': 'FARGATE',
         'PLATFORM_VERSION': '1.4.0',
  • Use manage again to execute showmigrations; observe that the invocation fails due to there being no container in the task definition named test
Traceback (most recent call last):
  File "manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.7/site-packages/ecsmanage/management/commands/ecsmanage.py", line 48, in handle
    task_id = self.run_task(config, task_def_arn, security_group_id, subnet_id, cmd)
  File "/usr/local/lib/python3.7/site-packages/ecsmanage/management/commands/ecsmanage.py", line 199, in run_task
    task = self.parse_response(self.ecs_client.run_task(**kwargs), "tasks", 0)
  File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 357, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 661, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.InvalidParameterException: An error occurred (InvalidParameterException) when calling the RunTask operation: Override for container named test is not a container in the TaskDefinition.

Checklist

  • fixup! commits have been squashed
  • CI passes after rebase
  • CHANGELOG.md updated with summary of features or fixes, following Keep a Changelog guidelines

@hectcastro hectcastro marked this pull request as ready for review October 10, 2020 18:23
Copy link
Contributor

@colekettler colekettler left a comment

Choose a reason for hiding this comment

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

I've reviewed the PRs in django-ecsmanage, tests all pass and the changes look good. We're all set for a (probably major) version bump and for the tag references in this PR to be updated 🎉

@hectcastro hectcastro changed the title Bump django-ecsmanage Bump django-ecsmanage to version 2.0.0 Oct 13, 2020
Adds support for overriding target container name and Fargate platform
version.
@hectcastro hectcastro force-pushed the feature/hmc/ecsmanage branch from 40a69fb to 10fe397 Compare October 13, 2020 16:49
@hectcastro hectcastro merged commit 6e2d71b into develop Oct 13, 2020
@hectcastro hectcastro deleted the feature/hmc/ecsmanage branch October 13, 2020 20:30
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants