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

OCPBUGS-31020,CONSOLE-3944: Disable segment analytics when cluster telemetry is disabled #877

Merged
merged 5 commits into from Apr 5, 2024

Conversation

TheRealJon
Copy link
Member

@TheRealJon TheRealJon commented Mar 14, 2024

Watch the cluster monitoring config for the telemeter client. If it's disabled, set a new console config property telemetry.TELEMETER_CLIENT_DISABLED to true so that all telemetry requests from the frontend can be halted.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 14, 2024
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 14, 2024

@TheRealJon: This pull request references CONSOLE-3944 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.

In response to this:

Watch the cluster monitoring config for the telemeter client. If it's disabled, set a new console config property telemetry.telemeterClientDisabled to true so that all telemetry requests from the frontend can be halted.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 14, 2024
@openshift-ci openshift-ci bot requested review from jhadvig and spadgett March 14, 2024 19:50
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 14, 2024
…abled

Watch the cluster monitoring config for the telemeter client. If it's disabled, set a new console config property `telemetry.telemeterClientDisabled` to true so that all telemetry requests from the frontend can be halted.
@TheRealJon TheRealJon changed the title WIP CONSOLE-3944: Disable segment analytics when cluster telemetry is disabled CONSOLE-3944: Disable segment analytics when cluster telemetry is disabled Mar 15, 2024
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 15, 2024
@TheRealJon
Copy link
Member Author

TheRealJon commented Mar 15, 2024

QE Approver
/assign @yapei

Docs Approver:
/assign @opayne1

PX Approver:
/assign @RickJWagner

@jerolimov
Copy link
Member

jerolimov commented Mar 18, 2024

/cc @jerolimov @jhadvig
/assign @jerolimov @jhadvig

@TheRealJon
Copy link
Member Author

TheRealJon commented Mar 20, 2024

@yapei I've updated this PR to address https://issues.redhat.com/browse/OCPBUGS-31020

@jerolimov Could you review this and make sure this logic is sound?

If no cluster monitoring config
  telemeter client enabled
Else if (no ClusterID || no Token || Enabled == false) in cluster monitoring config
  telemeter client disabled
Else
  telemeter client enabled

@TheRealJon TheRealJon changed the title CONSOLE-3944: Disable segment analytics when cluster telemetry is disabled OCPBUGS-31020,CONSOLE-3944: Disable segment analytics when cluster telemetry is disabled Mar 20, 2024
@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Mar 20, 2024
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 20, 2024

@TheRealJon: This pull request references Jira Issue OCPBUGS-31020, which is invalid:

  • expected the bug to target the "4.16.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

This pull request references CONSOLE-3944 which is a valid jira issue.

In response to this:

Watch the cluster monitoring config for the telemeter client. If it's disabled, set a new console config property telemetry.telemeterClientDisabled to true so that all telemetry requests from the frontend can be halted.

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 openshift-eng/jira-lifecycle-plugin repository.

@TheRealJon
Copy link
Member Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 20, 2024
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 20, 2024

@TheRealJon: This pull request references Jira Issue OCPBUGS-31020, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

This pull request references CONSOLE-3944 which is a valid jira issue.

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from yapei March 20, 2024 19:21
@TheRealJon
Copy link
Member Author

/retest

@RickJWagner
Copy link

/label px-approved

@openshift-ci openshift-ci bot added the px-approved Signifies that Product Support has signed off on this PR label Mar 21, 2024
@RickJWagner RickJWagner removed their assignment Mar 21, 2024
@jan--f
Copy link

jan--f commented Mar 26, 2024

@yapei I've updated this PR to address https://issues.redhat.com/browse/OCPBUGS-31020

@jerolimov Could you review this and make sure this logic is sound?

If no cluster monitoring config
  telemeter client enabled
Else if (no ClusterID || no Token || Enabled == false) in cluster monitoring config
  telemeter client disabled
Else
  telemeter client enabled

Yep I think that is correct.

Copy link
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

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

Thanks for PR @TheRealJon. Adding a few comments.
Also based on conversation with @simonpasquier it seems that the clusterID and token are never stored in the configmap in practice but populated respectively from the ClusterVersion version object and openshift-config/pull-secret Secret.
https://github.com/openshift/cluster-monitoring-operator/blob/800bedc61f101cd4450f45535f7bfafb72112c4f/pkg/manifests/config.go#L354-L367
https://github.com/openshift/cluster-monitoring-operator/blob/800bedc61f101cd4450f45535f7bfafb72112c4f/pkg/manifests/config.go#L368-L396

pkg/console/operator/sync_v400.go Outdated Show resolved Hide resolved
pkg/console/subresource/configmap/configmap.go Outdated Show resolved Hide resolved
pkg/console/subresource/configmap/configmap.go Outdated Show resolved Hide resolved
@jhadvig
Copy link
Member

jhadvig commented Apr 2, 2024

@TheRealJon looks you forgot to update TCs.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Apr 3, 2024

@TheRealJon: This pull request references Jira Issue OCPBUGS-31020, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

This pull request references CONSOLE-3944 which is a valid jira issue.

In response to this:

Watch the cluster monitoring config for the telemeter client. If it's disabled, set a new console config property telemetry.TELEMETER_CLIENT_DISABLED to true so that all telemetry requests from the frontend can be halted.

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 openshift-eng/jira-lifecycle-plugin repository.

@TheRealJon
Copy link
Member Author

/retest

1 similar comment
@jerolimov
Copy link
Member

/retest

Copy link
Contributor

openshift-ci bot commented Apr 4, 2024

@TheRealJon: all tests passed!

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.

Copy link
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 5, 2024
Copy link
Contributor

openshift-ci bot commented Apr 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhadvig, TheRealJon

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-merge-bot openshift-merge-bot bot merged commit 7415be3 into openshift:master Apr 5, 2024
9 checks passed
@openshift-ci-robot
Copy link
Contributor

@TheRealJon: Jira Issue OCPBUGS-31020: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-31020 has been moved to the MODIFIED state.

In response to this:

Watch the cluster monitoring config for the telemeter client. If it's disabled, set a new console config property telemetry.TELEMETER_CLIENT_DISABLED to true so that all telemetry requests from the frontend can be halted.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build openshift-enterprise-console-operator-container-v4.16.0-202404051041.p0.g7415be3.assembly.stream.el9 for distgit openshift-enterprise-console-operator.
All builds following this will include this PR.

@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.16.0-0.nightly-2024-04-05-200353

@TheRealJon TheRealJon deleted the CONSOLE-3944 branch April 8, 2024 13:59
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. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants