Skip to content

test: improve how we set PUBLISH_UI#1233

Merged
rsoaresd merged 3 commits into
codeready-toolchain:masterfrom
rsoaresd:improve_PUBLISH_UI_configuration
Dec 15, 2025
Merged

test: improve how we set PUBLISH_UI#1233
rsoaresd merged 3 commits into
codeready-toolchain:masterfrom
rsoaresd:improve_PUBLISH_UI_configuration

Conversation

@rsoaresd
Copy link
Copy Markdown
Contributor

@rsoaresd rsoaresd commented Dec 11, 2025

Description

  • improve how we set PUBLISH_UI

Summary by CodeRabbit

  • Chores

    • Build configuration updated to enable UI publishing by default while preserving an override for specific CI scenarios.
  • Tests

    • Streamlined local end-to-end test invocation by removing redundant explicit flags and keeping only the required repository path.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 11, 2025

Walkthrough

Changed Makefile defaults and a test target: PUBLISH_UI now defaults to true but is forced false when CLONEREFS_OPTIONS is set. The test target test-devsandbox-dashboard-e2e-local no longer passes PUBLISH_UI or DEPLOY_UI explicitly.

Changes

Cohort / File(s) Summary
Makefile Configuration
make/devsandbox-dashboard.mk
PUBLISH_UI default flipped to true; added conditional override to set PUBLISH_UI = false when CLONEREFS_OPTIONS is non-empty. Removed explicit PUBLISH_UI=true and DEPLOY_UI=true args from test-devsandbox-dashboard-e2e-local invocation; now only passes UI_REPO_PATH.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Single-file change with small conditional and a target invocation edit.
  • Review attention:
    • Makefile syntax and conditional correctness (tabs, spacing).
    • Interactions with CI or wrapper scripts that rely on PUBLISH_UI/DEPLOY_UI.
    • Confirm intended behavior when CLONEREFS_OPTIONS is present.

Suggested reviewers

  • rajivnathan

Poem

🐰 I nibble lines of Make with care,
A flip, a guard, a lighter share.
Defaults now shine, but options sway,
If CLONEREFS whispers — hide away.
Hoppity tests skip extra flags today. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test: improve how we set PUBLISH_UI' is directly related to the main changes in the pull request, which involve modifying how the PUBLISH_UI flag is configured and set in the Makefile.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7cf3082 and 7642cb3.

📒 Files selected for processing (1)
  • make/devsandbox-dashboard.mk (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: rsoaresd
Repo: codeready-toolchain/toolchain-e2e PR: 1232
File: make/devsandbox-dashboard.mk:57-57
Timestamp: 2025-12-11T16:29:29.356Z
Learning: In make/devsandbox-dashboard.mk, the test-devsandbox-dashboard-e2e-local target intentionally allows PUBLISH_UI=true and DEPLOY_UI=true to enable publishing and deploying when running locally (outside a container), while test-devsandbox-dashboard-in-container sets PUBLISH_UI=false because image pushing is not available from inside the container.
📚 Learning: 2025-12-11T16:29:29.356Z
Learnt from: rsoaresd
Repo: codeready-toolchain/toolchain-e2e PR: 1232
File: make/devsandbox-dashboard.mk:57-57
Timestamp: 2025-12-11T16:29:29.356Z
Learning: In make/devsandbox-dashboard.mk, the test-devsandbox-dashboard-e2e-local target intentionally allows PUBLISH_UI=true and DEPLOY_UI=true to enable publishing and deploying when running locally (outside a container), while test-devsandbox-dashboard-in-container sets PUBLISH_UI=false because image pushing is not available from inside the container.

Applied to files:

  • make/devsandbox-dashboard.mk
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Unit Tests
  • GitHub Check: Build & push operator bundles & dashboard image for e2e tests
🔇 Additional comments (2)
make/devsandbox-dashboard.mk (2)

9-14: PUBLISH_UI default + CLONEREFS guard correctly separate local vs CI behavior

Defaulting PUBLISH_UI to true and then forcing it to false when CLONEREFS_OPTIONS is set cleanly gives:

  • Local / non‑Prow runs (no CLONEREFS_OPTIONS): PUBLISH_UI=true by default.
  • Prow/CI runs (with CLONEREFS_OPTIONS): PUBLISH_UI=false unless explicitly overridden on the make command line, which still wins over this assignment.

This lines up with your earlier note that CI should not publish directly because a GitHub Action handles the push instead.

Please double‑check that all CI jobs which must not publish have CLONEREFS_OPTIONS set, and that any job which should publish uses an explicit PUBLISH_UI=… on the make command line where needed.


56-56: Local e2e target still publishes+deploys locally while avoiding CI publishes

Dropping the explicit PUBLISH_UI=true DEPLOY_UI=true here and relying on the defaults means:

  • Locally (no CLONEREFS_OPTIONS): PUBLISH_UI and DEPLOY_UI both remain true, preserving the previous “publish and deploy when running locally” behavior.
  • In CI (with CLONEREFS_OPTIONS): this target now respects PUBLISH_UI=false from the guard, so it won’t accidentally publish from CI if someone invokes the -local target there.

This matches the intended separation between local publishing and container/CI flows. Based on learnings, this keeps the desired local behavior while tightening CI behavior.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Comment thread make/devsandbox-dashboard.mk Outdated
@rsoaresd rsoaresd requested a review from rajivnathan December 11, 2025 17:03


PUBLISH_UI ?= false
PUBLISH_UI ?= true
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.

Shouldn't it be the other way around? false by default but if CLONEREFS_OPTIONS then set it to true?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When running in CI (CLONEREFS_OPTIONS set), we want PUBLISH_UI to false. Because we will push it in a GH action through this make target: https://github.com/codeready-toolchain/toolchain-e2e/blob/master/make/test.mk#L295-L304

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.

ah ok, thanks for the explanation

@rsoaresd rsoaresd requested a review from rajivnathan December 12, 2025 09:34
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Dec 15, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MatousJobanek, rsoaresd

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 [MatousJobanek,rsoaresd]

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

@rsoaresd rsoaresd merged commit b1147e8 into codeready-toolchain:master Dec 15, 2025
7 of 9 checks passed
@sonarqubecloud
Copy link
Copy Markdown

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.

3 participants