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: close IO sink after download finishes or fails #2561

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

bryanoltman
Copy link
Contributor

@bryanoltman bryanoltman commented Oct 21, 2024

Description

Close the IOSink we create in ArtifactManager.downloadFile after the write either completes or fails.

Fixes this issue when running shorebird doctor -v:

Network Speed
✓ GCP Upload Speed: 7.08 MB/s (0.9s)
✗ GCP download speed test failed: PathAccessException: Cannot delete file, path = 'C:\Users\bryan\AppData\Local\Temp\71835ee1\speed_test_file' (OS Error: The process cannot access the file because it is being used by another process.
, errno = 32) (1.3s)

✓ Shorebird is up-to-date (1.5s)
✓ Flutter install is correct (2.4s)

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
  • 🧪 Tests

Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@bryanoltman bryanoltman merged commit 8141444 into main Oct 21, 2024
11 checks passed
@bryanoltman bryanoltman deleted the bo/fix-gcp-download-windows branch October 21, 2024 14:55
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