Skip to content
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/actions/test-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ runs:
if [[ "${{ runner.os }}" != "Linux" && "${{ inputs.profile }}" != "supported-python" ]]; then
parallel+=(--parallel)
fi
# Native tests launch process trees; four macOS workers exceed their startup deadlines.
if [[ "${{ runner.os }}" == "macOS" && "${{ inputs.profile }}" == "native" ]]; then
export PYTEST_XDIST_AUTO_NUM_WORKERS=2
fi
./scripts/python-test.sh \
--profile "${{ inputs.profile }}" \
--python "${{ inputs.python-version }}" \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: marimo-team/internal-gh-actions/release-contract@36a2bd9a76109b91c9dc0bc65bfab95c9b632a3b
- uses: marimo-team/internal-gh-actions/release-contract@3c6ddeb4b132541309e3c56bbca8b3605d24ecfd
with:
workflows: |
ci.yml
Expand Down
66 changes: 0 additions & 66 deletions .github/workflows/release-pr.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
version=$(node -p "require(process.env.RUNNER_TEMP + '/release-manifest.json').version")
test -s ".github/release-notes/v$version.md"
- name: Wait for merged commit checks
uses: marimo-team/internal-gh-actions/wait-for-workflows@ddcee43722c904b25d4ab57a238df11e1a506ed0
uses: marimo-team/internal-gh-actions/wait-for-workflows@3c6ddeb4b132541309e3c56bbca8b3605d24ecfd
with:
commit: ${{ github.event.pull_request.merge_commit_sha }}
workflows: |
Expand All @@ -49,7 +49,7 @@ jobs:
platforms.yml
pages.yml
- name: Tag merged release
uses: marimo-team/internal-gh-actions/release-tag@3a52681ab8e200a34175ec8e5d14985e4e7ce3c3
uses: marimo-team/internal-gh-actions/release-tag@3c6ddeb4b132541309e3c56bbca8b3605d24ecfd
with:
app-id: ${{ vars.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
Expand All @@ -66,6 +66,6 @@ jobs:
pull-requests: read
contents: read
steps:
- uses: marimo-team/internal-gh-actions/release-approval-notification@0a3db0e04217aaa03b3d011502874b020e9466a3
- uses: marimo-team/internal-gh-actions/release-approval-notification@3c6ddeb4b132541309e3c56bbca8b3605d24ecfd
with:
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_RELEASES }}
14 changes: 13 additions & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,20 @@ Maintainers request a release with an authenticated GitHub CLI:
```

Accepts `patch`, `minor`, `major`, or a stable `X.Y.Z` version.
Review and merge the generated PR to approve publication.
Review and merge the generated PR after CI passes. Then another `marimo-eng` member
approves tagging in the protected `release` environment. Preparation needs no environment approval.
See the [maintainer runbook](https://github.com/marimo-team/github-maintenance/blob/main/docs/releases.md) (internal).

Add `.github/release-notes/vX.Y.Z.md` to the PR before merging.
See [package checks and previews](development_docs/releasing.md) for repository-specific details.

## Local preparation

Install Node 22+, Git, Docker with a running local daemon, and the shared
[`gh release-control` command](https://github.com/marimo-team/internal-gh-actions#release-command).
Authenticate with `gh auth login`.

The shortcut prepares fresh `main` in a credential-free Docker container and opens the PR
using your GitHub login. Your checkout stays untouched. Normal PR review and CI still apply.
Use `gh release-control request patch --dry-run` to validate without creating a PR.
Use `gh release-control status` to follow the PR, final approval, and publication.
3 changes: 3 additions & 0 deletions apps/e2e/tests/standalone-readiness.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,9 @@ test("a repair page in the frame reports its error at the top level", async ({
try {
await standalone.goto(`${studioOrigin()}/dashboard/?file=notebook.py`);
await expectTopLevelReady(standalone);
const retirement = browserDiagnostics.expectPageRetirement(page);
await page.close();
retirement.recovered();
const refused = browserDiagnostics.expectResponse({
path: /\/dashboard\/$/,
status: 500,
Expand Down
17 changes: 7 additions & 10 deletions packages/marimo-studio/tests/cli/test_release_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,15 @@ def test_distribution_checksums_cover_release_artifacts(tmp_path: Path) -> None:
]


def test_release_dispatches_main_without_local_git_changes(tmp_path: Path) -> None:
def test_release_requests_shared_preparation_without_local_git_changes(
tmp_path: Path,
) -> None:
script, binaries = _release_workspace(tmp_path, "release.sh")
command_log = tmp_path / "commands"
_write_executable(binaries / "git", "#!/bin/sh\nexit 93\n")
_write_executable(
binaries / "gh",
'#!/bin/sh\nprintf "%s\\n" "$@" > "$COMMAND_LOG"\n',
'#!/bin/sh\nprintf "%s\\n" "$@" "$GITHUB_REPOSITORY" > "$COMMAND_LOG"\n',
)
completed = subprocess.run(
[script, "0.3.0"],
Expand All @@ -210,15 +212,10 @@ def test_release_dispatches_main_without_local_git_changes(tmp_path: Path) -> No
)
assert completed.returncode == 0, completed.stderr
assert command_log.read_text().splitlines() == [
"workflow",
"run",
"release-pr.yml",
"--repo",
"release-control",
"request",
"0.3.0",
"marimo-team/marimo-studio",
"--ref",
"main",
"-f",
"version=0.3.0",
]


Expand Down
13 changes: 11 additions & 2 deletions packages/presentation/src/runtime/wasm-query.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { notebookQueryValues } from "@marimo-studio/protocol/query";
import { notebookQueryValues, publicNotebookQuery } from "@marimo-studio/protocol/query";
import { z } from "zod";

import type { RuntimeInvoke } from "./runtime";
Expand Down Expand Up @@ -58,6 +58,7 @@ export const createWasmQueryWriter = (ownerSignal: AbortSignal) => {
let active: PendingQueryUpdate | undefined;
let pending: PendingQueryUpdate | undefined;
let disposed = false;
let acknowledgedQuery: string | undefined;
const disposal = new AbortController();
const signal = AbortSignal.any([ownerSignal, disposal.signal]);
let resolveClosed = () => {};
Expand All @@ -77,7 +78,9 @@ export const createWasmQueryWriter = (ownerSignal: AbortSignal) => {
active = update;
try {
signal.throwIfAborted();
acknowledgedQuery = undefined;
await synchronize(update.invoke, update.query, update.generation, signal);
acknowledgedQuery = update.query;
update.waiters.forEach(({ resolve }) => resolve());
} catch (error) {
const failure =
Expand All @@ -101,11 +104,17 @@ export const createWasmQueryWriter = (ownerSignal: AbortSignal) => {

return {
write(invoke: RuntimeInvoke, query: string): Promise<void> {
if (disposed) {
if (disposed || signal.aborted) {
return Promise.reject(
signal.reason ?? new DOMException("The runtime was disposed.", "AbortError"),
);
}
query = publicNotebookQuery(query);
// Startup already synchronizes this query before executing projections.
// Do not queue the same query behind potentially expensive notebook work.
if (!active && !pending && acknowledgedQuery === query) {
return Promise.resolve();
}
const operation = new Promise<void>((resolve, reject) => {
pending = {
invoke,
Expand Down
37 changes: 37 additions & 0 deletions packages/presentation/tests/wasm-runtime.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,43 @@ describe("WebAssembly query synchronization", () => {
await writer.dispose();
});

it("acknowledges the initialized query without waiting behind notebook execution", async () => {
const owner = new AbortController();
const writer = createWasmQueryWriter(owner.signal);
const invoke = vi.fn<RuntimeInvoke>(async (request) => ({
found: true,
status: { code: "ok", message: null },
return_value: { generation: request.args.generation, applied: true },
}));
await writer.write(invoke, "?region=emea&file=notebook.py");
// The worker is occupied rendering the notebook after startup. An unchanged
// activation query already has an acknowledgement and needs no worker RPC.
invoke.mockImplementation(() => new Promise(() => {}));
const repeated = writer.write(invoke, "?region=emea&runtime=wasm");
expect(invoke).toHaveBeenCalledTimes(1);
await repeated;
await writer.dispose();
});

it("does not reuse an acknowledgement after a different query fails", async () => {
const writer = createWasmQueryWriter(new AbortController().signal);
const invoke = vi.fn<RuntimeInvoke>(async (request) => ({
found: true,
status: { code: "ok", message: null },
return_value: { generation: request.args.generation, applied: true },
}));
await writer.write(invoke, "?region=emea");
invoke.mockResolvedValueOnce({
found: true,
status: { code: "error", message: "query failed" },
return_value: null,
});
await expect(writer.write(invoke, "?region=apac")).rejects.toThrow("query failed");
await writer.write(invoke, "?region=emea");
expect(invoke).toHaveBeenCalledTimes(3);
await writer.dispose();
});

it("stops retrying when the runtime is disposed", async () => {
let rejectInvoke = (_error: Error) => {};
const invoke = vi.fn<RuntimeInvoke>(
Expand Down
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ if [[ ! "$1" =~ ^(patch|minor|major|(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0
printf 'Expected patch, minor, major, or a stable X.Y.Z version.\n' >&2
exit 2
fi
exec gh workflow run release-pr.yml --repo marimo-team/marimo-studio --ref main -f "version=$1"
GITHUB_REPOSITORY=marimo-team/marimo-studio exec gh release-control request "$1"
6 changes: 6 additions & 0 deletions scripts/verify-provider-bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ async def _prepare(root: Path) -> None:
document["project"] = project
tool = tomlkit.table()
uv = tomlkit.table()
# The acceptance project must resolve wheels for every supported CI platform.
uv["required-environments"] = [
"sys_platform == 'darwin' and platform_machine == 'arm64'",
"sys_platform == 'linux' and platform_machine == 'x86_64'",
"sys_platform == 'win32' and platform_machine == 'AMD64'",
]
sources = tomlkit.table()
for name, path in (
("marimo-studio", studio_wheel),
Expand Down
Loading