Skip to content
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

[Integration][Sonarqube] - Fix sonarQube client has no attributes metrics #952

Merged

Conversation

PeyGis
Copy link
Contributor

@PeyGis PeyGis commented Aug 26, 2024

Description

What - The integration was throwing an error where the self.metrics was not found in the get_all_sonarqube_analyses(). This was because each resync handler creates a new instance of the sonarQube client, causing the client to lose the state of it's saved variables. An example is when the self.metrics in the previous handler is lost in subsequent clients.
Why - Affecting the ingestion of onprem analysis kind as it relies on the metrics
How - Implemented a singleton pattern where we use one global instance of the sonarQube client across the application

Type of change

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

  • 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)

Screenshots

Include screenshots from your environment showing how the resources of the integration will look.
Screenshot 2024-08-26 at 9 07 58 PM

API Documentation

Provide links to the API documentation used for this integration.

@PeyGis PeyGis requested a review from a team as a code owner August 26, 2024 21:08
Copy link
Contributor

@Tankilevitch Tankilevitch left a comment

Choose a reason for hiding this comment

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

LGTM, let's make sure that for scheduled and real time there are no multi threading issues. Different event loops issues

@github-actions github-actions bot added size/S and removed size/XS labels Aug 27, 2024
@Tankilevitch Tankilevitch merged commit feb449c into main Aug 28, 2024
15 checks passed
@Tankilevitch Tankilevitch deleted the PORT-10078-sonar-qube-client-has-no-attributes-metrics branch August 28, 2024 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants