Skip to content

Release 0.38.0 #2362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/instructions/frontend-tests.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
applyTo: "**/*.test.ts,**/*.test.tsx"
---

## Guidelines for writing frontend tests

- `@testing-library/react` and `@testing-library/user-event` for rendering, querying, and manipulation
- within the `main` package, use `renderWithProviders` from `@/test-utils` to render components with the necessary context providers
- use `setMockResponse` and `urls` from `api/src/test-utils` for mocking API calls in tests
- data factories for tests live in `api/src/test-utils/factories`. API Calls should be
10 changes: 10 additions & 0 deletions .github/instructions/frontend.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
applyTo: "**/*.ts,**/*.tsx,**/package.json"
---

- We use React + NextJS. For NextJS, we use the App router NOT the older pages router.
- The frontend files are set up as a monorepo:
- `ol-components` for shared componenets
- `api` contains generated API client code and react-query hooks
- For reusable UI, use components from `@mitodl/smoot-design`, `ol-components` preferentially
- Within `main`, use `@/` for root-relative imports
27 changes: 13 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- 5432:5432

redis:
image: redis:7.4.4
image: redis:7.4.5
ports:
- 6379:6379

Expand Down Expand Up @@ -151,23 +151,22 @@ jobs:

- name: Build the Docker image
env:
ORIGIN: https://rc.learn.mit.edu
MITOL_API_BASE_URL: https://api.rc.learn.mit.edu
ORIGIN: http://fakelearn.odl.local:8062
MITOL_API_BASE_URL: http://api.fakelearn.odl.local:8065
SITE_NAME: MIT Learn
SUPPORT_EMAIL: mitlearn-support@mit.edu
EMBEDLY_KEY: ${{ secrets.EMBEDLY_KEY_RC }}
EMBEDLY_KEY: fake-embedly-key
MITOL_AXIOS_WITH_CREDENTIALS: true
CSRF_COOKIE_NAME: ${{ secrets.CSRF_COOKIE_NAME_RC }}
CSRF_COOKIE_NAME: learn_csrftoken_ci
POSTHOG_API_HOST: https://app.posthog.com
POSTHOG_PROJECT_ID: ${{ secrets.POSTHOG_PROJECT_ID_RC }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY_RC }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN_RC }}
SENTRY_ENV: ${{ secrets.MITOL_ENVIRONMENT_RC }}
SENTRY_PROFILES_SAMPLE_RATE: ${{ secrets.SENTRY_PROFILES_SAMPLE_RATE_RC }}
SENTRY_TRACES_SAMPLE_RATE: ${{ secrets.SENTRY_TRACES_SAMPLE_RATE_RC }}
APPZI_URL: ${{ secrets.APPZI_URL_RC }}
LEARN_AI_RECOMMENDATION_ENDPOINT: ${{ secrets.LEARN_AI_RECOMMENDATION_ENDPOINT_RC }}
LEARN_AI_SYLLABUS_ENDPOINT: ${{ secrets.LEARN_AI_SYLLABUS_ENDPOINT_RC }}
POSTHOG_PROJECT_ID: fake-posthog-project-id
POSTHOG_API_KEY: fake-posthog-api-key
SENTRY_DSN: fake-sentry-dsn
SENTRY_ENV: fake-sentry-env
SENTRY_PROFILES_SAMPLE_RATE: 0.1
SENTRY_TRACES_SAMPLE_RATE: 0.1
LEARN_AI_RECOMMENDATION_ENDPOINT: http://api.fakelearn.odl.local:8065/ai/http/recommendation_agent
LEARN_AI_SYLLABUS_ENDPOINT: http://api.fakelearn.odl.local:8065/ai/http/syllabus_agent
VERSION: ${{ github.sha }}
run: |
docker build \
Expand Down
106 changes: 0 additions & 106 deletions .github/workflows/production.yml

This file was deleted.

98 changes: 0 additions & 98 deletions .github/workflows/release-candidate.yml

This file was deleted.

19 changes: 19 additions & 0 deletions RELEASE.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
Release Notes
=============

Version 0.38.0
--------------

- Fix CI docker build and remove old NextJS Release actions (#2359)
- add a healthcheck route (#2357)
- fix price separator display (#2348)
- chore(deps): update dependency eslint-plugin-jest to v29 (#2356)
- canvas - separate courses per session (#2347)
- fix(deps): update dependency litellm to v1.74.2 (#2354)
- fix(deps): update dependency ruff to v0.12.3 (#2353)
- fix(deps): update dependency onnxruntime to v1.22.1 (#2352)
- chore(deps): update redis docker tag to v7.4.5 (#2351)
- Set language attribute on resource title and descriptions (#2346)
- Add Canvas platform for learning resources (#2345)
- Shanbady/summary flashcard sync (#2339)
- Testimonial spacing to allow 2 line attestation title (#2344)
- Remove the chat demo pages (#2341)
- Return to page after sign up (#2340)

Version 0.37.0 (Released July 14, 2025)
--------------

Expand Down
5 changes: 3 additions & 2 deletions authentication/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from django.contrib.auth import logout
from django.shortcuts import redirect
from django.utils.http import url_has_allowed_host_and_scheme
from django.utils.http import url_has_allowed_host_and_scheme, urlencode
from django.views import View

from main import settings
Expand Down Expand Up @@ -80,7 +80,8 @@ def get(
not profile.completed_onboarding
and request.GET.get("skip_onboarding", "0") == "0"
):
redirect_url = settings.MITOL_NEW_USER_LOGIN_URL
params = urlencode({"next": redirect_url})
redirect_url = f"{settings.MITOL_NEW_USER_LOGIN_URL}?{params}"
profile.completed_onboarding = True
profile.save()
return redirect(redirect_url)
5 changes: 4 additions & 1 deletion authentication/views_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,17 @@ def test_custom_login_view_authenticated_user_with_onboarding(mocker):
request.user = MagicMock(is_anonymous=False)
request.user.profile = MagicMock(completed_onboarding=False)
mocker.patch("authentication.views.get_redirect_url", return_value="/dashboard")
mocker.patch(
"authentication.views.urlencode", return_value="next=/search?resource=184"
)
mocker.patch(
"authentication.views.settings.MITOL_NEW_USER_LOGIN_URL", "/onboarding"
)

response = CustomLoginView().get(request)

assert response.status_code == 302
assert response.url == "/onboarding"
assert response.url == "/onboarding?next=/search?resource=184"


def test_custom_login_view_authenticated_user_skip_onboarding(mocker):
Expand Down
12 changes: 12 additions & 0 deletions data_fixtures/fixtures/platforms.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,5 +214,17 @@
"created_on": "2024-02-23T00:00:00+00:00",
"updated_on": "2024-02-23T00:00:00+00:00"
}
},
{
"model": "learning_resources.LearningResourcePlatform",
"fields": {
"code": "canvas",
"name": "Canvas",
"is_edx": false,
"has_content_files": true,
"url": "https://web.mit.edu/canvas/",
"created_on": "2025-07-10T00:00:00+00:00",
"updated_on": "2025-07-10T00:00:00+00:00"
}
}
]
44 changes: 44 additions & 0 deletions data_fixtures/migrations/0016_add_canvas_platform.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Generated manually


from django.db import migrations


def remove_canvas_platform(apps, schema_editor):
"""
Remove canvas platform
"""

LearningResourcePlatform = apps.get_model(
"learning_resources", "LearningResourcePlatform"
)
LearningResourcePlatform.objects.filter(code="canvas").delete()


def add_canvas_platform(apps, schema_editor):
LearningResourcePlatform = apps.get_model(
"learning_resources", "LearningResourcePlatform"
)

LearningResourcePlatform.objects.update_or_create(
code="canvas",
defaults={
"name": "Canvas",
"is_edx": False,
"has_content_files": True,
"url": "https://web.mit.edu/canvas/",
},
)


class Migration(migrations.Migration):
dependencies = [
(
"data_fixtures",
"0015_unit_page_copy_updates",
),
]

operations = [
migrations.RunPython(add_canvas_platform, remove_canvas_platform),
]
Loading
Loading