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

Bug 1810181: Components using globs in Dockerfile COPY commands may break on OCP 4 #802

Merged
merged 1 commit into from Mar 27, 2020

Conversation

p0lyn0mial
Copy link
Contributor

No description provided.

@p0lyn0mial p0lyn0mial changed the title stops using globs in Dockerfile COPY Bug 1810181: Components using globs in Dockerfile COPY commands may break on OCP 4 Mar 19, 2020
@openshift-ci-robot
Copy link

@p0lyn0mial: This pull request references Bugzilla bug 1810181, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1810181: Components using globs in Dockerfile COPY commands may break on OCP 4

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Mar 19, 2020
@stlaz
Copy link
Member

stlaz commented Mar 19, 2020

I was just about to open a PR with https://github.com/stlaz/cluster-kube-apiserver-operator/tree/wildcard_cp_remove, WDYT?

@p0lyn0mial
Copy link
Contributor Author

/test e2e-aws

@p0lyn0mial
Copy link
Contributor Author

/assign @sttts @stlaz

COPY --from=builder /go/src/github.com/openshift/cluster-kube-apiserver-operator/cluster-kube-apiserver-operator /usr/bin/
COPY manifests/*.yaml /manifests/
COPY manifests/image-references /manifests/
COPY manifests /manifests
Copy link
Contributor

Choose a reason for hiding this comment

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

do we know that folder structure does not matter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The content is exactly the same. The directory contains a bunch of yaml files and image-references file. Previously they were copied in two separate steps COPY manifests/*.yaml /manifests/ and COPY manifests/image-references /manifests/. Now only with one command COPY manifests /manifests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

let's see what happens when it is incorrect - I suspect the build failing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All e2e tests except e2e-aws-upgrade failed on the bootstrap step.

I suspect e2e-aws-upgrade passed because the previous version applied the manifests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

additionally, checking the image layer on the local disk gives the correct directory structure.

docker build
...
Step 11/13 : COPY manifests /manifests
 ---> 880677ddc878

I think that UpperDir contains changes made by that container

docker inspect 880677ddc878
...
"UpperDir":"/var/lib/docker/overlay2/5b82326af7a839d45bb2e25a3cf0903e92493f395630d39fc4835efa955916a3/diff"

Listing the content gives

ls 5b82326af7a839d45bb2e25a3cf0903e92493f395630d39fc4835efa955916a3/diff/manifests/

0000_20_kube-apiserver-operator_00_namespace.yaml             0000_20_kube-apiserver-operator_00_scc-hostnetwork.yaml  0000_20_kube-apiserver-operator_01_operator.cr.yaml         0000_20_kube-apiserver-operator_05_serviceaccount.yaml   0000_90_kube-apiserver-operator_02_prometheusrolebinding.yaml
0000_20_kube-apiserver-operator_00_scc-anyuid.yaml            0000_20_kube-apiserver-operator_00_scc-nonroot.yaml      0000_20_kube-apiserver-operator_02_service.yaml             0000_20_kube-apiserver-operator_06_deployment.yaml       0000_90_kube-apiserver-operator_03_servicemonitor.yaml
0000_20_kube-apiserver-operator_00_scc-hostaccess.yaml        0000_20_kube-apiserver-operator_00_scc-privileged.yaml   0000_20_kube-apiserver-operator_03_configmap.yaml           0000_20_kube-apiserver-operator_07_clusteroperator.yaml  0000_90_kube-apiserver-operator_04_servicemonitor-apiserver.yaml
0000_20_kube-apiserver-operator_00_scc-hostmount-anyuid.yaml  0000_20_kube-apiserver-operator_00_scc-restricted.yaml   0000_20_kube-apiserver-operator_04_clusterrolebinding.yaml  0000_90_kube-apiserver-operator_01_prometheusrole.yaml   image-references

Copy link
Contributor Author

Choose a reason for hiding this comment

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

copying only a single file COPY manifests/image-references /manifests/ gives me

ls ab9dc871721dccc831953c924029252ed8156771251e36fbb129fe0cc20069eb/diff/manifests/
image-references

@p0lyn0mial
Copy link
Contributor Author

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 25, 2020
@p0lyn0mial
Copy link
Contributor Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 25, 2020
@sttts
Copy link
Contributor

sttts commented Mar 27, 2020

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 27, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: p0lyn0mial, sttts

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 27, 2020
@openshift-merge-robot openshift-merge-robot merged commit 1c623a8 into openshift:master Mar 27, 2020
@openshift-ci-robot
Copy link

@p0lyn0mial: Some pull requests linked via external trackers have merged: openshift/cluster-kube-apiserver-operator#802. The following pull requests linked via external trackers have not merged:

In response to this:

Bug 1810181: Components using globs in Dockerfile COPY commands may break on OCP 4

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@p0lyn0mial
Copy link
Contributor Author

/cherry-pick release-4.4

@openshift-cherrypick-robot

@p0lyn0mial: new pull request created: #808

In response to this:

/cherry-pick release-4.4

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants