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

[eas-cli] Improve reliability of update asset presigned upload requests #1278

Merged
merged 4 commits into from
Aug 17, 2022

Conversation

wschurman
Copy link
Member

Checklist

  • 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

Google cloud storage says to retry with exponential backoff when the uploads throw an error: https://cloud.google.com/storage/docs/request-rate

I was seeing ECONNRESET errors locally when uploading huge numbers of assets, and this seemed to fix it.

How

Add promise-retry with 3 retries with exponential backoff.

Test Plan

With app with 3k assets, run:

~/expo/eas-cli/packages/eas-cli/bin/run update --branch preview --message "Updating the app"

(pointed at my local EAS server with the 700 limit disabled temporarily)

@wschurman wschurman requested a review from ide August 16, 2022 00:10
@wschurman wschurman force-pushed the @wschurman/reliability branch from 28d7b4e to eda7d1d Compare August 16, 2022 00:11
@github-actions
Copy link

github-actions bot commented Aug 16, 2022

Size Change: +19.1 kB (0%)

Total Size: 40.9 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 40.9 MB +19.1 kB (0%)

compressed-size-action

@codecov
Copy link

codecov bot commented Aug 16, 2022

Codecov Report

Merging #1278 (fe40ba3) into main (faf1e90) will decrease coverage by 0.07%.
The diff coverage is 11.12%.

@@            Coverage Diff             @@
##             main    #1278      +/-   ##
==========================================
- Coverage   51.32%   51.26%   -0.06%     
==========================================
  Files         400      400              
  Lines       14092    14111      +19     
  Branches     2939     2942       +3     
==========================================
+ Hits         7231     7232       +1     
- Misses       6329     6345      +16     
- Partials      532      534       +2     
Impacted Files Coverage Δ
packages/eas-cli/src/uploads.ts 22.96% <5.89%> (-8.00%) ⬇️
packages/eas-cli/src/project/publish.ts 91.27% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@dsokal dsokal left a comment

Choose a reason for hiding this comment

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

LGTM

@wkozyra95 wkozyra95 removed their request for review August 16, 2022 09:09
@wschurman wschurman requested a review from ide August 16, 2022 18:03
@wschurman
Copy link
Member Author

/changelog-entry new-feature Improve reliability of update asset presigned upload requests

@wschurman wschurman force-pushed the @wschurman/reliability branch from 1ff5f69 to fe40ba3 Compare August 17, 2022 17:08
@wschurman wschurman merged commit 06bb202 into main Aug 17, 2022
@wschurman wschurman deleted the @wschurman/reliability branch August 17, 2022 17:59

>>>>>>> 1ff5f69a (update CHANGELOG.md)
Copy link
Member

Choose a reason for hiding this comment

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

Clean up

Copy link
Member Author

Choose a reason for hiding this comment

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

ugh lol

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