This file provides guidance to coding agents when working with code in this repository.
Wave is a containers provisioning service that allows building container images on-demand and acts as a proxy for container registries. It's built with Java/Groovy using the Micronaut framework and follows a microservices architecture.
- Run development server:
./run.sh(runs with continuous compilation and file watching) - Build project:
./gradlew assembleormake compile - Run tests:
./gradlew testormake check - Run specific test:
./gradlew test --tests 'TestClassName' - Build container image:
./gradlew jibDockerBuildormake image - Generate code coverage:
./gradlew jacocoTestReport(runs automatically after tests)
Wave requires several environment variables for registry authentication:
DOCKER_USER/DOCKER_PATfor Docker HubQUAY_USER/QUAY_PATfor Quay.ioAWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEYfor AWS ECRAZURECR_USER/AZURECR_PATfor Azure Container RegistryWAVE_AWS_JUMP_ROLE_ARN/WAVE_AWS_JUMP_EXTERNAL_IDfor cross-account IAM role chaining
- ContainerBuildService: Manages container image building (Docker/Kubernetes strategies)
- ContainerMirrorService: Handles container mirroring operations
- ContainerScanService: Security vulnerability scanning
- RegistryProxyService: Acts as proxy between clients and registries
- BlobCacheService: Caches container layers and artifacts
- JobManager: Handles async job processing and queuing
- ContainerController: Main API for container provisioning (
/container-token) - BuildController: Container build operations
- ScanController: Security scanning endpoints
- RegistryProxyController: Registry proxy functionality
- Uses PostgreSQL with Micronaut Data JDBC
- Redis for caching and distributed state
- Object storage (AWS S3) for blob/artifact storage
- Kubernetes for production container builds
- Main config:
src/main/resources/application.yml - Environment-specific configs in
src/main/resources/application-*.yml - Uses Micronaut's configuration system with property injection
- Framework: Micronaut 4.10.6 with Netty runtime
- Language: Groovy with Java 21+
- Build Tool: Gradle with custom conventions
- Container: JIB for multi-platform builds (AMD64/ARM64)
- Database: PostgreSQL with HikariCP connection pooling
- Cache: Redis with Jedis client
- Testing: Spock 2 framework
- Metrics: Micrometer with Prometheus
- Security: JWT authentication for Tower integration
- The codebase uses custom Gradle conventions defined in
buildSrc/ - Container images are built using Amazon Corretto 25 with jemalloc
- The service requires Kubernetes cluster for production builds
- Rate limiting is implemented using Spillway library
- All async operations use Reactor pattern with Micronaut Reactor
The wave-cli/ directory contains the Wave command line tool. It is an independent Gradle build (own
settings.gradle, wrapper, VERSION and changelog.txt) not included in the Wave server build, built and released
by .github/workflows/build-wave-cli.yml. See wave-cli/CLAUDE.md.
Wave (server) and Wave CLI are versioned and released independently, the condasplit image is released with Wave. Both use a [release] commit pushed to
master: which one is released depends only on the files the commit touches. A release commit must never mix
the two, otherwise both releases are triggered.
- Update the root
VERSIONfile with a semantic version - Update the root
changelog.txtfile with changes against previous release (tagv<VERSION>) - Commit
VERSIONandchangelog.txtadding the tag[release]in the commit comment first line. The commit must not touch any file inwave-cli/. - Git push to upstream master branch. The
build.ymlworkflow publishes the condasplit image (when its tag is missing), then the Wave image and thev<VERSION>release. A failed condasplit build stops the release. - Wait for the
Wave CIrun of the release commit to succeed (gh run list --commit <SHA>, thengh run watch <ID> --exit-status) and check the release is published (gh release view v<VERSION>). - Deploy it by opening a PR on
seqeralabs/platform-deployment: on a new branch fromorigin/master, setnewTag: v<VERSION>inapplications/wave/environments/tower-{dev,stage,prod}/kustomization.yaml(all three environments together). Use the titlechore: Bump wave to v<VERSION> in all environments [NOTASK]and list the release changes in the PR body.
The condasplit/ image has its own immutable tag, set in condasplit/VERSION, and no release commit of its own.
- In the pull request that changes
condasplit/, bumpcondasplit/VERSION(e.g.v2->v3) and set thewave.build.condasplit-imagedefault topublic.cr.seqera.io/wave/condasplit:<VERSION>insrc/main/resources/application.ymland in the@Valuefallback ofBuildConfig. Thecheck-versionjob ofbuild-condasplit.ymlfails when the sources change without a bump or the default doesn't match the tag. - The next Wave release publishes the tag, see step 4 of the Wave release. Until then, builds from master
default to an unpublished tag: the conda
-fastbuilds fail on them.
- Update the
wave-cli/VERSIONfile with a semantic version - Update the
wave-cli/changelog.txtfile with changes against previous release. Usegit log --oneline cli-v<PREVIOUS VERSION>..HEAD -- wave-clito find them. This entry is used as GitHub release notes. - Commit
wave-cli/VERSIONandwave-cli/changelog.txtadding the tag[release]in the commit comment first line. The commit must only touch files inwave-cli/(Wave CI ignores those paths, so no Wave release is triggered). The[release]tag must be in the first line of a direct push: squash and merge commits never trigger a release. - Git push to upstream master branch. The
build-wave-cli.ymlworkflow builds the native binaries and publishes thecli-v<VERSION>release and the Homebrew formula.