Skip to content

Commit 9554227

Browse files
Merge branch 'master' into add-nodeselectors
2 parents 4d82dbf + 5af1639 commit 9554227

File tree

18 files changed

+613
-209
lines changed

18 files changed

+613
-209
lines changed

.github/workflows/claude.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Claude PR Assistant
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
claude-code-action:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19+
(github.event_name == 'issues' && contains(github.event.issue.body, '@claude'))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
pull-requests: read
24+
issues: read
25+
id-token: write
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 1
31+
32+
- name: Run Claude PR Action
33+
uses: anthropics/claude-code-action@beta
34+
with:
35+
anthropic_api_key: ${{ secrets.ENG_ANTHROPIC_API_KEY }}
36+
# Or use OAuth token instead:
37+
# claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38+
timeout_minutes: "60"
39+
# mode: tag # Default: responds to @claude mentions
40+
# Optional: Restrict network access to specific domains only
41+
# experimental_allowed_domains: |
42+
# .anthropic.com
43+
# .github.com
44+
# api.github.com
45+
# .githubusercontent.com
46+
# bun.sh
47+
# registry.npmjs.org
48+
# .blob.core.windows.net

CLAUDE.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
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.
8+
9+
## Key Commands
10+
11+
### Development
12+
- **Run development server**: `./run.sh` (runs with continuous compilation and file watching)
13+
- **Build project**: `./gradlew assemble` or `make compile`
14+
- **Run tests**: `./gradlew test` or `make check`
15+
- **Run specific test**: `./gradlew test --tests 'TestClassName'`
16+
- **Build container image**: `./gradlew jibDockerBuild` or `make image`
17+
- **Generate code coverage**: `./gradlew jacocoTestReport` (runs automatically after tests)
18+
19+
### Environment Setup
20+
Wave requires several environment variables for registry authentication:
21+
- `DOCKER_USER`/`DOCKER_PAT` for Docker Hub
22+
- `QUAY_USER`/`QUAY_PAT` for Quay.io
23+
- `AWS_ACCESS_KEY_ID`/`AWS_SECRET_ACCESS_KEY` for AWS ECR
24+
- `AZURECR_USER`/`AZURECR_PAT` for Azure Container Registry
25+
26+
## Architecture
27+
28+
### Core Services
29+
- **ContainerBuildService**: Manages container image building (Docker/Kubernetes strategies)
30+
- **ContainerMirrorService**: Handles container mirroring operations
31+
- **ContainerScanService**: Security vulnerability scanning
32+
- **RegistryProxyService**: Acts as proxy between clients and registries
33+
- **BlobCacheService**: Caches container layers and artifacts
34+
- **JobManager**: Handles async job processing and queuing
35+
36+
### Key Controllers
37+
- **ContainerController**: Main API for container provisioning (`/container-token`)
38+
- **BuildController**: Container build operations
39+
- **ScanController**: Security scanning endpoints
40+
- **RegistryProxyController**: Registry proxy functionality
41+
42+
### Storage & Persistence
43+
- Uses PostgreSQL with Micronaut Data JDBC
44+
- Redis for caching and distributed state
45+
- Object storage (AWS S3) for blob/artifact storage
46+
- Kubernetes for production container builds
47+
48+
### Configuration
49+
- Main config: `src/main/resources/application.yml`
50+
- Environment-specific configs in `src/main/resources/application-*.yml`
51+
- Uses Micronaut's configuration system with property injection
52+
53+
## Technology Stack
54+
- **Framework**: Micronaut 4.x with Netty runtime
55+
- **Language**: Groovy with Java 21+
56+
- **Build Tool**: Gradle with custom conventions
57+
- **Container**: JIB for multi-platform builds (AMD64/ARM64)
58+
- **Database**: PostgreSQL with HikariCP connection pooling
59+
- **Cache**: Redis with Jedis client
60+
- **Testing**: Spock 2 framework
61+
- **Metrics**: Micrometer with Prometheus
62+
- **Security**: JWT authentication for Tower integration
63+
64+
## Important Notes
65+
- The codebase uses custom Gradle conventions defined in `buildSrc/`
66+
- Container images are built using Amazon Corretto 25 with jemalloc
67+
- The service requires Kubernetes cluster for production builds
68+
- Rate limiting is implemented using Spillway library
69+
- All async operations use Reactor pattern with Micronaut Reactor
70+
71+
## Release Process
72+
73+
1. Update the `VERSION` file with a semantic version
74+
2. Update the `changelog.txt file with changes against previous release
75+
3. Commit VERSION and changelog.txt file adding the tag `[release]` in the commit comment first line.
76+
4. Git push to upstream master branch.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.25.0
1+
1.25.2

adr/metrics.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: Usage metrics
3+
description: Overview of Wave's Redis-based usage metrics storage and tracking system
4+
date: 2025-09-17
5+
tags: [redis, metrics, keys, wave]
6+
---
7+
8+
Wave can store usage metrics for specific dates and organizations in Redis.
9+
10+
:::note
11+
To use metrics, enable `wave.metrics.enabled` in your Wave configuration file. See [Configuration reference](./configuration.md) for more information about Wave configuration files.
12+
:::
13+
14+
## Keys
15+
16+
When Wave makes a keys request:
17+
18+
1. Wave increments the key with the current date. For example, `builds/d/2024-04-23`.
19+
1. **For authenticated requests**: If the request includes a Seqera Platform token, Wave also performs organization-specific tracking:
20+
1. Wave extracts the domain from the user's email address using the access token to query Seqera Platform. For example, it extracts `seqera.io` from `[email protected]`.
21+
1. Wave increments the key with the organization-specific keys. For example, `builds/o/seqera.io` and `builds/o/seqera.io/d/2024-04-23`.
22+
23+
### Builds
24+
25+
When you make a container build request, Wave increments the following `builds` keys:
26+
27+
- `builds/d/<YYYY-MM-DD>`
28+
- `builds/o/<ORG>`
29+
- `builds/o/<ORG>/d/<YYYY-MM-DD>`
30+
31+
### Pulls
32+
33+
When you make a container build request, Wave increments the following keys:
34+
35+
1. Wave tracks the container image pulls using `io.seqera.wave.filter.PullMetricsRequestsFilter`.
36+
1. Wave checks if the `Content-Type` header contains one of the following manifest values:
37+
- `application/vnd.docker.distribution.manifest.v2+json`
38+
- `application/vnd.oci.image.manifest.v1+json`
39+
- `application/vnd.docker.distribution.manifest.v1+prettyjws`
40+
- `application/vnd.docker.distribution.manifest.v1+json`
41+
1. Wave increments the following `pulls` keys:
42+
- `pulls/d/<YYYY-MM-DD>`
43+
- `pulls/o/<ORG>`
44+
- `pulls/o/<ORG>/d/<YYYY-MM-DD>`
45+
1. **For Fusion-enabled containers**: If the pulled container uses Fusion, Wave increments the following `fusion` keys:
46+
- `fusion/d/<YYYY-MM-DD>`
47+
- `fusion/o/<ORG>`
48+
- `fusion/o/<ORG>/d/<YYYY-MM-DD>`
49+
50+
## Keys reference
51+
52+
Wave stores usage metrics in Redis using the following key patterns:
53+
54+
- `pulls/d/<YYYY-MM-DD>`
55+
- `pulls/o/<ORG>`
56+
- `pulls/o/<ORG>/d/<YYYY-MM-DD>`
57+
- `fusion/d/<YYYY-MM-DD>`
58+
- `fusion/o/<ORG>`
59+
- `fusion/o/<ORG>/d/<YYYY-MM-DD>`
60+
- `builds/d/<YYYY-MM-DD>`
61+
- `builds/o/<ORG>`
62+
- `builds/o/<ORG>/d/<YYYY-MM-DD>`
63+
- `pulls/a/<ARCH>/d/<YYYY-MM-DD>`
64+
- `pulls/o/<ORG>/a/<ARCH>`
65+
- `pulls/o/<ORG>/a/<ARCH>/d/<YYYY-MM-DD>`
66+
- `pulls/a/<ARCH>`
67+
- `fusion/a/<ARCH>/d/<YYYY-MM-DD>`
68+
- `fusion/o/<ORG>/a/<ARCH>`
69+
- `fusion/o/<ORG>/a/<ARCH>/d/<YYYY-MM-DD>`
70+
- `fusion/a/<ARCH>`
71+
- `builds/a/<ARCH>/d/<YYYY-MM-DD>`
72+
- `builds/o/<ORG>/a/<ARCH>`
73+
- `builds/o/<ORG>/a/<ARCH>/d/<YYYY-MM-DD>`
74+
- `builds/a/<ARCH>`
75+
- `mirrors/a/<ARCH>/d/<YYYY-MM-DD>`
76+
- `mirrors/o/<ORG>/a/<ARCH>`
77+
- `mirrors/o/<ORG>/a/<ARCH>/d/<YYYY-MM-DD>`
78+
- `mirrors/a/<ARCH>`

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,10 @@ micronaut {
138138
//
139139
jib {
140140
from {
141-
image = 'cr.seqera.io/public/nf-jdk:corretto-24-al2023-jemalloc'
141+
image = 'cr.seqera.io/public/nf-jdk:corretto-25-al2023-jemalloc'
142142
platforms {
143143
platform { architecture = 'amd64'; os = 'linux' }
144+
platform { architecture = 'arm64'; os = 'linux' }
144145
}
145146
}
146147
to {

changelog.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
# Wave changelog
2+
1.25.2 - 25 Sep 2025
3+
- Add CLAUDE.md documentation file [573c06ae]
4+
- Bump corretto-25-al2023-jemalloc as base image [715c594a]
5+
- Add Claude PR Assistant workflow [94f9f443]
6+
- Add ARM64 platform support to container build (#911) [12dd4978]
7+
8+
1.25.1 - 22 Sep 2025
9+
- Fix links broken by renaming page (#892) [db0cacd9]
10+
- Remove unused env from jib task def [34718247]
11+
- Replace deprecated AppArmor annotation with securityContext field (#896) [e474e5c7]
12+
- Wv 217 remove app encoded values for seqera environment (#893) [e4eec429]
13+
- Bump buildkit to 0.23.2 in tests (#894) [fc24a4a0]
14+
- Bump MN version 4.9.3 [03b98e8d]
15+
- Bump buildkit version 0.23.2 [f31316d9]
16+
- Bump corretto-25-al2023-mimalloc as base image [46a6e2a9]
17+
218
1.25.0 - 1 Sep 2025
319
- Fix Netty direct memory OOM after Micronaut 4.9.2 upgrade (#889) [d16ab5dd]
420
- Support csi s3 driver in wave (#875) [a425ddc5]

docs/configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ Configure Redis with the following options:
283283
: Sets the minimum number of idle connections to maintain in the Redis connection pool (default: `0`).
284284

285285
`redis.uri` *(required)*
286-
: Specifies the URI for connecting to Redis (default format: `redis://${REDIS_HOST:redis}:${REDIS_PORT:6379}`.
286+
: Specifies the URI for connecting to Redis (default format: `redis://${REDIS_HOST:redis}:${REDIS_PORT:6379}`).
287287
Can be set using the `${REDIS_URI}` environment variable.
288288

289289
### PostgreSQL
@@ -367,11 +367,11 @@ Configure how Wave sends email notifications on behalf of the service with the f
367367

368368
`mail.from` *(required)*
369369
: Specifies the sender's email address for Wave notifications.
370-
Can be set using the `${{MAIL_FROM}}}` environment variable.
370+
Can be set using the `${MAIL_FROM}` environment variable.
371371

372372
## Metrics
373373

374-
Configure how Wave Metrics service provides data about container builds and pulls per ip, container image, and user with the following options:
374+
Configure how Wave Metrics service provides data about container builds and pulls per organization and date with the following options:
375375

376376
`wave.metrics.enabled` *(optional)*
377377
: Enables Wave metrics (default: `false`).

0 commit comments

Comments
 (0)