Skip to content

build: relocate the generated clients and the system test suite - #739

Merged
ExtraToast merged 4 commits into
mainfrom
build/relocate-clients-and-system-tests
Aug 27, 2026
Merged

build: relocate the generated clients and the system test suite#739
ExtraToast merged 4 commits into
mainfrom
build/relocate-clients-and-system-tests

Conversation

@ExtraToast

@ExtraToast ExtraToast commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Why

services/ held two things that do not ship. services/api/clients/brevo and
services/api/clients/discord carry no committed source at all — one
build.gradle.kts each, generating a Java client from libs/openapi-specs at
build time. They are third-party surfaces, not part of the api service.
services/system-tests is 62 Kotlin files of Playwright and Cucumber driving
the assembled stack over HTTP — a test suite, not a deployable.

settings.gradle.kts also still carried a note claiming libs/kotlin-common
was an empty skeleton and asking the reader to add a dependency that
services/api/build.gradle.kts has 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-common stays where it is — its dependencies are declared
compileOnly against the Spring BOM, which keeps it deliberately
service-agnostic; only the stale note about it is gone.

libs/openapi-specs also stays as it is: a plain directory read by
build-logic, scripts/openapi-common.sh and the spec-sync workflow, not a
Gradle module.

How

Moved, as git renames with no content change to the sources:

  • services/api/clients/brevo -> libs/clients/brevo
  • services/api/clients/discord -> libs/clients/discord
  • services/system-tests -> tests/system (73 files)

Gradle project paths follow the directories: :services:api:clients:brevo and
:services:api:clients:discord become :libs:clients:brevo and
:libs:clients:discord; :services:system-tests becomes :tests:system.

Path updates:

  • settings.gradle.kts — new includes, and the stale libs:kotlin-common note deleted.
  • services/api/build.gradle.kts — both project(":libs:clients:…") dependencies.
  • libs/clients/discord/build.gradle.kts — the root-relative specPath pointing at its own filtered spec.
  • scripts/openapi-common.sh:libs:clients:brevo:generate.
  • .github/workflows/validate.yml — the tests/** push filter, the warm-cache targets in the api-static job, the :tests:system:test command in the six-shard system-tests matrix (shard: [1, 2, 3, 4, 5, 6]), the :tests:system:acceptanceTest command in acceptance-features, and the report artifact paths for both.
  • .github/diff-stats.yml — the services/api/clients/** rule replaced by libs/clients/** in the libs block, and the system-test glob repointed at tests/system/**. The system-tests service label is unchanged, so .github/scripts/pr_diff_stats.py needs no edit.
  • build-logic/src/main/kotlin/testing-conventions.gradle.kts — the comment naming the extracted project.
  • .gitignore — the env-file guard was scoped to services/ only, so the rules follow the suite: tests/**/.*.env and tests/**/*.env sit 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-001 and ADR-006, and the five docs/flows/*/README.md files that link into the feature files.

.github/scripts/start-system-test-stack.sh, docker-compose.ci.yml and
.github/actions/setup-java-gradle/action.yml name the CI job rather than a
path, and the job is still called system-tests, so they are untouched.

Closes #719


Diff breakdown added removed, scaled to the largest row.

api                                                 +2     -2    1
  build & config     █░                             +2     -2    1

libs                                                +1     -1    2
  production         █░                             +1     -1    2
  generated          █░                             +2     -2    1  ~

platform                                            +2     -2    1
  infrastructure     █░                             +2     -2    1

ci                                                 +19    -23    5
  build & config     ██████████░░░░░░░░░░░░        +19    -23    5

repo                                                +3     -1    1
  build & config     █░                             +3     -1    1

docs                                               +25    -25    9
  docs               █████████████░░░░░░░░░░░░░    +25    -25    9

other                                               +1     -1   72
  unclassified       █░                             +1     -1   72

──────────────────────────────────────────────────────────────────
production                                          +1     -1
tests                                               +0     -0  0.00 test lines per prod line
total (hand-written)                               +53    -55  91 files
~ generated (excluded)                              +2     -2  1 file

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.
@ExtraToast ExtraToast added the enhancement New feature or request label Aug 27, 2026
@ExtraToast ExtraToast self-assigned this Aug 27, 2026
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.
@ExtraToast
ExtraToast merged commit 40c6c6d into main Aug 27, 2026
8 of 10 checks passed
@github-actions github-actions Bot mentioned this pull request Aug 27, 2026
@ExtraToast
ExtraToast deleted the build/relocate-clients-and-system-tests branch September 4, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decide how the Gradle modules are organised

1 participant