Thank you for your interest in contributing to the AWS VPCE Operator project.
- Setup: Install Go 1.24+, operator-sdk v1.21.0
- Install prek:
uv tool install prek(orpipx install prek) - Install hooks:
prek install - Build:
make go-build - Test:
make go-test - Lint:
make go-check
See DEVELOPMENT.md for detailed setup instructions.
All contributions must pass:
- Formatting & linting:
prek run --all-files - Unit tests:
make go-test - Build verification:
make go-build - Security scan: Automatic via prek (gitleaks)
# Create a feature branch
git checkout -b feature/my-change
# Make changes, following existing code patterns
# Add/update tests for your changes
# Run validation locally
prek run --all-files
make go-test
# Commit with descriptive message
git commit -m "feat: add support for X"
# Push and create PR
git push origin feature/my-changeWhen using AI coding agents (Claude Code, GitHub Copilot, Cursor, etc.):
Agents MUST:
- Run
prek runon changed files before committing - Execute relevant tests after code changes:
make go-test - Preserve existing code style and patterns
- Avoid editing generated files (
**/zz_generated.*.go,go.sumwithoutgo.mod) - Never bypass hooks with
--no-verify - Never commit secrets, tokens, or credentials
- Reuse existing utilities and abstractions
- Make incremental, focused changes
Validation expectations:
- Format check:
go fmt ./... - Lint:
make go-check(orprek run golangci-lint) - Type safety: Verified by
go build ./...in prek - Tests:
make go-testfor affected packages - Secret scan: Automatic via prek gitleaks hook
Required checks before PR:
- All prek hooks pass
- Unit tests pass for modified packages
- No new linter warnings introduced
- No secrets or credentials in diff
- Mocks regenerated if interfaces changed:
boilerplate/_lib/container-make generate
Follow existing patterns:
- Standard Go formatting (
gofmt) - golangci-lint rules in
boilerplate/openshift/golang-osd-operator/golangci.yml - Ginkgo/Gomega for tests
- GoMock for interface mocking
- Unit tests required for all new functionality
- Use Ginkgo BDD style:
Describe,Context,It - Mock external dependencies with GoMock
- Aim for meaningful test coverage, not just metrics
See TESTING.md for testing guidelines.
After modifying API types or interfaces:
# Regenerate deepcopy, OpenAPI, mocks (in container for consistency)
boilerplate/_lib/container-make generateNever commit:
- API keys, tokens, passwords
- AWS credentials, kubeconfig files
- Private keys, certificates
.envfiles with secrets- Debug statements printing sensitive data
The prek gitleaks hook will block commits containing secrets.
High-risk changes (requiring extra review):
- Authentication/authorization logic
- RBAC manifests with wildcard permissions
- Network policies
- CI/CD pipeline modifications
- Dockerfile changes
Use conventional commits style:
<type>: <short summary>
<optional body>
<optional footer>
Types: feat, fix, docs, test, refactor, chore, ci
Examples:
feat: add support for fleet notification filteringfix: correct RBAC permissions for service monitortest: add unit tests for network policy handler
- Title: Clear, descriptive summary
- Description: Explain what changed and why
- Testing: Describe how you tested the changes
- CI: All Tekton pipeline checks must pass
- Review: Address review feedback promptly
- Review the OWNERS file for maintainers and approvers
- Follow the OpenShift contributing guidelines
- Look for issues labeled
good-first-issuefor newcomers
All contributions are licensed under Apache 2.0. See LICENSE.