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): shorebird preview to not use outdated cached preview artifacts #2254

Merged
merged 4 commits into from
Jun 17, 2024

Conversation

erickzanardo
Copy link
Contributor

Description

When running a preview, the CLI will always use the cache artifact if one if found. This might make the command run an outdated artifact when a release is delete by some reason.

This PR makes the artifact id to be part of the path of the preview artifact, that way, if a release is deleted and recreated, the id will be a fresh one and the cli will not accidentally use the wrong cached artifact.

Fixes #1746

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

@erickzanardo erickzanardo changed the title fix: Preview command to always use latest artifact fix: Preview command to not use outdated preview artifacts Jun 17, 2024
@erickzanardo erickzanardo changed the title fix: Preview command to not use outdated preview artifacts fix: Preview command to not use outdated cached preview artifacts Jun 17, 2024
Copy link

codecov bot commented Jun 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (6c5ddca) to head (3114bf3).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2254   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          186       186           
  Lines         5851      5861   +10     
=========================================
+ Hits          5851      5861   +10     
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.

Copy link
Contributor

@felangel felangel left a comment

Choose a reason for hiding this comment

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

LGTM ✅

@felangel felangel changed the title fix: Preview command to not use outdated cached preview artifacts fix(shorebird_cli): shorebird preview to not use outdated cached preview artifacts Jun 17, 2024
erickzanardo and others added 2 commits June 17, 2024 13:36
Co-authored-by: Felix Angelov <felix@shorebird.dev>
@erickzanardo erickzanardo enabled auto-merge (squash) June 17, 2024 16:38
@erickzanardo erickzanardo merged commit 0bacde2 into main Jun 17, 2024
11 checks passed
@erickzanardo erickzanardo deleted the fix/preview-always-use-latest-artifact-build branch June 17, 2024 16:43
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.

Build does not update if you delete a release and then upload new one with same version number
3 participants