-
Notifications
You must be signed in to change notification settings - Fork 43
Include retry to check OCS CRD is available #670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughThe Ansible task checking for the OCS CustomResourceDefinition (CRD) was refactored to use a block with retry logic—attempting up to 12 times with 10-second intervals—and a rescue handler that fails explicitly if the CRD is not found, consolidating the previous separate failure task. Changes
Possibly related PRs
Suggested reviewers
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Build succeeded. ✔️ dci-rpm-build-el8 SUCCESS in 2m 52s |
|
Build succeeded. ✔️ dci-rpm-build-el8 SUCCESS in 2m 49s |
|
Build succeeded. ✔️ dci-rpm-build-el8 SUCCESS in 2m 51s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (3)
roles/odf_setup/tasks/validation.yml (3)
4-6: Specify the API version explicitly
When querying a CustomResourceDefinition, it’s best practice to setapi_version: apiextensions.k8s.io/v1so you’re always targeting the correct API endpoint.
22-22: Avoid register variable collision
Both the OCS and LSO checks useregister: req_crd, so the second invocation will overwrite the first. Consider renaming the LSO register (for example,req_lso_crd) and update its associatedwhenaccordingly.
16-16: Simplify rescue block condition
In arescue, tasks only run when the block fails—so thewhen: req_crd.resources | list | count == 0is redundant. You can remove thewhenclause and let thefailalways execute on block failure.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
roles/odf_setup/tasks/validation.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
roles/odf_setup/tasks/validation.yml
[error] 17-17: trailing spaces
(trailing-spaces)
🪛 GitHub Actions: Pull Request
roles/odf_setup/tasks/validation.yml
[error] 1-1: name[missing]: All tasks should be named.
[error] 1-1: yaml[trailing-spaces]: Trailing spaces detected.
🔇 Additional comments (1)
roles/odf_setup/tasks/validation.yml (1)
10-10: Approved: improved retry condition
Usinguntil: req_crd.resources | length > 0correctly waits until the CRD actually exists, fixing the previous “always true” check.
|
Build succeeded. ✔️ dci-rpm-build-el8 SUCCESS in 2m 47s |
tkrishtop
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM will approve once the job will pass
|
recheck |
|
Build succeeded. ✔️ dci-rpm-build-el8 SUCCESS in 2m 48s |
|
recheck |
|
from change #670:
|
1 similar comment
|
from change #670:
|
|
Build succeeded. ✔️ dci-rpm-build-el8 SUCCESS in 2m 53s |
SUMMARY
This change request is to allow wait time of 120 seconds to check OCS crd is avaialble.
Successful DCI job: https://www.distributed-ci.io/jobs/391874e4-f27c-4ba6-8e66-1549e09db2df/jobStates
ISSUE TYPE
nominal change
Tests
Test-Hints: no-check