Skip to content

fix(site-action): Pin cloned group to the site's bench versions (#7891) - #7968

Open
PrathmmeshJagdale wants to merge 2 commits into
frappe:developfrom
PrathmmeshJagdale:fix/7891-pin-cloned-bench-versions
Open

PrathmmeshJagdale wants to merge 2 commits into
frappe:developfrom
PrathmmeshJagdale:fix/7891-pin-cloned-bench-versions

Conversation

@PrathmmeshJagdale

Copy link
Copy Markdown
Collaborator

Fixes #7891.

Problem

Moving a site to a new (cloned) bench group builds the latest release of every app instead of the releases running on the site's current bench.

Cause

A cloned release group has no bench yet, so get_app_updates finds no current_hash and marks every app as update_available. get_apps_to_update then picks next_release for all of them.

Fix

In the clone branch of site_action.py, the new deploy candidate is pinned to the apps of site.bench (source, release and hash, with pullable_* cleared) and saved before the build is created. A destination release group chosen by the user is not changed.

Test

test_cloned_group_keeps_site_bench_releases creates a newer release for every app on the bench, moves the site to a cloned group, and checks that the new deploy candidate keeps the releases of the site's bench.

I don't have a local bench, so the tests have not been run locally. Lint, format and mypy pass via pre-commit.

@codecov-commenter

codecov-commenter commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.58824% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.96%. Comparing base (74fb6f5) to head (c637cb1).
⚠️ Report is 267 commits behind head on develop.

Files with missing lines Patch % Lines
...ress/press/doctype/site_action/test_site_action.py 73.07% 14 Missing ⚠️
press/press/doctype/site_action/site_action.py 62.50% 6 Missing ⚠️

❌ Your patch status has failed because the patch coverage (70.58%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7968      +/-   ##
===========================================
+ Coverage    65.42%   66.96%   +1.53%     
===========================================
  Files         1127     1178      +51     
  Lines       111195   118587    +7392     
  Branches      2125     2383     +258     
===========================================
+ Hits         72749    79406    +6657     
- Misses       38389    39114     +725     
- Partials        57       67      +10     
Flag Coverage Δ
dashboard 85.45% <ø> (-1.46%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 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.

@PrathmmeshJagdale PrathmmeshJagdale changed the title fix: pin cloned release group to site's current bench versions ( #7891) fix(site-action): Pin cloned group to the site's bench versions (#7891) Nov 4, 2026
@PrathmmeshJagdale
PrathmmeshJagdale force-pushed the fix/7891-pin-cloned-bench-versions branch 2 times, most recently from f32a1d5 to 89f9a67 Compare November 4, 2026 15:38
@PrathmmeshJagdale
PrathmmeshJagdale force-pushed the fix/7891-pin-cloned-bench-versions branch from 89f9a67 to c637cb1 Compare November 4, 2026 16:32

This branch has not been deployed

No deployments
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.

Moving a site to a new bench group builds the latest app releases, not the site's current versions

2 participants