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

untrusted builder acceptance tests are failing when setting a specific lifecycle image #904

Closed
yaelharel opened this issue Oct 21, 2020 · 4 comments · Fixed by #1088
Closed
Labels
type/bug Issue that reports an unexpected behaviour.
Milestone

Comments

@yaelharel
Copy link
Contributor

yaelharel commented Oct 21, 2020

Summary

When running the pack acceptance tests using a specific version of lifecycle (in order to test a new lifecycle release), the untrusted builder tests are failing.


Reproduction

Steps
  1. Go to https://github.com/buildpacks/lifecycle/releases and download an asset of one of the pre-releases
  2. Inside ~/workspace/pack, run: ACCEPTANCE_SUITE_CONFIG='[{"pack": "current", "pack_create_builder": "current", "lifecycle": "current"}]' LIFECYCLE_PATH="/Users/yaelharel/Downloads/lifecycle-v0.9.2+linux.x86-64.tgz" make acceptance
Current behavior

The acceptance tests finished with an error since the builder is untrusted. For example:

yaelharel@yharel-a01 pack % ACCEPTANCE_SUITE_CONFIG='[{"pack": "current", "pack_create_builder": "current", "lifecycle": "current"}]' LIFECYCLE_PATH="/Users/yaelharel/Downloads/lifecycle-v0.9.2+linux.x86-64.tgz" make acceptance
... TestAcceptance/acceptance_suite/p_current_cb_current_lc_current/stack_is_created/builder_is_created/build/builder_is_untrusted/uses_the_5_phases: acceptance_test.go:739: expected nil: exit status 1: Builder 'localhost:32802/test/builder-kmikykhbcy' is untrusted
        As a result, the phases of the lifecycle which require root access will be run in separate trusted ephemeral containers.
        For more information, see https://medium.com/buildpacks/faster-more-secure-builds-with-pack-0-11-0-4d0c633ca619
        Pulling image 'localhost:32802/test/builder-kmikykhbcy:latest'
        latest: Pulling from test/builder-kmikykhbcy
        Digest: sha256:c0747be479f765aac260538817fb2bbf8a3502bea1b0e16eb56467ed4e23e02d
        Status: Image is up to date for localhost:32802/test/builder-kmikykhbcy:latest
        Selected run image mirror 'localhost:32802/pack-test/run'
        Pulling image 'localhost:32802/pack-test/run'
        latest: Pulling from pack-test/run
        Digest: sha256:de2515d952ec7d9a972cc2868ea09c73e09d71a2403a2453c8c3b696e2b0fee8
        Status: Image is up to date for localhost:32802/pack-test/run:latest
        Creating builder with the following buildpacks:
        -> 'read/env@read-env-version'
        -> 'noop.buildpack@noop.buildpack.version'
        -> 'noop.buildpack@noop.buildpack.later-version'
        -> 'simple/layers@simple-layers-version'
        ERROR: failed to build: fetching lifecycle image: image 'buildpacksio/lifecycle:0.9.2' does not exist on the daemon: not found
Expected behavior

All of the acceptance tests should finish successfully.

@yaelharel yaelharel added type/bug Issue that reports an unexpected behaviour. status/triage Issue or PR that requires contributor attention. labels Oct 21, 2020
@yaelharel yaelharel changed the title Some acceptance tests are failing when setting a specific lifecycle image untrusted builder acceptance tests are failing when setting a specific lifecycle image Oct 21, 2020
@ekcasey
Copy link
Member

ekcasey commented Oct 21, 2020

It would be great if we could specify a lifecycle image to use with untrusted builders in the acceptance config.

@dfreilich dfreilich added this to the 0.17.0 milestone Jan 25, 2021
@dfreilich
Copy link
Member

@yaelharel I couldn't replicate this error. Could you check it again on your system and see whether it's still an issue?

@yaelharel
Copy link
Contributor Author

I don't know what has changed but I can't reproduce this error as well.
I'll close this issue for now and if something changes, I'll reopen it.

@yaelharel yaelharel reopened this Feb 4, 2021
@yaelharel
Copy link
Contributor Author

We figured out why we couldn't reproduce the issue:
The problem happens when we're trying to run the acceptance test with pre-released lifecycle image.
In this case, the builder is considered as untrusted and pack is looking for an image with the same version as the one that we provided in docker hub. Since it doesn't exist (because it's pre-released), we fail.
We don't want pack to always use the --trusted-builder flag since we would like to test also the option of running the 5 phases of the lifecycle (and not only the creator).

I'm going to update the description of this issue and reopen it.
Sorry about the confusion.
Please let me know if something is still unclear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Issue that reports an unexpected behaviour.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants