Compare commits

..

4 commits

Author SHA1 Message Date
Kévin Commaille 1e8cecb601
Merge f95dcfb0e7 into 43c65786eb 2026-01-06 12:52:16 -05:00
Tulir Asokan 43c65786eb
Specify that the /openid/userinfo return value must be validated (#2288) 2026-01-06 12:23:19 -05:00
Richard van der Hoff f2b68c7163
Updates to release process (#2289)
Some clarifications to the release process doc, particularly in view of #2275.
2026-01-06 17:05:59 +00:00
Richard van der Hoff fb2221aad7
Include spec release in filenames in built tarball (#2276)
It's slightly confusing that everything just ends up under `spec/`, so let's
put the version number in there
2026-01-06 16:19:57 +00:00
7 changed files with 47 additions and 32 deletions

View file

@ -195,6 +195,8 @@ jobs:
needs: [calculate-baseurl, build-openapi, generate-changelog]
# run even if generate-changelog was skipped
if: ${{ always() }}
env:
baseURL: "${{ needs.calculate-baseurl.outputs.baseURL }}"
steps:
- name: " Setup Node"
uses: actions/setup-node@v4
@ -217,8 +219,10 @@ jobs:
with:
name: changelog-artifact
path: content/changelog
- name: "⚙️ hugo"
run: hugo --baseURL "${{ needs.calculate-baseurl.outputs.baseURL }}" -d "spec"
run: hugo --baseURL "${baseURL}" -d "spec${baseURL}"
# We manually unpack the spec OpenAPI definition JSON to the website tree
# to make it available to the world in a canonical place:
# https://spec.matrix.org/latest/client-server-api/api.json
@ -229,10 +233,13 @@ jobs:
name: openapi-artifact
- name: "📝 Unpack the OpenAPI definitions in the right location"
run: |
tar -xzf openapi.tar.gz
tar -C "spec${baseURL}" --strip-components=1 -xzf openapi.tar.gz
- name: "📦 Tarball creation"
run: tar -czf spec.tar.gz spec
run: |
cd spec
tar -czf ../spec.tar.gz *
- name: "📤 Artifact upload"
uses: actions/upload-artifact@v4
with:
@ -261,14 +268,9 @@ jobs:
name: spec-artifact
- name: "📝 Unpack the spec"
# we have to unpack it into the right path given the baseurl, so that the
# links are correct.
# eg if baseurl is `/unstable`, we want to put the site in `spec/unstable`.
run: |
mkdir -p "spec${baseURL}"
tar -C "spec${baseURL}" --strip-components=1 -xvzf spec.tar.gz
env:
baseURL: "${{ needs.calculate-baseurl.outputs.baseURL }}"
mkdir spec
tar -C spec -xvzf spec.tar.gz
- name: "Run htmltest"
uses: wjdp/htmltest-action@master
@ -278,8 +280,10 @@ jobs:
build-historical-spec:
name: "📖 Build the historical backup spec"
runs-on: ubuntu-latest
needs: [build-openapi]
needs: [calculate-baseurl, build-openapi]
if: ${{ startsWith(github.ref, 'refs/tags/') }}
env:
baseURL: "${{ needs.calculate-baseurl.outputs.baseURL }}"
steps:
- name: " Setup Node"
uses: actions/setup-node@v4
@ -299,9 +303,8 @@ jobs:
- name: "⚙️ hugo"
env:
HUGO_PARAMS_VERSION_STATUS: "historical"
# Create a baseURL like `/v1.2` out of the `v1.2` tag
run: |
hugo --baseURL "/${GITHUB_REF/refs\/tags\//}" -d "spec"
hugo --baseURL "${baseURL}" -d "spec${baseURL}"
- name: "📥 Spec definition download"
uses: actions/download-artifact@v4
@ -309,10 +312,12 @@ jobs:
name: openapi-artifact
- name: "📝 Unpack the OpenAPI definitions in the right location"
run: |
tar -xzf openapi.tar.gz
tar -C "spec${baseURL}" --strip-components=1 -xzf openapi.tar.gz
- name: "📦 Tarball creation"
run: tar -czf spec-historical.tar.gz spec
run: |
cd spec
tar -czf ../spec-historical.tar.gz *
- name: "📤 Artifact upload"
uses: actions/upload-artifact@v4

View file

@ -45,7 +45,9 @@ jobs:
name: spec-artifact
- name: "📦 Extract Artifacts"
run: tar -xzvf spec.tar.gz && rm spec.tar.gz
run: |
mkdir spec
tar -C spec -xzvf spec.tar.gz && rm spec.tar.gz
- name: "📤 Deploy to Netlify"
id: netlify

View file

@ -0,0 +1 @@
Include the spec release version in the filenames in the tarballs generated by CI.

View file

@ -0,0 +1 @@
Updates to the release documentation.

View file

@ -0,0 +1 @@
Specify that callers of `/_matrix/federation/v1/openid/userinfo` must validate the returned user ID.

View file

@ -43,7 +43,12 @@ paths:
properties:
sub:
type: string
description: The Matrix User ID who generated the token.
description: |
The Matrix User ID who generated the token.
The caller MUST validate that the returned user ID is on the server they
called (i.e. if you make a request to example.com and it returns
`@alice:matrix.org`, the result is invalid).
example: "@alice:example.com"
required:
- sub

View file

@ -50,11 +50,6 @@ First, can we even release the spec? This stage is mostly preparation work neede
to ensure a consistent and reliable specification.
1. Ensure `main` is committed with all the spec changes you expect to be there.
2. Review the changelog to look for typos, wording inconsistencies, or lines which
can be merged. For example, "Fix typos" and "Fix spelling" can be condensed to
"Fix various typos throughout the specification".
3. Do a quick skim to ensure changelogs reference the MSCs which brought the changes
in. They should be linked to the GitHub MSC PR (not the markdown document).
## The release
@ -79,20 +74,24 @@ release.
2. Run `./scripts/generate-changelog.sh v1.2` (using the correct version number).
The script will use the current date. If that date is wrong, correct the document
by using the same `YYYY-MM-DD` date format.
3. Commit the result.
3. Review the changelog to look for typos, wording inconsistencies, or lines which
can be merged. For example, "Fix typos" and "Fix spelling" can be condensed to
"Fix various typos throughout the specification".
4. Do a quick skim to ensure changelogs reference the MSCs which brought the changes
in. They should be linked to the GitHub MSC PR (not the markdown document).
5. Commit the result.
6. Now is a good time to have someone else review the changelog.
5. Tag the branch with the spec release with a format of `v1.2` (if releasing Matrix 1.2).
6. Push the release branch and the tag.
7. GitHub Actions will run its build steps. Wait until these are successful. If fixes
need to be made to repair the pipeline or spec build, delete and re-tag the release.
You may need to fix up the changelog file by hand in this case.
8. Check out and fast-forward `main` to the release branch.
9. Create a new release on GitHub from the newly created tag.
* The title should be just "v1.2" (for example).
* The description should be a copy/paste of the changelog. The generated changelog
will be at `content/changelog/v1.2.md` - copy/paste verbatim.
* Upload the artifacts of the GitHub Actions build for the release to the GitHub
release as artifacts themselves. This should be the tarball that will be deployed
to spec.matrix.org.
8. GitHub Actions should have drafted a release based on the new tag. Find it
at https://github.com/matrix-org/matrix-spec/releases.
1. Double-check the generated release notes, and check that `spec-artifact.zip` and
`spec-historical-artifact.zip` are both attached to the draft release.
2. Publish the draft release.
9. Check out and fast-forward `main` to the release branch.
10. Commit a reversion to `params.version` of `./config/_default/hugo.toml` on `main`:
```toml
[params.version]
@ -103,7 +102,8 @@ release.
```
11. Push pending commits and ensure the unstable spec updates accordingly from the
GitHub Actions pipeline.
12. Deploy the release on the webserver. See internal wiki.
12. Deploy the release on the webserver. See "Spec release process" in the
internal handbook.
## Patching a release