Skip to content

Promote to master — 2026-08-17 07:10 UTC - #3630

Merged
yodem merged 58 commits into
masterfrom
preprod
Aug 26, 2026
Merged

yodem merged 58 commits into
masterfrom
preprod

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Promote preprodmaster

Field Value
Date 2026-08-17 07:10 UTC
Total Commits 12
Features 0
Bug Fixes 3

Rollback Reference

Version
Current on master app=v6.110.10, chart=0.87.3

To rollback: revert this PR or re-run the promotion workflow targeting the previous tag.

Changes

  • deploy(preprod): app=6.110.10-preprod.4 chart=0.87.3-preprod.1 [skip ci] (20e8c13)
  • fix: expand React app to full viewport when auth page is open on static pages (eb67e32)
  • deploy(preprod): app=6.110.10-preprod.3 chart=0.87.3-preprod.1 [skip ci] (ed07827)
  • fix: exclude redirect urls (379e366)
  • deploy(preprod): app=6.110.10-preprod.2 chart=0.87.3-preprod.1 [skip ci] (92d1044)
  • fix: add allauth to redirect exceptions (0a5c87a)
  • deploy(preprod): app=6.110.10-preprod.1 chart=0.87.3-preprod.1 [skip ci] (fed712a)
  • deploy(preprod): app=6.110.8-preprod.1 chart=0.87.1-preprod.1 [skip ci] (0611ce4)
  • deploy(preprod): app=6.107.4-preprod.1 chart=0.87.1-preprod.1 [skip ci] (5227e3f)
  • deploy(preprod): app=6.106.1-preprod.1 chart=0.86.0-preprod.1 [skip ci] (3734d7b)
  • deploy(preprod): app=6.105.3-preprod.1 chart=0.86.0-preprod.1 [skip ci] (e1d1dcd)
  • deploy(preprod): app=6.105.1-preprod.1 chart=0.86.0-preprod.1 [skip ci] (b49b245)

Auto-generated by Manual Promotion workflow

nsantacruz and others added 30 commits July 1, 2026 11:41
Promote to preprod — 2026-07-09 09:06 UTC
Promote to preprod — 2026-07-09 17:53 UTC
Promote to prod — 2026-07-09 18:22 UTC
Promote to preprod — 2026-07-12 20:34 UTC
Promote to prod — 2026-07-12 20:48 UTC
Promote to preprod — 2026-07-28 09:34 UTC
Promote to prod — 2026-07-28 11:05 UTC
Promote to preprod — 2026-08-09 12:54 UTC
Promote to prod — 2026-08-09 13:42 UTC
Promote to preprod — 2026-08-12 06:54 UTC
Promote to prod — 2026-08-12 09:01 UTC
Promote to prod — 2026-08-12 14:25 UTC
yodem and others added 10 commits August 17, 2026 07:07
Promote to prod — 2026-08-17 07:05 UTC
api/login/ was stock SimpleJWT, so a failed sign-in always returned the
same generic "no active account" message. The mobile app therefore could
not tell a wrong password from an account that only has Google or Apple
sign-in, and had no way to tell the user to use the buttons above.

The web auth endpoint already detects this: email_login returns
401 {error, _auth: {code: 'sso_only_account', providers}}. This extends
the same signal to api/login/ rather than reimplementing it, via a
serializer (SSOAwareTokenObtainPairSerializer) that delegates to
SimpleJWT and only decorates the failure path -- simplejwt's documented
extension point, instead of catching AuthenticationFailed in post() and
returning a raw JsonResponse from a DRF view.

The detection itself moves into a shared sso_only_account_info() helper
that email_login and password_reset_api now both call too, so the three
call sites cannot drift. It also collapses detection from four queries
(user_exists, get_user, socialaccount_set.exists(), then
socialaccount_set.values_list(...)) down to one user lookup and one
social-account fetch; has_usable_password() needs no query of its own.

Behavior is otherwise unchanged. Success still returns exactly
{access, refresh} at 200, and an ordinary wrong-password or unknown-user
failure re-raises SimpleJWT's original exception untouched, preserving
the existing body and status for current clients. password_reset_api and
email_login keep their exact prior status codes and response bodies.

Note for review: this extends account enumeration to api/login/. An
unauthenticated caller can now learn whether an email is registered and
which providers are linked, and neither this endpoint nor email_login is
throttled (no DEFAULT_THROTTLE_CLASSES anywhere). The same exposure
already ships on the web endpoint, so this doubles the surface rather
than introducing a new class of leak -- but it is a deliberate tradeoff
worth an explicit decision, not an oversight.

Supersedes #3580 (closed pending mobile consumption, which has now
landed) and replaces #3612 (view-based approach). Related: #3609.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JMEqissBzfRtQuukMijY4u
The mobile app's forgot-password screen holds no csrftoken cookie and
sends no Referer, so CsrfViewMiddleware rejects it with a 403 HTML body
before the view ever runs. The endpoint is unauthenticated and reads
its target email from the JSON body rather than the session, so CSRF
protects nothing here -- mirrors the existing google_mobile/apple_mobile
exemptions.

sc-46557
The existing wrong-password test used an account with no linked
provider, so it passed with or without the guard. Add the case that
actually distinguishes them: a user holding both a password and a
Google account, mistyping the password. Without the guard they would
be told their account is Google-only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JMEqissBzfRtQuukMijY4u
Reviewer was right that the branch is unreachable: nothing produces an
account with both a usable password and a linked provider. Linking wipes
the password (adapters.py pre_social_login), the reset API rejects
SSO-only accounts, and the web reset form inherits Django's get_users(),
which skips unusable-password users.

Keep the check -- it is free, and "SSO always wins on an email collision"
is a documented product decision rather than an invariant -- but stop the
docstring and test implying it guards a live case.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JMEqissBzfRtQuukMijY4u
…t-api-login

hotfix(sso): surface sso_only_account on the mobile JWT login endpoint
yodem and others added 9 commits August 26, 2026 17:01
/healthz is served by the same gunicorn workers as real traffic, so it
queues behind them. With no explicit failureThreshold the default of 3
means ~3 minutes of a slow-but-alive app is enough for the kubelet to
kill the container.

In production since 2026-08-23 that has produced 17-20 liveness-probe
kills per pod (vs 1-2 before), with zero OOMKills - the containers are
being killed for being slow, not dead. Each kill re-imports the whole
application and shifts traffic onto the remaining pods, which then slow
down and fail their own probes; kills arrive in waves of 3-5 pods.

Readiness is deliberately left at the default so a slow pod is still
pulled out of the Service. Liveness should only fire for a genuinely
dead process.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbbDpzvvxiRi2U9J9wssxi
The container already passes --timeout 420 to gunicorn, so the app itself
tolerates a 7-minute request. The liveness probe, at the default
failureThreshold of 3 with periodSeconds 60, kills the container after
~3 minutes - stricter than the app's own timeout.

60s x 7 = 420s makes the two consistent: the kubelet no longer kills a
worker before gunicorn would have recycled it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbbDpzvvxiRi2U9J9wssxi
…eshold

hotfix(helm): stop the kubelet killing slow-but-alive web pods
sefaria/model/dependencies.py is imported while sefaria.model's __init__
is still running, so its module-level `from sefaria.helper.search import
(...)` pulls that module - and transitively sefaria.search and the
Elasticsearch client - into every worker boot, whether or not anything
is ever indexed.

Wraps each of the eight ES cascade handlers in a thunk that imports on
first call. Subscription order is unchanged, which matters: several
subscriptions carry explicit ordering comments.

The handlers already defer their own imports (`from sefaria.search
import index_topic_doc` inside the function body), so this makes the
module consistent with them.

Behaviour is identical; only the timing of the import changes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbbDpzvvxiRi2U9J9wssxi
…boot

hotfix(deps): defer sefaria.helper.search import to first use
The deploy job for #3661 built and tagged chart 0.87.5-preprod.2, but its
push of the version bump was rejected non-fast-forward because #3663
merged three minutes later and moved the branch. The tag exists
(preprod/6.111.0-preprod.4+chart.0.87.5-preprod.2) while its commit
c917e87 was never pushed, so nothing references the chart.

The follow-up run skipped release-chart, so the chart stayed pinned at
0.87.5-preprod.1 and #3661's livenessProbe failureThreshold never
reached the cluster.

This only updates the reference. The chart is already built and needs no
rebuild.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbbDpzvvxiRi2U9J9wssxi
…875preprod2

fix(preprod): point helmrelease at chart 0.87.5-preprod.2
@yodem
yodem merged commit f1241f6 into master Aug 26, 2026
2 checks passed
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.

5 participants