Commit Graph

197 Commits

Author SHA1 Message Date
Mihir Kandoi
63325cb976 ci(postgres): match MariaDB test job name (drop "(PG)")
Both server-test workflows now name the test job "Python Unit Tests" so the
check appears under the same name regardless of engine.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:32:53 +05:30
Mihir Kandoi
e36e6bbb96 ci(postgres): warm up test data before baking the datadir
Mirror frappe/erpnext#56655 for the Postgres CI. Run the
bootstrap_test_data module in the setup job while Postgres is still up, so
the BootStrapTestData records are baked into the PGDATA artifact every shard
hydrates from — the shards start on already-warmed data instead of each
building it.

Unlike the MariaDB step, no `su -m` wrapper: the Postgres CI is
GitHub-hosted ubuntu-latest running as the runner user directly, matching
its own "Run Tests" step.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:22:30 +05:30
ruthra kumar
d389a03c15 Merge pull request #56655 from ruthra-kumar/bootstrap_test_data_in_warmed_db
ci: warmup test data along with DB
2026-06-30 17:44:45 +05:30
ruthra kumar
dcdbf9df17 ci: warmup test data along with DB 2026-06-30 17:30:36 +05:30
Mihir Kandoi
dc2d3c433d Merge pull request #56624 from mihir-kandoi/pg-ci-fanout-stop-guard
ci(postgres): fail setup if pg_ctl stop fails; drop redundant ALTER SYSTEM block
2026-06-29 22:10:52 +05:30
Mihir Kandoi
f645e51338 ci(patch): fetch v14 baseline from public release URL without a token
Greptile flagged that `gh release download` with `github.token` could be
rejected for fork pull requests (token scoped to the fork, asset in
frappe/erpnext). The release is public and published, so the asset is
downloadable anonymously from objects.githubusercontent.com — drop the token
and curl the public URL directly. Removes the cross-repo token dependency and
keeps fork PRs working. Cloudflare is still bypassed since GitHub serves the
asset, not frappe.io.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 21:33:42 +05:30
Mihir Kandoi
b93a3bca16 ci(postgres): fail setup if pg_ctl stop fails before baking the datadir
The "Stop DB and stage datadir" step swallowed a failed `pg_ctl -m fast -w
stop` with `|| true`, then moved and tarred the PGDATA regardless. A stop
that times out or errors would bake a still-running, crash-inconsistent
cluster into the artifact every test shard consumes — and with
full_page_writes off, crash recovery can't repair torn pages. Drop the
`|| true` so a failed stop fails the job, mirroring the MariaDB sister's
"don't bake a dirty datadir" guard.

Also drop the redundant `ALTER SYSTEM SET fsync/synchronous_commit/
full_page_writes = off` block from install.sh. Its comment claimed the
postgres workflow "runs a service-container DB and never calls start-db.sh",
but it does call start-db.sh, which already applies those flags via `-o` on
every postgres start (setup job and each shard). The block was a no-op and
its justification was factually wrong.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 21:29:22 +05:30
Mihir Kandoi
6e955bdf3f ci(patch): download v14 baseline from GitHub release instead of frappe.io
The Patch Test job intermittently failed on the "Download erpnext v14 backup"
step with HTTP 403 Forbidden: frappe.io sits behind Cloudflare, and wget's
default User-Agent gets flagged by bot protection on cache misses. This caused
random failures across PRs that only a re-run would clear.

Pull the fixed baseline from the v14-baseline GitHub release using the built-in
token instead. Release assets are served from GitHub's CDN and authenticated
from the runner, so no rate-limit roulette.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 21:28:08 +05:30
Diptanil Saha
1e2adc0706 ci: bump pre-commit actions to v3.0.1 (#56562) 2026-06-26 11:14:57 +00:00
Raffael Meyer
7f58c7f0ac ci: bump po review action (#56454) 2026-06-25 09:27:45 +00:00
Mihir Kandoi
f3315ecb34 ci(mariadb): un-wire warm-bench (no measurable gain)
Measured A/B on the self-hosted setup: warm-bench restore 85s vs full
bench init 82s — no gain (slightly slower). bench init is already fast
because the uv/pip caches are mounted warm, so the cache only replaces a
~13s init while adding a ~200MB untar and still running bench build.

Drop BENCH_CACHE_DIR so warm-bench stays inert (the helper functions
remain, matching develop's install.sh).
2026-06-25 13:47:54 +05:30
Mihir Kandoi
61f0a39716 Merge remote-tracking branch 'frappe/develop' into mariadb-ci-fanout
# Conflicts:
#	.github/helper/hydrate.sh
#	.github/helper/install.sh
#	.github/helper/start-db.sh
2026-06-25 13:31:28 +05:30
Mihir Kandoi
368ea75e38 ci: address self-review findings
- Wire up warm-bench: set BENCH_CACHE_DIR on the setup job so the bench-base
  cache actually activates (was inert with no dir set, so every run did a
  full bench init). Lives on the node-local bench-staging hostPath; any
  miss/failure still falls back to a full init.
- run_ci_step: capture the timeout exit code under `set -e` (the previous
  `timeout ...` + `ec=$?` aborted at the timeout line on failure, skipping
  ::endgroup:: and the exit-code return).
- Raise the per-step timeout 600s -> 1800s so a contended reinstall isn't
  killed before the 40-min job timeout.
- Propagate DB through the su re-exec in start-db.sh / hydrate.sh so a
  DB=postgres invocation can't silently fall back to the mariadb branch.
- Simplify the coverage job `if` to the equivalent plain non-PR gate.
2026-06-25 13:24:15 +05:30
Mihir Kandoi
694f46f7f7 ci(mariadb): track the erpnext branch for frappe, drop hardcoded develop
Remove the `|| 'develop'` fallback on FRAPPE_BRANCH so install.sh resolves the
frappe framework branch from the git context (GITHUB_BASE_REF/GITHUB_REF), the
same as the Postgres workflow. This makes the workflow backportable unchanged:
on version-15-hotfix / version-16-hotfix it now clones the matching frappe
branch instead of develop.
2026-06-25 11:54:26 +05:30
Mihir Kandoi
dfdfcb8ca1 ci(mariadb): fix stale 'restore DB dump' fan-out comment
The shards start MariaDB on the baked datadir; there is no DB dump restore.
Aligns the overview comment with the corrected Hydrate step (greptile).
2026-06-25 06:28:28 +05:30
Mihir Kandoi
eba851b4b5 Merge pull request #56408 from mihir-kandoi/pg-ci-fanout
ci(postgres): scheduled fan-out Postgres CI (daily + `postgres` label gate)
2026-06-24 12:57:13 +05:30
Mihir Kandoi
7cd1cca2ed ci(mariadb): address greptile review 2026-06-24 12:26:46 +05:30
Mihir Kandoi
a0cc645725 ci(postgres): address greptile review 2026-06-24 12:26:44 +05:30
Mihir Kandoi
b74abbb9c3 ci(mariadb): use org-owned ghcr.io/frappe image 2026-06-24 12:08:03 +05:30
Mihir Kandoi
afca370fa8 ci(patch): cache the v14 baseline backup instead of re-downloading it every run 2026-06-24 11:59:25 +05:30
Mihir Kandoi
69cb1121ed ci(mariadb): drop '(ARC)' from test job name 2026-06-24 11:56:51 +05:30
Mihir Kandoi
62c401badc ci(mariadb): revert to 4 shards + cleanup 2026-06-24 11:54:50 +05:30
Mihir Kandoi
c1006e79a4 ci(postgres): cleanup — drop baseline-restore code, debug step, stale restore vars 2026-06-24 11:54:48 +05:30
Mihir Kandoi
3b8674a4a9 ci(mariadb): self-hosted fan-out CI (ARC runners, datadir bake, 8 shards) 2026-06-24 11:19:58 +05:30
Mihir Kandoi
8fd0813614 ci(postgres): scheduled fan-out Postgres CI (daily 3am IST + 'postgres' label gate) 2026-06-24 10:39:44 +05:30
Nabin Hait
a120bf8363 Merge pull request #56286 from nabinhait/ci-patch-test-no-workers-during-migrate
ci: don't run background workers during patch-test migrate
2026-06-22 17:05:15 +05:30
Ankush Menat
7256fc98e9 ci: Wait for processes to die (#56288) 2026-06-22 12:25:16 +05:30
Nabin Hait
599b1bab60 ci: don't run background workers during patch-test migrate
The Patch Test starts the full bench (incl. workers) and then runs migrate.
Migrate enqueues orphan-link cleanup jobs (delete_dynamic_links) that the
workers pick up and process while migrate is altering tables, which
intermittently fails with MySQL 1412 'Table definition has changed, please
retry transaction'.

Start every bench process except the workers during migrate, so nothing
consumes the queue mid-migrate. Redis and the other services stay up; the
queued jobs just wait.
2026-06-22 11:30:46 +05:30
Mihir Kandoi
c820591089 ci: name the Postgres job distinctly so it is not a required check
The MariaDB job is named 'Python Unit Tests', and 'Python Unit Tests (1..4)' are the
required status checks on develop. Naming the Postgres matrix job the same made its
checks report under those required contexts, effectively gating every (labelled) PR on
Postgres. Rename it to 'Postgres Unit Tests' so its contexts are distinct and the
workflow stays non-required until we deliberately add it to branch protection.
2026-06-21 16:19:52 +05:30
Mihir Kandoi
57d0cebfb8 ci: make Postgres coverage upload glob explicit (codecov files) 2026-06-21 16:19:52 +05:30
Mihir Kandoi
d7eb54b153 ci: upgrade the PostgreSQL server test workflow (kept opt-in via 'postgres' label)
Bring the Server (Postgres) workflow in line with Server (MariaDB) internals while
keeping it opt-in for now: pull_request runs still require the 'postgres' label, but the
job now uses the full 4-container matrix (was 1), adds the nightly schedule /
workflow_dispatch / repository_dispatch triggers (which always run), and uploads
coverage. Builds ERPNext against frappe `develop` (PostgreSQL query-builder/ORM support
is merged there), so no fork override is needed.

The ERPNext server suite now passes on PostgreSQL and MariaDB from a single codebase;
flipping this to run on every PR / become a required check is a later, separate step.
2026-06-21 16:19:52 +05:30
Mihir Kandoi
a3e3e1b32c ci: optimize install helper setup
Cc: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 16:50:50 +05:30
Raffael Meyer
5641f37381 ci: add review comments on gettext files (#55699) 2026-06-07 22:11:45 +00:00
Mihir Kandoi
85be72a403 fix: minor improvements to web templates, banking page and CI workflow (#55525)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 08:26:23 +05:30
Rushabh Mehta
6ac050e624 feat: build and upload assets to GitHub Releases 2026-06-02 06:45:10 +05:30
Diptanil Saha
1ae46b54b2 ci: split sync into orchestrator + per-branch runners, generalise for any app (#55414)
* ci: re-fetch before push to avoid force-push on translations_hotfix

If upstream/translations_hotfix moved forward while the script was
running (e.g., a concurrent run or manual push), git push would fail
with "behind remote". Re-fetch right before pushing and merge any new
remote commits with -X ours so our .po changes and the main.pot from
${HOTFIX_BRANCH} (set by the initial -X theirs merge) are preserved
without needing a force-push.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: define HOTFIX_BRANCH once as job env; pass it to sync script

version-16-hotfix is now declared as env.HOTFIX_BRANCH at the job level
so the checkout ref and the script argument both derive from the same
value. Quoting the GITHUB_WORKSPACE path guards against spaces on
self-hosted runners.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: define HOTFIX_BRANCH as job env and pass to sync script via env

Declares version-16-hotfix once as env.HOTFIX_BRANCH at the job level
so the checkout ref and the script both derive from the same value.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: read HOTFIX_BRANCH from env instead of hardcoding in script

Removes the hardcoded branch name from the script; reads it from the
HOTFIX_BRANCH env var set by the workflow. Fails immediately with a
clear message if the var is not set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: use ls-remote to check branch existence instead of swallowing fetch errors

Replace `git fetch ... 2>/dev/null || true` + `git rev-parse --verify`
with `git ls-remote --exit-code --heads upstream translations_hotfix`.
ls-remote queries the remote directly so the check is never based on
stale local state, and real failures (auth, network) propagate through
set -e instead of being silently ignored. Applied to both the initial
branch setup and the pre-push re-fetch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: rewrite orchestrator to dispatch runner per hotfix branch via matrix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: add per-branch runner workflow for hotfix translation sync

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: generalise sync script to use APP_NAME and GITHUB_REPOSITORY

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: remove push trigger from runner workflow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: rename working branch to sync_translations_{hotfix_branch}

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 20:13:45 +05:30
Diptanil Saha
fcb87b437e ci: add node setup on sync translations to version 16 hotfix (#55355) 2026-05-27 23:34:10 +05:30
Diptanil Saha
7561ad4666 ci: sync translations from develop to version-16-hotfix (#55348)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 20:50:03 +05:30
Daniel Radl
d85f6a4541 chore: migrate to new docker publish workflow (#54499) 2026-05-20 16:22:09 +00:00
Mihir Kandoi
28d9c2ca68 Revert "ci: auto merge backports" (#54754)
* Revert "ci: auto merge backports"

This reverts commit dfe1a5749a.

* revert: propogate label
2026-05-06 06:04:34 +00:00
Mihir Kandoi
0cd0b8213d ci: Upgrade github-script action to version 8 (#54726) 2026-05-04 16:08:56 +00:00
Mihir Kandoi
032a282f84 ci: auto merge backports (#54701)
* ci: auto merge backports

* ci: add github action to propogate auto-merge label
2026-05-02 17:11:39 +00:00
diptanilsaha
0d2da6d86c ci: fix timezone for python mariadb tests (#54464) 2026-04-22 17:46:28 +05:30
Mihir Kandoi
ef18b5cd93 Revert "chore: initiate release twice in a week" (#53944) 2026-03-31 19:01:12 +05:30
ruthra kumar
be4496e4ab ci: semgrep to prevent test regression 2026-03-27 12:49:28 +05:30
ruthra kumar
4167609e41 ci: run parallel test in lightmode
- modify individual test CI. let it be dormat for now.

Acked-by: ruthra kumar <ruthra@erpnext.com>
2026-03-18 20:59:34 +05:30
Mihir Kandoi
ef09cffa58 chore: initiate release twice in a week (#53543) 2026-03-17 10:17:02 +00:00
ruthra kumar
ee187065c6 ci: drop v14 from weekly release 2026-03-10 16:29:02 +05:30
ruthra kumar
e565d2283e ci: skip svg 2026-02-03 14:59:52 +05:30
Diptanil Saha
936f13eb20 ci: generate pot files for version-16-hotfix (#51954) 2026-01-21 14:37:21 +05:30