원클릭으로
eg-contrib-pr-guide
PR conventions, commit format, review expectations, and common mistakes to avoid when contributing to envoyproxy/gateway
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
PR conventions, commit format, review expectations, and common mistakes to avoid when contributing to envoyproxy/gateway
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Configure client-facing traffic policies -- timeouts, connection limits, TLS settings, HTTP behavior
Production-grade Envoy Gateway setup with comprehensive security, observability, high availability, and operational best practices
Integrate Envoy Gateway with Istio ambient mesh or Cilium for unified ingress and service mesh
Envoy Gateway version information, compatibility matrix, and upgrade readiness checks
Envoy AI Gateway contribution orchestrator — interviews you about your contribution and guides you through the correct workflow using contributor skills
Envoy Gateway contribution orchestrator — interviews you about your contribution and guides you through the correct workflow using contributor skills
| name | eg-contrib-pr-guide |
| description | PR conventions, commit format, review expectations, and common mistakes to avoid when contributing to envoyproxy/gateway |
type(subsystem): short description in lowercase
| Type | When to Use |
|---|---|
feat | New feature or capability |
fix | Bug fix |
chore | Maintenance (deps, CI, build) |
docs | Documentation changes |
api | API type changes in api/v1alpha1/ |
refactor | Code restructuring without behavior change |
test | Test-only changes |
style | Formatting, linting fixes |
| Subsystem | Directory |
|---|---|
translator | internal/gatewayapi/ |
xds | internal/xds/translator/ |
provider | internal/provider/ |
infra | internal/infrastructure/ |
ir | internal/ir/ |
api | api/v1alpha1/ |
extension | internal/extension/ |
helm | charts/gateway-helm/ |
e2e | test/e2e/ |
ci | .github/ |
egctl | internal/cmd/egctl/ |
bootstrap | internal/xds/bootstrap/ |
feat(translator): add retry budget support for BackendTrafficPolicyfix(xds): correct filter chain order for ext_authz with CORSapi(api): add RetryBudget field to BackendTrafficPolicySpectest(e2e): add circuit breaker e2e testchore(ci): update Go version to 1.23API changes (api/v1alpha1/) must be in a separate PR from the implementation.
Workflow for features requiring new API fields:
api/v1alpha1/, run make generate, add CEL validation testsThis separation makes review easier and avoids monolithic PRs.
// Copyright Envoy Gateway Authors
// SPDX-License-Identifier: Apache-2.0
// The full text of the Apache license is available in the LICENSE file at
// the root of the repo.
git commit -sk8s.io/utils/ptr for pointer helpers — never write custom ptrTo() functionssigs.k8s.io/yaml for YAML marshaling — not encoding/json or gopkg.in/yaml.v3github.com/stretchr/testify/require for fatal test assertions, assert for non-fatalerrors.Join() for accumulating multiple errors — not custom error slicesinternal/logging — not fmt.Printf or logmake lint catches thisThese are real patterns from PR reviews. Avoiding these saves review cycles.
| Issue | Fix |
|---|---|
| Adding a field when nil/omitted represents the same behavior | Do not add it — use nil to mean "not configured" |
| Defaults that differ from upstream Envoy | Align with Envoy defaults unless there is a strong reason not to (document why) |
| Using string for a fixed set of values | Use an enum type with +kubebuilder:validation:Enum |
| Missing validation for mutually exclusive fields | Add CEL x-kubernetes-validations rules |
| Not marking optional fields as optional | Add // +optional comment and use pointer type |
| Overly nested types | Flatten when the nesting does not add semantic meaning |
| Issue | Fix |
|---|---|
Using map types in IR structs | Use []MapEntry slices — maps break DeepEqual determinism |
| Changing a filter name | Never change filter names — it breaks downstream consumers and causes listener drains |
| Not handling nil IR fields | Always nil-check optional IR fields before xDS translation |
Missing patchResources implementation | If your filter needs auxiliary clusters (JWKS, token endpoints), add them via patchResources |
| Hardcoded values that should come from config | Make them configurable via CRD fields or use upstream Envoy defaults |
| Issue | Fix |
|---|---|
| Happy-path-only test coverage | Add tests for invalid input, missing references, edge cases |
| Missing golden file updates | Run go test -run TestTranslate -update after changing translation logic |
Flaky e2e tests with time.Sleep | Use wait.PollImmediate or MakeRequestAndExpectEventuallyConsistentResponse |
| Not testing policy at multiple attachment levels | Test policy on Gateway, Route, and Route rule when applicable |
| Issue | Fix |
|---|---|
| Helm values not updated | Update charts/gateway-helm/values.yaml if adding new config |
| Missing release notes | Add entry to release-notes/current.yaml for user-facing changes |
Not running make generate | Always run after API or IR changes — it regenerates deepcopy, CRDs, Helm |
| Target | What It Does | When to Run |
|---|---|---|
make generate | Regenerate deepcopy, CRDs, Helm CRDs, protobuf | After changing api/ or internal/ir/ types |
make lint | Run golangci-lint and other linters | Before pushing — CI will fail otherwise |
make go.test.unit | Run unit tests with race detection | After any code change |
make go.testdata.complete | Regenerate all golden test files | After changing translator logic |
make go.test.coverage | Run tests with coverage report | Verify 100% coverage on new code |
make go.test.cel | Run CEL validation tests | After changing CRD validation rules |
A typical feature PR touches these files. Use this checklist to ensure nothing is missed:
api/v1alpha1/<crd>_types.go — new type definitionapi/v1alpha1/shared_types.go — shared types (if cross-CRD)api/v1alpha1/validation/*.go — Go validation (if complex rules)test/cel-validation/<crd>_test.go — CEL validation testsmake generate — updates deepcopy, CRDs, Helm CRDsinternal/ir/xds.go — IR type additionsinternal/gatewayapi/<policy>.go — Gateway API → IR translationinternal/gatewayapi/testdata/<feature>.in.yaml — translator test inputinternal/gatewayapi/testdata/<feature>.out.yaml — translator test outputinternal/xds/translator/<feature>.go — IR → xDS translationinternal/xds/translator/testdata/in/xds-ir/<feature>.yaml — xDS test inputinternal/xds/translator/testdata/out/xds-ir/<feature>.*.yaml — xDS test outputtest/e2e/tests/<feature>.go — e2e testtest/e2e/testdata/<feature>.yaml — e2e test manifestsrelease-notes/current.yaml — release notes entrymake generate — if IR types changedmake lint — verify linting passesmake go.test.unit — verify unit tests passsite/content/en/ — user-facing documentationsite/content/en/contributions/design/ — design document (for significant features)