Skip to content

Add a delay and check to ensure that SPOD patch is rolled out #2964

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

Conversation

ngopalak-redhat
Copy link
Contributor

@ngopalak-redhat ngopalak-redhat commented Aug 18, 2025

What type of PR is this?

/kind bug

What this PR does / why we need it:

This PR fixes an intermittent failure in the e2e tests for seccomp-profile.

This was observed in https://github.com/kubernetes-sigs/security-profiles-operator/actions/runs/16961101889/job/48074161956?pr=2958

2025-08-14T09:28:28.0405670Z Found Kubernetes object spod spod
2025-08-14T09:28:28.1700531Z securityprofilesoperatordaemon.security-profiles-operator.x-k8s.io/spod patched
2025-08-14T09:28:28.3930140Z daemon set "spod" successfully rolled out
2025-08-14T09:28:28.6896880Z securityprofilesoperatordaemon.security-profiles-operator.x-k8s.io/spod condition met

The issue occurred because a test assumed the SPOD object's changes had been applied to the DaemonSet before the SPO controller had time to execute. The controller, which takes a moment or two to run (Many a time less than a second), is responsible for modifying the DaemonSet. This timing discrepancy caused the rollout status check to fail because it ran before the changes were complete.

Which issue(s) this PR fixes:

Does this PR have test?

Yes, the successful multiple runs of the e2etest.

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 18, 2025
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 18, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @ngopalak-redhat. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 18, 2025
@codecov-commenter
Copy link

codecov-commenter commented Aug 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.44%. Comparing base (11d77f4) to head (fbab50f).
⚠️ Report is 958 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2964       +/-   ##
===========================================
- Coverage   45.50%   26.44%   -19.07%     
===========================================
  Files          79      126       +47     
  Lines        7782    21051    +13269     
===========================================
+ Hits         3541     5566     +2025     
- Misses       4099    15203    +11104     
- Partials      142      282      +140     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Aug 18, 2025
@ngopalak-redhat ngopalak-redhat marked this pull request as ready for review August 18, 2025 06:11
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 18, 2025
@saschagrunert
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 18, 2025
@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/contains-merge-commits and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Aug 18, 2025
@saschagrunert
Copy link
Member

@ngopalak-redhat do you mind a rebase?

@ngopalak-redhat
Copy link
Contributor Author

@ngopalak-redhat do you mind a rebase?

@saschagrunert I have done the rebase. Initially tried via the UI to sync the branch and it added "contains-merge-commit" label. Best way was to rebase using the cli which fixed the issue.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 18, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ngopalak-redhat, saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit b6c28cb into kubernetes-sigs:main Aug 18, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants