Thanks for choosing to contribute!
Before making any changes, read INVARIANTS.md — it lists non-negotiable constraints.
The following are a set of guidelines to follow when contributing to this project.
This project adheres to the Adobe code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to Grp-opensourceoffice@adobe.com.
All third-party contributions to this project must be accompanied by a signed contributor license. This gives Adobe permission to redistribute your contributions as part of the project. Sign our CLA. You only need to submit an Adobe CLA one time, so if you have submitted one previously, you are good to go!
Prerequisites:
- Java 25 (compile/run; JVM target 17 with Kotlin language/api 2.2, per Spring Boot 4.x guidance)
- Maven 3.9+ (use the included
./mvnwwrapper) - Docker (for Docker build and integration tests)
Build and verify:
make install # Full build with Docker
make skip-docker # Skip Docker (faster, for unit tests only)
make integration-tests # Run integration tests
make format # Format Kotlin code- Add DTO(s) in
server/dto/— XML names must match the AWS S3 API spec exactly - Add store method(s) in
server/store/— acquire the per-object or per-bucket lock - Add service method(s) in
server/service/— business logic only, throwS3Exceptionconstants - Add controller method(s) in
server/controller/— HTTP mapping only, no logic, no exception catching - Add integration test(s) in
integration-tests/— use real AWS SDK v2 against Docker container - Run
make integration-teststo verify XML serialization - Update
CHANGELOG.mdandAGENTS.mdconfiguration tables if new properties are added
In priority order:
- AWS API correctness (XML names, status codes, error codes)
- Layer violations (logic in controllers, HTTP in services)
- Locking correctness (all filesystem writes acquire the appropriate lock)
- Constraint violations (SDK v1, JUnit 4, legacy Jackson annotations)
- Test quality (mocked SDK clients in
*IT.kt, shared state between tests)
S3Mock follows a Controller - Service - Store layered architecture. For detailed architecture documentation, code style guidelines, and project conventions, see the AGENTS.md in the project root.
Module-specific documentation:
- Server Module - core implementation
- Integration Tests - test patterns
- Test Support - framework integrations
- Kotlin: Enforced by ktlint — run
make formatbefore submitting - XML/Java: Enforced by Checkstyle — configuration in
etc/checkstyle.xml - Key conventions: Constructor injection, data classes for DTOs, backtick test names,
valovervar - See the DO / DON'T section in AGENTS.md for the full list
All submissions should come in the form of pull requests and need to be reviewed by project committers. Read GitHub's pull request documentation for more information on sending pull requests.
All submissions must include tests for any new functionality or bug fixes.
S3Mock uses three test levels:
- Unit tests (
*Test.kt) - Spring Boot tests with@MockitoBeanfor mocking, inserver/src/test/ - Spring Boot tests - component-level coverage with Spring context
- Integration tests (
*IT.kt) - end-to-end tests against the Docker container using real AWS SDK v2 clients, inintegration-tests/src/test/
Ensure your code has coverage from at least one of these test types.
- Ensure all CI gates pass (build, tests, ktlint, checkstyle, Docker)
- Update CHANGELOG.md under the current version section for user-facing changes
- Update documentation if applicable (README.md, AGENTS.md)
- Follow the pull request template when submitting
- Edit any file in
server/,integration-tests/,testsupport/,docs/,AGENTS.md,INVARIANTS.md,CHANGELOG.md - Run
make test,make lint,make fmt,make typecheck,make check - Create branches, stage files, draft commit messages
git pushor creating a PR- Modifying
.github/workflows - Changing
pom.xmldependency versions - Deleting files (check with the human first)
- Any change that touches the Docker image, Dockerfile, or CI configuration
Before flagging a blocker, verify:
-
make lintpasses (ktlint + Checkstyle) -
make typecheckpasses (no compilation errors) -
make testpasses (unit tests) - The change you're making is within the scope requested
If an integration test fails and you cannot determine why without running the full Docker stack, say so explicitly — do not claim success based on compilation alone.
- Do not modify
INVARIANTS.mdconstraints - Do not add or remove dependencies in
pom.xml - Do not change port numbers or storage layout
- Do not add authentication, authorization, or real encryption
- Do not push to remote or open PRs
To report security vulnerabilities, see the Security Policy.