Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

MGMT-24219: add cluster template support to prepare-fulfillment-service - #96

Merged
openshift-merge-bot[bot] merged 1 commit into
mainfrom
MGMT-24219-cluster-template-support
May 10, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
mainfrom
MGMT-24219-cluster-template-support

Conversation

@omer-vishlitzky

@omer-vishlitzky omer-vishlitzky commented May 9, 2026

Copy link
Copy Markdown
Contributor

https://issues.redhat.com/browse/MGMT-24219

Adds INSTALLER_CLUSTER_TEMPLATE support so CaaS CI can trigger
template publishing and wait for cluster templates to appear.

  • Gate the template-publishing block on either INSTALLER_VM_TEMPLATE
    or INSTALLER_CLUSTER_TEMPLATE being non-empty
  • If INSTALLER_CLUSTER_TEMPLATE is set, wait for it via
    osac get clustertemplate with the same retry_until pattern
  • Existing VMAaS flow (INSTALLER_VM_TEMPLATE) is unaffected

Summary by CodeRabbit

  • Chores
    • Extended deployment script with support for optional cluster template configuration
    • Updated template handling to wait for cluster template availability when configured

Review Change Stack

Gate template-publishing on either INSTALLER_VM_TEMPLATE or
INSTALLER_CLUSTER_TEMPLATE being set. Wait for clustertemplate
using osac get clustertemplate when INSTALLER_CLUSTER_TEMPLATE
is provided.
@openshift-ci-robot

openshift-ci-robot commented May 9, 2026

Copy link
Copy Markdown

@omer-vishlitzky: This pull request references MGMT-24219 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 epic to target the "5.0.0" version, but no target version was set.

Details

In response to this:

https://issues.redhat.com/browse/MGMT-24219

Adds INSTALLER_CLUSTER_TEMPLATE support so CaaS CI can trigger
template publishing and wait for cluster templates to appear.

  • Gate the template-publishing block on either INSTALLER_VM_TEMPLATE
    or INSTALLER_CLUSTER_TEMPLATE being non-empty
  • If INSTALLER_CLUSTER_TEMPLATE is set, wait for it via
    osac get clustertemplate with the same retry_until pattern
  • Existing VMAaS flow (INSTALLER_VM_TEMPLATE) is unaffected

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.

@coderabbitai

coderabbitai Bot commented May 9, 2026

Copy link
Copy Markdown

Walkthrough

The pull request extends scripts/prepare-fulfillment-service.sh to support publishing and waiting for an optional cluster template alongside the existing compute instance template feature. It introduces a new INSTALLER_CLUSTER_TEMPLATE environment variable and updates the template-handling conditional logic to run when either template variable is set. The script now includes separate timed waits for both template types using retry logic with timeout enforcement.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • osac-project/osac-installer#67: Adds VM template publish/wait logic for computeinstancetemplate; the main PR extends that pattern to also handle cluster templates.
  • osac-project/osac-installer#87: Modifies computeinstancetemplate wait timeout in the same script; both PRs adjust template-related logic in prepare-fulfillment-service.sh.

Suggested reviewers

  • larsks
  • trewest
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: adding cluster template support to the prepare-fulfillment-service script.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch MGMT-24219-cluster-template-support

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
scripts/prepare-fulfillment-service.sh (1)

44-58: ⚖️ Poor tradeoff

Consider parallel waits when both templates are set.

When both INSTALLER_VM_TEMPLATE and INSTALLER_CLUSTER_TEMPLATE are set, the current sequential waiting can take up to 600 seconds (300s + 300s). Since both templates are published by the same AAP job, waiting for them in parallel could reduce total wait time to approximately 300 seconds in CI scenarios.

This is not a functional issue—the current implementation is correct—but could improve CI efficiency.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/prepare-fulfillment-service.sh` around lines 44 - 58, When both
INSTALLER_VM_TEMPLATE and INSTALLER_CLUSTER_TEMPLATE are set the script waits
sequentially causing up to double timeout; change the logic around the two
retry_until calls so they run in parallel (background the retry_until
invocations and wait for both), ensure you still capture non-zero exit of either
retry_until and propagate a single failure exit code, and keep the same messages
for computeinstancetemplate and clustertemplate; reference the
INSTALLER_VM_TEMPLATE and INSTALLER_CLUSTER_TEMPLATE checks and the retry_until
invocation to locate where to background, wait, and handle errors.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@scripts/prepare-fulfillment-service.sh`:
- Around line 44-58: When both INSTALLER_VM_TEMPLATE and
INSTALLER_CLUSTER_TEMPLATE are set the script waits sequentially causing up to
double timeout; change the logic around the two retry_until calls so they run in
parallel (background the retry_until invocations and wait for both), ensure you
still capture non-zero exit of either retry_until and propagate a single failure
exit code, and keep the same messages for computeinstancetemplate and
clustertemplate; reference the INSTALLER_VM_TEMPLATE and
INSTALLER_CLUSTER_TEMPLATE checks and the retry_until invocation to locate where
to background, wait, and handle errors.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d69942d4-858f-4173-a1fb-d499235e0ab7

📥 Commits

Reviewing files that changed from the base of the PR and between faaf549 and 8b9b03b.

📒 Files selected for processing (1)
  • scripts/prepare-fulfillment-service.sh

@openshift-ci

openshift-ci Bot commented May 10, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danmanor, omer-vishlitzky

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 [danmanor,omer-vishlitzky]

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
openshift-merge-bot Bot merged commit 252e16d into main May 10, 2026
15 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants