Skip to content

fix(setup): ask for a password and record the setup start on new Frappe Cloud sites - #3377

Merged
pateljannat merged 4 commits into
frappe:developfrom
pateljannat:fix/setup-password-on-frappe-cloud
Nov 20, 2026
Merged

pateljannat merged 4 commits into
frappe:developfrom
pateljannat:fix/setup-password-on-frappe-cloud

Conversation

@pateljannat

@pateljannat pateljannat commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Setup asks a Frappe Cloud trial owner for a password again

A Frappe Cloud trial owner arrives signed in with no password. The password step of Learning's setup did not show for them, so once their session ends they have no password to sign in with. Frappe's own check skips Frappe Cloud v2 sites and sites with email login links, and every trial site is both.

Learning now decides when its setup asks: any signed-in user without a password, unless a password cannot sign in on the site (password login off, LDAP, social login). Learning's own set_first_password keeps the framework's checks under that rule, and hooks.py points the framework's method at it, so the framework's password step saves without a framework change. Both can go once the framework check covers these sites.

Tested on a local Frappe Cloud v2 site with email login links on and the framework as it is today: the password step shows, saving it goes through the override, and the owner signs in with the new password. Five new tests in test_onboarding.py; four of them fail on develop.


The setup start is recorded on new sites

The framework's setup flow sends setup_started and the first step's view as the page opens, and telemetry drops events until it has loaded. On a new site's first page it often loads later. In the last 30 days, 7 of 16 sites that finished setup have no start event and no view of the first step, while their later steps are there, so the Started count is too low.

When telemetry is still off as setup opens, Learning sends both events once it is on. When it was already on, Learning sends nothing, so no start is counted twice. Remove this once the framework's setup flow waits for telemetry itself. A test in setupPage.test.ts fails on develop.

A Frappe Cloud trial owner arrives signed in with no password, but the
password step of Learning's setup never showed. Frappe's own check skips
Frappe Cloud v2 sites and sites with email login links, and every trial
site is both, so the owner had no password to sign in again.

Learning now decides when its setup asks: any signed-in user without a
password, unless a password cannot sign in on the site. Its own
set_first_password keeps the framework's checks under that rule, and
hooks.py points the framework's method at it, so the framework's password
step saves without a framework change. Remove both once the framework
check covers these sites.
@pateljannat

Copy link
Copy Markdown
Member Author

@frappe-pr-bot deep review

The framework's SetupFlow sends setup_started and the first step's view
as it opens, and telemetry drops events until it has loaded. On a new
site's first page it often loads later, so 7 of 16 sites in the last 30
days have no start event, and the Started count is too low.

When telemetry is still off as setup opens, Learning sends both events
once it is on. When it was already on, Learning sends nothing, so no
start is counted twice. Remove this once the framework's SetupFlow waits
for telemetry itself.
@pateljannat pateljannat changed the title fix(setup): ask for a first password on Frappe Cloud trial sites fix(setup): ask for a password and record the setup start on new Frappe Cloud sites Nov 20, 2026
@pateljannat pateljannat added Run Server Tests Run the server suite on this pull request Run UI Tests Run the UI suite on this pull request Run Frontend Tests Run the frontend suite on this pull request labels Nov 20, 2026
The trial-site password tests changed System Settings with
change_settings, which saves the document. Saving needs a language and a
time zone, and the CI site never ran the setup wizard, so it has neither
and the three tests failed with MandatoryError. They now patch what
get_system_settings returns instead.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.54930% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.69%. Comparing base (d739be4) to head (dca7dd3).

Files with missing lines Patch % Lines
lms/lms/onboarding.py 81.81% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3377      +/-   ##
===========================================
- Coverage    93.69%   93.69%   -0.01%     
===========================================
  Files          316      316              
  Lines        34901    34968      +67     
===========================================
+ Hits         32700    32762      +62     
- Misses        2201     2206       +5     

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

@pateljannat
pateljannat merged commit 4d7090c into frappe:develop Nov 20, 2026
17 of 18 checks passed
@pateljannat pateljannat added the backport version-16-hotfix Mergify: backport to version-16-hotfix label Nov 20, 2026
pateljannat added a commit that referenced this pull request Nov 20, 2026
…3377

fix(setup): ask for a password and record the setup start on new Frappe Cloud sites (backport #3377)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport version-16-hotfix Mergify: backport to version-16-hotfix Run Frontend Tests Run the frontend suite on this pull request Run Server Tests Run the server suite on this pull request Run UI Tests Run the UI suite on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants