Skip to content

Release 0.30.5 #2060

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 16 commits into from
Feb 21, 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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ jobs:
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 }}
VERSION: ${{ github.sha }}
run: |
docker build \
Expand All @@ -185,6 +187,8 @@ jobs:
--build-arg NEXT_PUBLIC_SENTRY_PROFILES_SAMPLE_RATE=$SENTRY_PROFILES_SAMPLE_RATE \
--build-arg NEXT_PUBLIC_SENTRY_TRACES_SAMPLE_RATE=$SENTRY_TRACES_SAMPLE_RATE \
--build-arg NEXT_PUBLIC_APPZI_URL=$APPZI_URL \
--build-arg NEXT_PUBLIC_LEARN_AI_RECOMMENDATION_ENDPOINT=$LEARN_AI_RECOMMENDATION_ENDPOINT \
--build-arg NEXT_PUBLIC_LEARN_AI_SYLLABUS_ENDPOINT=$LEARN_AI_SYLLABUS_ENDPOINT \
--build-arg NEXT_PUBLIC_VERSION=$VERSION \
-t mitodl/mit-learn-frontend:$VERSION .

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
SENTRY_PROFILES_SAMPLE_RATE: ${{ secrets.SENTRY_PROFILES_SAMPLE_RATE_PROD }}
SENTRY_TRACES_SAMPLE_RATE: ${{ secrets.SENTRY_TRACES_SAMPLE_RATE_PROD }}
APPZI_URL: ${{ secrets.APPZI_URL_PROD }}
LEARN_AI_RECOMMENDATION_ENDPOINT: ${{ secrets.LEARN_AI_RECOMMENDATION_ENDPOINT_PROD }}
LEARN_AI_SYLLABUS_ENDPOINT: ${{ secrets.LEARN_AI_SYLLABUS_ENDPOINT_PROD }}
VERSION: ${{ github.sha }}
run: |
heroku container:push web \
Expand All @@ -79,6 +81,8 @@ jobs:
NEXT_PUBLIC_SENTRY_PROFILES_SAMPLE_RATE=$SENTRY_PROFILES_SAMPLE_RATE,\
NEXT_PUBLIC_SENTRY_TRACES_SAMPLE_RATE=$SENTRY_TRACES_SAMPLE_RATE,\
NEXT_PUBLIC_APPZI_URL=$APPZI_URL,\
NEXT_PUBLIC_LEARN_AI_RECOMMENDATION_ENDPOINT=$LEARN_AI_RECOMMENDATION_ENDPOINT,\
NEXT_PUBLIC_LEARN_AI_SYLLABUS_ENDPOINT=$LEARN_AI_SYLLABUS_ENDPOINT,\
NEXT_PUBLIC_VERSION=$VERSION \
--context-path .

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
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 }}
VERSION: ${{ github.sha }}
run: |
heroku container:push web \
Expand All @@ -79,6 +81,8 @@ jobs:
NEXT_PUBLIC_SENTRY_PROFILES_SAMPLE_RATE=$SENTRY_PROFILES_SAMPLE_RATE,\
NEXT_PUBLIC_SENTRY_TRACES_SAMPLE_RATE=$SENTRY_TRACES_SAMPLE_RATE,\
NEXT_PUBLIC_APPZI_URL=$APPZI_URL,\
NEXT_PUBLIC_LEARN_AI_RECOMMENDATION_ENDPOINT=$LEARN_AI_RECOMMENDATION_ENDPOINT,\
NEXT_PUBLIC_LEARN_AI_SYLLABUS_ENDPOINT=$LEARN_AI_SYLLABUS_ENDPOINT,\
NEXT_PUBLIC_VERSION=$VERSION \
--context-path .

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

Version 0.30.5
--------------

- Fixed SCIM search for large queries (#2049)
- Latest smoot-design (#2059)
- Recommendation bot styling and text updates (#2058)
- Open Learning Library CSV update (#2014)
- Update dependency litellm to v1.61.5 (#2056)
- Update opensearchproject/opensearch Docker tag to v2.19.0 (#2055)
- Update dependency tiktoken to ^0.9.0 (#2054)
- Update dependency litellm to v1.61.4 (#2053)
- Update Node.js to v22.14.0 (#2052)
- Celery task to embed new contentfiles (#2044)
- Design update for the homepage AskTIM action (#2047)
- Point the chatbots to the Learn AI endpoints (#2045)
- Recommendation bot UI (#2019)
- Update React Query to v5 (#2043)

Version 0.30.4 (Released February 12, 2025)
--------------

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ services:
profiles:
- frontend
working_dir: /src
image: node:22.13
image: node:22.14
entrypoint: ["/bin/sh", "-c"]
command:
- |
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.opensearch.base.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
opensearch:
image: opensearchproject/opensearch:2.18.0
image: opensearchproject/opensearch:2.19.0
environment:
- "cluster.name=opensearch-cluster"
- "bootstrap.memory_lock=true" # along with the memlock settings below, disables swapping
Expand Down
3 changes: 3 additions & 0 deletions env/frontend.env
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ NEXT_PUBLIC_DEFAULT_SEARCH_SLOP=6
NEXT_PUBLIC_DEFAULT_SEARCH_STALENESS_PENALTY=2.5
NEXT_PUBLIC_DEFAULT_SEARCH_MINIMUM_SCORE_CUTOFF=0
NEXT_PUBLIC_DEFAULT_SEARCH_MAX_INCOMPLETENESS_PENALTY=90

NEXT_PUBLIC_LEARN_AI_RECOMMENDATION_ENDPOINT=https://api-learn-ai-qa.ol.mit.edu/http/recommendation_agent/
NEXT_PUBLIC_LEARN_AI_SYLLABUS_ENDPOINT=https://api-learn-ai-qa.ol.mit.edu/http/syllabus_agent/
2 changes: 1 addition & 1 deletion frontends/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"ol-test-utilities": "0.0.0"
},
"dependencies": {
"@tanstack/react-query": "^4.36.1",
"@tanstack/react-query": "^5.66.0",
"axios": "^1.6.3"
}
}
16 changes: 9 additions & 7 deletions frontends/api/src/hooks/articles/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ describe("Article CRUD", () => {

await waitFor(() => expect(result.current.isSuccess).toBe(true))
expect(makeRequest).toHaveBeenCalledWith("post", url, requestData)
expect(queryClient.invalidateQueries).toHaveBeenCalledWith(
articleKeys.listRoot(),
)
expect(queryClient.invalidateQueries).toHaveBeenCalledWith({
queryKey: articleKeys.listRoot(),
})
})

test("useArticlePartialUpdate calls correct API", async () => {
Expand All @@ -89,7 +89,9 @@ describe("Article CRUD", () => {
await waitFor(() => expect(result.current.isSuccess).toBe(true))
const { id, ...patchData } = article
expect(makeRequest).toHaveBeenCalledWith("patch", url, patchData)
expect(queryClient.invalidateQueries).toHaveBeenCalledWith(articleKeys.root)
expect(queryClient.invalidateQueries).toHaveBeenCalledWith({
queryKey: articleKeys.root,
})
})

test("useArticleDestroy calls correct API", async () => {
Expand All @@ -104,8 +106,8 @@ describe("Article CRUD", () => {

await waitFor(() => expect(result.current.isSuccess).toBe(true))
expect(makeRequest).toHaveBeenCalledWith("delete", url, undefined)
expect(queryClient.invalidateQueries).toHaveBeenCalledWith(
articleKeys.listRoot(),
)
expect(queryClient.invalidateQueries).toHaveBeenCalledWith({
queryKey: articleKeys.listRoot(),
})
})
})
15 changes: 5 additions & 10 deletions frontends/api/src/hooks/articles/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
UseQueryOptions,
useMutation,
useQuery,
useQueryClient,
} from "@tanstack/react-query"
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"

import { articlesApi } from "../../clients"
import type {
Expand All @@ -14,7 +9,7 @@ import { articleQueries, articleKeys } from "./queries"

const useArticleList = (
params: ArticleListRequest = {},
opts: Pick<UseQueryOptions, "enabled"> = {},
opts?: { enabled?: boolean },
) => {
return useQuery({
...articleQueries.list(params),
Expand All @@ -40,7 +35,7 @@ const useArticleCreate = () => {
.articlesCreate({ ArticleRequest: data })
.then((response) => response.data),
onSuccess: () => {
client.invalidateQueries(articleKeys.listRoot())
client.invalidateQueries({ queryKey: articleKeys.listRoot() })
},
})
}
Expand All @@ -49,7 +44,7 @@ const useArticleDestroy = () => {
return useMutation({
mutationFn: (id: number) => articlesApi.articlesDestroy({ id }),
onSuccess: () => {
client.invalidateQueries(articleKeys.listRoot())
client.invalidateQueries({ queryKey: articleKeys.listRoot() })
},
})
}
Expand All @@ -64,7 +59,7 @@ const useArticlePartialUpdate = () => {
})
.then((response) => response.data),
onSuccess: (_data) => {
client.invalidateQueries(articleKeys.root)
client.invalidateQueries({ queryKey: articleKeys.root })
},
})
}
Expand Down
10 changes: 5 additions & 5 deletions frontends/api/src/hooks/articles/queries.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QueryOptions } from "@tanstack/react-query"
import { queryOptions } from "@tanstack/react-query"
import { articlesApi } from "../../clients"
import type { ArticlesApiArticlesListRequest as ArticleListRequest } from "../../generated/v1"

Expand All @@ -12,16 +12,16 @@ const articleKeys = {

const articleQueries = {
list: (params: ArticleListRequest) =>
({
queryOptions({
queryKey: articleKeys.list(params),
queryFn: () => articlesApi.articlesList(params).then((res) => res.data),
}) satisfies QueryOptions,
}),
detail: (id: number) =>
({
queryOptions({
queryKey: articleKeys.detail(id),
queryFn: () =>
articlesApi.articlesRetrieve({ id }).then((res) => res.data),
}) satisfies QueryOptions,
}),
}

export { articleQueries, articleKeys }
11 changes: 3 additions & 8 deletions frontends/api/src/hooks/channels/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
UseQueryOptions,
useMutation,
useQuery,
useQueryClient,
} from "@tanstack/react-query"
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"

import { channelsApi } from "../../clients"
import type {
Expand All @@ -14,7 +9,7 @@ import { channelKeys, channelQueries } from "./queries"

const useChannelsList = (
params: ChannelsApiChannelsListRequest = {},
opts: Pick<UseQueryOptions, "enabled"> = {},
opts?: { enabled?: boolean },
) => {
return useQuery({
...channelQueries.list(params),
Expand Down Expand Up @@ -45,7 +40,7 @@ const useChannelPartialUpdate = () => {
})
.then((response) => response.data),
onSuccess: (_data) => {
client.invalidateQueries(channelKeys.root)
client.invalidateQueries({ queryKey: channelKeys.root })
},
})
}
Expand Down
18 changes: 9 additions & 9 deletions frontends/api/src/hooks/channels/queries.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QueryOptions } from "@tanstack/react-query"
import { queryOptions } from "@tanstack/react-query"
import { channelsApi } from "../../clients"
import type { ChannelsApiChannelsListRequest as FieldsApiListRequest } from "../../generated/v0"

Expand All @@ -22,34 +22,34 @@ const channelKeys = {

const channelQueries = {
list: (params: FieldsApiListRequest) =>
({
queryOptions({
queryKey: channelKeys.list(params),
queryFn: () => channelsApi.channelsList(params).then((res) => res.data),
}) satisfies QueryOptions,
}),
detail: (id: number) =>
({
queryOptions({
queryKey: channelKeys.detail(id),
queryFn: () =>
channelsApi.channelsRetrieve({ id }).then((res) => res.data),
}) satisfies QueryOptions,
}),
detailByType: (channelType: string, name: string) =>
({
queryOptions({
queryKey: channelKeys.detailByType(channelType, name),
queryFn: () => {
return channelsApi
.channelsTypeRetrieve({ channel_type: channelType, name: name })
.then((res) => res.data)
},
}) satisfies QueryOptions,
}),
countsByType: (channelType: string) =>
({
queryOptions({
queryKey: channelKeys.countsByType(channelType),
queryFn: () => {
return channelsApi
.channelsCountsList({ channel_type: channelType })
.then((res) => res.data)
},
}) satisfies QueryOptions,
}),
}

export { channelQueries, channelKeys }
36 changes: 15 additions & 21 deletions frontends/api/src/hooks/learningPaths/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,9 @@ describe("LearningPath CRUD", () => {
await waitFor(() => expect(result.current.isSuccess).toBe(true))
expect(makeRequest).toHaveBeenCalledWith("post", url, requestData)

expect(queryClient.invalidateQueries).toHaveBeenCalledWith([
"learningPaths",
"list",
])
expect(queryClient.invalidateQueries).toHaveBeenCalledWith({
queryKey: ["learningPaths", "list"],
})
})

test("useLearningPathDestroy calls correct API", async () => {
Expand All @@ -178,14 +177,12 @@ describe("LearningPath CRUD", () => {
await waitFor(() => expect(result.current.isSuccess).toBe(true))
expect(makeRequest).toHaveBeenCalledWith("delete", url, undefined)

expect(queryClient.invalidateQueries).toHaveBeenCalledWith([
"learningPaths",
"list",
])
expect(queryClient.invalidateQueries).toHaveBeenCalledWith([
"learningPaths",
"membershipList",
])
expect(queryClient.invalidateQueries).toHaveBeenCalledWith({
queryKey: ["learningPaths", "list"],
})
expect(queryClient.invalidateQueries).toHaveBeenCalledWith({
queryKey: ["learningPaths", "membershipList"],
})
})

test("useLearningPathUpdate calls correct API", async () => {
Expand All @@ -203,14 +200,11 @@ describe("LearningPath CRUD", () => {
await waitFor(() => expect(result.current.isSuccess).toBe(true))
expect(makeRequest).toHaveBeenCalledWith("patch", url, patch)

expect(queryClient.invalidateQueries).toHaveBeenCalledWith([
"learningPaths",
"list",
])
expect(queryClient.invalidateQueries).toHaveBeenCalledWith([
"learningPaths",
"detail",
path.id,
])
expect(queryClient.invalidateQueries).toHaveBeenCalledWith({
queryKey: ["learningPaths", "list"],
})
expect(queryClient.invalidateQueries).toHaveBeenCalledWith({
queryKey: ["learningPaths", "detail", path.id],
})
})
})
Loading
Loading