Skip to content

AROSLSRE-2394: declare RUN_COST_TAG_VALUE in the provision step and enable it for dev e2e-parallel jobs - #87928

Open
galchammat wants to merge 1 commit into
openshift:mainfrom
galchammat:aroslsre-2394-run-cost-tag-value
Open

galchammat wants to merge 1 commit into
openshift:mainfrom
galchammat:aroslsre-2394-run-cost-tag-value

Conversation

@galchammat

@galchammat galchammat commented Oct 29, 2026 •

Copy link
Copy Markdown

Summary

Minimal ci-operator wiring for DEV E2E run cost attribution (AROSLSRE-2394):

  1. Declare RUN_COST_TAG_VALUE in the aro-hcp-provision-environment step ref, default "" — ci-operator only passes env vars the step ref declares, so without this declaration enabling it on any job is a silent no-op. The empty default keeps every other consumer of the step (including the capz-e2e job and the long-lived environments) unchanged. The literal BUILD_ID resolves to the job's Prow build ID, because ci-operator configuration cannot expand $(BUILD_ID) itself.
  2. Enable it on the four dev e2e-parallel jobs (e2e-parallel, e2e-parallel-inplace-upgrade, e2e-parallel-ocp-nightly, e2e-parallel-slow, all ARO_HCP_DEPLOY_ENV: ci01) with RUN_COST_TAG_VALUE: "BUILD_ID" — the per-run PR-validation jobs whose infrastructure spend should be attributable to a single job.

With the variable set, hack/ci/provision-environment.sh passes the tag to templatize's --resource-group-tags, which sets jobID.aro-hcp-ci.redhat.com=<BUILD_ID> on the resource groups the run creates (existing groups only have tag keys they already carry replaced), and the config override generator applies the same tag to the AKS cluster tags. Cost Management tag inheritance on the E2E subscriptions then attributes each job's spend.

Depends on Azure/ARO-HCP#7436 (the tool-side implementation). Until that merges, the variable is read but nothing consumes the tag yet — the jobs behave as before.

Verification

  • Both files are byte-identical to current main except the intended additions.
  • YAML structure follows ci-operator conventions; the only other ci01 consumer of the aro-hcp-provision-environment step (the optional capz-e2e job) and the periodic healthchecks (which use the separate aro-hcp-provision-from-main step) do not set the variable and stay untagged.

Summary by CodeRabbit

The ARO HCP CI step ref now declares RUN_COST_TAG_VALUE with an empty default. Four ci01 dev E2E jobs set it to "BUILD_ID": e2e-parallel, e2e-parallel-inplace-upgrade, e2e-parallel-ocp-nightly, and e2e-parallel-slow.

This configures those jobs to identify their created resource groups with the Prow build ID for run cost attribution. Other consumers keep the empty default.

@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 29, 2026
@openshift-ci-robot

openshift-ci-robot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

@galchammat: This pull request references AROSLSRE-2394 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 "5.1.0" version, but no target version was set.

Details

In response to this:

Summary

Minimal ci-operator wiring for DEV E2E run cost attribution (AROSLSRE-2394):

  1. Declare RUN_COST_TAG_VALUE in the aro-hcp-provision-environment step ref, default "" — ci-operator only passes env vars the step ref declares, so without this declaration enabling it on any job is a silent no-op. The empty default keeps every other consumer of the step (including the capz-e2e job and the long-lived environments) unchanged. The literal BUILD_ID resolves to the job's Prow build ID, because ci-operator configuration cannot expand $(BUILD_ID) itself.
  2. Enable it on the four dev e2e-parallel jobs (e2e-parallel, e2e-parallel-inplace-upgrade, e2e-parallel-ocp-nightly, e2e-parallel-slow, all ARO_HCP_DEPLOY_ENV: ci01) with RUN_COST_TAG_VALUE: "BUILD_ID" — the per-run PR-validation jobs whose infrastructure spend should be attributable to a single job.

With the variable set, hack/ci/provision-environment.sh passes the tag to templatize's --resource-group-tags, which sets jobID.aro-hcp-ci.redhat.com=<BUILD_ID> on the resource groups the run creates (existing groups only have tag keys they already carry replaced), and the config override generator applies the same tag to the AKS cluster tags. Cost Management tag inheritance on the E2E subscriptions then attributes each job's spend.

Depends on Azure/ARO-HCP#7436 (the tool-side implementation). Until that merges, the variable is read but nothing consumes the tag yet — the jobs behave as before.

Verification

  • Both files are byte-identical to current main except the intended additions.
  • YAML structure follows ci-operator conventions; the only other ci01 consumer of the aro-hcp-provision-environment step (the optional capz-e2e job) and the periodic healthchecks (which use the separate aro-hcp-provision-from-main step) do not set the variable and stay untagged.

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 openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 29, 2026
@openshift-ci

openshift-ci Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Hi @galchammat. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: openshift/release
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 2e14869
  • Layers: Repository YAML (base), Central YAML (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dade051e-0e82-4f9e-96ba-fe090ab6d816
Commits

Reviewing files that changed from the base of the PR and between 2e14869 and f72cac7.

Files selected for processing: 2
  • ci-operator/config/Azure/ARO-HCP/Azure-ARO-HCP-main.yaml
  • ci-operator/step-registry/aro-hcp/provision/environment/aro-hcp-provision-environment-ref.yaml

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Walkthrough

The provision environment step adds a documented RUN_COST_TAG_VALUE variable. Four ARO-HCP e2e jobs set it to BUILD_ID.

Changes

ARO-HCP run cost tag configuration

Layer / File(s) Summary
Define the run cost tag value
ci-operator/step-registry/aro-hcp/provision/environment/aro-hcp-provision-environment-ref.yaml
Adds RUN_COST_TAG_VALUE with an empty default. The documentation describes BUILD_ID, literal values, and disabling run cost attribution.
Set the build ID in ARO-HCP jobs
ci-operator/config/Azure/ARO-HCP/Azure-ARO-HCP-main.yaml
Sets RUN_COST_TAG_VALUE to BUILD_ID in the e2e-parallel, e2e-parallel-inplace-upgrade, e2e-parallel-ocp-nightly, and e2e-parallel-slow jobs.

Priority: Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Feature

Suggested reviewers: roivaz

Merge Risk: Minimal · up to f72ca

The jobs continue to run, and no verified merge-blocking risk remains.

Pre-merge checks: Passed 15
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately summarizes both changes: declaring RUN_COST_TAG_VALUE in the provision step and enabling it for the dev e2e-parallel jobs.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names Passed PASS: The pull request changes only CI YAML configuration and a step-reference environment declaration. The diff adds RUN_COST_TAG_VALUE settings and documentation; it adds no Ginkgo test titles or le…
Test Structure And Quality Passed PASS: This pull request changes only two YAML configuration files. The diff adds an environment declaration and values for four jobs. It adds no Ginkgo test code or It blocks, so the listed test-str…
Microshift Test Compatibility Passed PASS: The pull request changes only two YAML configuration files. It adds an environment declaration and enables that variable on four CI jobs. The diff adds no Ginkgo tests or test bodies, so the Mic…
Single Node Openshift (Sno) Test Compatibility Passed The pull request changes only CI YAML configuration and a step-reference environment declaration. It adds no Ginkgo e2e tests or test bodies, so the SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility Passed The pull request changes only ci-operator job environment settings and a step-reference environment declaration. It does not add or modify deployment manifests, operator code, controllers, replicas, a…
Ote Binary Stdout Contract Passed PASS. The pull request changes only two YAML files. It adds CI environment configuration and documentation; it does not modify an OTE binary, Go code, suite setup, or any process-level stdout behavior…
Ipv6 And Disconnected Network Test Compatibility Passed The pull request changes only two YAML configuration files. It adds an environment declaration and enables that variable on four jobs. It adds no Ginkgo tests and introduces no IPv4 assumptions or ext…
No-Weak-Crypto Passed The pull request only adds the RUN_COST_TAG_VALUE environment declaration and sets it to "BUILD_ID" in four CI job configurations. The changed lines contain no MD5, SHA1, DES, 3DES, RC4, Blowfish,…
Container-Privileges Passed The pull request adds only RUN_COST_TAG_VALUE environment entries and documentation. The diff adds no privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation, or root execution …
No-Sensitive-Data-In-Logs Passed PASS: The pull request changes only CI YAML and a step-reference declaration. It adds RUN_COST_TAG_VALUE: "BUILD_ID" and documentation, with no logging statements, secret values, tokens, passwords, …
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

Full details: Stable And Deterministic Test Names

Explanation

PASS: The pull request changes only CI YAML configuration and a step-reference environment declaration. The diff adds RUN_COST_TAG_VALUE settings and documentation; it adds no Ginkgo test titles or legacy metadata prefixes. Therefore, no unstable or overly specific test name is introduced.

Full details: Test Structure And Quality

Explanation

PASS: This pull request changes only two YAML configuration files. The diff adds an environment declaration and values for four jobs. It adds no Ginkgo test code or It blocks, so the listed test-structure requirements do not apply.

Full details: Microshift Test Compatibility

Explanation

PASS: The pull request changes only two YAML configuration files. It adds an environment declaration and enables that variable on four CI jobs. The diff adds no Ginkgo tests or test bodies, so the MicroShift test compatibility check does not apply.

Full details: Topology-Aware Scheduling Compatibility

Explanation

The pull request changes only ci-operator job environment settings and a step-reference environment declaration. It does not add or modify deployment manifests, operator code, controllers, replicas, affinity, topology spread, node selectors, tolerations, or PDBs. Therefore, it introduces no topology-aware scheduling constraint covered by this check.

Full details: Ote Binary Stdout Contract

Explanation

PASS. The pull request changes only two YAML files. It adds CI environment configuration and documentation; it does not modify an OTE binary, Go code, suite setup, or any process-level stdout behavior. No explicit OTE stdout contract violation is introduced.

Full details: Ipv6 And Disconnected Network Test Compatibility

Explanation

The pull request changes only two YAML configuration files. It adds an environment declaration and enables that variable on four jobs. It adds no Ginkgo tests and introduces no IPv4 assumptions or external connectivity requirements under this check.

Full details: No-Weak-Crypto

Explanation

The pull request only adds the RUN_COST_TAG_VALUE environment declaration and sets it to "BUILD_ID" in four CI job configurations. The changed lines contain no MD5, SHA1, DES, 3DES, RC4, Blowfish, ECB, custom cryptography, or secret/token comparison logic.

Full details: Container-Privileges

Explanation

The pull request adds only RUN_COST_TAG_VALUE environment entries and documentation. The diff adds no privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation, or root execution setting in either changed file.

Full details: No-Sensitive-Data-In-Logs

Explanation

PASS: The pull request changes only CI YAML and a step-reference declaration. It adds RUN_COST_TAG_VALUE: "BUILD_ID" and documentation, with no logging statements, secret values, tokens, passwords, PII, hostnames, or customer data. The provision command remains unchanged and only invokes the existing provisioning script.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

@openshift-ci
openshift-ci Bot requested review from hbhushan3 and raelga October 29, 2026 02:58
@openshift-ci

openshift-ci Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: galchammat
Once this PR has been reviewed and has the lgtm label, please assign geoberle 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

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@galchammat: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-Azure-ARO-HCP-main-e2e-parallel Azure/ARO-HCP presubmit Ci-operator config changed
pull-ci-Azure-ARO-HCP-main-e2e-parallel-inplace-upgrade Azure/ARO-HCP presubmit Ci-operator config changed
pull-ci-Azure-ARO-HCP-main-e2e-parallel-ocp-nightly Azure/ARO-HCP presubmit Ci-operator config changed
pull-ci-Azure-ARO-HCP-main-e2e-parallel-slow Azure/ARO-HCP presubmit Ci-operator config changed
pull-ci-Azure-ARO-HCP-main-capz-e2e-dev Azure/ARO-HCP presubmit Registry content changed

Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals.

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

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

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants