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

chore: add telemetry for examples #1098

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cdrage
Copy link
Contributor

@cdrage cdrage commented Dec 16, 2024

chore: add telemetry for examples

What does this PR do?

Adds telemetry for building as well as pulling examples

Screenshot / video of UI

N/A

What issues does this PR fix or reference?

Closes #1047

How to test this PR?

Functions on example should work as normal.

Signed-off-by: Charlie Drage [email protected]

### What does this PR do?

Adds telemetry for building as well as pulling examples

### Screenshot / video of UI

<!-- If this PR is changing UI, please include
screenshots or screencasts showing the difference -->

N/A

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Closes podman-desktop#1047

### How to test this PR?

<!-- Please explain steps to reproduce -->

Functions on example should work as normal.

Signed-off-by: Charlie Drage <[email protected]>
@cdrage cdrage requested a review from a team as a code owner December 16, 2024 13:39
@cdrage cdrage requested review from benoitf, jeffmaury and axel7083 and removed request for a team December 16, 2024 13:39
@cdrage
Copy link
Contributor Author

cdrage commented Dec 16, 2024

@deboer-tim @slemeur

If you can double-check that I did this right, please let me know! First time adding telemetry.

Copy link
Contributor

@axel7083 axel7083 left a comment

Choose a reason for hiding this comment

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

LGTM codewise

@@ -90,10 +91,16 @@ test('pullImage function is called when Pull image button is clicked', async ()

// Find and click the "Pull image" button
const pullButton = screen.getByTitle('Pull image');

// spy on telemetryLogUsage function
const spyOnLogUsage = vi.spyOn(bootcClient, 'telemetryLogUsage');
Copy link
Contributor

Choose a reason for hiding this comment

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

You can probably do vi.mocked(bootcClient.telemetryLogUsage) and expect(bootcClient.telemetryLogUsage).toHaveBeenCalled()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good call! updated

@@ -90,10 +91,16 @@ test('pullImage function is called when Pull image button is clicked', async ()

// Find and click the "Pull image" button
const pullButton = screen.getByTitle('Pull image');

// spy on telemetryLogUsage function
vi.mocked(bootcClient.telemetryLogUsage);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't get why this is required ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you're right, not required! updated the PR.

Signed-off-by: Charlie Drage <[email protected]>
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.

Add telemetry for example downloads
3 participants