eas-cli icon indicating copy to clipboard operation
eas-cli copied to clipboard

[eas-cli] Use wrapper instead of telemetry subscriber for metadata

Open byCedric opened this issue 2 years ago • 4 comments

Checklist

  • [x] I've added an entry to CHANGELOG.md if necessary. You can comment this pull request with /changelog-entry [breaking-change|new-feature|bug-fix|chore] [message] and CHANGELOG.md will be updated automatically.

Why

Fixes ENG-5291

See discussion in https://github.com/expo/eas-cli/pull/1147#discussion_r892037938

How

  • Added EXPO_NO_TELEMETRY for eas metadata
  • Refactored subscribeTelemetry to withTelemetryAsync
  • Added more tests for withTelemetryAsync
  • Added Error container to safely wrap executionId with the thrown error
  • Updated shared error handler to use the Error container

Test Plan

  • $ yarn test telemetry

byCedric avatar Jun 16 '22 12:06 byCedric

/changelog-entry chore Refactor metadata telemetry with opt-out

byCedric avatar Jun 16 '22 12:06 byCedric

Size Change: -629 B (0%)

Total Size: 25.1 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 25.1 MB -629 B (0%)

compressed-size-action

github-actions[bot] avatar Jun 16 '22 12:06 github-actions[bot]

Codecov Report

Merging #1169 (97c361f) into main (db338b2) will increase coverage by 0.09%. The diff coverage is 26.67%.

@@            Coverage Diff             @@
##             main    #1169      +/-   ##
==========================================
+ Coverage   51.01%   51.10%   +0.09%     
==========================================
  Files         371      371              
  Lines       13219    13221       +2     
  Branches     2543     2694     +151     
==========================================
+ Hits         6743     6755      +12     
+ Misses       6464     5953     -511     
- Partials       12      513     +501     
Impacted Files Coverage Δ
packages/eas-cli/src/metadata/download.ts 29.73% <6.25%> (+1.53%) :arrow_up:
packages/eas-cli/src/metadata/upload.ts 27.03% <6.25%> (+0.72%) :arrow_up:
packages/eas-cli/src/metadata/errors.ts 25.00% <57.15%> (+6.25%) :arrow_up:
packages/eas-cli/src/metadata/utils/telemetry.ts 77.09% <100.00%> (+18.39%) :arrow_up:
packages/eas-cli/src/project/publish.ts 93.66% <0.00%> (-0.04%) :arrow_down:
packages/eas-cli/src/prompts.ts 43.34% <0.00%> (ø)
packages/eas-cli/src/vcs/git.ts 27.28% <0.00%> (ø)
packages/eas-json/src/reader.ts 80.44% <0.00%> (ø)
packages/eas-cli/src/platform.ts 50.00% <0.00%> (ø)
packages/eas-cli/src/vcs/local.ts 79.49% <0.00%> (ø)
... and 130 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3e224f9...97c361f. Read the comment docs.

codecov[bot] avatar Jun 16 '22 12:06 codecov[bot]

ENG-5291 Implement `EXPO_NO_TELEMETRY`

Allow users to disable it

linear[bot] avatar Jun 16 '22 12:06 linear[bot]

@byCedric is this PR something we still want to merge? If no can we close it?

dsokal avatar Apr 25 '23 09:04 dsokal

Inactive for a long time, plus a lot of changes in the underlying code, so I'm closing it.

wkozyra95 avatar Jun 22 '23 11:06 wkozyra95