Backport to 1.8.x: MDX docs fixes, server v1.31.2, extension exit code (#1112, #1115, #1116)#1118
Merged
chaptersix merged 3 commits intoJul 9, 2026
Conversation
…temporalio#1112) ## Summary This consolidates the excellent groundwork in temporalio#980, temporalio#1076, and temporalio#981 into a single change, and verifies the result against a real Docusaurus 3.10.1 build. Huge thanks to @lennessyy — the approach here is entirely built on those PRs; this just stitches them together and irons out a few interactions between them. gen-docs now escapes the patterns that break Docusaurus MDX (JSX) compilation, on **every** path that writes a command description (including the new split paths): - bare angle-bracket placeholders in prose (e.g. `<base64-encoded-cert>`, `<key>`) → `\<...\>` - single-quoted JSON examples (e.g. `'{"a":"b"}'`, `'Key={"a":"b"}'`) → braces escaped in body text, backticked in option tables - custom heading IDs (e.g. `## Heading {#id}`) → `{/* #id */}`, the form that compiles under Docusaurus 3.10 and still produces the custom anchor Fenced code blocks and inline code spans are left untouched. It also adds the `-subdir` flag (subcommands of the named command are written to a subdirectory, e.g. `-subdir cloud` → `cloud/*.mdx`, with deeper subcommands nested as headings), and a generic auto-generated notice. ## What changed relative to the existing PRs All three PRs were on the right track. The differences here are about how they interact: - **temporalio#1076 (MDX escaping):** kept as the core of this change, including the `{#id}` → `{/* #id */}` heading conversion — which I confirmed is exactly right for the 3.10 upgrade (see verification below). Escaping is now also applied to the `-subdir` split output, so cloud docs get the same treatment. Re-added unit tests for the escaping logic. - **temporalio#980 (`-subdir`):** kept the split mechanism. Unified the `encodeJSONExample` regex so it matches both `'{...}'` and `'Key={...}'` (the standalone-vs-key-value cases the two PRs handled separately). Intentionally did **not** carry over temporalio#980's index-page generation: `command-reference/index.mdx` and `cloud/index.mdx` are hand-maintained on the docs site (custom ordering, the `ReleaseNoteHeader` component), so gen-docs deliberately does not emit them — generating them would overwrite that curated content. The companion docs PR restores those files after each regeneration. - **temporalio#981 (generic notice):** folded in — the previous notice pointed at paths that no longer exist and don't hold for cloud-cli inputs. ## Companion PR temporalio/documentation#4836 (cherry picked from commit a38333d)
- Bumps server version for an OSS security release - Dockerfile's Alpine is already up-to-date (cherry picked from commit 1d8f321)
…n used (temporalio#1116) ## Related issues CLDDX-141 ## What changed? When delegating to an extension (e.g. `temporal-cloud`, non-zero exit codes don't make it back to the user, so there's no programmatic way to know if the command succeeded. This change uses the exit code of the extension as the exit command for the `temporal` command that wrapped it. ## Checklist **Stability** - [ ] Breaking changes are marked with 💥 in the PR title and release notes - [ ] Changes to JSON output (`-o json` / `-o jsonl`) are treated as breaking changes **Design** - [ ] This feature does not depend on Cloud-only APIs or behavior (it works against an OSS server) - [ ] New commands follow `temporal <noun> <verb>` structure (e.g. `temporal workflow start`) - [ ] New flags are named after the API concept, not the implementation mechanism (good: `--search-attribute`, bad: `--index-field`) - [ ] New flags don't duplicate an existing flag that serves the same purpose - [ ] New flags do not have short aliases without strong justification - [ ] Experimental features are marked with `(Experimental)` in `commands.yaml` **Help text** (see style guide at the top of `commands.yaml`) - [ ] All flags shown in help text and examples are implemented and functional - [ ] Summaries use sentence case and have no trailing period - [ ] Long descriptions end with a period and include at least one example invocation - [ ] Examples use long flags (`--namespace`, not `-n`), one flag per line - [ ] Placeholder values use `YourXxx` form (`YourWorkflowId`, `YourNamespace`) **Behavior** - [ ] Results go to stdout; errors and warnings go to stderr - [ ] Error messages are lowercase with no trailing punctuation **Tests** - [ ] Added functional test(s) (`SharedServerSuite`) - [ ] Added unit test(s) (`func TestXxx`) where applicable ## Manual tests **Setup** Create an executable file named `temporal-exit` somewhere on your PATH ``` #!/bin/bash exit $1 ``` **Happy path** ``` $ temporal exit 0; echo $? 0 ``` **Error case** ``` $ temporal exit 1; echo $? 1 ``` Co-authored-by: Alex Stanfield <13949480+chaptersix@users.noreply.github.com> (cherry picked from commit 99eb050)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports the following PRs from
maintorelease/1.8.x:-subdirto gen-docsgo.temporal.io/serverto v1.31.2 (originally merged intorelease/1.7.x)Cherry-picked in merge order with
-x.Notes
go.mod/go.sumbecauserelease/1.8.xwas ongo.temporal.io/server v1.31.0. Resolved by takingv1.31.2and regeneratinggo.sumviago mod tidy.go build ./...passes; tests forinternal/commandsgen,cmd/gen-docs, and the extension delegation tests pass locally.