Don't use skopeo inspect for canonical (digested) pull specs#51
Conversation
|
Is there a double-negative issue in the PR/commit subject? I think we want to skip |
|
Is there somewhere we can/should document the fact that with this PR |
`skopeo inspect` hits the `/tags` API which can be expensive for registries to compute. Quay.io recently changed how they do rate limiting, and we started hitting this in OpenShift CI jobs. Since the machine-config-operator always provides canonical/digested pull specs, the non-digested support is just for local developer convenience. This PR changes things so we don't use `skopeo` at all anymore, rather we `podman inspect` after we pull. Basically this PR ends up in a place where the non-canonical path only loses out on the optimization of avoiding pulling the image in the case where we already have that target.
3821542 to
fb4271d
Compare
Not sure why that'd matter? The few people who should care are all reading this PR.
Since as noted above this isn't a hard error anymore, all we're avoiding is re-pulling the image and only when the sha256 would match, and if it does, why are you asking |
|
Ahh right, forgot about coreos/rpm-ostree#1807. /lgtm |
|
Commit message is fixed, but PR subject still has the double-negative. |
skopeo inspect for non-canonical pull specsskopeo inspect for canonical (digested) pull specs
This includes openshift/pivot#51
A while ago, we were using `skopeo inspect` as part of `pivot` for OpenShift 4 OS upgrades, and it turns out that enumerates all tags, which is expensive and rate limited by quay.io: openshift/pivot#51 The RHCOS oscontainer builds have been failing in `skopeo inspect` and I suspect it's related to this. It looks like nowadays podman has `--digestfile` which is exactly what we want here, so let's use it and drop the `skopeo`. This simplifies the code too.
A while ago, we were using `skopeo inspect` as part of `pivot` for OpenShift 4 OS upgrades, and it turns out that enumerates all tags, which is expensive and rate limited by quay.io: openshift/pivot#51 The RHCOS oscontainer builds have been failing in `skopeo inspect` and I suspect it's related to this. It looks like nowadays podman has `--digestfile` which is exactly what we want here, so let's use it and drop the `skopeo`. This simplifies the code too.
A while ago, we were using `skopeo inspect` as part of `pivot` for OpenShift 4 OS upgrades, and it turns out that enumerates all tags, which is expensive and rate limited by quay.io: openshift/pivot#51 The RHCOS oscontainer builds have been failing in `skopeo inspect` and I suspect it's related to this. It looks like nowadays podman has `--digestfile` which is exactly what we want here, so let's use it and drop the `skopeo`. This simplifies the code too.
A while ago, we were using `skopeo inspect` as part of `pivot` for OpenShift 4 OS upgrades, and it turns out that enumerates all tags, which is expensive and rate limited by quay.io: openshift/pivot#51 The RHCOS oscontainer builds have been failing in `skopeo inspect` and I suspect it's related to this. It looks like nowadays podman has `--digestfile` which is exactly what we want here, so let's use it and drop the `skopeo`. This simplifies the code too. (cherry picked from commit b574572)
A while ago, we were using `skopeo inspect` as part of `pivot` for OpenShift 4 OS upgrades, and it turns out that enumerates all tags, which is expensive and rate limited by quay.io: openshift/pivot#51 The RHCOS oscontainer builds have been failing in `skopeo inspect` and I suspect it's related to this. It looks like nowadays podman has `--digestfile` which is exactly what we want here, so let's use it and drop the `skopeo`. This simplifies the code too. (cherry picked from commit b574572)
A while ago, we were using `skopeo inspect` as part of `pivot` for OpenShift 4 OS upgrades, and it turns out that enumerates all tags, which is expensive and rate limited by quay.io: openshift/pivot#51 The RHCOS oscontainer builds have been failing in `skopeo inspect` and I suspect it's related to this. It looks like nowadays podman has `--digestfile` which is exactly what we want here, so let's use it and drop the `skopeo`. This simplifies the code too. (cherry picked from commit b574572)
A while ago, we were using `skopeo inspect` as part of `pivot` for OpenShift 4 OS upgrades, and it turns out that enumerates all tags, which is expensive and rate limited by quay.io: openshift/pivot#51 The RHCOS oscontainer builds have been failing in `skopeo inspect` and I suspect it's related to this. It looks like nowadays podman has `--digestfile` which is exactly what we want here, so let's use it and drop the `skopeo`. This simplifies the code too. (cherry picked from commit b574572)
Calling image inspect directly pulls in RepoTags as well which can add up some extra time. See openshift/pivot#51 Since we are already vendoring containers/image in MCO, we are now calling necessary functions directly needed to get the OSTree version and commit information for the OSContainer. Thanks to Colin Walters and Miloslav Trmač for the idea of using container/image stack directly and reviewing the implementation.
skopeo inspecthits the/tagsAPI which can be expensivefor registries to compute. Quay.io recently changed how
they do rate limiting, and we started hitting this in OpenShift CI
jobs.
Since the machine-config-operator always provides canonical/digested
pull specs, the non-digested support is just for local developer
convenience.
And anyways, what we really should do is pull the image unconditionally
and then inspect it afterwards, we don't need all of the tag info.
Basically this PR ends up in a place where the non-canonical
path only loses out on the optimization of avoiding pulling the
image in the case where we already have that target.