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

Support default network modes, Update Python and Django Support #33

Merged
merged 4 commits into from
Dec 18, 2023

Conversation

rajadain
Copy link
Collaborator

@rajadain rajadain commented Dec 18, 2023

Overview

In the case of default network modes, the networkMode attribute is not specified in the describe-task-definition response. For these cases, we add tolerance for when it isn't specified, defaulting to None, and skipping the AWSVPC configuration block.

BREAKING CHANGE

Also drops support for Django 2.2, 3.0, 3.1, and Python 3.6 and 3.7.

Testing Instructions

Copy link
Member

@aaronxsu aaronxsu left a comment

Choose a reason for hiding this comment

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

I see that new commits are being pushed up, so unsure if it is related. I followed the testing steps on the collab for children side and ran the suggested command at the root of the project, and got the following. Lemme know if I missed anything.

 ~/Documents/collab-for-children -  (release/1.0) $ ./scripts/manage ecsmanage showmigrations
[+] Building 0.0s (0/0)                                                                                                                                                                        docker:desktop-linux
[+] Creating 1/0
 ✔ Container collab-for-children-database-1  Running                                                                                                                                                           0.0s 
[+] Building 0.0s (0/0)                                                                                                                                                                        docker:desktop-linux
Unknown command: 'ecsmanage'
Type 'manage.py help' for usage.

@rajadain rajadain force-pushed the feature/support-default-network-modes branch from a3d3272 to c9a70b2 Compare December 18, 2023 19:17
@rajadain
Copy link
Collaborator Author

Ah right sorry, you need to run update after checking out that branch on collab-for-children to install the new dependency.

@rajadain rajadain force-pushed the feature/support-default-network-modes branch 3 times, most recently from c4d6877 to 14d8884 Compare December 18, 2023 19:24
Copy link
Member

@aaronxsu aaronxsu left a comment

Choose a reason for hiding this comment

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

Tested and works as advertised. Looks like there is a changelog file at the root of this project- might be good to append an entry there. Also, do we need to cut a release for this project?

~/Documents/collab-for-children -  (release/1.0) $ ./scripts/manage ecsmanage showmigrations
[+] Building 0.0s (0/0)                                                                                                                                                                        docker:desktop-linux
[+] Creating 1/0
 ✔ Container collab-for-children-database-1  Running                                                                                                                                                           0.0s 
[+] Building 0.0s (0/0)                                                                                                                                                                        docker:desktop-linux
Task started! View here:
https://console.aws.amazon.com/ecs/home?region=us-east-1#/clusters/ecsStagingCluster/tasks/aa0cc0bb39ff4a7fb4381be3c3c00036/details

@@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8"]
Copy link
Member

Choose a reason for hiding this comment

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

Will this affect Python versions used in projects?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is what we're testing against, but we didn't change any of the code, so users running Python 3.6+ should be able to run this no problem, just as they are now.

Also upgrade environment variable passing for modern format
In the case of EC2 launch type instances with no custom
network modes specified, the response of describe-task-definition
does not include a networkMode key. In those cases, we can
skip the AWSVPC block entirely. This adds tolerance for the
absence of that key.
@rajadain rajadain force-pushed the feature/support-default-network-modes branch from 14d8884 to 90b53c8 Compare December 18, 2023 19:36
@rajadain
Copy link
Collaborator Author

Yes this will require a new release. Since we are dropping support for EOL'd Python and Django versions with this, I will do a major version upgrade. All existing projects should be unaffected since they are pinned to pull a current or older version, which does support their environment.

@aaronxsu
Copy link
Member

Awesome 🚀

@rajadain rajadain changed the title Support default network modes Support default network modes, Update Python and Django Support Dec 18, 2023
@rajadain
Copy link
Collaborator Author

Thanks for reviewing! And sorry about the in-flight commits 🙈 I didn't realize the build would break until I opened the PR.

@rajadain rajadain merged commit 735fe77 into develop Dec 18, 2023
3 checks passed
@rajadain rajadain deleted the feature/support-default-network-modes branch December 18, 2023 19:46
@aaronxsu
Copy link
Member

No worries. All good.

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.

2 participants