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: local-docker build failure when deploymentRegistry is enabled #4835

Merged
merged 3 commits into from
Jul 14, 2023

Conversation

vvagaytsev
Copy link
Collaborator

What this PR does / why we need it:
The issue (#4815) happens on the build status check when the active provider has the deploymentRegistry configuration.

The action's build directory might not exist on the first build status check.
The underlying docker command does not use the action's build directory in any context. So, there is no reason to run the docker command from the action's build directory.

The cwd for the underlying docker command has been changed to the garden project root dir. Just like in a normal local status check in imageExistsLocally.

Which issue(s) this PR fixes:

Fixes #4815

Special notes for your reviewer:

@vvagaytsev vvagaytsev changed the title Fix/local docker build failure fix: fix Docker cwd on build status check in deploymentRegistry Jul 14, 2023
@vvagaytsev vvagaytsev changed the title fix: fix Docker cwd on build status check in deploymentRegistry fix: local-docker build failure when deploymentRegistry is enabled Jul 14, 2023
The action's build directory might not exist on the first build status check.
The underlying docker command does not use the action's build directory in any context.
The `cwd` for the `docker` command has been changed to the garden project root dir.
@vvagaytsev vvagaytsev changed the base branch from main to 0.12 July 14, 2023 11:58
@vvagaytsev vvagaytsev changed the base branch from 0.12 to main July 14, 2023 11:58
@vvagaytsev vvagaytsev marked this pull request as ready for review July 14, 2023 11:59
@vvagaytsev vvagaytsev requested review from edvald and a team July 14, 2023 11:59
@@ -31,7 +31,7 @@ export const getLocalBuildStatus: BuildStatusHandler = async (params) => {
if (deploymentRegistry) {
const args = await getManifestInspectArgs(outputs.deploymentImageId, deploymentRegistry)
const res = await containerHelpers.dockerCli({
cwd: action.getBuildPath(),
cwd: ctx.projectRoot,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We might need to ensure the existence of the action's build directory here. But it looks unnecessary at this step. Any comments/thoughts?

@vvagaytsev vvagaytsev force-pushed the fix/local-docker-build-failure branch from 5825346 to f470a5c Compare July 14, 2023 12:02
Copy link
Contributor

@Walther Walther left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@vvagaytsev vvagaytsev merged commit 135ea04 into main Jul 14, 2023
@vvagaytsev vvagaytsev deleted the fix/local-docker-build-failure branch July 14, 2023 12:51
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.

0.13: [Bug]: local-docker build fails with ENOENT
2 participants