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

feat(cli): add telemetry cli commands #5322

Merged
merged 23 commits into from
Dec 19, 2023
Merged

Conversation

bjoerge
Copy link
Member

@bjoerge bjoerge commented Dec 4, 2023

Description

Adds three new CLI commands for managing telemetry consent, and also adds caching of telemetry consent status.

  • sanity telemetry status – view consent status
  • sanity telemetry disable – disable telemetry by withdrawing consent
  • sanity telemetry enable – enable telemetry by granting consent

In addition:

  • Adds a short lived cache of consent status (to avoid excessive api calls in case of serial cli usages)
  • Adds information about telemetry that will appear the first time the cli is run after upgrading (or on new machines)

What to review

  • Does the changes look ok?

Notes for release

TBD

Copy link

vercel bot commented Dec 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Dec 19, 2023 10:16am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2023 10:16am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2023 10:16am

@bjoerge bjoerge requested a review from juice49 December 4, 2023 20:44
Copy link
Contributor

github-actions bot commented Dec 4, 2023

No changes to documentation

@juice49 juice49 marked this pull request as ready for review December 4, 2023 20:48
@juice49 juice49 requested a review from rexxars as a code owner December 4, 2023 20:48
Copy link
Contributor

github-actions bot commented Dec 4, 2023

Component Testing Report Updated Dec 19, 2023 10:19 AM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 15s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 2s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 8s 3 0 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 6s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 16s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 8s 9 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 39s 18 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 6s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 3s 3 0 0

@bjoerge bjoerge changed the title Feat/telemetry cli commands feat(cli): add telemetry cli commands Dec 4, 2023
@bjoerge bjoerge marked this pull request as draft December 4, 2023 20:58
@rexxars rexxars removed their request for review December 4, 2023 22:22
@bjoerge bjoerge force-pushed the feat/telemetry-cli-commands branch from b5be2f6 to b35a8b0 Compare December 7, 2023 11:02
@bjoerge bjoerge force-pushed the feat/telemetry-cli-commands branch from f097e88 to 0e4508f Compare December 11, 2023 12:27
@bjoerge bjoerge force-pushed the feat/telemetry-cli-commands branch from 0e4508f to c52da31 Compare December 11, 2023 12:32
juice49 and others added 23 commits December 19, 2023 11:15
For now, I have removed some tests that cannot easily be achieved.

For example: there is no way to unset consent status via the API,
and unfortunately, there isn't any easy way to mock HTTP requests
(e.g. using Nock) for CLI tests (because they rely on spawning
another process). This also limits our ability to simulate failed
requests.
@bjoerge bjoerge force-pushed the feat/telemetry-cli-commands branch from 5179e8d to e6c53e7 Compare December 19, 2023 10:15
@bjoerge bjoerge added this pull request to the merge queue Dec 19, 2023
Merged via the queue into next with commit 02f4cf2 Dec 19, 2023
68 of 69 checks passed
@bjoerge bjoerge deleted the feat/telemetry-cli-commands branch December 19, 2023 13:01
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.

3 participants