Skip to content

fix(bench): allow PostgreSQL benches only on Frappe develop - #668

Open
mihir-kandoi wants to merge 4 commits into
developfrom
fix/postgres-develop-only
Open

mihir-kandoi wants to merge 4 commits into
developfrom
fix/postgres-develop-only

Conversation

@mihir-kandoi

Copy link
Copy Markdown
Contributor

Summary

Frappe supports PostgreSQL only on develop. Pilot let you create a PostgreSQL bench on version-16, and it defaulted to that branch.

 BenchCreator._initial_settings
+  if db_type == postgres: app_branch = develop

 setup wizard PUT /setup/configuration
   validate_configuration
+    get_framework_branch_error(db_type, app_branch)  -> 422

 BenchInitializer "Validate bench.toml"
   config.validate()
+  get_framework_branch_error(db_type, framework_app.branch)  -> ConfigError

 Setup.vue  "Frappe branch" combobox
+  PostgreSQL picked -> branch set to develop, field disabled

The rule lives in one place: get_framework_branch_error() in pilot/config/bench.py. Existing benches are not affected because the check is not in BenchConfig.validate(), which runs on every config read.

Evidence

  • Before: validate_configuration({db_type: postgres, app_branch: version-16, ...}) returns None, and pilot init builds the bench.
    After: it returns "PostgreSQL benches need Frappe branch 'develop', not 'version-16'.", and pilot init stops at step 1.
  • New tests: test_validate_configuration_rejects_postgres_off_develop, test_rejects_postgres_bench_off_develop. Also test_new_command_postgres_bench_has_no_password_yet now checks that the branch is develop.
  • Wizard: when you pick PostgreSQL, step 2 shows develop locked with the hint "PostgreSQL needs the develop branch."

Merge Danger

Door: two-way

Blast Radius: narrow

Only new PostgreSQL benches are affected. The E2E postgres job already uses develop.

Frappe supports PostgreSQL only on develop. Reject other branches in the
setup wizard and at init, and default new PostgreSQL benches to develop.
@greptile-apps

greptile-apps Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change reaches PostgreSQL bench setup and initialization.

Add the required frontend tests and remove the repeated comments before merging.

Reviews (2) · Last reviewed commit: "docs: Note PostgreSQL needs Frappe devel..." · Reviewed by Greptile

Comment thread pilot/config/bench.py
Comment thread admin/frontend/dashboard/src/composables/setup/useSetup.ts
Comment thread admin/frontend/dashboard/src/composables/setup/useSetup.ts
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.

1 participant