Skip to content

feat(sync): sync the contract from a local checkout - #3

Merged
bmc08gt merged 2 commits into
mainfrom
feat/local-contract-sync
Aug 25, 2026
Merged

feat(sync): sync the contract from a local checkout#3
bmc08gt merged 2 commits into
mainfrom
feat/local-contract-sync

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Trying a one-field contract change meant pushing to ocp-protobuf-api, cutting a release here, and
bumping both apps. Maven Central will not take a version number twice, so every throwaway iteration
burned a real version.

scripts/sync-protos.sh --local [path] reads a checkout's working tree instead of cloning at the
pinned SHA, uncommitted edits included. The path defaults to $OCP_UPSTREAM_PATH, then to
../ocp-protobuf-api. Everything downstream of proto/ is unchanged: the same re-namespacing and
the same generators run.

The lock file is what keeps a local sync from shipping. --local writes commit: LOCAL into
ocp.lock, along with the local HEAD and whether that working tree was dirty. A new contract job
in ci.yml fails on it and publish.yml refuses to release it, so proto/ cannot reach main or
Maven Central without an upstream commit behind it. Re-running the sync with no argument against a
LOCAL lock is an error too, rather than a confusing git checkout LOCAL failure.

The app side of the loop lands separately: code-payments/code-android-app#1327 and
code-payments/code-ios-app#646.

Trying a contract change meant pushing it to ocp-protobuf-api first, because
sync-protos.sh only ever cloned. `--local <path>` reads a checkout's working
tree instead, so an uncommitted .proto edit reaches codegen, and the apps, with
nothing pushed.

The mode is deliberately hard to merge. It writes `commit: LOCAL` to ocp.lock,
and both CI and the publish workflow fail while it says that, so proto/ cannot
reach main or Maven Central without an upstream commit behind it.
@bmc08gt
bmc08gt merged commit b7fa255 into main Aug 25, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the feat/local-contract-sync branch August 25, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant