Skip to content

Release 0.69.0 - #3391

Merged
odlbot merged 4 commits into
releasefrom
release-candidate
Jun 1, 2026
Merged

Release 0.69.0#3391
odlbot merged 4 commits into
releasefrom
release-candidate

Conversation

@odlbot

@odlbot odlbot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Shankar Ambady

Zaman Afzal

Chris Chudzicki

ChristopherChudzicki and others added 4 commits May 28, 2026 16:34
…3383)

`frontends/api/src/test-utils/mockAxios.ts` previously mocked the whole axios
module — re-implementing `create()`, per-method shims, interceptors, baseURL
join, and a `defaults` map. Tests effectively ran against a parallel
implementation of axios that drifted from the real one.

Replace that with a thin mock adapter installed on real axios via
`axios.defaults.adapter`. URL resolution, interceptors, transforms, headers,
and AxiosError construction now go through real axios; the adapter is the
single divergence point.

Defense in depth: the factory mutates `axios.defaults.adapter` AND wraps
`axios.create()` to force the adapter onto every instance, even when callers
pass an explicit `adapter` in config. A `beforeEach` canary asserts both
install layers stay hooked so a future regression fails loud rather than
silently hitting the network.

Mock-registration timing: `jest.mock("axios", () => mockAxiosFactory())` is
called at the top level of setupJest, where @swc/jest's babel transform
hoists it above all imports — including any module that imports axios at
load time. Earlier prototypes wrapped this in a `setupMockAxios()` helper
that called `jest.mock` internally; that pattern is NOT hoisted because the
`jest.mock` call sits inside a function body, so modules that imported axios
during setup-phase resolution would see the unwrapped `create` and miss the
adapter install. Exposing `mockAxiosFactory` as the factory itself and
registering it from the setup file's top level is what keeps the hoist
intact. The `() => mockAxiosFactory()` wrapper is required to defer the
identifier lookup past TDZ; passing `mockAxiosFactory` directly throws
`Cannot access '_mockAxios' before initialization` because the hoisted
jest.mock evaluates its arguments above the import that binds the symbol.

Also change `makeRequest` from positional `(method, url, body)` to a single
object arg `{ method, url, body }` — assertions can use
`objectContaining` to ignore fields, no more `undefined` placeholders, and
the shape is additively extensible (e.g. headers) without breaking call
sites. Drop `mockAxiosInstance` entirely; migrate its ~30 assertion sites
to `makeRequest`.

A leaf package export `api/test-utils/mockAxios` bypasses the barrel to
avoid a setup-time import cycle (the barrel transitively pulls in generated
client modules that import axios, which would load axios before the mock
factory runs).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: Handle nullable page field from MITx Online client update
* upgrade qdrant client

* upgrade qdrant client
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

OpenAPI Changes

No changes detected

View full changelog

Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

@odlbot
odlbot merged commit 687d01a into release Jun 1, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants