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

fix: Skips the runtime test when building in docker #362

Conversation

lorengordon
Copy link
Contributor

@lorengordon lorengordon commented Oct 21, 2022

Description

This skips the runtime test when building in docker.

Motivation and Context

In the plan phase, package.py is executed on the local machine, even when the build is configured to use docker. This means the runtime check was executed on the local machine, and therefore required that the runtime be present in the local machine PATH. But when using docker, the runtime should only be required in the container, not on the local machine.

Since by default the image used is based on the runtime, we skip the runtime check when using docker to build the package. However, a note is added to the readme for cases where the user customizes the docker_image, as that can lead to a success in the plan phase that would fail in the apply phase, if they are not careful to match up the runtime and the image.

Fixes #361

Breaking Changes

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@lorengordon lorengordon force-pushed the docker-skip-runtime-check branch from 8bc3573 to 0220f31 Compare October 21, 2022 17:12
@antonbabenko antonbabenko changed the title [Fix]: Skips the runtime test when building in docker fix: Skips the runtime test when building in docker Oct 21, 2022
Copy link
Member

@antonbabenko antonbabenko left a comment

Choose a reason for hiding this comment

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

LGTM.

@AllanBenson001 What do you think?

@AllanBenson001
Copy link
Contributor

LGTM.

@AllanBenson001 What do you think?

I'm unable to test at the moment (not at work) but the changes included fixed the issue for me so I'm fairly certain this will resolve the issue

@antonbabenko antonbabenko merged commit 2055256 into terraform-aws-modules:master Oct 21, 2022
antonbabenko pushed a commit that referenced this pull request Oct 21, 2022
### [4.1.4](v4.1.3...v4.1.4) (2022-10-21)

### Bug Fixes

* Skips the runtime test when building in docker ([#362](#362)) ([2055256](2055256))
@antonbabenko
Copy link
Member

This PR is included in version 4.1.4 🎉

@lorengordon lorengordon deleted the docker-skip-runtime-check branch October 21, 2022 18:05
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

new runtime check fails for docker build
3 participants