Skip to content

TestK8s/test_k8s_with_context_issue-57 diffs when the remote ADD URL serves different bytes to each build #1041

Description

@mzihlmann

integration/dockerfiles-with-context/issue-57/Dockerfile ends with two ADDs from a live URL:

ADD --chown=bob:1001 https://raw.githubusercontent.com/osscontainertools/kaniko/master/README.md /r1.txt
ADD https://raw.githubusercontent.com/osscontainertools/kaniko/master/README.md /r2.txt

The docker oracle and kaniko each fetch the URL independently, so each image holds whatever bytes its own fetch returned. In run 32899666186 the two diverged:

TYPE    NAME      INPUT-0                                                             INPUT-1
File    r1.txt    322e605e25ee066907c31d2fd481669f9fd2a1495a4c2c1b0ae1ac0c87927655    4a26ab809e143760f65940f6498aa6345b44fb23ab0d18d64e6224de33b94f7c
File    r2.txt    322e605e25ee066907c31d2fd481669f9fd2a1495a4c2c1b0ae1ac0c87927655    4a26ab809e143760f65940f6498aa6345b44fb23ab0d18d64e6224de33b94f7c

Both files differ the same way, so one build fetched one version of the file and the other build fetched another.

The URL also points at master. That ref no longer exists on this fork, repos/osscontainertools/kaniko/contents/README.md?ref=master returns 404. raw.githubusercontent.com still answers 200 by falling back to the default branch, so the request succeeds and the test does not surface the stale ref.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTest infrastructure or coverage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions