- 
                Notifications
    
You must be signed in to change notification settings  - Fork 20
 
change logic that checks if filter matches context in which an action shall be performed #310
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
          
     Open
      
      
            trz42
  wants to merge
  30
  commits into
  EESSI:develop
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
trz42:reverse_filter_matching
  
      
      
   
  
    
  
  
  
 
  
      
    base: develop
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          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
    
  
  
    
    This reverts commit c78feb0. We take a different approach aiming at only modifying the existing tests such that they continue to test what they originally were built to test, and add new tests that cover new or modified capabilities.
- also improve docstring - add a potential TODO
…nto reverse_filter_matching
…appear in coverage report
…PR that might use github pages
…nto reverse_filter_matching
      
     Merged
  
  
    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.
  
    
  
    
This PR implements the following changes
tools/filters.pyReady for review after completed all tasks below
check_filtersto something likecheck_build_filtersbecause the method is very specific to be used forbot: buildcommandsThis PR primarily changes the logic that checks if an action filter, for example, defined by
arch:x86_64/generic inst:eessi-bot-mc-aws repo:eessi.io-2023.06-softwarein a command such asmatches the context in which the action (
buildin this example) shall be performed.The changes shall avoid accidentally triggered actions. These changes have become more and more important with the growing number of bot instances and the growing number of potential build targets. Without these changes a simple command such as
where no filter is provided would lead to submitting build jobs for all configured build targets on all running bot instances (unless a bot instance would employ other restrictions such as only accepting commands from specific GitHub users).
The PR implements the following changes:
architecture,instanceandrepositoryhave to be provided for a filter,architecture:zenwould matchzen2,zen3andzen4values for the architecture component in a context)Since the checks are now based on exact string matches, the PR renamed the use of 'pattern' to 'value'.