Files
synapse/.github/workflows/schema_diff.yml
T
dependabot[bot] a61ce0cfd4 Bump the all-github-actions group across 1 directory with 3 updates (#20269)
Bumps the all-github-actions group with 3 updates in the / directory:
[dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain),
[tailscale/github-action](https://github.com/tailscale/github-action)
and
[marocchino/sticky-pull-request-comment](https://github.com/marocchino/sticky-pull-request-comment).

Updates `dtolnay/rust-toolchain` from
6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 to
02cb101ec7c40f2c49e1d9714d64511d8e1b74de
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/dtolnay/rust-toolchain/commit/02cb101ec7c40f2c49e1d9714d64511d8e1b74de"><code>02cb101</code></a>
Merge pull request 185 from fufesou/feat/force-non-host</li>
<li><a
href="https://github.com/dtolnay/rust-toolchain/commit/b38a663c5df0fd5ac7bb65ded7b02a3f7af3b636"><code>b38a663</code></a>
Pass --force-non-host unconditionally</li>
<li><a
href="https://github.com/dtolnay/rust-toolchain/commit/a4f61a09a512763ecbf6a72db0464f906f59f011"><code>a4f61a0</code></a>
Document rustup non-host opt-in requirement</li>
<li><a
href="https://github.com/dtolnay/rust-toolchain/commit/06b350f08c8596edaf3d95d38686ba934fc4a6a7"><code>06b350f</code></a>
Support force-non-host toolchains</li>
<li><a
href="https://github.com/dtolnay/rust-toolchain/commit/d1031067263f94b142dd6c0ce24c5eb9d02d52a0"><code>d103106</code></a>
Predefine branches up to 1.120</li>
<li><a
href="https://github.com/dtolnay/rust-toolchain/commit/3ea7b2dde9987cecfa88322de1f09983972fc8e9"><code>3ea7b2d</code></a>
Add 1.98.1 patch release</li>
<li>See full diff in <a
href="https://github.com/dtolnay/rust-toolchain/compare/6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772...02cb101ec7c40f2c49e1d9714d64511d8e1b74de">compare
view</a></li>
</ul>
</details>
<br />

Updates `tailscale/github-action` from 4.1.3 to 4.2.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tailscale/github-action/releases">tailscale/github-action's
releases</a>.</em></p>
<blockquote>
<h2>v4.2.0</h2>
<h2>What's Changed</h2>
<ul>
<li>feat: implement log grouping for better output by <a
href="https://github.com/jaxxstorm"><code>@​jaxxstorm</code></a> in <a
href="https://redirect.github.com/tailscale/github-action/pull/304">tailscale/github-action#304</a></li>
<li>fix: reuse stale tailscale.tgz on self-hosted runners by <a
href="https://github.com/TowyTowy"><code>@​TowyTowy</code></a> in <a
href="https://redirect.github.com/tailscale/github-action/pull/305">tailscale/github-action#305</a></li>
<li>Bump typescript from 5.9.3 to 6.0.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/tailscale/github-action/pull/298">tailscale/github-action#298</a></li>
<li>Bump actions/setup-node from 6.4.0 to 7.0.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/tailscale/github-action/pull/312">tailscale/github-action#312</a></li>
<li>Bump actions/checkout from 7.0.0 to 7.0.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/tailscale/github-action/pull/314">tailscale/github-action#314</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/TowyTowy"><code>@​TowyTowy</code></a>
made their first contribution in <a
href="https://redirect.github.com/tailscale/github-action/pull/305">tailscale/github-action#305</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/tailscale/github-action/compare/v4.1.3...v4.2.0">https://github.com/tailscale/github-action/compare/v4.1.3...v4.2.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/tailscale/github-action/commit/d1b6cd204f8dceda5b3eaad7f1f767be390056cd"><code>d1b6cd2</code></a>
Merge pull request <a
href="https://redirect.github.com/tailscale/github-action/issues/314">#314</a>
from tailscale/dependabot/github_actions/actions/chec...</li>
<li><a
href="https://github.com/tailscale/github-action/commit/f2a4d7820e0a2fa1d2809136f7b5ec81a830d240"><code>f2a4d78</code></a>
Bump actions/checkout from 7.0.0 to 7.0.1</li>
<li><a
href="https://github.com/tailscale/github-action/commit/a122c3446c6d6e2762acc44da35fe65bc3deac1e"><code>a122c34</code></a>
Merge pull request <a
href="https://redirect.github.com/tailscale/github-action/issues/312">#312</a>
from tailscale/dependabot/github_actions/actions/setu...</li>
<li><a
href="https://github.com/tailscale/github-action/commit/55d86933927ed94902b2dd7d32fdfab60c629390"><code>55d8693</code></a>
Bump actions/setup-node from 6.4.0 to 7.0.0</li>
<li><a
href="https://github.com/tailscale/github-action/commit/546937c0d1ff12317e57f889368e81a01fcacb7f"><code>546937c</code></a>
Bump typescript from 5.9.3 to 6.0.3</li>
<li><a
href="https://github.com/tailscale/github-action/commit/0e42fa1ff301a540c9bb9a654695f05e783f05ee"><code>0e42fa1</code></a>
fix: reuse stale tailscale.tgz on self-hosted runners</li>
<li><a
href="https://github.com/tailscale/github-action/commit/508737e1960abaf049b2ca9e6519b8b4291dbf2d"><code>508737e</code></a>
Merge pull request <a
href="https://redirect.github.com/tailscale/github-action/issues/304">#304</a>
from tailscale/log_groups</li>
<li><a
href="https://github.com/tailscale/github-action/commit/5a0d794b306ae171006afad4c14e0ce74d4a8dfe"><code>5a0d794</code></a>
extract logging function into its own class</li>
<li><a
href="https://github.com/tailscale/github-action/commit/ba16990ca09b5f745b03ed05e83b66a722996df7"><code>ba16990</code></a>
catch errors</li>
<li><a
href="https://github.com/tailscale/github-action/commit/191eb01caf1fad37292ad6ffc39136ca24700f9f"><code>191eb01</code></a>
build</li>
<li>Additional commits viewable in <a
href="https://github.com/tailscale/github-action/compare/780049a30b6ff5c378a9e7b389d15ece7a204888...d1b6cd204f8dceda5b3eaad7f1f767be390056cd">compare
view</a></li>
</ul>
</details>
<br />

Updates `marocchino/sticky-pull-request-comment` from
3d7b8546315c63df45a03981d50a43ec19237f80 to
28ad303d6acb4ccfc50f20c0044188e7e294b8c4
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/marocchino/sticky-pull-request-comment/commit/28ad303d6acb4ccfc50f20c0044188e7e294b8c4"><code>28ad303</code></a>
build(deps-dev): Bump <code>@​types/node</code> from 26.1.1 to 26.3.0
(<a
href="https://redirect.github.com/marocchino/sticky-pull-request-comment/issues/1757">#1757</a>)</li>
<li><a
href="https://github.com/marocchino/sticky-pull-request-comment/commit/e17452d56eb060f9ebca915e13b64f051a2fc6aa"><code>e17452d</code></a>
build(deps-dev): Bump vitest from 4.1.10 to 4.1.11 (<a
href="https://redirect.github.com/marocchino/sticky-pull-request-comment/issues/1753">#1753</a>)</li>
<li>See full diff in <a
href="https://github.com/marocchino/sticky-pull-request-comment/compare/3d7b8546315c63df45a03981d50a43ec19237f80...28ad303d6acb4ccfc50f20c0044188e7e294b8c4">compare
view</a></li>
</ul>
</details>
<br />

<details>
<summary>Most Recent Ignore Conditions Applied to This Pull
Request</summary>

| Dependency Name | Ignore Conditions |
| --- | --- |
| dtolnay/rust-toolchain | [> 1.66.0] |
</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-25 13:08:42 +01:00

129 lines
4.9 KiB
YAML

name: Schema Diff # If this is changed, need to update `schema_diff_comment.yml` as well
on:
pull_request:
paths:
- synapse/storage/schema/*/delta/**
- synapse/storage/schema/*/full_schemas/**
- .github/workflows/schema_diff.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
# Posts a GitHub PR comment that shows what the effective change to the schema is.
# Provides an excuse to run the `make_full_schema.sh` script in CI (so we keep it working)
# and can act as a review aid for schema changes, letting you easily see the diff of the
# end result, even when background updates or complex schema deltas are present.
show-schema-diff:
name: Show schema diff
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Start postgres with a faked clock
background: true
id: postgres
# Use faketime here for schema deltas that are wall-clock sensitive under Postgres
# For SQLite, faketime is used when invoking `make_full_schema.sh` within the script
run: |
# Build a docker image with faketime
mkdir /tmp/postgres-faketime
cat > /tmp/postgres-faketime/Dockerfile <<'EOF'
FROM postgres:14-alpine
RUN apk add --no-cache libfaketime
# It seems like it could be harmful to fake the monotonic timer
# as it might prevent deadlock detection, etc.
# But not sure, just doing out of precaution.
ENV FAKETIME_DONT_FAKE_MONOTONIC=1
ENTRYPOINT ["faketime", "-f", "2001-05-25 12:42:42", "docker-entrypoint.sh"]
CMD ["postgres"]
EOF
docker build -t localhost/postgres-faketime /tmp/postgres-faketime
# Run it in the background
docker run -d --name postgres -p 5432:5432 \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_INITDB_ARGS="--lc-collate C --lc-ctype C --encoding UTF8" \
--health-cmd pg_isready --health-interval 10s \
--health-timeout 5s --health-retries 5 \
localhost/postgres-faketime
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Install PostgreSQL client and faketime
run: sudo apt-get -qq install postgresql-client faketime
- uses: matrix-org/setup-python-poetry@5bbf6603c5c930615ec8a29f1b5d7d258d905aa4 # v2.0.0
with:
poetry-version: "2.4.1"
extras: "postgres"
python-version: "3.x"
- name: Wait for Postgres to be up
run: |
until [ "$(docker inspect -f '{{.State.Health.Status}}' postgres)" = healthy ]; do sleep 2; done
- name: Generate schema diff
id: schema_diff
env:
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
run: |
poetry run python .ci/scripts/schema_diff.py \
--base origin/develop \
> "${{ runner.temp }}/schema_diff.md"
- name: Stop postgres
cancel: postgres
# If the generation step failed, write an error message so the sticky
# comment step still has a file to read.
- name: Ensure output file exists on failure
if: always() && steps.schema_diff.outcome == 'failure'
run: |
echo "⚠️ Schema diff generation failed. See job logs for details." \
> "${{ runner.temp }}/schema_diff.md"
# Post a comment.
#
# For same-repo PRs, we can do this directly and we are done.
- name: Post sticky PR comment
uses: marocchino/sticky-pull-request-comment@28ad303d6acb4ccfc50f20c0044188e7e294b8c4 # v3
# Only run for same-repo PRs
if: always() && github.event.pull_request.head.repo.full_name == github.repository
with:
header: schema-diff
path: ${{ runner.temp }}/schema_diff.md
# For PRs from forks, we only have a read-only `GITHUB_TOKEN` here and need to work around
# by triggering a `workflow_run` onto the main repo.
#
# We upload an artifact and the `schema_diff_comment.yml` workflow will be triggered
# on the main repo by this workflow exiting.
- name: Save PR number for forked PRs
# Only run for fork PRs
if: always() && github.event.pull_request.head.repo.full_name != github.repository
run: echo "${{ github.event.pull_request.number }}" > "${{ runner.temp }}/pr_number"
- name: Upload schema diff artifact for forked PRs
# Only run for fork PRs
if: always() && github.event.pull_request.head.repo.full_name != github.repository
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: schema-diff
path: |
${{ runner.temp }}/schema_diff.md
${{ runner.temp }}/pr_number
retention-days: 1