Skip to content

fix(test): retry authz allow tests to handle RBAC cache propagation - #104

Merged
kubevirt-prow[bot] merged 1 commit into
kubevirt:mainfrom
RoniKishner:request-perm-test-fix
Jul 13, 2026
Merged

fix(test): retry authz allow tests to handle RBAC cache propagation#104
kubevirt-prow[bot] merged 1 commit into
kubevirt:mainfrom
RoniKishner:request-perm-test-fix

Conversation

@RoniKishner

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
The three functional tests were flaky due to a race between RoleBinding creation and the Kubernetes RBAC authorize cache.
Wraps the createTemplateRequest calls in Eventually to retry until the cache propagates.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:
Tracked in Jira: https://redhat.atlassian.net/browse/CNV-92283

Release note:

NONE

@kubevirt-prow kubevirt-prow Bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/S labels Jul 8, 2026
@kubevirt-prow
kubevirt-prow Bot requested review from 0xFelix and akrejcir July 8, 2026 13:39

@0xFelix 0xFelix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That means the negative tests may pass because of this behavior? That's also not what we want. Is there a way to ensure the cache is synced before making the assertions?

@RoniKishner
RoniKishner force-pushed the request-perm-test-fix branch from a42b482 to 27c0265 Compare July 9, 2026 08:40
@kubevirt-prow kubevirt-prow Bot added size/M and removed size/S labels Jul 9, 2026
Comment thread tests/template_request_authz_test.go Outdated
assisted-by: Cursor
Signed-off-by: rkishner <rkishner@redhat.com>
@RoniKishner
RoniKishner force-pushed the request-perm-test-fix branch from 27c0265 to 4381b72 Compare July 9, 2026 16:01

@0xFelix 0xFelix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/approve

@kubevirt-prow

kubevirt-prow Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 0xFelix

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

The pull request process is described here

Details 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

@kubevirt-prow kubevirt-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 10, 2026
@ksimon1

ksimon1 commented Jul 13, 2026

Copy link
Copy Markdown
Member

/lgtm

@kubevirt-prow kubevirt-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 13, 2026
@kubevirt-prow
kubevirt-prow Bot merged commit d862f28 into kubevirt:main Jul 13, 2026
6 checks passed
@RoniKishner
RoniKishner deleted the request-perm-test-fix branch July 13, 2026 08:45
@0xFelix

0xFelix commented Jul 13, 2026

Copy link
Copy Markdown
Member

/cherry-pick release-0.2

@kubevirt-bot

Copy link
Copy Markdown
Contributor

@0xFelix: new pull request created: #105

Details

In response to this:

/cherry-pick release-0.2

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.

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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants