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

fix(shorebird_cli): fix hangs in patch command output #1647

Merged
merged 4 commits into from
Jan 18, 2024

Conversation

bryanoltman
Copy link
Contributor

Description

Both Android and iOS patch commands were hanging when checking for unpatchable diffs. This change

  1. Moves an artifact download to within a "downloading" progress block
  2. Moves zipping, unzipping, and unsigning to an isolate

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (726dbe1) 100.00% compared to head (656d3b1) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1647   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          156       156           
  Lines         4911      4914    +3     
=========================================
+ Hits          4911      4914    +3     
Flag Coverage Δ
shorebird_cli 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

}

Future<PathHashes> fileHashes(File archive) async {
return Isolate.run(() {
Copy link
Contributor

Choose a reason for hiding this comment

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

💯

Comment on lines +40 to 50
var oldPathHashes = await fileHashes(File(oldArchivePath));
var newPathHashes = await fileHashes(File(newArchivePath));

oldPathHashes = await _updateHashes(
archivePath: oldArchivePath,
pathHashes: oldPathHashes,
);
_updateHashes(
newPathHashes = await _updateHashes(
archivePath: newArchivePath,
pathHashes: newPathHashes,
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we do these in parallel or do they need to be done in series?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They could be done in parallel, will update

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do in a future PR so to get this in the current release.

@bryanoltman bryanoltman merged commit fcc6e63 into main Jan 18, 2024
8 checks passed
@bryanoltman bryanoltman deleted the bo/better-patch-logging branch January 18, 2024 20:48
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.

2 participants