bump submodules + fix refresh script reliability - #163
openshift-merge-bot[bot] merged 1 commit into
Conversation
Bump all submodules to latest main. prepare-aap.sh: capture curl response before piping to jq so non-JSON responses from the AAP gateway are logged instead of producing a silent jq parse error. refresh-after-snapshot.sh: bump keycloak-set-passwords job timeout from 120s to 300s. The job needs Keycloak to fully start after snapshot boot which can take up to 3 minutes.
Summary by CodeRabbit
WalkthroughThis pull request coordinates version updates across the OSAC project by advancing three component submodules (osac-aap, osac-fulfillment-service, osac-operator) to new commits and updating their corresponding image tag overrides in the base kustomization.yaml. These changes are then propagated through three environment overlay configurations (caas-ci, osac-integration, vmaas-ci) to ensure AAP build references remain synchronized. Additionally, two shell scripts are hardened: prepare-aap.sh gains explicit error handling for token creation responses, and refresh-after-snapshot.sh increases a Kubernetes Job wait timeout from 120s to 300s. Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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: 1
🤖 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.
Inline comments:
In `@scripts/prepare-aap.sh`:
- Around line 22-26: The curl call that sets AAP_RESPONSE in prepare-aap.sh can
hang indefinitely; update the curl invocation (the command assigning
AAP_RESPONSE) to include explicit timeouts (e.g., --connect-timeout 10 and
--max-time 30 or values chosen by your policy) so connection and total request
time are bounded, and ensure these flags are added alongside the existing -sk -X
POST -u ... -H ... -d ... "${AAP_URL}/api/gateway/v1/tokens/" invocation.
🪄 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: Enterprise
Run ID: 84c38ef4-72e3-4c0d-83d0-8c826432f8b4
📒 Files selected for processing (9)
base/kustomization.yamlbase/osac-aapbase/osac-fulfillment-servicebase/osac-operatoroverlays/caas-ci/kustomization.yamloverlays/osac-integration/kustomization.yamloverlays/vmaas-ci/kustomization.yamlscripts/prepare-aap.shscripts/refresh-after-snapshot.sh
| AAP_RESPONSE=$(curl -sk -X POST \ | ||
| -u "admin:${AAP_ADMIN_PASSWORD}" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{"description": "osac-operator", "scope": "write"}' \ | ||
| "${AAP_URL}/api/gateway/v1/tokens/" | jq -r '.token') | ||
| "${AAP_URL}/api/gateway/v1/tokens/") |
There was a problem hiding this comment.
Add explicit curl timeouts to prevent indefinite hangs
Line 22 performs a remote call without --connect-timeout/--max-time. If the gateway or network stalls, this script can block indefinitely and break refresh automation reliability.
Suggested patch
-AAP_RESPONSE=$(curl -sk -X POST \
+AAP_RESPONSE=$(curl -skS --connect-timeout 10 --max-time 60 -X POST \
-u "admin:${AAP_ADMIN_PASSWORD}" \
-H "Content-Type: application/json" \
-d '{"description": "osac-operator", "scope": "write"}' \
"${AAP_URL}/api/gateway/v1/tokens/")As per coding guidelines, "Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| AAP_RESPONSE=$(curl -sk -X POST \ | |
| -u "admin:${AAP_ADMIN_PASSWORD}" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"description": "osac-operator", "scope": "write"}' \ | |
| "${AAP_URL}/api/gateway/v1/tokens/" | jq -r '.token') | |
| "${AAP_URL}/api/gateway/v1/tokens/") | |
| AAP_RESPONSE=$(curl -skS --connect-timeout 10 --max-time 60 -X POST \ | |
| -u "admin:${AAP_ADMIN_PASSWORD}" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"description": "osac-operator", "scope": "write"}' \ | |
| "${AAP_URL}/api/gateway/v1/tokens/") |
🤖 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-aap.sh` around lines 22 - 26, The curl call that sets
AAP_RESPONSE in prepare-aap.sh can hang indefinitely; update the curl invocation
(the command assigning AAP_RESPONSE) to include explicit timeouts (e.g.,
--connect-timeout 10 and --max-time 30 or values chosen by your policy) so
connection and total request time are bounded, and ensure these flags are added
alongside the existing -sk -X POST -u ... -H ... -d ...
"${AAP_URL}/api/gateway/v1/tokens/" invocation.
|
[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 |
|
@omer-vishlitzky: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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 kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
Test plan