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] Added support for querying projects via the GA API #1146

Merged
merged 72 commits into from
Dec 23, 2024

Conversation

lordsarcastic
Copy link
Contributor

@lordsarcastic lordsarcastic commented Nov 15, 2024

Description

What - Changed projects API from internal to GA and made use of internal API optional. Add more logs to SonarQube integration

Why - To aid investigations of bugs in the SonarQube integration and to avoid reliance on internal and unstable APIs

How - Added selector property to enable use of internal API to enrich more data. Added more details to the logs and keeping them at the debug level

Type of change

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

  • Non-breaking change (fix of existing functionality that will not change current behavior)

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.

@lordsarcastic lordsarcastic marked this pull request as ready for review November 15, 2024 16:40
@lordsarcastic lordsarcastic requested a review from a team as a code owner November 15, 2024 16:40
@github-actions github-actions bot added size/M and removed size/S labels Nov 18, 2024
@lordsarcastic lordsarcastic changed the title [Integration][SonarQube] Add debug logs to SonarQube integration [Integration][SonarQube] Change projects API from internal to GA | Add debug logs to SonarQube integration Nov 18, 2024
integrations/sonarqube/CHANGELOG.md Outdated Show resolved Hide resolved
integrations/sonarqube/client.py Outdated Show resolved Hide resolved
integrations/sonarqube/client.py Outdated Show resolved Hide resolved
integrations/sonarqube/main.py Show resolved Hide resolved
integrations/sonarqube/client.py Show resolved Hide resolved
integrations/sonarqube/client.py Outdated Show resolved Hide resolved
Copy link
Contributor

@PeyGis PeyGis left a comment

Choose a reason for hiding this comment

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

left some comments

integrations/sonarqube/CHANGELOG.md Outdated Show resolved Hide resolved
integrations/sonarqube/client.py Outdated Show resolved Hide resolved
integrations/sonarqube/integration.py Outdated Show resolved Hide resolved
integrations/sonarqube/client.py Outdated Show resolved Hide resolved
integrations/sonarqube/client.py Outdated Show resolved Hide resolved
integrations/sonarqube/client.py Outdated Show resolved Hide resolved
Copy link
Member

@mk-armah mk-armah left a comment

Choose a reason for hiding this comment

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

left some comments

integrations/sonarqube/client.py Outdated Show resolved Hide resolved
integrations/sonarqube/client.py Outdated Show resolved Hide resolved
integrations/sonarqube/client.py Outdated Show resolved Hide resolved
@mk-armah mk-armah changed the title [Integration][SonarQube] Change projects API from internal to GA | Add debug logs to SonarQube integration [Integration][SonarQube] Added support for Querying projects via the GA API Nov 20, 2024
@mk-armah mk-armah changed the title [Integration][SonarQube] Added support for Querying projects via the GA API [Integration][SonarQube] Added support for querying projects via the GA API Nov 20, 2024
integrations/sonarqube/integration.py Outdated Show resolved Hide resolved
integrations/sonarqube/main.py Outdated Show resolved Hide resolved
integrations/sonarqube/main.py Outdated Show resolved Hide resolved
integrations/sonarqube/main.py Outdated Show resolved Hide resolved
integrations/sonarqube/main.py Show resolved Hide resolved
integrations/sonarqube/tests/conftest.py Outdated Show resolved Hide resolved
integrations/sonarqube/tests/fixtures.py Show resolved Hide resolved
integrations/sonarqube/client.py Show resolved Hide resolved
integrations/sonarqube/client.py Show resolved Hide resolved
integrations/sonarqube/client.py Show resolved Hide resolved
@github-actions github-actions bot added size/XXL and removed size/XL labels Dec 11, 2024
integrations/sonarqube/integration.py Show resolved Hide resolved
integrations/sonarqube/integration.py Show resolved Hide resolved
integrations/sonarqube/integration.py Outdated Show resolved Hide resolved
integrations/sonarqube/integration.py Outdated Show resolved Hide resolved
integrations/sonarqube/main.py Outdated Show resolved Hide resolved
integrations/sonarqube/main.py Outdated Show resolved Hide resolved
@@ -0,0 +1,57 @@
# from typing import Any
Copy link
Contributor

Choose a reason for hiding this comment

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

what is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the sync code that kept failing here and on Jira that I couldn't resolve. We agreed to take it out for now.

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

@Tankilevitch Tankilevitch dismissed stale reviews from PeyGis and mk-armah December 22, 2024 09:31

approved offline

@Tankilevitch Tankilevitch merged commit 0ac08ec into main Dec 23, 2024
18 checks passed
@Tankilevitch Tankilevitch deleted the add-sonarqube-logs branch December 23, 2024 09:40
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.

5 participants