Skip to content

Adding ev2 execution constraints level - #331

Open
Rachel Weber (rachelvweber) wants to merge 1 commit into
mainfrom
rawo/addingExecutionConstraintLevelKnob
Open

Adding ev2 execution constraints level#331
Rachel Weber (rachelvweber) wants to merge 1 commit into
mainfrom
rawo/addingExecutionConstraintLevelKnob

Conversation

@rachelvweber

Copy link
Copy Markdown
Collaborator

Adding ev2 execution constraints level knob to pipelines. For use when you want to deploy to all regions within a cloud with execution constraints. Previously, if just cloud was specified, the step would run once per cloud.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new level semantics and the existing OR-evaluated constraints don’t align with the current index-based equality check, risking false “metadata conflict” errors (and omitted vs explicit “Cloud” comparisons) without the suggested normalization.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR extends the pipeline execution-constraints model to support an explicit Ev2 constraint “level” knob (Cloud vs Region), enabling scenarios where a deployment should run once per region across a cloud even when regions aren’t explicitly listed.

Changes:

  • Adds level to ExecutionConstraint (Go type + YAML/JSON shape).
  • Updates the v1 pipeline JSON schema to validate level as an enum (Cloud/Region).
  • Updates graph resource-group metadata equality logic to consider the new field and updates testdata pipeline YAML to include level: Region.
File summaries
File Description
pipelines/types/resourcegroup.go Adds ExecutionConstraint.Level and documents intended behavior.
pipelines/types/pipeline.schema.v1.json Adds executionConstraint.level enum validation to schema v1.
pipelines/graph/graph.go Compares Level during resource group metadata conflict detection.
config/testdata/pipelines/pipeline.yaml Adds level: Region to a test pipeline fixture.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pipelines/graph/graph.go
Comment on lines 785 to 789
for i, ac := range a.ExecutionConstraints {
bc := b.ExecutionConstraints[i]
if ac.Singleton != bc.Singleton {
return false
}
Comment thread pipelines/types/pipeline.schema.v1.json
Comment thread pipelines/types/resourcegroup.go

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci

openshift-ci Bot commented Sep 11, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jonathan34c, rachelvweber, stevekuznetsov

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [rachelvweber,stevekuznetsov]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rachelvweber

Copy link
Copy Markdown
Collaborator Author

/retest

@rachelvweber
Rachel Weber (rachelvweber) force-pushed the rawo/addingExecutionConstraintLevelKnob branch from 0ae0b8b to cd688c8 Compare September 11, 2026 19:46
@openshift-ci openshift-ci Bot removed the lgtm label Sep 11, 2026
@openshift-ci

openshift-ci Bot commented Sep 11, 2026

Copy link
Copy Markdown

New changes are detected. LGTM label has been removed.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants