feat: add oc adm inspect output to prow artifacts#5351
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sclarkso The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Skipping CI for Draft Pull Request. |
|
/test e2e-parallel |
|
/test e2e-parallel |
There was a problem hiding this comment.
Pull request overview
This PR enhances E2E debug artifact collection by capturing oc adm inspect output from HCP clusters (focused on ingress-related namespaces/resources) and storing it under the test’s ${ARTIFACT_DIR} output, using cached admin REST configs obtained during test execution.
Changes:
- Cache HCP admin
*rest.Configper cluster (resourceGroup/clusterName) after successfully requesting admin credentials. - Extend per-test debug collection to run
oc adm inspectper cached HCP cluster and write results to${ARTIFACT_DIR}/inspect-{clusterName}/. - Add supporting plumbing in the per-test framework (new
hcpAdminConfigsfield; inspect collection routines;ocdiscovery and timeout handling).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/util/framework/per_test_framework.go | Adds hcpAdminConfigs to test context and collects oc adm inspect artifacts for cached HCP clusters during debug collection. |
| test/util/framework/hcp_helper.go | Caches the admin REST config in the test context after a successful admin credential request. |
https://redhat.atlassian.net/issues?filter=-1&selectedIssue=[AROSLSRE-846](https://redhat.atlassian.net/browse/AROSLSRE-846)
What
test/util/framework/hcp_helper.go — GetAdminRESTConfigForHCPCluster now caches the admin REST config in tc.hcpAdminConfigs (keyed by resourceGroup/clusterName) after a successful credential request.
test/util/framework/per_test_framework.go:
Why
The ingress cert provisioning chain has async hops that happen on the customer's cluster (ACM policy delivers cert to HCP's openshift-ingress/cluster-ingress-cert, IngressController reloads). We cannot gate our backend's Succeeded state on these customer-side steps -- the backend cannot couple its readiness to the customer's kube-apiserver or nodes. But E2E tests can and should collect diagnostic data when these steps haven't completed.
Testing
e2e
Special notes for your reviewer
PR Checklist