Skip to content

Commit a49c3a0

Browse files
authored
Merge branch 'master' into docs/use-non-deprecated-database-identity
2 parents cd2ae50 + 77ffdbb commit a49c3a0

120 files changed

Lines changed: 1873 additions & 1340 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ jobs:
261261
262262
wasm-bindgen --version
263263
264+
- name: Check engine simulation build
265+
run: cargo check -p spacetimedb-engine --no-default-features --features simulation
266+
264267
# Source emsdk environment to make emcc (Emscripten compiler) available in PATH.
265268
- name: Run tests
266269
run: |

.github/workflows/cla-gate.yml

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
name: CLA Gate
22

3-
# This workflow makes CLA checks work with merge queue entries. Merge groups get
4-
# a repository-owned `CLA Gate` commit status on the synthetic queue SHA, while
5-
# pull request/status events use this Actions job result based on CLA Assistant's
6-
# raw `license/cla` status.
7-
#
8-
# SECURITY: Pull request runs must still check out trusted base-branch code, not
9-
# PR code, before running repository scripts.
3+
# This workflow publishes a repository-owned commit status named `CLA Gate`.
4+
# Make `CLA Gate` required instead of requiring CLA Assistant's raw `license/cla`
5+
# status directly. That lets merge queue entries pass without waiting for CLA
6+
# Assistant to report on the synthetic merge-group SHA, while pull requests still
7+
# mirror the real CLA Assistant result.
108

119
on:
12-
pull_request:
13-
types: [opened, reopened]
1410
status:
1511
merge_group:
1612

1713
permissions:
1814
contents: read
19-
pull-requests: read
2015
statuses: write
2116

2217
jobs:
@@ -42,11 +37,20 @@ jobs:
4237
const { execFileSync } = require("child_process");
4338
4439
function claStatus(args) {
45-
const output = execFileSync("cargo", ["ci", "cla-assistant", "status", ...args], {
40+
const command = ["ci", "cla-assistant", "status", ...args];
41+
core.info(`Running cargo ${command.join(" ")}`);
42+
const output = execFileSync("cargo", command, {
4643
encoding: "utf8",
4744
env: process.env,
4845
});
49-
return JSON.parse(output);
46+
core.info(`cargo ci output: ${output.trim()}`);
47+
const status = JSON.parse(output);
48+
core.info(
49+
`Resolved license/cla for ${status.sha}: state=${status.state || "missing"} ` +
50+
`description=${status.description || "<none>"} ` +
51+
`target_url=${status.target_url || "<none>"}`
52+
);
53+
return status;
5054
}
5155
5256
async function postStatus({ sha, state, description, targetUrl }) {
@@ -69,7 +73,12 @@ jobs:
6973
let targetSha;
7074
let claStatusArgs;
7175
76+
core.info(
77+
`Handling ${context.eventName} event for workflow SHA ${process.env.GITHUB_SHA}`
78+
);
79+
7280
if (context.eventName === "merge_group") {
81+
core.info(`Merge group SHA is ${process.env.GITHUB_SHA}`);
7382
await postStatus({
7483
sha: process.env.GITHUB_SHA,
7584
state: "success",
@@ -81,28 +90,25 @@ jobs:
8190
if (context.eventName === "status") {
8291
targetSha = context.payload.sha;
8392
claStatusArgs = ["--sha", targetSha];
84-
} else if (context.eventName === "pull_request") {
85-
const pr = context.payload.pull_request;
86-
targetSha = pr.head.sha;
87-
claStatusArgs = ["--pr", String(pr.number)];
93+
core.info(
94+
`status event context=${context.payload.context} state=${context.payload.state} sha=${targetSha}`
95+
);
8896
} else {
8997
core.setFailed(`Unsupported event type: ${context.eventName}`);
9098
return;
9199
}
92100
101+
core.info(`Checking license/cla with args: ${claStatusArgs.join(" ")}`);
93102
const status = claStatus(claStatusArgs);
94103
95104
if (!status.state) {
96105
core.info(`No CLA Gate status to publish for ${targetSha}`);
97106
return;
98107
}
99108
100-
if (status.state === "success") {
101-
core.info(`license/cla is success for ${targetSha}`);
102-
return;
103-
}
104-
105-
const state = status.state || "missing";
106-
const description = status.description || "license/cla status is missing";
107-
const targetUrl = status.target_url ? ` (${status.target_url})` : "";
108-
core.setFailed(`license/cla is ${state}: ${description}${targetUrl}`);
109+
await postStatus({
110+
sha: targetSha,
111+
state: status.state,
112+
description: status.description || undefined,
113+
targetUrl: status.target_url || undefined,
114+
});

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
packages: write
9+
10+
concurrency:
11+
group: manual-release
12+
cancel-in-progress: true
13+
14+
jobs:
15+
foo:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Be done
19+
run: echo

0 commit comments

Comments
 (0)