Skip to content

refactor: backupCreate for testability#604

Merged
miparnisari merged 1 commit intoauthzed:mainfrom
ivanauth:fix/issue-569-refactor-backup-create
Mar 31, 2026
Merged

refactor: backupCreate for testability#604
miparnisari merged 1 commit intoauthzed:mainfrom
ivanauth:fix/issue-569-refactor-backup-create

Conversation

@ivanauth
Copy link
Copy Markdown
Contributor

@ivanauth ivanauth commented Dec 19, 2025

Summary

  • Extract backupCreateImpl with injectable client and ProgressTracker interface for testability
  • Harden retry logic (error checks, max 10 retries)
  • Remove legacy Serverless backup path
  • Add --prefix-filter and --rewrite-legacy flags

Resolves #569

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 65.30612% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.03%. Comparing base (0d466f3) to head (d4003ac).

Files with missing lines Patch % Lines
internal/cmd/backup.go 65.30% 24 Missing and 10 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #604      +/-   ##
==========================================
+ Coverage   42.33%   43.03%   +0.69%     
==========================================
  Files          38       38              
  Lines        6113     6098      -15     
==========================================
+ Hits         2588     2624      +36     
+ Misses       3264     3208      -56     
- Partials      261      266       +5     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ivanauth ivanauth force-pushed the fix/issue-569-refactor-backup-create branch from 8437759 to 7a02c9f Compare January 24, 2026 00:34
@miparnisari
Copy link
Copy Markdown
Contributor

miparnisari commented Mar 27, 2026

Remove legacy Serverless backup path

can you explain this? i don't think we should remove support for serverless yet

@ivanauth ivanauth force-pushed the fix/issue-569-refactor-backup-create branch from 46fc10a to c0f705f Compare March 27, 2026 20:09
@ivanauth
Copy link
Copy Markdown
Contributor Author

ivanauth commented Mar 27, 2026

You're right, removing serverless support is a separate decision. Reworked PR.

@ivanauth ivanauth force-pushed the fix/issue-569-refactor-backup-create branch 2 times, most recently from 6bc52b3 to 58c3d78 Compare March 27, 2026 22:06
@miparnisari miparnisari changed the title Refactor backupCreate for testability refactor: backupCreate for testability Mar 29, 2026
@miparnisari miparnisari force-pushed the fix/issue-569-refactor-backup-create branch from 58c3d78 to d4003ac Compare March 31, 2026 18:18
Copy link
Copy Markdown
Contributor

@miparnisari miparnisari left a comment

Choose a reason for hiding this comment

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

LGTM

@miparnisari miparnisari merged commit fa942ff into authzed:main Mar 31, 2026
12 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reorganize backupCreate code and refactor tests accordingly

3 participants