Repository navigation
chore(ci): stop no-op syncs to client repos - #1293
Conversation
- Java: set hideGenerationTimestamp so generated files no longer carry a per-run @generated date, which made every push commit ~250 files to phrase-java. - CLI: build the compile check with -o /dev/null and gitignore /phrase-cli, so the binary is no longer rsynced into phrase-cli. - Serialize the sync workflow with a concurrency group; concurrent runs finishing out of order could overwrite a newer sync (e.g. phrase-php 3.26.0 was briefly reverted to 3.25.0). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
API changelog (oasdiff)Doc-only edits (descriptions, examples) do not appear here. |
openapi-generator parses the example of a `format: binary` property into a Java byte[], and the model_doc template printed it via toString(), yielding a per-run identity hash (e.g. `screenshot: [B@2857f172`). That changed 5 doc files on every generation, causing no-op syncs to phrase-ruby. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Ruby generation still writes a fresh README timestamp, which can continue causing no-op sync commits.
Review effort: Lite
Findings: None
What changed in this PR
This PR makes generated client output deterministic and serializes CI syncs to prevent unnecessary or stale client-repository commits.
Changes:
- Stabilizes Ruby binary examples.
- Disables Java generation timestamps.
- Prevents CLI binary artifacts from being synced.
- Serializes workflow syncs with concurrency controls.
| File | Summary |
|---|---|
openapi-generator/templates/ruby-client/model_doc.mustache |
Uses a stable binary file example; the generated README timestamp remains to be addressed. |
openapi-generator/java_lang.yaml |
Disables Java generation timestamps. |
clients/cli/.gitignore |
Ignores the compiled CLI binary. |
.github/workflows/build.yml |
Avoids CLI build artifacts and serializes deployments. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Re the Copilot overview ("Ruby generation still writes a fresh README timestamp"): the README timestamp is inside — Claude |
Why
build.ymlsyncs regenerated clients to their repos on every push tomain, committing whenever the output differs. Several sources of non-determinism made it commit (almost) every time, even for pushes irrelevant to a client:@javax.annotation.Generated(..., date = "<now>"), so each run commits ~250 files (e.g. phrase-java81eb41a3, from a CLI-only change).go build .leaves aphrase-clibinary inclients/cli, which gets rsynced and committed on every run (e.g. phrase-cli5f39b767contains only the binary).exampleofformat: binaryproperties into a Javabyte[], andmodel_doc.mustacheprinted it viatoString(), giving a per-run identity hash (screenshot: [B@2857f172) in 5 doc files (e.g. phrase-rubybc33f26d).14fbf125→316dea67→868e73de).Changes
openapi-generator/java_lang.yaml:hideGenerationTimestamp: true(ourgeneratedAnnotation.mustachealready honours it). Verified locally: regenerated Java client has 0@Generatedannotations.build.yml: compile check now usesgo build -o /dev/null .;clients/cli/.gitignorealso ignores/phrase-cli. The already-committed binary in phrase-cli will be removed by the next sync (rsync --delete).build.yml: workflow-levelconcurrencygroup withcancel-in-progress: false. A running sync always completes; only the newest pending run is kept, which is fine since it generates from the latestmain(including any version bumps/tags of skipped commits).openapi-generator/templates/ruby-client/model_doc.mustache: binary fields print a fixedFile.new('/path/to/file')example. Verified locally: two generations from a clean worktree are byte-identical, and the diff against current phrase-ruby master is exactly those 5 lines.🤖 Generated with Claude Code