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

Integration TestRelativePaths fails to build #1092

Closed
cvgw opened this issue Mar 1, 2020 · 4 comments · Fixed by #1093
Closed

Integration TestRelativePaths fails to build #1092

cvgw opened this issue Mar 1, 2020 · 4 comments · Fixed by #1093
Assignees
Labels
area/testing Issues related to testing kaniko itself kind/bug Something isn't working priority/p0 Highest priority. Break user flow. We are actively looking at delivering it.

Comments

@cvgw
Copy link
Contributor

cvgw commented Mar 1, 2020

Actual behavior
The image for TestRelativePaths fails to build, we didn't notice this because the error return by the builder method was not checked

imageBuilder.buildRelativePathsImage(config.imageRepo, dockerfile, config.serviceAccount)

Expected behavior
The test builds and passes successfully

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing
Please check if the build works in docker but not in kaniko
Please check if this error is seen when you use --cache flag
Please check if your dockerfile is a multistage dockerfile
@cvgw cvgw added kind/bug Something isn't working area/testing Issues related to testing kaniko itself priority/p0 Highest priority. Break user flow. We are actively looking at delivering it. labels Mar 1, 2020
@cvgw cvgw self-assigned this Mar 1, 2020
@cvgw
Copy link
Contributor Author

cvgw commented Mar 1, 2020

It looks like that test was added in #736 but I'm not sure how it could have ever passed. What creates ./relative-subdirectory?

@cvgw
Copy link
Contributor Author

cvgw commented Mar 1, 2020

cc @tejal29

@cvgw
Copy link
Contributor Author

cvgw commented Mar 1, 2020

It's not clear to me what scenario this is supposed to be testing.

Is ./relative-suubdirectory supposed to be in the context? In the workspace?

@huguesalary perhaps you can provide some insight into what the intention behind this test was?

@cvgw
Copy link
Contributor Author

cvgw commented Mar 1, 2020

Perhaps this is an example of the scenario which should be tested?

foo
  src
    package.json
  docker
    Dockerfile
FROM bar:latest
COPY package.json /app/package.json
docker run \
  -v /foo:/workspace \
  gcr.io/kaniko-project/executor \
  --context ./src \
  --Dockerfile ./docker/Dockerfile
...

edit

It does appear this is a valid scenario for the test. Kaniko fails to build this example without the code added in #736

I've created two branches to demonstrate this

cvgw/kaniko@1092-debugging-pre
cvgw/kaniko@1092-debugging-post

cvgw added a commit to cvgw/kaniko that referenced this issue Mar 1, 2020
Fix integraton test TestRelativePaths
@cvgw cvgw mentioned this issue Mar 1, 2020
4 tasks
cvgw added a commit to cvgw/kaniko that referenced this issue Mar 1, 2020
Fix integraton test TestRelativePaths
cvgw added a commit to cvgw/kaniko that referenced this issue Mar 1, 2020
Fix integraton test TestRelativePaths
tejal29 added a commit that referenced this issue Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Issues related to testing kaniko itself kind/bug Something isn't working priority/p0 Highest priority. Break user flow. We are actively looking at delivering it.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant