OTA-740: Fix telemetry shellcheck#44591
Conversation
We'd tried this previously in 3c1da8e (OTA-740: ci-operator/step-registry/ipi/conf/telemetry: Disable Telemetry (openshift#32153), 2022-09-13), but had to roll it back with d61129c (ci-operator/step-registry/ipi/conf/telemetry: Restore Telemetry (openshift#32249), 2022-09-13), to avoid failing: Prometheus when installed on the cluster should report telemetry if a cloud.openshift.com token is present Subsequently, openshift/origin@76652fa4fa (test/extended/prometheus: Consider telemeterClient.enabled, 2022-09-15, openshift/origin#27422) taught that test-case about the config knob this step uses to disable Telemetry. Those test-case changes are present in origin test suites starting in 4.12: $ for Y in $(seq 11 15); do git --no-pager grep 'should report telemetry' "origin/release-4.${Y}" -- test/extended/prometheus/prometheus.go; done origin/release-4.11:test/extended/prometheus/prometheus.go: g.It("should report telemetry if a cloud.openshift.com token is present [Late]", func() { origin/release-4.12:test/extended/prometheus/prometheus.go: g.It("should report telemetry [Late]", func() { origin/release-4.13:test/extended/prometheus/prometheus.go: g.It("should report telemetry [Late]", func() { origin/release-4.14:test/extended/prometheus/prometheus.go: g.It("should report telemetry [Serial] [Late]", func() { origin/release-4.15:test/extended/prometheus/prometheus.go: g.It("should report telemetry [Serial] [Late]", func() { and 4.10 is end-of-life since 2023-09-10 [1]. That leaves tests using 4.11 versions of the origin suite, and I'm addressing those via the JOB_NAME checks [2,3]. The checks are brittle, leaving out 4.9 and earlier, and possibly not matching some 4.11 jobs, but they will hopefully be sufficient to get us through until 4.11 goes end-of-life on 2024-02-10 [3]. And when the defaulting logic breaks down, jobs that have an opinion can set TELEMETRY_ENABLED explicitly to match their needs. [1]: https://access.redhat.com/support/policy/updates/openshift/#dates [2]: https://docs.ci.openshift.org/docs/architecture/step-registry/#available-environment-variables [3]: https://docs.prow.k8s.io/docs/jobs/#job-environment-variables
|
|
||
| if test -z "${TELEMETRY_ENABLED}" | ||
| then | ||
| if [[ "${JOB_NAME}" =~ (^|[^[:digit:]]+)4.11([^[:digit:]]+|$) ]] |
There was a problem hiding this comment.
Ok having this off on 4.12 minors and multi-upgrades too?
There was a problem hiding this comment.
All relevent versions of the monitoring stack understand:
telemeterClient:
enabled: falseThe issue is whether the origin suite understands that means Telemetry has been disabled. And 4.11->4.12 update jobs are controlled by a 4.12 origin suite, so they're fine with Telemetry disabled. The current JOB_NAME matching will disable it for those jobs by default, because they mention 4.11, but 🤷, we don't need to check Telemetry in those runs, and if we decide we do, we can go for a fancier regexp or explicitly set TELEMETRY_ENABLED: "true" for those jobs.
|
/lgtm |
|
[REHEARSALNOTIFIER]
A total of 14133 jobs have been affected by this change. The above listing is non-exhaustive and limited to 35 jobs. A full list of affected jobs can be found here Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jupierce, stbenjam The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/pj-rehearse |
|
/pj-rehearse more |
|
/pj-rehearse periodic-ci-openshift-release-master-nightly-4.11-e2e-aws-upgrade |
|
/pj-rehearse periodic-ci-openshift-release-master-nightly-4.12-e2e-aws-upgrade |
|
@jupierce: job(s): periodic-ci-openshift-release-master-nightly-4.12-e2e-aws-upgrade either don't exist or were not found to be affected, and cannot be rehearsed |
|
/pj-rehearse periodic-ci-openshift-release-master-nightly-4.12-e2e-aws-sdn |
|
/pj-rehearse ack |
|
@jupierce: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
/retitle OTA-740: Fix telemetry shellcheck |
#44561 for context