Skip to content

adding log message for projects that chose undistributed, so it's cle…#973

Merged
Allda merged 1 commit into
mainfrom
update_finally_for_undistrubited
Jun 30, 2026
Merged

adding log message for projects that chose undistributed, so it's cle…#973
Allda merged 1 commit into
mainfrom
update_finally_for_undistrubited

Conversation

@acornett21

@acornett21 acornett21 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

…arer when their operator isn't released to catalogs

Merge Request Checklists

  • Development is done in feature branches
  • Code changes are submitted as pull request into a primary branch [Provide reason for non-primary branch submissions]
  • Code changes are covered with unit and integration tests.
  • Code passes all automated code tests:
    • Linting
    • Code formatter - Black
    • Security scanners
    • Unit tests
    • Integration tests
  • Code is reviewed by at least 1 team member
  • Pull request is tagged with "risk/good-to-go" label for minor changes

Motivation

PR's like the below, there are no logs explaining why acquire-lease is skipped and only a bundle is released. This adds a finally block so this is always logged for clarity, and does not affect any of the workflow revolving around the lease itself.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Log undistributed operator choice in operator release pipeline
✨ Enhancement ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

Description

• Add a conditional finally-step that logs when lease acquisition was skipped.
• Surface the Pyxis operator distribution value to clarify why no catalogs are updated.
Diagram

graph TD
  A["get-pyxis data"] --> B["acquire lease"] --> C{"lease skipped?"} -->|"No"| E["release leases"]
  C -->|"Yes"| D["log skip notice"] --> E
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Log the reason inside the acquire-lease task itself
  • ➕ Keeps all 'skipped' reasoning co-located with the decision that skipped the task
  • ➕ Avoids relying on a finally-stage status check
  • ➖ May require changing shared/reused task definitions
  • ➖ Harder to limit the message only to the undistributed scenario if the task can be skipped for other reasons
2. Emit a pipeline result/annotation for distribution decision
  • ➕ Makes the reason visible in Tekton UI/automation without scanning logs
  • ➕ Can be consumed by downstream reporting/alerts
  • ➖ More plumbing (results wiring) than a simple log step
  • ➖ Still needs a logging/message strategy for humans reading task output

Recommendation: The current approach (a small conditional finally-step) is a pragmatic, low-risk way to make the undistributed behavior obvious in logs without touching shared task implementations. Consider adding a pipeline result later if consumers need machine-readable visibility.

Files changed (1) +25 / -0

Other (1) +25 / -0
operator-release-pipeline.ymlAdd conditional finally log when distribution is undistributed +25/-0

Add conditional finally log when distribution is undistributed

• Introduces a new 'finally' task ('log-distribution-skip-notice') guarded by 'when' to run only when 'acquire-lease' has status 'None'. The step logs the operator distribution value from Pyxis and explicitly states the operator will not be released to indexes/catalogs.

ansible/roles/operator-pipeline/templates/openshift/pipelines/operator-release-pipeline.yml

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

@acornett21 acornett21 requested a review from Allda June 23, 2026 14:45
@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

Qodo Logo

@acornett21 acornett21 force-pushed the update_finally_for_undistrubited branch 2 times, most recently from ac63686 to 2599546 Compare June 25, 2026 17:47
…arer when their operator isn't released to catalogs

Signed-off-by: Adam D. Cornett <adc@redhat.com>
@acornett21 acornett21 force-pushed the update_finally_for_undistrubited branch from cc3d5a5 to 6b294a9 Compare June 26, 2026 13:55
@Allda Allda merged commit 59b58b9 into main Jun 30, 2026
37 of 39 checks passed
@Allda Allda deleted the update_finally_for_undistrubited branch June 30, 2026 12:26
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.

2 participants