From d80824060624fbcfee266a90b07dd9dd9a21fb68 Mon Sep 17 00:00:00 2001 From: Mladen Jablanovic Date: Wed, 23 Sep 2026 15:27:59 +0200 Subject: [PATCH 1/2] chore(ci): stop no-op syncs to client repos - 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) --- .github/workflows/build.yml | 9 ++++++++- clients/cli/.gitignore | 1 + openapi-generator/java_lang.yaml | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c56f4732..b350812a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,13 @@ on: push: branches: - main +# Serialize runs: concurrent runs finish in arbitrary order, and an older +# commit's run finishing last would overwrite a newer sync (e.g. revert a +# release). Only the newest pending run is kept, which is fine since it +# generates from the latest main. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false jobs: build-go: runs-on: ubuntu-latest @@ -64,7 +71,7 @@ jobs: # Verify the generated CLI compiles against the freshly generated go # client, so this does not depend on a released phrase-go version # that may lag behind the spec. - (cd ./clients/cli && go mod edit -replace github.com/phrase/phrase-go/v4=../go && go build . && go mod edit -dropreplace github.com/phrase/phrase-go/v4) + (cd ./clients/cli && go mod edit -replace github.com/phrase/phrase-go/v4=../go && go build -o /dev/null . && go mod edit -dropreplace github.com/phrase/phrase-go/v4) git clone https://$API_TOKEN_GITHUB@github.com/phrase/phrase-cli.git clones/cli &> /dev/null rsync -avI --delete --exclude='.git/' clients/cli/ clones/cli cd clones/cli diff --git a/clients/cli/.gitignore b/clients/cli/.gitignore index 479e0b2c7..d3b018cbe 100644 --- a/clients/cli/.gitignore +++ b/clients/cli/.gitignore @@ -1 +1,2 @@ .phraseapp.yaml +/phrase-cli diff --git a/openapi-generator/java_lang.yaml b/openapi-generator/java_lang.yaml index 72969b676..b70b878f6 100644 --- a/openapi-generator/java_lang.yaml +++ b/openapi-generator/java_lang.yaml @@ -20,4 +20,5 @@ scmDeveloperConnection: scm:git:git@github.com:phrase/openapi.git scmUrl: https://github.com/phrase/strings-openapi java8: true dateLibrary: java8 +hideGenerationTimestamp: true templateDir: openapi-generator/templates/java From d5333761d6976d17e85760add6172e6827cebaed Mon Sep 17 00:00:00 2001 From: Mladen Jablanovic Date: Wed, 23 Sep 2026 15:38:57 +0200 Subject: [PATCH 2/2] chore(ci): use a fixed example for binary fields in Ruby model docs 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) --- openapi-generator/templates/ruby-client/model_doc.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi-generator/templates/ruby-client/model_doc.mustache b/openapi-generator/templates/ruby-client/model_doc.mustache index c2a790d9d..63cb29bd4 100644 --- a/openapi-generator/templates/ruby-client/model_doc.mustache +++ b/openapi-generator/templates/ruby-client/model_doc.mustache @@ -12,7 +12,7 @@ Name | Type | Description | Notes ```ruby require '{{moduleName}}' -instance = {{moduleName}}::{{classname}}.new({{#vars}}{{name}}: {{example}}{{^-last}}, +instance = {{moduleName}}::{{classname}}.new({{#vars}}{{name}}: {{#isBinary}}File.new('/path/to/file'){{/isBinary}}{{^isBinary}}{{example}}{{/isBinary}}{{^-last}}, {{/-last}}{{/vars}}) ```