Skip to content

[e2e] relax skip_permissions assertions#9014

Merged
knative-prow[bot] merged 2 commits intoknative:mainfrom
maschmid:maschmid-main-relax-skip-permissions-test
Apr 10, 2026
Merged

[e2e] relax skip_permissions assertions#9014
knative-prow[bot] merged 2 commits intoknative:mainfrom
maschmid:maschmid-main-relax-skip-permissions-test

Conversation

@maschmid
Copy link
Copy Markdown
Contributor

@maschmid maschmid commented Apr 7, 2026

Fixes #8903 (maybe)

Proposed Changes

  • 🧹 Make the TestApiServerSourceSkipPermissionsFeature test tolerant to other tests' global trust bundles changes

From https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative_eventing/8985/reconciler-tests_eventing_main/2039312118016118784

=== CONT TestApiServerSourceSkipPermissionsFeature/Knative_ApiServerSource_-Features-_Permissions_Check/ApiServerSource_skip_permissions_and_pod_has_permissions/Assert/ApiServerSource_adapter_has_FailFast_set_to_true
skip_permissions.go:270: Expected 1 ready replica, got: 2

Looking at the replicasets of the apiserversource-two-kmrmshbe-e8874f5d64f6d4ffacf50942f8e1b30ae4 Deployment, we see 4 replicasets in total, differing only in trust bundles being removed.

RS1 → RS2 (revision 1 → 2)                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                          
  Removed trust-bundle-pbgjrpiekne-bundle from the projected volume sources.                                                                                                                                                                                                              
                  
    RS1 volumes sources:                                                                                                                                                                                                                                                                  
      - kn-combined-kne-bundlekne-bundle                                                                                                                                                                                                                                                  
      - knative-eventing-bundlekne-bundle                                                                                                                                                                                                                                                 
      - trust-bundle-enmxarlokne-bundle                                                                                                                                                                                                                                                   
    - trust-bundle-pbgjrpiekne-bundle    ← removed                                                                                                                                                                                                                                        
      - trust-bundle-tslsquugkne-bundle                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                          
    RS2 volumes sources:                                                                                                                                                                                                                                                                  
      - kn-combined-kne-bundlekne-bundle                                                                                                                                                                                                                                                  
      - knative-eventing-bundlekne-bundle                                                                                                                                                                                                                                                 
      - trust-bundle-enmxarlokne-bundle                                                                                                                                                                                                                                                   
      - trust-bundle-tslsquugkne-bundle                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                          
  RS2 → RS3 (revision 2 → 3)                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                          
  Removed trust-bundle-enmxarlokne-bundle from the projected volume sources.                                                                                                                                                                                                              
                  
    RS2 volumes sources:                                                                                                                                                                                                                                                                  
      - kn-combined-kne-bundlekne-bundle                                                                                                                                                                                                                                                  
      - knative-eventing-bundlekne-bundle                                                                                                                                                                                                                                                 
    - trust-bundle-enmxarlokne-bundle    ← removed                                                                                                                                                                                                                                        
      - trust-bundle-tslsquugkne-bundle                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                          
    RS3 volumes sources:                                                                                                                                                                                                                                                                  
      - kn-combined-kne-bundlekne-bundle                                                                                                                                                                                                                                                  
      - knative-eventing-bundlekne-bundle                                                                                                                                                                                                                                                 
      - trust-bundle-tslsquugkne-bundle                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                          
  RS3 → RS4 (revision 3 → 4, current)                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                          
  Removed trust-bundle-tslsquugkne-bundle from the projected volume sources.                                                                                                                                                                                                              
                  
    RS3 volumes sources:                                                                                                                                                                                                                                                                  
      - kn-combined-kne-bundlekne-bundle                                                                                                                                                                                                                                                  
      - knative-eventing-bundlekne-bundle                                                                                                                                                                                                                                                 
    - trust-bundle-tslsquugkne-bundle    ← removed                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                          
    RS4 volumes sources:                                                                                                                                                                                                                                                                  
      - kn-combined-kne-bundlekne-bundle                                                                                                                                                                                                                                                  
      - knative-eventing-bundlekne-bundle                 

It may be that the other tests that add trust-bundles to the system namespace may cause this one to flake (as "Expected 1 ready replica, got: 2" is likely the caused by having two replicasets, differing only by the trust bundle, with the old one still running)

So, let's see if we can just ignore the replicaset changes of the apiserversource adapter in the test.

@knative-prow knative-prow bot requested review from aliok and evankanderson April 7, 2026 12:05
@knative-prow knative-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. area/test-and-release Test infrastructure, tests or release labels Apr 7, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.03%. Comparing base (263a3a5) to head (5d09681).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9014      +/-   ##
==========================================
- Coverage   51.04%   51.03%   -0.02%     
==========================================
  Files         409      409              
  Lines       21996    21996              
==========================================
- Hits        11228    11225       -3     
- Misses       9905     9909       +4     
+ Partials      863      862       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maschmid
Copy link
Copy Markdown
Contributor Author

maschmid commented Apr 7, 2026

Passed once
/test reconciler-tests

@maschmid
Copy link
Copy Markdown
Contributor Author

maschmid commented Apr 8, 2026

Passed twice
/test reconciler-tests

@maschmid
Copy link
Copy Markdown
Contributor Author

maschmid commented Apr 8, 2026

Passed thrice

Copy link
Copy Markdown
Member

@creydr creydr left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 10, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow bot commented Apr 10, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: creydr, maschmid

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

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 10, 2026
@knative-prow knative-prow bot merged commit 30cd193 into knative:main Apr 10, 2026
36 of 37 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. area/test-and-release Test infrastructure, tests or release lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

2 participants