Skip to content

HYPERFLEET-1108 - feat: Add run id labels to the adapter configs for …#62

Draft
ma-hill wants to merge 1 commit into
openshift-hyperfleet:mainfrom
ma-hill:HYPERFLEET-1108-mahill-new
Draft

HYPERFLEET-1108 - feat: Add run id labels to the adapter configs for …#62
ma-hill wants to merge 1 commit into
openshift-hyperfleet:mainfrom
ma-hill:HYPERFLEET-1108-mahill-new

Conversation

@ma-hill

@ma-hill ma-hill commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds run ID labels to E2E adapter configurations to enable cleanup of test resources created during specific test runs. When running E2E tests, resources (deployments, jobs, namespaces, configmaps, manifestworks) are created across multiple clusters and can accumulate if tests fail or are interrupted. This change propagates a RUN_ID environment variable through adapter task configs and into resource labels, allowing test cleanup scripts to query and delete all resources associated with a specific test run using label selectors.

HYPERFLEET-1108

Changes

  • Added optional runId parameter to all E2E adapter task configs (cl-deployment, cl-job, cl-maestro, cl-namespace, np-configmap) sourced from env.RUN_ID
  • Added e2e.hyperfleet.io/run-id labels to all adapter-created resources:
    • Deployments: resource metadata, selector matchLabels, and pod template labels
    • Jobs: resource metadata and pod template labels
    • ManifestWorks: resource metadata and embedded ConfigMap/Namespace manifests
    • Namespaces: resource metadata
    • ConfigMaps: resource metadata
  • Added RUN_ID environment variable to base adapter configuration in helmfile/values/base-adapter.yaml.gotmpl with default value "unknown"
  • All run ID labels are conditionally rendered using {{ if .runId }} to maintain backward compatibility when RUN_ID is not set

Notes

The runId parameter is optional (required: false) to maintain backward compatibility with existing test setups that don't set RUN_ID. Resources created without a run ID will have the label omitted entirely rather than set to a default value, making it easier to distinguish between labeled and unlabeled resources during cleanup.

Change associated

Test Plan

  • Deployed e2e-gcp environment, ran all tests, ensured labels were included
  • Verified label selectors can successfully query resources by run ID
  • Ensure no negative effect on other environments, gcp, e2e-kind, or kind

@openshift-ci

openshift-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mischulee for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (2)
  • do-not-merge/work-in-progress
  • do-not-merge/hold

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 325ee92a-1728-4411-b4e0-458b1dc2a007

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant