Skip to content

fix(api): Tighten site backup link validation (backport #6085)#6160

Merged
ssiyad merged 4 commits intomasterfrom
mergify/bp/master/pr-6085
Apr 22, 2026
Merged

fix(api): Tighten site backup link validation (backport #6085)#6160
ssiyad merged 4 commits intomasterfrom
mergify/bp/master/pr-6085

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Apr 16, 2026

  • align get_backup_link with the existing site-level backup download behavior
  • tighten validation around backup link resolution and accepted file types
  • add regression coverage for mismatched backup/site lookups and invalid file selections

This is an automatic backport of pull request #6085 done by [Mergify](https://mergify.com).

- align `get_backup_link` with the existing site-level backup download behavior
- tighten validation around backup link resolution and accepted file types
- add regression coverage for mismatched backup/site lookups and invalid file selections

(cherry picked from commit 56f3535)
Tests reuse deterministic site names across rollbacks, which can leave
stale Site values in Frappe's per-request cache. Child docs created
during after_insert (Site Activity, Site Domain) then resolve the old
team via fetch_from, causing LinkValidationError.

(cherry picked from commit 0fb19ef)
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 51.68%. Comparing base (4f778ca) to head (169bdd5).

Files with missing lines Patch % Lines
press/api/tests/test_site.py 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6160      +/-   ##
==========================================
+ Coverage   51.66%   51.68%   +0.02%     
==========================================
  Files         905      905              
  Lines       75195    75222      +27     
  Branches      272      272              
==========================================
+ Hits        38847    38881      +34     
+ Misses      36325    36318       -7     
  Partials       23       23              
Flag Coverage Δ
dashboard 73.06% <ø> (+<0.01%) ⬆️

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.

🚀 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.

@ssiyad ssiyad merged commit 086cbd5 into master Apr 22, 2026
11 checks passed
@ssiyad ssiyad deleted the mergify/bp/master/pr-6085 branch April 22, 2026 08:31
@frappe-pr-bot
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 0.16.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants