-
Notifications
You must be signed in to change notification settings - Fork 398
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
OTA-1010: extract included manifests with net-new capabilities #1958
base: master
Are you sure you want to change the base?
OTA-1010: extract included manifests with net-new capabilities #1958
Conversation
@hongkailiu: This pull request references OTA-1010 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. In response to this: 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 openshift-eng/jira-lifecycle-plugin repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: hongkailiu The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
ad75be6
to
38aeb1d
Compare
@hongkailiu: This pull request references OTA-1010 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
69216c5
to
916427e
Compare
@hongkailiu: This pull request references OTA-1010 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
manifestInclusionConfiguration.Overrides, | ||
true, | ||
) | ||
// update manifest is enabled, no need to check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, but with IncludeAllowUnknownCapabilities
, aren't the ones that fail the ones we can ignore? I'd guess they meant "not even with all these new caps enabled will this manifest get included". The ones we'll implicitly enable caps for are the ones that fail to get included if we apply the current caps, but which do get included if we allow new caps, and which match SameResourceID
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is refactored from this one in CVO: https://github.com/openshift/cluster-version-operator/blob/e90705bb5457b2b9d449b4377036c3de6617ebb6/pkg/payload/payload.go#L247-L252
My understanding is very weak on this function (although i have read it a couple of times already).
hmm, but with IncludeAllowUnknownCapabilities, aren't the ones that fail the ones we can ignore?
No. Passed ones (updateManErr == nil
in the next line) are ignored. The manifests that are included on the cluster wont generate new implicitly enabled capabilities.
916427e
to
27e03eb
Compare
/retest-required |
/cc |
c1909d5
to
0431ce4
Compare
/retest-required |
Some testing result from 0431ce4 (outdated)Cluster-bot:
|
/retest-required |
/test okd-scos-e2e-aws-ovn |
0431ce4
to
c1ec179
Compare
/test e2e-agnostic-ovn-cmd |
/uncc I am not paying attention OTA-1010 matter that much b/c afaik Trevor is involved in this, so I uncc myself to avoid giving false impression that I plan to review here. If my review or approval is necessary, feel free to /cc me again. |
c1ec179
to
99cda00
Compare
99cda00
to
def90a6
Compare
capSet = capabilitiesSpec.BaselineCapabilitySet | ||
} | ||
deepCopy := clusterVersion.Status.Capabilities.DeepCopy() | ||
if capSet == configv1.ClusterVersionCapabilitySetCurrent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v4.y
could be grow too over time.
But it keeps the consistency with
oc/pkg/cli/admin/release/extract_tools.go
Lines 1300 to 1302 in def90a6
if data.Capabilities.BaselineCapabilitySet == configv1.ClusterVersionCapabilitySetCurrent { | |
klog.Infof("If the eventual cluster will not be the same minor version as this %s 'oc', the actual %s capability set may differ.", reportedVersion, data.Capabilities.BaselineCapabilitySet) | |
} |
Rerun the test with def90a6:
The cluster did not set
Comparing with #1958 (comment), no caps became implicitly enabled as expected. Because they would be (explicitly) enabled with I wanted to try
But cluster-bot is not so happy with the command. I expect to see some implicitly enabled caps there. Update on May 20.
When the rehearsal job came to
Then login to the build farm to get the kubeconfig to the ephemeral cluster:
Repeat the above test:
The logs look good to me. |
/test e2e-agnostic-ovn-cmd |
@hongkailiu: No presubmit jobs available for openshift/oc@master In response to this:
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-sigs/prow repository. |
/retest-required |
klog.Infof("If the eventual cluster will not be the same minor version as this %s 'oc', the actual %s capability set may differ.", reportedVersion, capSet) | ||
} | ||
deepCopy.EnabledCapabilities = append(deepCopy.EnabledCapabilities, configv1.ClusterVersionCapabilitySets[capSet]...) | ||
klog.Infof("If the eventual cluster will not be the same minor version as this %s 'oc', the known capability sets may differ.", reportedVersion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this looks like it will be an unnecessary echo in the capSet == configv1.ClusterVersionCapabilitySetCurrent
case, where we've just logged a very similar message above. Can we put this log line into an else
branch, or something? We may also have a way to figure out the target version from the pullspec we're extracting, and then be able to know instead of guess the if?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put this log line into an else branch, or something?
Done.
We may also have a way to figure out the target version from the pullspec we're extracting
Left a TODO for this.
Update:
Done in the 88d0075
$ /oc -v 2 adm release extract --to 414 quay.io/openshift-release-dev/ocp-release:4.14.0-rc.0-x86_64
I0321 10:31:15.726235 22094 extract.go:365] Retrieved the version from image configuration in the image to extract: 4.14.0-rc.0
Extracted release payload from digest sha256:1d2cc38cbd94c532dc822ff793f46b23a93b76b400f7d92b13c1e1da042c88fe created at 2023-09-07T07:37:47Z
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot use the existing ImageMetadataCallback
oc/pkg/cli/image/extract/extract.go
Lines 561 to 563 in 88d0075
if o.ImageMetadataCallback != nil { | |
o.ImageMetadataCallback(&mapping, location.Manifest, contentDigest, imageConfig, location.ManifestListDigest()) | |
} |
because it is called too late.
0be8d41
to
88d0075
Compare
@hongkailiu: The following test failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
Before this pull, we enabled three 3 net-new capabilities for 4.13 clusters:
oc/pkg/cli/admin/release/extract_tools.go
Lines 1241 to 1252 in e005223
Now the capabilities for the incoming release is calculated with the function from CVO based on the manifests from the current release and the ones from the incoming release.
To fit the current code that had
TarEntryCallback
already, the above logic is implemented via aManifestReceiver
that works between the upstreamTarEntryCallback
and the downstreammanifestsCallback
. WithneedEnabledCapabilities
, it tells the receiver that themanifestsCallback
is called with enabled capabilities computed. The price is thatmanifestsCallback
is called only after it collects all the manifests from the upstream.