Skip to content

check_resource | Remove check for current/desired-state in wait-sriov.yml #701

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

Merged
merged 1 commit into from
Jun 11, 2025

Conversation

ramperher
Copy link
Contributor

@ramperher ramperher commented Jun 10, 2025

SUMMARY

It's not true that all the SriovNetworkNodeState checks have the SRIOV annotations present, e.g. https://www.distributed-ci.io/jobs/e655be15-f3ce-410b-8e75-a9476c50d4ae/jobStates?sort=date&task=625d5c02-78c2-4779-b561-2346840feacc, the task is failing because all checks were passing but desired-state annotation was not in place.

From what I've extracted from daily jobs, I could see that:

So, with this change, I'm just returning to the original check, which is just to check the syncStatus, just to be compliant with all available OCP releases. but still using the cleaner approach with json_query, introduced in this PR: #661

It's true that it would be more precise to also use the two network annotations aforementioned, but with the syncStatus it should be fine; typically, syncStatus moves to Succeeded once the annotations (if they're defined) are in Idle status.

ISSUE TYPE
  • Bug
Tests

Test-Hints: no-check

@ramperher ramperher requested a review from a team as a code owner June 10, 2025 08:35
Copy link
Contributor

coderabbitai bot commented Jun 10, 2025

📝 Walkthrough

Walkthrough

The wait-sriov.yml task was simplified by removing the extraction and checks of both "current-state" and "desired-state" annotations from the SriovNetworkNodeState resource. Now, it only waits for the resource’s sync status to be "Succeeded" and that the resource exists.

Changes

File(s) Change Summary
roles/check_resource/tasks/wait-sriov.yml Removed extraction and evaluation of "current-state" and "desired-state" annotations; simplified wait condition to check only sync status and resource existence.

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6a3c566 and 091ba08.

📒 Files selected for processing (1)
  • roles/check_resource/tasks/wait-sriov.yml (0 hunks)
💤 Files with no reviewable changes (1)
  • roles/check_resource/tasks/wait-sriov.yml
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Sanity Check (stable-2.18)
  • GitHub Check: Sanity Check (stable-2.9)
  • GitHub Check: Ansible-lint Check

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@ramperher
Copy link
Contributor Author

recheck

Copy link

@dcibot
Copy link
Collaborator

dcibot commented Jun 10, 2025

@ramperher
Copy link
Contributor Author

recheck

Copy link

@ramperher
Copy link
Contributor Author

recheck

1 similar comment
@ramperher
Copy link
Contributor Author

recheck

Copy link

@ramperher
Copy link
Contributor Author

recheck

Copy link

@dcibot
Copy link
Collaborator

dcibot commented Jun 10, 2025

@ramperher
Copy link
Contributor Author

recheck

Copy link

@manurodriguez
Copy link
Contributor

SUMMARY

It's not true that all the SriovNetworkNodeState checks have the desired-state annotation present, e.g. https://www.distributed-ci.io/jobs/e655be15-f3ce-410b-8e75-a9476c50d4ae/jobStates?sort=date&task=625d5c02-78c2-4779-b561-2346840feacc, the task is failing because all checks were passing but desired-state annotation was not in place. It's enough by checking the current-state and the syncStatus.

Thanks Ramon, I started to experience this yesterday, I suspect SRIOV operator changed.

@dcibot
Copy link
Collaborator

dcibot commented Jun 10, 2025

@ramperher
Copy link
Contributor Author

SUMMARY

It's not true that all the SriovNetworkNodeState checks have the desired-state annotation present, e.g. https://www.distributed-ci.io/jobs/e655be15-f3ce-410b-8e75-a9476c50d4ae/jobStates?sort=date&task=625d5c02-78c2-4779-b561-2346840feacc, the task is failing because all checks were passing but desired-state annotation was not in place. It's enough by checking the current-state and the syncStatus.

Thanks Ramon, I started to experience this yesterday, I suspect SRIOV operator changed.

In fact, I've tested in 4.12 with SPK and it failed because no network annotation is used there to report the "Idle" status, it's just used the syncStatus field, so I've refactored again the code.

Copy link

@dcibot
Copy link
Collaborator

dcibot commented Jun 10, 2025

Copy link
Contributor

@manurodriguez manurodriguez left a comment

Choose a reason for hiding this comment

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

LGTM

@tonyskapunk
Copy link
Contributor

Before merging can we ensure those annotations are really not in use and the failure is not something else?

I found previous jobs without those annotations and it didn't fail, why it is failing now?

2025-06-08

2025-06-09

2025-06-03

2025-05-25

On the other hand I do see the checked annotations in these jobs:

2025-06-09

. It's enough by checking the current-state and the syncStatus.

@ramperher did you find something that confirms the syncstatus is enough?

@ramperher
Copy link
Contributor Author

ramperher commented Jun 11, 2025

Before merging can we ensure those annotations are really not in use and the failure is not something else?

I found previous jobs without those annotations and it didn't fail, why it is failing now?

2025-06-08

2025-06-09

2025-06-03

2025-05-25

On the other hand I do see the checked annotations in these jobs:

2025-06-09

. It's enough by checking the current-state and the syncStatus.

@ramperher did you find something that confirms the syncstatus is enough?

@tonyskapunk , all the jobs you were quoting were using an older version of wait-sriov playbook from the check_resource role. This changed the 9th of June with my change to document other SRIOV setups for example-cnf, including Mellanox support: ec7cdb6#diff-d4875c737e9f1aa17619dc88fa6d49137f1e474fd6fa4fab763f48eb669d8712

For this, I improved the SriovNetworkNodeState check, to use json_query, and I also included the checks of the annotations called "sriovnetwork.openshift.io/current-state" and "sriovnetwork.openshift.io/desired-state". They were available in the OCP version I was testing example-cnf (OCP 4.18). I wrongly assumed that these annotations were in place in older OCP versions without testing them, my bad.

From what I've extracted from daily jobs, I could see that:

So, with this change, I'm just returning to the original check, which is just to check the syncStatus, but still using the cleaner approach with json_query, just to be compliant with all available OCP releases. It's true that it would be more precise to also use the two network annotations aforementioned, but with the syncStatus it should be fine; typically, syncStatus moves to Succeeded once the annotations (if they're defined) are in Idle status.

If you don't mind, I will include this conclusion in the PR description and merge the change.

@ramperher ramperher changed the title check_resource | Remove check for desired-state in wait-sriov.yml check_resource | Remove check for current/desired-state in wait-sriov.yml Jun 11, 2025
@ramperher ramperher added this pull request to the merge queue Jun 11, 2025
Merged via the queue into main with commit d48c2b0 Jun 11, 2025
8 checks passed
@ramperher ramperher deleted the wait-sriov-fix branch June 11, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants