Skip to content

Remove deprecated legacy frontend code, UserProfile, and Twilio SMS#967

Draft
alexdlaird wants to merge 11 commits into
developfrom
feature/legacy-shutdown-2026-08-01-v2
Draft

Remove deprecated legacy frontend code, UserProfile, and Twilio SMS#967
alexdlaird wants to merge 11 commits into
developfrom
feature/legacy-shutdown-2026-08-01-v2

Conversation

@alexdlaird
Copy link
Copy Markdown
Member

@alexdlaird alexdlaird commented May 12, 2026

Removes everything in platform marked deprecated for the legacy frontend, plus the UserProfile model (only held phone fields) and the Twilio SMS integration. Lands alongside the Aug 1, 2026 frontend-legacy shutdown.

API

  • Drop /auth/token/legacy/, deprecated PUT /auth/user/profile/, deprecated GET /auth/user/pushtoken/<pk>/
  • Drop CourseScheduleAsEvents views and the deprecated DELETE on CourseScheduleApiDetailView
  • Drop legacy CSRF/CORS origins, user_legacy throttle, PROJECT_APP_LEGACY_HOST, FRONTEND_LEGACY_VERSION
  • Restore standard DRF UserRateThrottle (the custom helium.common.throttles.UserRateThrottle was legacy-only)
  • Reminder updates: PUT removed, PATCH-only
  • Registration: drop username from UserCreateSerializer (auto-generated from email)
  • material_group made read-only on MaterialSerializer
  • Deprecate POPUP/TEXT reminder types, alias to PUSH, shrink REMINDER_TYPE_CHOICES to (EMAIL, PUSH); import service forward-maps legacy type values

Models / services / CI

  • Delete UserProfile model and User.last_login_legacy field
  • Delete phoneservice, send_text task, process_text_reminders, text_reminders periodic task
  • Drop twilio from requirements.txt
  • Add deprecation comment to User.username (kept only because AbstractBaseUser requires USERNAME_FIELD; auto-generated from email)
  • Drop run_legacy_cluster_tests and the cluster-tests stage from release.yml/deploy.yml/build.yml

Linked PRs — do not merge before Aug 1, 2026

Merge in order — this PR last so the deploy doesn't 404 routes the legacy frontend is still calling:

  1. Move site to www.heliumedu.com; drop Helium Classic links www#1 — marketing site reconfigured for www
  2. Tear down legacy frontend hosting and Twilio (phase 1 of 2) infra#52 — infra phase 1 (tears down legacy hosting)
  3. Repoint marketing distribution to www.heliumedu.com (phase 2 of 2) infra#53 — infra phase 2 (points www at the marketing distribution)
  4. This PR

Test plan

  • CI green
  • Migrations helium_auth/0060, helium_auth/0061, helium_planner/0047 apply cleanly on a copy of prod data
  • After deploy, POST /auth/token/legacy/ returns 404
  • After deploy, GET /planner/courseschedules/events/ returns 404

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 12, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · -26 duplication

Metric Results
Complexity 0
Duplication -26

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@alexdlaird alexdlaird force-pushed the feature/legacy-shutdown-2026-08-01-v2 branch from 966d1e2 to 99fc6bc Compare May 12, 2026 18:18
@alexdlaird alexdlaird mentioned this pull request May 12, 2026
4 tasks
@alexdlaird alexdlaird force-pushed the feature/legacy-shutdown-2026-08-01-v2 branch from 99fc6bc to a1b7fe2 Compare May 12, 2026 18:50
Base automatically changed from feature/api-docs-cleanup-v2 to develop May 12, 2026 18:57
Frees the platform from legacy frontend support ahead of frontend-legacy
shutdown on August 1, 2026.

API surface
- Drop legacy token endpoint, serializer, and longer-TTL token classes
- Drop deprecated PUT on user profile and GET on user push token
- Drop CourseSchedule-as-Events views and DELETE on CourseSchedule
- Drop legacy CSRF/CORS origins, throttle scope, and PROJECT_APP_LEGACY_HOST
- Drop FRONTEND_LEGACY_VERSION setting

Models, services, tasks
- Delete UserProfile model entirely (only held phone fields, all legacy)
- Drop User.last_login_legacy field
- Migration 0060 removes the model and field
- Delete Twilio integration: phoneservice, send_text task, process_text_reminders
- Drop twilio dependency from requirements.txt
- Add deprecation comment to User.username explaining it stays only because
  Django's AbstractBaseUser requires USERNAME_FIELD

CI
- Drop legacy cluster-tests stages from release/deploy/build workflows
- Delete entire testcasecoursescheduleresourceviews.py (tested the
  CourseScheduleAsEvents views removed in this PR)
- Delete test_get_push_token_by_id (tested the deprecated GET removed)
- Update test_delete_course_schedule_by_id to expect 405 (DELETE method
  was removed; DRF now returns Method Not Allowed)
- Drop UserProfile assertions from test_get_user (UserProfile is gone)
@alexdlaird alexdlaird marked this pull request as draft May 12, 2026 18:59
@alexdlaird alexdlaird force-pushed the feature/legacy-shutdown-2026-08-01-v2 branch from a1b7fe2 to 87e0316 Compare May 12, 2026 19:00
@sentry
Copy link
Copy Markdown

sentry Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.50%. Comparing base (8e775ef) to head (cc028ea).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
helium/importexport/services/importservice.py 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #967      +/-   ##
===========================================
- Coverage    87.66%   87.50%   -0.17%     
===========================================
  Files          141      136       -5     
  Lines         7509     7212     -297     
  Branches       754      730      -24     
===========================================
- Hits          6583     6311     -272     
+ Misses         736      713      -23     
+ Partials       190      188       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Rename Django migration file from 0047_alter_reminder_type.py to 0048_alter_reminder_type.py and update the generated timestamp. Update the migration dependency from ('planner', '0046_alter_category_title_and_more') to ('planner', '0047_alter_category_weight_alter_course_credits_and_more') so the migration ordering remains correct.
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