forked from kubernetes/kubernetes
    
        
        - 
                Notifications
    
You must be signed in to change notification settings  - Fork 2
 
Conflicts on update don't count as retry #98
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
            
            
          Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    d5bd7ac    to
    d821ad8      
    Compare
  
    
              
                    badouralix
  
              
              approved these changes
              
                  
                    Mar 19, 2025 
                  
              
              
            
            
        
          
                staging/src/k8s.io/apiserver/pkg/admission/plugin/resourcequota/controller.go
              
                Outdated
          
            Show resolved
            Hide resolved
        
      20bba71    to
    0894cfe      
    Compare
  
    
              
                    badouralix
  
              
              reviewed
              
                  
                    Mar 20, 2025 
                  
              
              
            
            
        
          
                staging/src/k8s.io/apiserver/pkg/admission/plugin/resourcequota/controller.go
              
                Outdated
          
            Show resolved
            Hide resolved
        
      0894cfe    to
    d8b3b3b      
    Compare
  
    d8b3b3b    to
    43653fd      
    Compare
  
    
              
                    nyodas
  
              
              approved these changes
              
                  
                    Mar 25, 2025 
                  
              
              
            
            
43653fd    to
    d819024      
    Compare
  
    
    
  nyodas 
      pushed a commit
      that referenced
      this pull request
    
      May 6, 2025 
    
    
  
    
  nyodas 
      pushed a commit
      that referenced
      this pull request
    
      May 6, 2025 
    
    
  
    
  nyodas 
      pushed a commit
      that referenced
      this pull request
    
      May 6, 2025 
    
    
  
    
  nyodas 
      pushed a commit
      that referenced
      this pull request
    
      May 6, 2025 
    
    
  
    
  nyodas 
      pushed a commit
      that referenced
      this pull request
    
      May 26, 2025 
    
    
  
    
  nyodas 
      pushed a commit
      that referenced
      this pull request
    
      May 27, 2025 
    
    
  
    
  nyodas 
      pushed a commit
      that referenced
      this pull request
    
      May 27, 2025 
    
    
  
    
  nyodas 
      pushed a commit
      that referenced
      this pull request
    
      May 27, 2025 
    
    
  
    
  nyodas 
      pushed a commit
      that referenced
      this pull request
    
      May 28, 2025 
    
    
  
    
  nyodas 
      pushed a commit
      that referenced
      this pull request
    
      May 28, 2025 
    
    
  
| 
           Has this method been tried? Is it feasible?  | 
    
    
  nyodas 
      pushed a commit
      that referenced
      this pull request
    
      Sep 1, 2025 
    
    
  
    
  nyodas 
      pushed a commit
      that referenced
      this pull request
    
      Sep 2, 2025 
    
    
  
    
  nyodas 
      pushed a commit
      that referenced
      this pull request
    
      Oct 3, 2025 
    
    
  
    
  nyodas 
      pushed a commit
      that referenced
      this pull request
    
      Oct 6, 2025 
    
    
  
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
What type of PR is this?
/kind bug
What this PR does / why we need it:
When updating the resource quota,
e.checkAttributescallse.checkQuotasup to 3 times. This is to prevent transient failures when updating the resource quota object viae.quotaAccessor.UpdateQuotaStatus. In case of an error, we calle.checkQuotasagain and we decrement the remaining retries.On busy clusters, we might exhaust the 3 retries before making a successful update, bubbling up the error to the client.
This PR is adding a check to avoid decrementing the retries when the error is because of a conflict. While this might increase the processing times because of the additional retries, there are two benefits:
If upstream doesn't like this approach, we might consider switching to a
workqueue.TypedRateLimitingInterfaceso we can use a rate limiter before re-adding the object on the queue. This will required more code changes the requeue would happen at a higher level, so we need to be able to inspect thewaiterto understand why it got denied.Which issue(s) this PR fixes:
Fixes kubernetes#67761
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: