Skip to content

SONARPY-2457 Collect data for the Python version - #2252

Merged
ghislainpiot merged 2 commits into
masterfrom
SONARPY-2457
Dec 17, 2024
Merged

ghislainpiot merged 2 commits into
masterfrom
SONARPY-2457

Conversation

@ghislainpiot

@ghislainpiot ghislainpiot commented Dec 16, 2024 •

Copy link
Copy Markdown
Contributor

@guillaume-dequenne guillaume-dequenne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm missing some context on this topic, so I might miss things, and I'm taking what was already implemented as reference.

This looks good though! I left some questions for my own comprehension. My only concern is about the strategy for the isVersionSet key that I could see skewed when counting SonarLint.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The name of the method seems a bit misleading I guess, what we're doing here is update the Python version telemetry rather than "setting it", no? (I initially thought this was about setting a telemetry field to the context...)
What about updatePythonVersionTelemetry ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure I understand in which case we should expect this sensorTelemetryStorage to be injected and in which case we should expect to instantiate it ourselves, and what difference it makes, can you explain?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

A similar point was raised by Maksim. The goal is to be able to inject the storage as a mock and test it that way.
I should probably rewrite it to use Mockito on the sendTelemetryProperty mock on the SensorContextTester

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do we consider the version to be set in SonarLint context? Wouldn't that skew the data and imply more people actively set the version than what actually happens?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So that means we can set more than just booleans for the telemetry?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, CFamily is sending strings.

@Seppli11 Seppli11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!
Out of curiosity, why don't we send telemetry from sonarlint? Would it just screw up the data too much?

@ghislainpiot

Copy link
Copy Markdown
Contributor Author

LGTM! Out of curiosity, why don't we send telemetry from sonarlint? Would it just screw up the data too much?

I don't think telemetry is sent right now on their side anyways.
It would also probably screw up the stats

@ghislainpiot
ghislainpiot force-pushed the SONARPY-2457 branch 2 times, most recently from 63aa67f to 0c34b58 Compare December 17, 2024 14:47
Base automatically changed from SONARPY-2451 to master December 17, 2024 14:52
@sonarqube-next

Copy link
Copy Markdown

@ghislainpiot
ghislainpiot merged commit fc085d2 into master Dec 17, 2024
@ghislainpiot
ghislainpiot deleted the SONARPY-2457 branch December 17, 2024 16:15
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.

3 participants