Skip to content

switch auto_remove with remove in codegen and tests #221

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

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

mmaeng
Copy link
Contributor

@mmaeng mmaeng commented Nov 8, 2022

Closes #211

Use docker container.run remove option instead of auto_remove. If the job errors, this will allow the user to run the container outside the run and troubleshoot further. This will also mean on error manual cleanup of the containers would be necessary.

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

Copy link

@aservedio-swi aservedio-swi left a comment

Choose a reason for hiding this comment

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

I have a suggestion to also help with debugging (this change is great by the way, it really helped me out). In python/rpdk/python/codegen.py just below your change there is a section that catches the ContainerError... I suggest you add an error log line that dumps out stderr. That way they will see what error was produced.

        except (ContainerError, ImageLoadError, APIError) as e:
            LOG.error(e.stderr)
            raise DownstreamError("Error running docker build") from e

Nevermind that suggestion, I can see that it winds up printing the same information twice which is silly. So please ignore this...

@mmaeng
Copy link
Contributor Author

mmaeng commented Dec 12, 2022

@aservedio-swi Thanks for the feedback! Glad the update was of help! There is more discussion on the core of this change in #214

@mircealam mircealam merged commit e5bbb8f into aws-cloudformation:master Oct 9, 2023
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.

Docker errors are hidden
4 participants