Skip to content

Conversation

@hongkailiu
Copy link
Member

@hongkailiu hongkailiu commented Nov 4, 2025

This pull add a section to clarify test names in OTE.
It modifies hack/update-test-metadata.sh to give a
hint of what to do to fix the issue.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 4, 2025
@openshift-ci-robot
Copy link
Contributor

@hongkailiu: This pull request explicitly references no jira issue.

In response to this:

This pull add a section to clarify test names in OTE. It modifies make update to with a knob to opt into deleting the existing metadata.

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 4, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hongkailiu

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 4, 2025
@hongkailiu
Copy link
Member Author

/retest-required

readonly METADATA_FILE=".openshift-tests-extension/openshift_payload_cluster-version-operator.json"
DELETE_EXISTING="${DELETE_EXISTING:-false}"

if [[ "${DELETE_EXISTING,,}" == "true" ]] && [[ -f "${METADATA_FILE}" ]] ; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this functionality needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

In my testing, cluster-version-operator-tests update is actually validating if the json file exists.
It creates only if the file does not exist.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed.

A summary of slack discussion for the future of myself:

The expect dev workflow for renaming test:

  • modify the name without going thro the renaming process: we have a hint (coming with this pull) reminding the process.
  • dev did the process and rerun make update as hinted.


if [[ "${DELETE_EXISTING,,}" == "true" ]] && [[ -f "${METADATA_FILE}" ]] ; then
echo "Removing ${METADATA_FILE}"
rm .openshift-tests-extension/openshift_payload_cluster-version-operator.json
Copy link
Contributor

Choose a reason for hiding this comment

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

And this file name is dynamic, it was created by

ext := extension.NewExtension("openshift", "payload", "cluster-version-operator")
, so it's better to find a dynamic way to delete it.

@DavidHurta Please correct me if I am wrong.

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this discussion was resolved in the relevant Slack thread. If not, please ping me.

This pull add a section to clarify test names in OTE.
It modifies `hack/update-test-metadata.sh` to give a
hint of what to do to fix the issue.
@DavidHurta
Copy link
Contributor

/cc

@openshift-ci openshift-ci bot requested a review from DavidHurta November 6, 2025 16:48
Comment on lines +9 to +10
>&2 echo "run 'make update' to fix the metadata after going through the teest renaming process.
See https://github.com/openshift/cluster-version-operator/blob/main/cmd/cluster-version-operator-tests/README.md#test-names for details."
Copy link
Contributor

Choose a reason for hiding this comment

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

From the OTE enhancement update section:

If an incompatible change is introduced from the prior invocation of update (e.g. changing a test name without preserving the original), update will raise an error which the component owner must correct before committing their change in git.

Thus, it may not be just a renaming issue. Personally, I would make the message more general in nature; however, we can still reference the README file that can contain additional help.


### Deleting

If a test is renamed, claim it with [ext.IgnoreObsoleteTests](https://pkg.go.dev/github.com/openshift-eng/[email protected]/pkg/extension#Extension.IgnoreObsoleteTests)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If a test is renamed, claim it with [ext.IgnoreObsoleteTests](https://pkg.go.dev/github.com/openshift-eng/[email protected]/pkg/extension#Extension.IgnoreObsoleteTests)
If a test is deleted, claim it with [ext.IgnoreObsoleteTests](https://pkg.go.dev/github.com/openshift-eng/[email protected]/pkg/extension#Extension.IgnoreObsoleteTests)


# Update test metadata
eval "${BIN_PATH}/cluster-version-operator-tests" "update"
if ! "${BIN_PATH}/cluster-version-operator-tests" "update"; then
Copy link
Contributor

@DavidHurta DavidHurta Nov 6, 2025

Choose a reason for hiding this comment

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

Comment not related to the code

We can break down the commit into two distinct commits as the current commit updates the README and also de facto updates the default logic of the make update target, and this way also updates the logic of the verify-update job, which are quite distinct areas. What do you think?


### Deleting

If a test is renamed, claim it with [ext.IgnoreObsoleteTests](https://pkg.go.dev/github.com/openshift-eng/[email protected]/pkg/extension#Extension.IgnoreObsoleteTests)
Copy link
Contributor

Choose a reason for hiding this comment

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

Clicking the link results in:

Image


### Renaming

If a test is renamed, claim it with [specs.Walk](https://pkg.go.dev/github.com/openshift-eng/[email protected]/pkg/extension/extensiontests#ExtensionTestSpecs.Walk):
Copy link
Contributor

Choose a reason for hiding this comment

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

Clicking the link results in:

Image

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 6, 2025

@hongkailiu: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-hypershift e8a192b link true /test e2e-hypershift

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.

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants