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

MGMT-22635: fix setup for CI E2E jobs - #67

Merged
openshift-merge-bot[bot] merged 1 commit into
mainfrom
MGMT-22635-setup-fixes
Apr 19, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
mainfrom
MGMT-22635-setup-fixes

Conversation

@omer-vishlitzky

@omer-vishlitzky omer-vishlitzky commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

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

Summary

  • Wait for Authorino deployment before running prepare scripts — fixes failed to check permissions in CaaS CI jobs
  • Increase AAP bootstrap timeout from 20 to 40 minutes — fixes intermittent timeouts in VMaaS CI jobs
  • Trigger publish-templates AAP job and wait for VM template when INSTALLER_VM_TEMPLATE is set — fixes Template 'osac.templates.ocp_virt_vm' doesn't exist in VMaaS CI jobs
  • Remove hardcoded INSTALLER_VM_TEMPLATE default so CaaS CI (which doesn't pass it) skips template publishing

Test plan

  • CaaS setup + teardown cycle (no template wait, hub created successfully)
  • VMaaS setup + teardown cycle (template published and available)
  • Consecutive teardown runs on clean cluster

Summary by CodeRabbit

  • Chores
    • Refined VM template configuration defaults and environment variable handling for improved flexibility.
    • Extended bootstrap job timeout to support longer system initialization scenarios.
    • Added readiness verification for additional services to ensure proper deployment sequencing.
    • Enhanced template provisioning workflow with improved service integration and validation.

@openshift-ci-robot

openshift-ci-robot commented Apr 19, 2026

Copy link
Copy Markdown

@omer-vishlitzky: This pull request references MGMT-22635 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-22635

Summary

  • Wait for Authorino deployment before running prepare scripts — fixes failed to check permissions in CaaS CI jobs
  • Increase AAP bootstrap timeout from 20 to 40 minutes — fixes intermittent timeouts in VMaaS CI jobs
  • Trigger publish-templates AAP job and wait for VM template when INSTALLER_VM_TEMPLATE is set — fixes Template 'osac.templates.ocp_virt_vm' doesn't exist in VMaaS CI jobs
  • Remove hardcoded INSTALLER_VM_TEMPLATE default so CaaS CI (which doesn't pass it) skips template publishing

Test plan

  • CaaS setup + teardown cycle (no template wait, hub created successfully)
  • VMaaS setup + teardown cycle (template published and available)
  • Consecutive teardown runs on clean cluster

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 Apr 19, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@omer-vishlitzky has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 29 minutes and 58 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 29 minutes and 58 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fb67a36d-dbec-49d5-8b6f-767cc98a6161

📥 Commits

Reviewing files that changed from the base of the PR and between f1ab7df and 06e843d.

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

Walkthrough

This pull request modifies three setup scripts to change the default behavior for VM template handling. INSTALLER_VM_TEMPLATE default values are changed from "osac.templates.ocp_virt_vm" to empty string across prepare-fulfillment-service.sh and prepare-tenant.sh. The readiness check in prepare-fulfillment-service.sh is updated from a conditional gate on VIRT_SERVICE to a direct check for INSTALLER_VM_TEMPLATE presence; when enabled, it queries the osac-aap route, retrieves an API token secret, and calls the AAP API to launch an osac-publish-templates job before waiting for the template. Additionally, setup.sh increases the AAP bootstrap job timeout from 1200 to 2400 seconds and adds a new readiness wait for deployment/authorino.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested labels

lgtm, approved

Suggested reviewers

  • tzumainn
  • tzvatot
  • akshaynadkarni
🚥 Pre-merge checks | ✅ 3
✅ 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 clearly references the JIRA issue (MGMT-22635) and accurately describes the main objective: fixes for CI E2E job setup. The summary shows the changes address specific CI/E2E issues (CaaS and VMaaS) through setup modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch MGMT-22635-setup-fixes

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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
scripts/setup.sh (1)

217-220: Quote the namespace argument in the new waits.

ShellCheck is right here: quoting keeps these helper calls robust and removes word-splitting/globbing risk.

Proposed cleanup
-wait_for_resource job/aap-bootstrap condition=complete 2400 ${INSTALLER_NAMESPACE}
+wait_for_resource job/aap-bootstrap condition=complete 2400 "${INSTALLER_NAMESPACE}"
 
 # Wait for Authorino to be ready (gRPC auth depends on it)
-wait_for_resource deployment/authorino condition=Available 300 ${INSTALLER_NAMESPACE}
+wait_for_resource deployment/authorino condition=Available 300 "${INSTALLER_NAMESPACE}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/setup.sh` around lines 217 - 220, The two calls to wait_for_resource
(for job/aap-bootstrap and deployment/authorino) pass the namespace variable
unquoted; update both invocations to quote the namespace argument so they read
wait_for_resource job/aap-bootstrap condition=complete 2400
"${INSTALLER_NAMESPACE}" and wait_for_resource deployment/authorino
condition=Available 300 "${INSTALLER_NAMESPACE}" to avoid
word-splitting/globbing issues when INSTALLER_NAMESPACE contains special
characters or spaces.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/prepare-fulfillment-service.sh`:
- Line 35: The retry condition passed to retry_until expands
INSTALLER_VM_TEMPLATE unquoted which allows word-splitting/glob expansion;
update the command inside retry_until to quote the variable (use
"$INSTALLER_VM_TEMPLATE") where --arg tpl is set in the osac | jq invocation so
the jq filter select(.id == $tpl) receives the whole template id as a single
argument; specifically modify the expression containing osac get
computeinstancetemplate and jq -r --arg tpl to use "$INSTALLER_VM_TEMPLATE"
while keeping the rest of the retry_until call intact.
- Around line 28-32: The JT_ID assignment and launch steps should fail fast:
change the initial lookup to treat HTTP errors as failures and validate the
parsed JT_ID is non-empty and not "null" before proceeding (the symbol JT_ID
identifies this variable), and ensure the launch curl command also checks its
exit status; specifically, run the lookup curl with fail-on-error (so it returns
non-zero for 4xx/5xx), parse with jq into JT_ID, test "[ -z "$JT_ID" ] || [
"$JT_ID" = "null" ]" and exit with a clear error if true, and after the curl
POST that launches the job check its exit code and fail fast with an explanatory
message if it failed.

---

Nitpick comments:
In `@scripts/setup.sh`:
- Around line 217-220: The two calls to wait_for_resource (for job/aap-bootstrap
and deployment/authorino) pass the namespace variable unquoted; update both
invocations to quote the namespace argument so they read wait_for_resource
job/aap-bootstrap condition=complete 2400 "${INSTALLER_NAMESPACE}" and
wait_for_resource deployment/authorino condition=Available 300
"${INSTALLER_NAMESPACE}" to avoid word-splitting/globbing issues when
INSTALLER_NAMESPACE contains special characters or spaces.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a68324fa-1f81-4947-a741-c391989eb0c7

📥 Commits

Reviewing files that changed from the base of the PR and between c4e96ee and f1ab7df.

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

Comment thread scripts/prepare-fulfillment-service.sh Outdated
Comment thread scripts/prepare-fulfillment-service.sh Outdated
- wait for Authorino deployment before running prepare scripts,
  fixes "failed to check permissions" in CaaS CI jobs
- increase AAP bootstrap timeout from 20 to 40 minutes,
  fixes intermittent timeouts in VMaaS CI jobs
- trigger publish-templates AAP job and wait for VM template
  when INSTALLER_VM_TEMPLATE is set, fixes "template not found"
  in VMaaS CI jobs
- remove hardcoded INSTALLER_VM_TEMPLATE default so CaaS CI
  (which doesn't pass it) skips template publishing
@omer-vishlitzky
omer-vishlitzky force-pushed the MGMT-22635-setup-fixes branch from d04dd72 to 06e843d Compare April 19, 2026 11:58
@danmanor

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci

openshift-ci Bot commented Apr 19, 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

@danmanor

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Apr 19, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit a341d75 into main Apr 19, 2026
7 of 8 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jul 3, 2026
5 tasks
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