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

Add telemetry for the download-starter-project endpoint to registry server #157

Merged
merged 2 commits into from
Jan 19, 2023

Conversation

michael-valdron
Copy link
Member

Signed-off-by: Michael Valdron mvaldron@redhat.com

Please specify the area for this PR

registry

What does does this PR do / why we need it:

Before, the download starter project process was only done in the registry viewer which tracked this telemetry metric itself https://github.com/devfile/registry-viewer/blob/145a485893b726808be40e1e31cc1ec96a8dde96/src/components/DevfilePage/DevfilePageProjects/DevfilePageProjects.tsx#L85.

In recent changes, the registry viewer no longer handles this process itself and instead uses an endpoint on the registry server (devfile/api#720). In addition, the registry viewer no longer tracks starter project downloads since devfile/api#747 was closed and therefore telemetry on starter project downloads needs to be tracked on the server endpoint itself. This PR provides these changes to resolve devfile/api#803.

Which issue(s) this PR fixes:

Fixes #?

fixes devfile/api#803

PR acceptance criteria:

  • Test Coverage
    • Are your changes sufficiently tested, and are any applicable test cases added or updated to cover your changes?

Documentation (WIP)

How to test changes / Special notes to the reviewer:

@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Base: 43.92% // Head: 43.20% // Decreases project coverage by -0.73% ⚠️

Coverage data is based on head (e2ca77e) compared to base (7a809c0).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
- Coverage   43.92%   43.20%   -0.73%     
==========================================
  Files           6        6              
  Lines        1020     1037      +17     
==========================================
  Hits          448      448              
- Misses        530      546      +16     
- Partials       42       43       +1     
Impacted Files Coverage Δ
index/server/pkg/server/endpoint.go 35.51% <0.00%> (-1.28%) ⬇️
index/server/pkg/server/index.go 9.02% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

…ver.

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Copy link
Contributor

@kim-tsao kim-tsao left a comment

Choose a reason for hiding this comment

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

Also update the year range in license header for the modified files e.g. 2022-2023

index/server/pkg/server/endpoint.go Show resolved Hide resolved
Copy link
Contributor

@kim-tsao kim-tsao left a comment

Choose a reason for hiding this comment

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

@michael-valdron can you update the year in the license headers for these files? Since they were created in 2022, add the year range to indicate original and modified date e.g. 2022-2023

… index.go

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 19, 2023
@openshift-ci
Copy link

openshift-ci bot commented Jan 19, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kim-tsao, michael-valdron
Once this PR has been reviewed and has the lgtm label, please assign johnmcollier for approval by writing /assign @johnmcollier in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@michael-valdron michael-valdron merged commit 05c05d3 into devfile:main Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
2 participants