MGMT-22635: fix setup for CI E2E jobs - #67
Conversation
|
@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. DetailsIn response to this:
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. |
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis pull request modifies three setup scripts to change the default behavior for VM template handling. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (3)
scripts/prepare-fulfillment-service.shscripts/prepare-tenant.shscripts/setup.sh
- 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
d04dd72 to
06e843d
Compare
|
/approve |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
https://issues.redhat.com/browse/MGMT-22635
Summary
failed to check permissionsin CaaS CI jobsINSTALLER_VM_TEMPLATEis set — fixesTemplate 'osac.templates.ocp_virt_vm' doesn't existin VMaaS CI jobsINSTALLER_VM_TEMPLATEdefault so CaaS CI (which doesn't pass it) skips template publishingTest plan
Summary by CodeRabbit