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

Devfile registry telemetry integration #5101

Merged
merged 4 commits into from
Oct 5, 2021

Conversation

GeekArthur
Copy link
Contributor

Signed-off-by: Jingfu Wang [email protected]

What type of PR is this?
/kind feature

What does this PR do / why we need it:
The change is to let odo consume the latest registry library for enabling the devfile registry telemetry on client side.

Which issue(s) this PR fixes:
Related issue: devfile/api#281

PR acceptance criteria:

How to test changes / Special notes to the reviewer:
Run odo catalog and odo create commands then monitor the community registry telemetry to see if the data can be collected.

@GeekArthur GeekArthur self-assigned this Sep 29, 2021
@openshift-ci openshift-ci bot added kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. Required by Prow. labels Sep 29, 2021
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. Required by Prow. label Sep 29, 2021
Signed-off-by: Jingfu Wang <[email protected]>
Copy link
Member

@dharmit dharmit left a comment

Choose a reason for hiding this comment

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

@GeekArthur WDYT about putting telemetryClient as a const in one place in the code and reuse it at places where you have currently defined it? IMO, it could go into pkg/odo/cli/registry/util/util.go along with what we presently have there:

const (
	RegistryUser = "default"
)

Thoughts @feloy @valaparthvi ?

@GeekArthur
Copy link
Contributor Author

@GeekArthur WDYT about putting telemetryClient as a const in one place in the code and reuse it at places where you have currently defined it? IMO, it could go into pkg/odo/cli/registry/util/util.go along with what we presently have there:

const (
	RegistryUser = "default"
)

Thoughts @feloy @valaparthvi ?

Make sense, thanks for suggesting the shared file

@feloy
Copy link
Contributor

feloy commented Sep 30, 2021

@GeekArthur WDYT about putting telemetryClient as a const in one place in the code and reuse it at places where you have currently defined it? IMO, it could go into pkg/odo/cli/registry/util/util.go along with what we presently have there:

const (
	RegistryUser = "default"
)

Thoughts @feloy @valaparthvi ?

I agree to put the constant in a common place, but the util package is not a place I would first go to find such a constant. Can we instead have a consts.go file in the registry package (`pkg/odo/cli/registry/consts.go)?

@dharmit
Copy link
Member

dharmit commented Sep 30, 2021

Can we instead have a consts.go file in the registry package (pkg/odo/cli/registry/consts.go)?

+1

Signed-off-by: Jingfu Wang <[email protected]>
@netlify
Copy link

netlify bot commented Sep 30, 2021

✔️ Deploy Preview for odo-docusaurus-preview ready!

🔨 Explore the source changes: a35d72d

🔍 Inspect the deploy log: https://app.netlify.com/sites/odo-docusaurus-preview/deploys/6155d70f0bb32700088cf5ac

😎 Browse the preview: https://deploy-preview-5101--odo-docusaurus-preview.netlify.app

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@GeekArthur
Copy link
Contributor Author

GeekArthur commented Sep 30, 2021

Can we instead have a consts.go file in the registry package (pkg/odo/cli/registry/consts.go)?

+1

pkg/odo/cli/registry/consts.go has circular dependency issue when we use it in catalog package, so I create a separate consts package under pkg/odo/cli/registry, please review again

@GeekArthur
Copy link
Contributor Author

ci/prow/psi-k8s-ibmc-integration-e2e fails due to the following errors:

[ssh:Fedora 32] ++ make bin
[ssh:Fedora 32] go: GOPATH entry cannot start with shell metacharacter '~': "~/go"
[ssh:Fedora 32] go: GOPATH entry cannot start with shell metacharacter '~': "~/go"
[ssh:Fedora 32] make: *** [Makefile:62: bin] Error 2
[ssh:Fedora 32] ++ cp -avrf ./odo '~/go/bin/'
[ssh:Fedora 32] cp: cannot stat './odo': No such file or directory

It seems like an test automation infrastructure issue, probably need to use absolute path instead of relative path for go

@GeekArthur
Copy link
Contributor Author

/retest

1 similar comment
@GeekArthur
Copy link
Contributor Author

/retest

@valaparthvi
Copy link
Contributor

@GeekArthur Things lgtm from code perspective, but I was unable to see any data in Devfile Registry on Segment, or was I looking in the wrong place? I tested with odo create and odo catalog list components. Can you help?

@dharmit dharmit self-requested a review October 1, 2021 06:54
@dharmit
Copy link
Member

dharmit commented Oct 1, 2021

@GeekArthur Things lgtm from code perspective, but I was unable to see any data in Devfile Registry on Segment, or was I looking in the wrong place? I tested with odo create and odo catalog list components. Can you help?

I thinik the telemetry data for this will show up on devfile registry side, and not on odo side. Correct me if I'm wrong @GeekArthur.

@GeekArthur
Copy link
Contributor Author

GeekArthur commented Oct 1, 2021

@GeekArthur Things lgtm from code perspective, but I was unable to see any data in Devfile Registry on Segment, or was I looking in the wrong place? I tested with odo create and odo catalog list components. Can you help?

I thinik the telemetry data for this will show up on devfile registry side, and not on odo side. Correct me if I'm wrong @GeekArthur.

Yes, you are right, the telemetry data is on devfile registry side as odo is the client that consumes registry library to interact with devfile registry.

@valaparthvi You can check the telemetry data of devfile registry here: https://app.segment.com/redhat-devtools/sources/devfile-registry/overview

@GeekArthur
Copy link
Contributor Author

/retest

@openshift-ci
Copy link

openshift-ci bot commented Oct 2, 2021

@GeekArthur: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/psi-k8s-ibmc-integration-e2e a35d72d link false /test psi-k8s-ibmc-integration-e2e

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@valaparthvi
Copy link
Contributor

@valaparthvi You can check the telemetry data of devfile registry here: https://app.segment.com/redhat-devtools/sources/devfile-registry/overview

That is what I did before, but I did not see any data on odo create or odo catalog list components. Do you see this data on telemetry when you run these commands?

@GeekArthur
Copy link
Contributor Author

@dharmit @valaparthvi Can you please review to see if it looks good to you?

The failing tests from ibmc is not related to this PR, I wonder if we can bypass that instead of waiting for the

@valaparthvi You can check the telemetry data of devfile registry here: https://app.segment.com/redhat-devtools/sources/devfile-registry/overview

That is what I did before, but I did not see any data on odo create or odo catalog list components. Do you see this data on telemetry when you run these commands?

Yes, I can see the data from odo by verifying the UserId field below:
image

image

@GeekArthur
Copy link
Contributor Author

/retest

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Oct 5, 2021
@valaparthvi
Copy link
Contributor

@dharmit can you confirm if you can see the data in Devfile Registry and maybe approve it ?

@kadel
Copy link
Member

kadel commented Oct 5, 2021

/approve

@openshift-ci
Copy link

openshift-ci bot commented Oct 5, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kadel

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Oct 5, 2021
@openshift-merge-robot openshift-merge-robot merged commit 1eff321 into redhat-developer:main Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants