hashicorp/consul
How to contribute
If you're sending a pull request to hashicorp/consul, this section walks through the workflow, conventions, and tooling. The canonical reference is .github/CONTRIBUTING.md; this page extracts the essentials and points to specifics in the codebase.
Pull request workflow
- Open an issue describing the bug or feature, then comment that you'd like to work on it. The Consul team triages with
type/bug,type/enhancement, etc. - Fork the repo and create a feature branch from
main. - Implement the change. Match the conventions used in the surrounding code (see Patterns and conventions).
- Add a changelog entry in
.changelog/<PR>.txtunless the PR is labeledpr/no-changelog. The template is indocs/contributing/add-a-changelog-entry.md. - Run tests for the packages you touched and
make lint. - Open a PR against
hashicorp/consul:main. Apply labels (pr/no-changelog,pr/no-backport,backport/1.22.x,backport/all, etc.) per the README in.changelog/. - Address review feedback. Maintainers review for security, backwards compatibility, and Enterprise impact. The CE-only files (
*_ce.go) sometimes have Enterprise counterparts that maintainers need to keep in sync. - Merge. A maintainer merges; backport bots open follow-up PRs to release branches if labeled.
Definition of done
A change is ready to merge when:
- All
make lintchecks pass on the touched modules. - New behavior has unit tests in the relevant
*_test.gofile. Integration tests intest-integ/are added for cross-component features. - Public API changes (HTTP, gRPC, CLI) include or update docs in hashicorp/web-unified-docs (PR linked from this PR).
- A changelog entry exists or
pr/no-changelogis set. - Config-entry, FSM-command, or RPC-protocol changes follow the relevant checklist in
docs/contributing/.
Backport policy
CE bug fixes can be backported to the current major. Enterprise additionally backports to N-2 majors and the two latest LTS releases. Apply backport/<version> labels to request automatic backport PRs. The list of active branches lives in .release/versions.hcl.
Sub-pages
- Development workflow — branching, building, smoke-testing
- Testing — unit, integration, race, and golden tests
- Debugging — logging, common errors, troubleshooting
- Patterns and conventions — code style, error handling, file layout
- Tooling — Makefile targets, code generation, lint configuration
Checklists
There are several explicit checklists for common changes in docs/:
docs/config/checklist-adding-config-fields.md— when adding fields to the agent config schemadocs/contributing/add-a-changelog-entry.md— changelog formatdocs/contributing/build-an-rpm-and-deb-package.md— packagingdocs/contributing/fork-the-project.md— fork setup- Many more
checklist-*.mdfiles indocs/for specific subsystems (FSM, config-entries, gRPC, etc.)
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.