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

[server] always use . for image builder checkoutLocation #8833

Closed
wants to merge 1 commit into from

Conversation

iQQBot
Copy link
Contributor

@iQQBot iQQBot commented Mar 16, 2022

Description

all preview environment can't build image, this is because

let checkoutLocation =
(CommitContext.is(workspace.context) && workspace.context.checkoutLocation) || ".";
if (
!AdditionalContentContext.hasDockerConfig(workspace.context, workspace.config) &&
imgsrc.dockerFileSource
) {
// TODO(se): we cannot change this initializer structure now because it is part of how baserefs are computed in image-builder.
// Image builds should however just use the initialization if the workspace they are running for (i.e. the one from above).
const { initializer, disposable } = await this.createCommitInitializer(
{ span },
workspace,
{
...imgsrc.dockerFileSource,
checkoutLocation: ".",

L721 using workspace.context.checkoutLocation and L735 is .

In image build stage we don't care checkoutLocation, this PR always use . for checkoutLocation

Related Issue(s)

Fixes #

How to test

  1. start a workspace which need image build, like https://github.com/iQQBot/test.test you will see image builder is work
  2. and start another workspace check everything is like before

Release Notes

Fixes image builder not work

Documentation

@iQQBot iQQBot requested a review from a team March 16, 2022 03:43
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Mar 16, 2022
@geropl
Copy link
Member

geropl commented Mar 16, 2022

@iQQBot I will have a look later today if no one else gets around to do so.
Please have a look at this as well.

@geropl
Copy link
Member

geropl commented Mar 17, 2022

Superseded by #8854

@geropl geropl closed this Mar 17, 2022
@iQQBot iQQBot deleted the pd/image-build-failed branch March 18, 2022 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants