Skip to content

Conversation

@JianLi-RH
Copy link
Contributor

@JianLi-RH JianLi-RH commented Oct 22, 2025

In this PR, I finished 2 things:

  1. MustGetKubeClient() function helps us create an Clientset instance which can be used to connect to cluster.
  2. Update the README.md file, we can follow it to create our e2e test cases.

/cc @wking @DavidHurta @PratikMahajan @hongkailiu @jhou1 @dis016 @jiajliu

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 22, 2025
@JianLi-RH JianLi-RH force-pushed the implement_client_oc branch 4 times, most recently from a6a8ada to 37caff4 Compare October 23, 2025 07:39
@JianLi-RH JianLi-RH changed the title [WIP] Create packages for connecting to a cluster [WIP] OTA-1605 Create e2e test in CVO repo Oct 23, 2025
@JianLi-RH JianLi-RH force-pushed the implement_client_oc branch 4 times, most recently from a79646a to d944000 Compare October 23, 2025 09:32
@DavidHurta
Copy link
Contributor

Please note that @petr-muller is no longer an active reviewer or approver in the CVO repository. You can refrain from directly pinging him on usual PRs where the expertise of the active folks should be sufficient. He is an "emeritus" approver.

What's an emeritus approver?

GitHub usernames listed under the emeritus_approvers key can no longer approve code (use the /approve command) and will be ignored by prow for assignment. However, it can still be referenced by a person looking at the OWNERS file for a possible second or more informed opinion.

@JianLi-RH JianLi-RH force-pushed the implement_client_oc branch from d944000 to 067cd4b Compare October 24, 2025 07:45
@JianLi-RH JianLi-RH changed the title [WIP] OTA-1605 Create e2e test in CVO repo [WIP] NO-ISSUE: OTA-1605 Create e2e test in CVO repo Oct 24, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 24, 2025
@openshift-ci-robot
Copy link
Contributor

@JianLi-RH: This pull request explicitly references no jira issue.

In response to this:

In this PR, finished first e2e test case. Related case can be found in: https://polarion.engineering.redhat.com/polarion/#/project/OSE/workitem?id=OCP-42543

Tested it locally:

[jianl@jianl-thinkpadt14gen4 cvo]$ ginkgo --label-filter="42543"
Running Suite: CVO Suite - /home/jianl/1_code/cluster-version-operator/test/cvo
===============================================================================
Random Seed: 1761205561

Will run 1 of 1 specs
•

Ran 1 of 1 Specs in 1.585 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS

Ginkgo ran 1 suite in 3.310067262s
Test Suite Passed
[jianl@jianl-thinkpadt14gen4 cvo]$ 

Here is the old case in openshift-tests-private: https://github.com/openshift/openshift-tests-private/blob/f1f32ff1e9eeef4cb2cb4ae6549daa9306c6616a/test/extended/ota/cvo/cvo.go#L716-L759

There is a disadvantage here when I use client-go, it seems client-go does not support all Openshift features, for example it could not extract all manifest and it although support methods to get all resource types but it could not use these types to get resources. So in these PR I don't check all manifests but check some special objects.

Another work we need to do is improve the make update command to let it can embed all tests into binary.

/cc @petr-muller @DavidHurta @hongkailiu @wking @jhou1 @dis016 @jiajliu

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.

@JianLi-RH
Copy link
Contributor Author

Tested on my local machine:

[jianl@jianl-thinkpadt14gen4 cluster-version-operator]$ make update
hack/build-go.sh
Using version from git...
Building binaries into _output/linux/amd64
Building github.com/openshift/cluster-version-operator cluster-version-operator-tests binary (v1.0.0-1482-gd9440005-dirty)
Compressing the cluster-version-operator-tests binary
Building github.com/openshift/cluster-version-operator cluster-version-operator binary (v1.0.0-1482-gd9440005-dirty)
hack/update-test-metadata.sh
Using version from git...
successfully updated metadata
[jianl@jianl-thinkpadt14gen4 cluster-version-operator]$ _output/linux/amd64/cluster-version-operator-tests list
[
  {
    "name": "[Jira:Cluster Version Operator] cluster-version-operator-tests Author:jianl-High-42543-the removed resources are not created in a fresh installed cluster",
    "labels": {
      "42543": {},
      "High": {},
      "cvo": {}
    },
    "resources": {
      "isolation": {}
    },
    "source": "openshift:payload:cluster-version-operator",
    "lifecycle": "blocking",
    "environmentSelector": {}
  }
]
[jianl@jianl-thinkpadt14gen4 cluster-version-operator]$

Run the case:

[jianl@jianl-thinkpadt14gen4 cluster-version-operator]$ _output/linux/amd64/cluster-version-operator-tests list | jq '.[] | select(.name | contains("42543")) | .name' | xargs _output/linux/amd64/cluster-version-operator-tests run-test
  Running Suite:  - /home/jianl/1_code/cluster-version-operator
  =============================================================
  Random Seed: 1761292866 - will randomize all specs

  Will run 1 of 1 specs
  ------------------------------
  [Jira:Cluster Version Operator] cluster-version-operator-tests Author:jianl-High-42543-the removed resources are not created in a fresh installed cluster [cvo, High, 42543]
  /home/jianl/1_code/cluster-version-operator/test/cvo/cvo.go:22
    STEP: Validate resource with 'release.openshift.io/delete: "true"' annotation is not installed @ 10/24/25 16:01:06.862
  • [1.428 seconds]
  ------------------------------

  Ran 1 of 1 Specs in 1.428 seconds
  SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
[
  {
    "name": "[Jira:Cluster Version Operator] cluster-version-operator-tests Author:jianl-High-42543-the removed resources are not created in a fresh installed cluster",
    "lifecycle": "blocking",
    "duration": 1428,
    "startTime": "2025-10-24 08:01:06.858981 UTC",
    "endTime": "2025-10-24 08:01:08.287644 UTC",
    "result": "passed",
    "output": "  STEP: Validate resource with 'release.openshift.io/delete: \"true\"' annotation is not installed @ 10/24/25 16:01:06.862\n"
  }
]
[jianl@jianl-thinkpadt14gen4 cluster-version-operator]$ 

@JianLi-RH JianLi-RH changed the title [WIP] NO-ISSUE: OTA-1605 Create e2e test in CVO repo NO-ISSUE: OTA-1605 Create e2e test in CVO repo Oct 24, 2025
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 24, 2025
@JianLi-RH JianLi-RH force-pushed the implement_client_oc branch from 067cd4b to bac7793 Compare October 27, 2025 03:16
@DavidHurta
Copy link
Contributor

/cc

@openshift-ci openshift-ci bot requested a review from DavidHurta October 27, 2025 11:41
@hongkailiu
Copy link
Member

/cc

@openshift-ci openshift-ci bot requested a review from hongkailiu October 27, 2025 13:04
@JianLi-RH JianLi-RH force-pushed the implement_client_oc branch from bac7793 to 51facb3 Compare October 29, 2025 04:06
@JianLi-RH
Copy link
Contributor Author

After modification, the case is still valid:

[jianl@jianl-thinkpadt14gen4 cluster-version-operator]$ _output/linux/amd64/cluster-version-operator-tests run-test "[Jira:Cluster Version Operator] The cluster version operator the removed resources are not created in a fresh installed cluster"
  Running Suite:  - /home/jianl/1_code/cluster-version-operator
  =============================================================
  Random Seed: 1761710868 - will randomize all specs

  Will run 1 of 1 specs
  ------------------------------
  [Jira:Cluster Version Operator] The cluster version operator the removed resources are not created in a fresh installed cluster [cvo, High, 42543]
  /home/jianl/1_code/cluster-version-operator/test/cvo/cvo.go:24
    STEP: Service controller-manager-service should not be installed @ 10/29/25 12:07:48.862
    STEP: ClusterRoleBindings default-account-openshift-machine-config-operator should not be installed @ 10/29/25 12:07:49.759
    STEP: CronJobs machine-config-nodes-crd-cleanup should not be installed @ 10/29/25 12:07:50.024
  • [1.428 seconds]
  ------------------------------

  Ran 1 of 1 Specs in 1.429 seconds
  SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
[
  {
    "name": "[Jira:Cluster Version Operator] The cluster version operator the removed resources are not created in a fresh installed cluster",
    "lifecycle": "blocking",
    "duration": 1429,
    "startTime": "2025-10-29 04:07:48.858522 UTC",
    "endTime": "2025-10-29 04:07:50.287978 UTC",
    "result": "passed",
    "output": "  STEP: Service controller-manager-service should not be installed @ 10/29/25 12:07:48.862\n  STEP: ClusterRoleBindings default-account-openshift-machine-config-operator should not be installed @ 10/29/25 12:07:49.759\n  STEP: CronJobs machine-config-nodes-crd-cleanup should not be installed @ 10/29/25 12:07:50.024\n"
  }
]
[jianl@jianl-thinkpadt14gen4 cluster-version-operator]$ 

@JianLi-RH JianLi-RH force-pushed the implement_client_oc branch from 51facb3 to 8e9da36 Compare October 30, 2025 01:44
@JianLi-RH JianLi-RH force-pushed the implement_client_oc branch 2 times, most recently from 72354d1 to 3a8631b Compare November 4, 2025 01:46
@hongkailiu
Copy link
Member

/testwith openshift/cluster-version-operator/main/e2e-agnostic-ovn http://openshift/origin#30316

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 7, 2025

@hongkailiu, testwith: Error processing request. ERROR:

could not determine job runs: invalid format for additional PR: http://openshift/origin#30316

@hongkailiu
Copy link
Member

/testwith openshift/cluster-version-operator/main/e2e-agnostic-ovn openshift/origin#30316

@jiajliu
Copy link

jiajliu commented Nov 7, 2025

Based on #1249 (comment), @jiajliu is OK if we do not have the oc-cli for now.

@hongkailiu Thanks for getting into consideration! My comment was raising the risk of changing test coverage, since the risk has been assessed to be manageable, it seems safe to go.

@JianLi-RH
Copy link
Contributor Author

/test e2e-aws-ovn-techpreview

@JianLi-RH
Copy link
Contributor Author

/testwith openshift/cluster-version-operator/main/e2e-agnostic-ovn openshift/origin#30316

@JianLi-RH
Copy link
Contributor Author

@DavidHurta @hongkailiu The ote test case passed in https://prow.ci.openshift.org/view/gs/test-platform-results/logs/multi-pr-openshift-cluster-version-operator-1249-openshift-origin-30316-e2e-agnostic-ovn/1986710370059816960

passed: (0s) 2025-11-07T10:40:00 "[Jira:\"Cluster Version Operator\"] cluster-version-operator-tests should support passing tests should support passing tests"
passed: (100ms) 2025-11-07T10:33:17 "[Jira:\"Cluster Version Operator\"] The cluster version operator should not install resources annotated with release.openshift.io/delete=true"

@DavidHurta
Copy link
Contributor

/hold

I have some requests for changes. I am explicitly holding the PR while I review the full PR.

test/cvo/cvo.go Outdated
client = utilities.MustGetKubeClient()
})

g.It(`should not install resources annotated with release.openshift.io/delete=true`, g.Label("Conformance", "High", "42543"), func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume that the 42543 label represents the polarion ID test case. Is that correct? If so, is it common or expected to write these IDs in labels?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is polarion ID, I have no idea if it is common but I think it is helpful for us when we want to read the case from polarion.

@@ -1,12 +1,39 @@
package cvo

Copy link
Contributor

@DavidHurta DavidHurta Nov 7, 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

I will hold us to a higher standard regarding the git hygiene, if I may.

Please see the Contributing guide for the cluster-version-operator repository.

I am mainly concerned about the following points:

  • Make commits of logical units.

  • Make sure your commit messages are in the proper format (see below).

  • The PR title.

Currently, the PR consists of a single commit jianl - First e2e test, which consists of multiple logical units, and the commit title does not follow the recommended format. While PR titles are not explicitly mentioned in the guide, a PR title should state what a PR distinctly and briefly does.

Please keep in mind that these guidelines have their practical purposes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the commit, because this is the first OTE PR, it contains many logic, so the description may not describes everything. I will keep PR simple and describe the logic in the future.

test/cvo/cvo.go Outdated
})
})

var _ = g.Describe(`[Jira:"Cluster Version Operator"] The cluster version operator`, g.Ordered, g.Label("cvo"), func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the cvo label commonly used in other places as well? We already specify the component via [Jira:<Component>]. As such, I am interested in the purpose of the label or its usage.

Copy link
Contributor Author

@JianLi-RH JianLi-RH Nov 10, 2025

Choose a reason for hiding this comment

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

label and [Jira:] are two difference things.
We can use label to restrict which case can be included in a binary, for example:

specs = specs.Select(extensiontests.HasLabel("cvo"))

And we can also set platform for special test cases to restrict their execution, for example restrict 42543 run on GCP:

specs = specs.Select(extensiontests.HasLabel("42543")).Include(extensiontests.PlatformEquals("gcp"))

Label also gives us the possibility that work with many different teams/binaries, for example we want to run all LEVEL-0 cases, we can use specs.AddLabel(“LEVEL0"), for more details, you can refer: https://github.com/openshift/enhancements/blob/master/enhancements/testing/openshift-tests-extension.md#info---extension-metadata

In short, labels gives us more possibilities.

test/cvo/cvo.go Outdated
client = utilities.MustGetKubeClient()
})

g.It(`should not install resources annotated with release.openshift.io/delete=true`, g.Label("Conformance", "High", "42543"), func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

What does the High label represent, please? Can you link me a reference/docs for the label?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

High is a property of the case on polarion, with it we can create test suites with same level, then we can run test suite by case level.
For example, we want to run all High level test cases on a special version, then we can follow below steps:

	ext.AddSuite(extension.Suite{
		Name:       "high level test cases",
		Parents:    []string{"openshift/conformance"},
		Qualifiers: []string{`"High" in labels`},
	})

Then run it:

$ _output/linux/amd64/cluster-version-operator-tests run-suite "high level test cases"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"High" in labels means the High keyword in labels list, labels can be found by _output/linux/amd64/cluster-version-operator-tests list, for example:

$ _output/linux/amd64/cluster-version-operator-tests list
[
  {
    "name": "[Jira:\"Cluster Version Operator\"] cluster-version-operator-tests should support passing tests the sanity test should pass",
    "labels": {},
    "resources": {
      "isolation": {}
    },
    "source": "openshift:payload:cluster-version-operator",
    "lifecycle": "blocking",
    "environmentSelector": {}
  },
  {
    "name": "[Jira:\"Cluster Version Operator\"] The cluster version operator should not install resources annotated with release.openshift.io/delete=true",
    "labels": {
      "42543": {},
      "Conformance": {},
      "High": {},
      "cvo": {}
    },
    "resources": {
      "isolation": {}
    },
    "source": "openshift:payload:cluster-version-operator",
    "lifecycle": "blocking",
    "environmentSelector": {}
  }
]

Similarly, we can use name.contains("[Serial]") in Qualifiers.

[
{
"name": "[Jira:Cluster Version Operator] cluster-version-operator-tests should support passing tests",
"name": "[Jira:\"Cluster Version Operator\"] cluster-version-operator-tests should support passing tests should support passing tests",
Copy link
Contributor

@DavidHurta DavidHurta Nov 7, 2025

Choose a reason for hiding this comment

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

Please note the manually deleted and recreated metadata file in a separate commit. The file should only be updated via the make update. We are intentionally bypassing this as of the moment, but that should be clearly communicated in a commit description, as in "we know what we are doing, in the future, do not do that, do it properly or else history is lost". Otherwise, we may risk a higher chance of invalid changes in the future from people misunderstanding a commit change.

Copy link
Contributor

Choose a reason for hiding this comment

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

I will be updating the README file to clearly state this for the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I am not quite understand your concern.
Are you saying that we should use a separate commit to change the matedata file?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. Commits should be of logical units. Such a change deserves a separate commit with a disclaimer due to the mentioned concerns.

For example, see my past cfab71d commit that renamed a test this way.

To better understand why I advocate for this, see my past comment, which cites the metadata validation from the OTE enhancement.

)

var _ = Describe("[Jira:Cluster Version Operator] cluster-version-operator-tests", func() {
It("should support passing tests", func() {
Copy link
Contributor

@DavidHurta DavidHurta Nov 7, 2025

Choose a reason for hiding this comment

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

Thanks. It helps with the integration. It also provides a signal of the integration working in the future. Such sanity tests are also in several other OpenShift repositories that already integrated the OTE or are in the process of the integration.

test/cvo/cvo.go Outdated
Comment on lines 32 to 37
_, err = client.CoreV1().Services("openshift-cloud-credential-operator").Get(context.TODO(), "controller-manager-service", metav1.GetOptions{})
o.Expect(kerrors.IsNotFound(err)).To(o.BeTrue(), "The NotFound error should occur")

g.By("checking if ClusterRoleBindings default-account-openshift-machine-config-operator does not exist")
_, err = client.RbacV1().ClusterRoleBindings().Get(context.TODO(), "default-account-openshift-machine-config-operator", metav1.GetOptions{})
o.Expect(kerrors.IsNotFound(err)).To(o.BeTrue(), "The NotFound error should occur")
Copy link
Contributor

@DavidHurta DavidHurta Nov 7, 2025

Choose a reason for hiding this comment

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

I am afraid such test logic is not sufficient. Please correct me if I am wrong.

Copy link
Contributor

@DavidHurta DavidHurta Nov 7, 2025

Choose a reason for hiding this comment

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

Testing for the existence of hard-coded objects we expect to have a manifest annotation release.openshift.io/delete: "true" may work for the current minor release; however, there is no guarantee that such tests would cover the expected functionality in the next minor release or any future minor release.

For example:

  1. 4.y: A team has decided for the next release to stop creating a specific deployment.
  2. 4.(y+1): The deployment manifest now has the delete annotation.
  3. 4.(y+2): The team can safely remove the entire manifest.

The written test logic would keep passing even though the hard-coded objects are not present, not due to the delete annotation; however, due to the manifests being gone. As such, the test would not test the expected should not install resources annotated with release.openshift.io/delete=true functionality and would provide a false passing signal.

For more information regarding the delete annotation and the mentioned potential issue, see the Subsequent Releases Strategy section of the Manifest Annotation For Object Deletion developer guide.

As of the moment, I personally can't think of an alternative solution while not using the oc CLI. Thus, I am leaving the resolution open. Maybe it's worth revisiting the discussion regarding importing origin utilities?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right, there are potential issues like you said. Right now it is a technical blocker for me, see my comments in:
#1249 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

Ideally (like we did before), we loop over manifests extracted from a payload, find the ones with the annotation, and ensure the non-installation.
Before a better solution (something like above) is available, the current solution is fine with me.

My reasoning:
Say the manifest is not even included in the payload in a future minor.
Our test still passes (good) but it basically checks nothing (bad).
In that bad case, we should update the manifests to check in the CURRENT minor version. If nothing is there, then remove the test case.
This refresh of the list should be done automatically but we need a more powerful tool for it.

If we find that the annotation comes and goes very often on the manifests over minor versions, we could do this (just throwing out an idea into the air, still not depending on oc-cli):

  • Make a script to extract the manifests with annotation
  • Save the list as a file and the test loads it and check the manifests.
  • When the first build of each minor version is available, we update the list. (So once in a quarter, not too much of a burden)

I do not see we need to invest in that direction right now. We can always do it when we feel needing it in the future.

Copy link
Contributor

@DavidHurta DavidHurta Nov 10, 2025

Choose a reason for hiding this comment

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

we should update the manifests to check in the CURRENT minor version.

The manifests can also be added and removed via backports, thus affecting all existing minor versions.

If we find that the annotation comes and goes very often on the manifests over minor versions

Who would be monitoring this?

When the first build of each minor version is available, we update the list.

Again, the manifests can also be removed and added via backports.

I do not see we need to invest in that direction right now.

Me as well, but for other reasons.


This means we would need to monitor all minor releases periodically via automation, as our attention is better utilized on more important efforts. This, in conclusion, means at minimum an initial development cost for the automation tooling and its maintenance.

Otherwise, the current solution may theoretically stop covering the expected functionality as soon as the day after merging. As a result, we, the OTA team, cannot rely on the test to cover the expected functionality. Then we would have a passing signal for a functionality, and we cannot depend on the signal being useful. That’s a rather large regression in the migrated test. I would personally rather drop the test case than go this route.


However, we still have the option to loop through all manifests and thus not change the covered functionality. This could be done by implementing the original logic, not using the oc CLI, or by importing origin packages. This could be done using a Go library for processing container images to fetch and extract the release image. We can then loop through the manifests as done originally. This would be done in collaboration with the software and quality engineers. No regression in covered functionality, no extreme imports hopefully, no implementation of automation for a single test case.

What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

@JianLi-RH

We will have to face this issue, whenever you migrate an existing case it uses oc in the implementation and you do not find an easy workaround for it. I honestly do not know how many such cases there are.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will have to face this issue, whenever you migrate an existing case it uses oc in the implementation and you do not find an easy workaround for it. I honestly do not know how many such cases there are.

@hongkailiu @DavidHurta This issue not only blocked me but also blocked all team to start their work because they are waiting for the MustGetKubeClient() ready to use, that's why I said don't waist time one my case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replaced Kubernetes/client-go by Openshift/client-go, Openshift/client-go is more easy to use and gives us many efficent functions to manipulate Cluster resources.

One thing I don't solved is that all above client could not get clusterversionoperator/cluster which is the log level object. cc @DavidHurta @hongkailiu

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regarding how to list the manifest files, I took a quick look at the oc repository, it looks very complicated.

I prefer @hongkailiu 's Opt1 and Opt2, BTW I have another option: let's list some important resources by resource type then check all resources, for example :

	g.It("demo", func() {
		client := utilities.MustGetClient()
		auths, _ := client.ConfigV1().Authentications().List(context.TODO(), metav1.ListOptions{})

		for _, auth := range auths.Items {
			if slices.Contains(auth.Annotations, "release.openshift.io/delete" {
				panic("xxxxxx")
			}
		}
	})

Copy link
Contributor Author

@JianLi-RH JianLi-RH Nov 13, 2025

Choose a reason for hiding this comment

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

the manifest with the annotation is removed.

This has a very low frequency, last time we hit the issue is at 4.20, the manifest with "release.openshift.io/delete" was introduced in 4.7 or 4.8, and the file was removed in 4.20.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 7, 2025
@JianLi-RH JianLi-RH force-pushed the implement_client_oc branch 2 times, most recently from 80af1c8 to 56a29e0 Compare November 11, 2025 03:58
@JianLi-RH
Copy link
Contributor Author

@hongkailiu @DavidHurta I just removed the case, right now the PR only finished one thing: MustGetKubeClient().
Then we can start creating test cases in new PRs.

@JianLi-RH JianLi-RH changed the title NO-ISSUE: OTA-1605 Create e2e test in CVO repo NO-ISSUE: OTA-1605 Create MustGetKubeClient function for e2e test Nov 11, 2025
@JianLi-RH
Copy link
Contributor Author

/retest

@JianLi-RH
Copy link
Contributor Author

/hold

I want to investigate more about client-go.

@DavidHurta
Copy link
Contributor

/hold
I want to investigate more about client-go.

@JianLi-RH, in case the investigation is not done by the end of the day, you want simply more time to explore or are simply busy, I would like to ask you whether it would be fine for me to rename the sanity test in a separate PR. That specific change is blocking my openshift/origin#30316 PR. I am happy to rename the test personally in a separate PR to unblock my PR while we are working on this one.

@JianLi-RH
Copy link
Contributor Author

@DavidHurta of course, go ahead, please. I am not sure when I can finish the investigation.

…create a clientset instance.

Clientset instance can be used to connect to cluster, manage resources.
With clientset instance we can evaluate the posibility of moving other tests to OTE.

The reference to OTE framework:
https://docs.google.com/document/d/1cFZj9QdzW8hbHc3H0Nce-2xrJMtpDJrwAse9H7hLiWk/edit?tab=t.0#heading=h.8cf3f4eii1q8
@JianLi-RH JianLi-RH force-pushed the implement_client_oc branch 5 times, most recently from afebe69 to d2300d9 Compare November 13, 2025 09:09
openshift/client-go gives us more efficient functions to access cluster
@JianLi-RH
Copy link
Contributor Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 13, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 13, 2025

@JianLi-RH: 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-aws-ovn-techpreview f98e03c link true /test e2e-aws-ovn-techpreview

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.

5 participants