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

SLVS-1474 Refactor ServerConnectionsProvider #5718

Merged

Conversation

gabriela-trutan-sonarsource
Copy link
Contributor

@gabriela-trutan-sonarsource gabriela-trutan-sonarsource commented Sep 30, 2024

SLVS-1474

Update ServerConnectionsProvider to use the ServerConnectionsRepository instead of the ISolutionBindingRepository.

Now we have a separate file for storing the server connections, so we no longer need to look at the bindings. The ServerConnectionsProvider now works as an adapter: converts the ServerConnection model to the DTO expected by slCore.

Also dropped the no longer needed ConnectionIdHelper:

The connectionId is of type URI, so we don't need anymore to add the sq| and sc|, which were a workaround needed to determine if, given a connectionId, the server is of type SonarQube or SonarCloud (which, in turn, was needed to calculate the URI needed to get the credentials form the CredentialsStore)

…verConnectionRepository instead of ISolutionBindingRepository.

The connections are saved in a dedicated repository and is no longer calculated from binding, therefore we need to listen to the repository.
…nsRepository instead of the ISolutionBindingRepository.

Now we have a separate file for storing the server connections, so we no longer need to look at the bindings.

The ServerConnectionsProvider now works as an adapter: converts the ServerConnection model to the DTO expected by slCore.
The connectionId is of type URI, so we don't need anymore to add the sq| and sc|, which were a workaround needed to determine if, given a connectionId, the server is of type SonarQube or SonarCloud, to be able to calculate the URI needed to get the credentials form the CredentialsStore.
@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod bot changed the title SLVS-1474 Refactor ServerConnectionsProvider SLVS-1474 Refactor ServerConnectionsProvider Sep 30, 2024
Base automatically changed from gt/refactor-alive-connection-tracker to feature/hardening-8-4 October 1, 2024 11:28
@vnaskos-sonar vnaskos-sonar marked this pull request as ready for review October 1, 2024 11:29
Copy link

sonarcloud bot commented Oct 1, 2024

Copy link
Contributor

@vnaskos-sonar vnaskos-sonar left a comment

Choose a reason for hiding this comment

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

👍

@vnaskos-sonar vnaskos-sonar merged commit 172de34 into feature/hardening-8-4 Oct 1, 2024
3 checks passed
@vnaskos-sonar vnaskos-sonar deleted the gt/refactor-server-connections-provider branch October 1, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants