ocean icon indicating copy to clipboard operation
ocean copied to clipboard

[Integration][SonarQube] Bug handling of live events in sonarqube

Open Lanrey opened this issue 5 months ago • 4 comments

User description

Description

What - Added selectors to webhook processors to match selectors on resync reorder webhook processors to temporarily fix issues with project blueprint failing when issues blueprint

Why - Differences between webhooks data and resync data due to selector changes

How - Add the selector filters to all the webhook processor

Type of change

Please leave one option from the following and delete the rest:

  • [ x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] New Integration (non-breaking change which adds a new integration)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Non-breaking change (fix of existing functionality that will not change current behavior)
  • [ ] Documentation (added/updated documentation)

All tests should be run against the port production environment(using a testing org).

Core testing checklist

  • [ ] Integration able to create all default resources from scratch
  • [ ] Resync finishes successfully
  • [ ] Resync able to create entities
  • [ ] Resync able to update entities
  • [] Resync able to detect and delete entities
  • [ ] Scheduled resync able to abort existing resync and start a new one
  • [ ] Tested with at least 2 integrations from scratch
  • [ ] Tested with Kafka and Polling event listeners
  • [ ] Tested deletion of entities that don't pass the selector

Integration testing checklist

  • [ ] Integration able to create all default resources from scratch
  • [ ] Resync able to create entities
  • [ ] Resync able to update entities
  • [ ] Resync able to detect and delete entities
  • [ ] Resync finishes successfully
  • [ ] If new resource kind is added or updated in the integration, add example raw data, mapping and expected result to the examples folder in the integration directory.
  • [ ] If resource kind is updated, run the integration with the example data and check if the expected result is achieved
  • [ ] If new resource kind is added or updated, validate that live-events for that resource are working as expected
  • [ ] Docs PR link here

Preflight checklist

  • [ ] Handled rate limiting
  • [ ] Handled pagination
  • [ ] Implemented the code in async
  • [ ] Support Multi account

Screenshots

Include screenshots from your environment showing how the resources of the integration will look.

API Documentation

Provide links to the API documentation used for this integration.


PR Type

Bug fix


Description

• Fix webhook processors to use selectors matching resync behavior • Reorder webhook processors to prevent project blueprint failures • Switch analysis from task-based to project-based approach • Add fallback data handling for webhook events


Changes walkthrough 📝

Relevant files
Formatting
2 files
client.py
Minor formatting and comment fixes                                             
+6/-1     
integration.py
Remove trailing comma from metrics list                                   
+1/-1     
Bug fix
4 files
main.py
Reorder webhook processor registration                                     
+2/-1     
analysis_webhook_processor.py
Switch from task-based to project-based analysis                 
+34/-8   
issue_webhook_processor.py
Add selector support and fallback handling                             
+39/-7   
project_webhook_processor.py
Add selector support and fallback handling                             
+34/-5   
Enhancement
1 files
utils.py
Add selector metrics extraction utility function                 
+16/-1   
Miscellaneous
1 files
base_webhook_processor.py
Add debug logging for payload validation                                 
+1/-0     

Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Lanrey avatar Jun 19 '25 20:06 Lanrey