[EndpointsBDD release infra] Add conditional copy of endpoint-bdd-1.json model - #7335
Open
alextwoods wants to merge 1 commit into
Open
[EndpointsBDD release infra] Add conditional copy of endpoint-bdd-1.json model#7335alextwoods wants to merge 1 commit into
alextwoods wants to merge 1 commit into
Conversation
alextwoods
changed the base branch from
master
to
feature/master/endpoints-bdd
August 31, 2026 21:21
Lets the release script carry endpoint-bdd-1.json for a service, without that being what decides whether the service uses the BDD endpoint provider. The provider is selected by codegen purely on whether the model file is present, so an unconditional copy would move every service onto the BDD path on the first release that carried the model. copyFileIfAlreadyPresent therefore checks the destination first and updates the file only for a service that already has one. Adding the file by hand stays the act of opting a service in, which is what makes a phased rollout possible; the script keeps it refreshed from then on. The existing copyFile is left alone for the other models. Gating those would be wrong: a service legitimately gains waiters-2.json or endpoint-tests.json for the first time, and those should land on the release that carries them. The argument is optional, so callers that do not pass it are unaffected. Note that release automation lives outside this repo and has to start passing --endpoint-bdd-json for any of this to take effect. Testing: - Seven tests driving UpdateServiceMain.main with temp directories, so the option registration and the resolved destination are covered along with the gate. An unregistered option would silently ignore the argument, which a test of the helper alone would not catch. - Cases: absent destination is not created; existing destination is overwritten; an empty existing file still counts as present; omitting the argument leaves an opted-in model alone; the other five models are still copied unconditionally; and the gate applies to DynamoDB's nested codegen-resources directory rather than the module root. - Mutation checked. Swapping in the unconditional copyFile, and gating on the source instead of the destination, each fail endpointBddJson_notAlreadyPresent_isNotCopied. - release-scripts had no test tree, so junit-jupiter and assertj-core are added at test scope. checkstyle clean, spotbugs 0 bugs.
alextwoods
force-pushed
the
alexwoo/endpoints-bdd-pr6
branch
from
August 31, 2026 21:40
6f87ba9 to
29cc5ef
Compare
jencymaryjoseph
approved these changes
Aug 31, 2026
dagnir
approved these changes
Aug 31, 2026
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.
[EndpointsBDD release infra] Add conditional copy of endpoint-bdd-1.json model
This is the release infrastructure PR to support the Endpoints BDD. It depends on the BDD implementation, primarily in:
Note: This PR merges to the feature/master/endpoints-bdd feature branch and NOT to master.
Motivation and Context
We are gating generating a BDD based endpoint resolver on whether the
endpoint-bdd-1.jsonmodel is present or not. This lets us opt-in services without requiring yet another customization.config key that ends up living long after the release is complete.The
UpdateServiceMainis repsonible for copying the model files from a new preview/release build into the correct service directory. This PR adds a conditional copy of the endpoint BDD file - ONLY when it is already present will we copy it.Note: the conditional copy is TEMPORARY - once we have completed batched/phased release we will remove the the
copyFileIfAlreadyPresentand just use the standardcopyFilemethod.Testing
Added new unit tests.
License