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

RF: Use usermod instead of addgroup in the Dockerfile template. #306

Closed
wants to merge 26 commits into from

Conversation

arokem
Copy link
Member

@arokem arokem commented Jul 29, 2023

Hopefully closes #305.

@arokem arokem force-pushed the deprecate_addgroup branch from c1bd5c7 to 44aa104 Compare July 29, 2023 17:51
@arokem arokem force-pushed the deprecate_addgroup branch from f77de20 to 8f7051e Compare January 29, 2024 23:13
@maouw
Copy link
Contributor

maouw commented Jan 31, 2024

I got the tests to succeed using moto[cloudformation]==4.1.5.

It started succeeding with moto==4.1.10. I chose this because 4.1.11 is where there were some changes to handling duplicate tags, according to the changelog:

  • ECR: put_image(): now behaves correctly on duplicate images with duplicate tags

When I first tried with moto==4.1.10, test_DockerImage succeeded. However, test_pars_with_new_vpc started to fail at cloudknot/tests/test_pars.py:298:

An error occurred (DependencyViolation) when calling the DeleteStack operation: The vpc vpc-b2ae771a has dependencies and cannot be deleted.

I went back to the moto changelog, and looked for where there were any potential changes to CloudFormation, and found 4.1.6 changed how stack deletion was handled:

  • CloudFormation now supports deletion of AWS::EC2::Subnet, AWS::EC2::VPC
  • CloudFormation now supports variable mapping inside "Fn::Sub"
  • CloudFormation: delete_stack() now adheres to "DeletionPolicy": "Retain" set for individual resources

So, I set moto==4.1.5 and it worked!

There is one warning that we might want to check out:

cloudknot/tests/test_knot.py::test_knot
  . . . moto/ec2/models/instances.py:140: PendingDeprecationWarning: Could not find AMI with image-id:None, in the near future this will cause an error.
  Use ec2_backend.describe_images() to find suitable image for your test

@maouw maouw mentioned this pull request Jan 31, 2024
@arokem
Copy link
Member Author

arokem commented Feb 26, 2024

Superseded by #307

@arokem arokem closed this Feb 26, 2024
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.

Outdated call to add-user within Dockerfile template?
2 participants