build: relocate the generated clients and the system test suite - #739
Merged
Conversation
The brevo and discord clients hold no committed source — a build file each, generating from libs/openapi-specs at build time. They are third-party surfaces rather than part of the api service, so they now sit next to the specs they are generated from. Gradle project paths change from :services:api:clients:* to :libs:clients:*.
The suite is 62 Kotlin files of Playwright and Cucumber, not a deployable, and services/ should hold only what ships. The Gradle project path changes from :services:system-tests to :tests:system; CI shard paths, report artifact paths, the validate.yml push filter, and the docs and READMEs that name the suite or the relocated client modules follow it.
The env-file guard was scoped to services/ only, so moving the system test suite to tests/ silently took it out of scope: a stray tests/system/.something.env would be committable. The rules now cover both roots.
Merged
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.
Why
services/held two things that do not ship.services/api/clients/brevoandservices/api/clients/discordcarry no committed source at all — onebuild.gradle.ktseach, generating a Java client fromlibs/openapi-specsatbuild time. They are third-party surfaces, not part of the api service.
services/system-testsis 62 Kotlin files of Playwright and Cucumber drivingthe assembled stack over HTTP — a test suite, not a deployable.
settings.gradle.ktsalso still carried a note claiminglibs/kotlin-commonwas an empty skeleton and asking the reader to add a dependency that
services/api/build.gradle.ktshas declared since the helpers landed.What this achieves
services/now holds only what ships:api,frontend,stalwart,vault.The generated clients sit next to the specs they are generated from, so a spec
change and the client it regenerates are one directory apart. The system test
suite has a home that names what it is, leaving room for further test projects
under
tests/without them reading as services.libs/kotlin-commonstays where it is — its dependencies are declaredcompileOnlyagainst the Spring BOM, which keeps it deliberatelyservice-agnostic; only the stale note about it is gone.
libs/openapi-specsalso stays as it is: a plain directory read bybuild-logic,scripts/openapi-common.shand the spec-sync workflow, not aGradle module.
How
Moved, as git renames with no content change to the sources:
services/api/clients/brevo->libs/clients/brevoservices/api/clients/discord->libs/clients/discordservices/system-tests->tests/system(73 files)Gradle project paths follow the directories:
:services:api:clients:brevoand:services:api:clients:discordbecome:libs:clients:brevoand:libs:clients:discord;:services:system-testsbecomes:tests:system.Path updates:
settings.gradle.kts— new includes, and the stalelibs:kotlin-commonnote deleted.services/api/build.gradle.kts— bothproject(":libs:clients:…")dependencies.libs/clients/discord/build.gradle.kts— the root-relativespecPathpointing at its own filtered spec.scripts/openapi-common.sh—:libs:clients:brevo:generate..github/workflows/validate.yml— thetests/**push filter, the warm-cache targets in theapi-staticjob, the:tests:system:testcommand in the six-shardsystem-testsmatrix (shard: [1, 2, 3, 4, 5, 6]), the:tests:system:acceptanceTestcommand inacceptance-features, and the report artifact paths for both..github/diff-stats.yml— theservices/api/clients/**rule replaced bylibs/clients/**in the libs block, and the system-test glob repointed attests/system/**. Thesystem-testsservice label is unchanged, so.github/scripts/pr_diff_stats.pyneeds no edit.build-logic/src/main/kotlin/testing-conventions.gradle.kts— the comment naming the extracted project..gitignore— the env-file guard was scoped toservices/only, so the rules follow the suite:tests/**/.*.envandtests/**/*.envsit alongside the existing pair.libs/openapi-specs/README.md,tests/system/src/test/resources/features/README.md,platform/docs/bringup-v2.md,docs/adr/api/ADR-011,docs/adr/testing/ADR-001andADR-006, and the fivedocs/flows/*/README.mdfiles that link into the feature files..github/scripts/start-system-test-stack.sh,docker-compose.ci.ymland.github/actions/setup-java-gradle/action.ymlname the CI job rather than apath, and the job is still called
system-tests, so they are untouched.Closes #719
Diff breakdown —
█added░removed, scaled to the largest row.