Skip to content

Commit e61691b

Browse files
committed
Merge branch 'master' into extend-container-expire
# Conflicts: # src/main/groovy/io/seqera/wave/configuration/SsrfConfig.groovy # src/main/groovy/io/seqera/wave/encoder/DateTimeAdapter.groovy # src/main/groovy/io/seqera/wave/service/license/LicenseManValidator.groovy # src/main/groovy/io/seqera/wave/service/request/ContainerRequestStoreImpl.groovy # src/main/groovy/io/seqera/wave/tower/client/DescribeWorkflowResponse.groovy
2 parents 1b8e80a + 17273e5 commit e61691b

File tree

460 files changed

+30905
-10326
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

460 files changed

+30905
-10326
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and publish Scanner container image
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
trivy_version:
7+
description: 'trivy version (e.g., 0.65.0)'
8+
required: true
9+
default: '0.65.0'
10+
oras_version :
11+
description : 'oras version (e.g., 1.3.0)'
12+
required : true
13+
default : '1.3.0'
14+
15+
jobs:
16+
build-and-push:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Docker Buildx
23+
id: buildx
24+
uses: docker/setup-buildx-action@v3
25+
26+
- name: Docker Login
27+
uses: docker/login-action@v3
28+
with:
29+
registry: public.cr.seqera.io
30+
username: ${{ vars.SEQERA_PUBLIC_CR_USERNAME }}
31+
password: ${{ secrets.SEQERA_PUBLIC_CR_PASSWORD }}
32+
33+
- name: Build and Push Image to public.cr.seqera.io
34+
run: |
35+
cd plugin-scanner
36+
make all trivy_version=${{ github.event.inputs.trivy_version }} oras_version=${{ github.event.inputs.oras_version }}

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,16 @@ jobs:
8282
- name: Release
8383
if: "contains(github.event.head_commit.message, '[release]')"
8484
run: |
85+
bash publish.sh wave-api
86+
bash publish.sh wave-utils
8587
bash tag-and-push.sh
8688
env:
8789
GRADLE_OPTS: '-Dorg.gradle.daemon=false'
8890
AWS_ACCESS_KEY_ID: ${{secrets.TOWER_CI_AWS_ACCESS}}
8991
AWS_SECRET_ACCESS_KEY: ${{secrets.TOWER_CI_AWS_SECRET}}
92+
AWS_JAVA_V1_DISABLE_DEPRECATION_ANNOUNCEMENT: true
93+
AWS_DEFAULT_REGION: 'eu-west-1'
94+
PUBLISH_REPO_URL: "s3://maven.seqera.io/releases"
9095
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
9196
DOCKER_PAT: ${{ secrets.DOCKER_PAT }}
9297
QUAY_PAT: ${{ secrets.QUAY_PAT }}

.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

.github/workflows/seqera_docs_changelog.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Thumbs.db
22
.DS_Store
3+
.claude
34
.gradle
45
.cache
56
.nextflow*
@@ -26,6 +27,7 @@ wave.log
2627
build-workspace/
2728
scan-workspace/
2829
/k8s/dev/config-k3d.yml
30+
/.wave-test
2931

3032
# Docs
3133
.vercel

.specify/memory/constitution.md

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
<!--
2+
Sync Impact Report:
3+
- Version change: [unversioned template] → 1.0.0
4+
- Modified principles: All (initialized from template)
5+
- Added sections: All core principles and governance sections
6+
- Removed sections: None
7+
- Templates requiring updates:
8+
✅ plan-template.md - Reviewed, Constitution Check section aligns
9+
✅ spec-template.md - Reviewed, requirement structure aligns
10+
✅ tasks-template.md - Reviewed, task organization aligns
11+
✅ checklist-template.md - Reviewed, compatible with principles
12+
- Follow-up TODOs: None
13+
-->
14+
15+
# Wave Containers Constitution
16+
17+
## Core Principles
18+
19+
### I. Service-Oriented Architecture
20+
21+
Wave MUST maintain a clear separation of concerns through distinct service boundaries. Each service (ContainerBuildService,
22+
ContainerMirrorService, ContainerScanService, RegistryProxyService, BlobCacheService) MUST be independently testable and
23+
have a single, well-defined responsibility. Controllers MUST remain thin, delegating business logic to services.
24+
25+
**Rationale**: Microservices architecture enables independent scaling, testing, and maintenance of distinct container
26+
provisioning capabilities. Clear boundaries prevent coupling and facilitate parallel development.
27+
28+
### II. Container Platform Agnosticism
29+
30+
Wave MUST support multiple container platforms (Docker, Kubernetes, Singularity) and registries (Docker Hub, Quay.io,
31+
AWS ECR, Azure CR) without hardcoding platform-specific assumptions into core logic. Platform-specific strategies
32+
MUST be isolated behind abstract interfaces.
33+
34+
**Rationale**: Container ecosystem diversity requires flexible provisioning that adapts to client infrastructure without
35+
forcing migration or lock-in.
36+
37+
### III. Ephemeral-First Design
38+
39+
All container operations MUST assume ephemeral lifecycle by default. Containers, build contexts, and intermediate
40+
artifacts MUST be automatically garbage-collected. Long-term persistence MUST be explicit opt-in through user-provided
41+
registry credentials and push operations.
42+
43+
**Rationale**: Wave's core value is on-demand provisioning without manual registry management. Ephemeral-first design
44+
prevents storage bloat and reduces operational overhead.
45+
46+
### IV. Proxy Transparency
47+
48+
When acting as a registry proxy, Wave MUST remain transparent to Docker clients and comply strictly with the Docker
49+
Registry v2 API specification. Manifest instrumentation and layer injection MUST appear seamless to standard container
50+
tooling.
51+
52+
**Rationale**: Compatibility with existing container toolchains (docker pull, kubectl, etc.) is non-negotiable for adoption.
53+
Protocol compliance prevents breaking changes in client workflows.
54+
55+
### V. Async-by-Default Operations
56+
57+
All I/O-bound operations (registry pulls, builds, scans, blob storage) MUST use Micronaut Reactor non-blocking patterns.
58+
Blocking calls are prohibited in HTTP request handlers. Long-running operations MUST use JobManager for background processing.
59+
60+
**Rationale**: Container operations involve large data transfers and external API calls. Blocking threads under load
61+
causes cascading failures. Reactive patterns ensure resource efficiency and throughput under concurrency.
62+
63+
### VI. Security Scanning Integration
64+
65+
Container security scanning MUST be an opt-in, asynchronous operation that never blocks image provisioning. Scan results
66+
MUST be persisted independently and queryable after container delivery. Scanning failures MUST NOT prevent container access.
67+
68+
**Rationale**: Security scanning adds latency. Making it non-blocking preserves Wave's primary value (fast provisioning)
69+
while enabling security workflows for teams that require them.
70+
71+
### VII. Multi-Platform Build Support
72+
73+
Container builds MUST support cross-platform compilation (linux/amd64, linux/arm64) without requiring users to manage
74+
build infrastructure. Platform selection MUST be declarative via API parameters. Build strategy selection (Docker vs Kubernetes)
75+
MUST be transparent to users.
76+
77+
**Rationale**: ARM64 adoption in cloud and edge requires transparent multi-platform support. Kubernetes-based builds
78+
provide scalability and isolation that local Docker daemon cannot.
79+
80+
## Storage & Persistence Requirements
81+
82+
### Data Layer Principles
83+
84+
- PostgreSQL MUST be used for structured metadata (build records, scan results, job state)
85+
- Redis MUST be used for ephemeral caching and rate-limiting state
86+
- Object storage (S3-compatible) MUST be used for blobs, layers, and build contexts
87+
- Database migrations MUST be versioned and reversible
88+
- No business logic in SQL; use application-layer queries via Micronaut Data JDBC
89+
90+
**Rationale**: Clear storage tier separation prevents cross-cutting concerns. Postgres handles ACID requirements, Redis
91+
handles high-frequency ephemeral state, S3 handles blob scale.
92+
93+
### Authentication & Authorization
94+
95+
- Registry credentials MUST be encrypted at rest
96+
- JWT tokens MUST be used for Tower integration authentication
97+
- Rate limiting MUST be enforced per-user via Spillway library
98+
- Service-to-service calls within Kubernetes MUST use pod identity where available
99+
100+
**Rationale**: Wave handles sensitive registry credentials and must prevent credential leakage. Rate limiting prevents
101+
abuse of compute-intensive build operations.
102+
103+
## Testing & Quality Standards
104+
105+
### Testing Requirements
106+
107+
- All services MUST have unit tests using Spock 2 framework
108+
- Integration tests MUST use Testcontainers for external dependencies (Postgres, Redis)
109+
- Controller tests MUST mock service layer dependencies
110+
- Test coverage MUST be measured via JaCoCo and reported after test runs
111+
- Tests MUST NOT depend on external registries; use local registry containers or mocks
112+
113+
**Rationale**: Groovy + Spock provide expressive BDD-style tests. Testcontainers ensure consistent CI/CD environments.
114+
External registry dependencies cause flaky tests and rate-limiting issues.
115+
116+
### Performance Standards
117+
118+
- HTTP endpoints MUST respond within 200ms p95 for proxy operations (excluding upstream registry latency)
119+
- Build operations MUST queue within 100ms and report job ID
120+
- Blob cache MUST serve layers with 90%+ hit rate under normal load
121+
- Memory usage MUST remain under 2GB heap for typical workloads
122+
123+
**Rationale**: Wave sits in the critical path for container pulls. Latency directly impacts developer and CI/CD workflows.
124+
Performance budgets prevent regressions.
125+
126+
## Governance
127+
128+
### Amendment Process
129+
130+
Constitution changes MUST be documented in Git commit messages with rationale. MAJOR changes (removing principles,
131+
incompatible policy shifts) require version bump to next major. MINOR changes (new principles, expanded guidance) require
132+
minor version bump. PATCH changes (clarifications, wording) require patch version bump.
133+
134+
### Compliance Review
135+
136+
All pull requests MUST be reviewed against constitution principles. Violations MUST be explicitly justified with
137+
"Why Needed" and "Simpler Alternative Rejected" documentation in design docs. Unjustified complexity MUST be rejected.
138+
139+
### Versioning Policy
140+
141+
Wave follows semantic versioning (MAJOR.MINOR.PATCH):
142+
- MAJOR: Breaking API changes, incompatible registry protocol changes
143+
- MINOR: New features (new registry support, new build capabilities)
144+
- PATCH: Bug fixes, performance improvements, security patches
145+
146+
Release process:
147+
1. Update VERSION file
148+
2. Update changelog.txt with changes since last release
149+
3. Commit with `[release]` tag in first line of commit message
150+
4. Push to upstream master branch
151+
152+
**Rationale**: Semantic versioning provides clear upgrade expectations. Tagged release commits enable automated CI/CD
153+
release workflows.
154+
155+
**Version**: 1.0.0 | **Ratified**: 2025-10-28 | **Last Amended**: 2025-10-28

0 commit comments

Comments
 (0)