Skip to content

Commit 74c089b

Browse files
authored
Merge branch 'master' into bot/update-dependencies-1778468456
2 parents 8231c8f + 9b11284 commit 74c089b

1 file changed

Lines changed: 33 additions & 16 deletions

File tree

AGENTS.md

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ If a single argument is present in the function, `str | bytes` is preferred.
5656
- Small, focused functions with descriptive names are better than repeated code blocks
5757
- Reusable helpers improve maintainability and reduce the need for comments
5858

59+
### Module Constants
60+
61+
- Do not prefix uppercase module constants with a leading underscore (for example `_GIT_REMOTE_PATTERNS`). Module-private constants are fine; just name them without the underscore (`GIT_REMOTE_PATTERNS`). This is a style choice for consistency, not a scoping rule.
62+
5963
## Configuration Models
6064

6165
**Applicable to:** `**/config_models/*.py`, `*/assets/configuration/spec.yaml`
@@ -127,35 +131,48 @@ Format code with `ddev test -fs <INTEGRATION>`. For example, for the pgbouncer i
127131

128132
## Changelog Management
129133

130-
Changelog entries are required for all Python changes in `datadog_checks` subdirectories. Changelog entries are not required for changes in tests or assets.
134+
Changelog entries are required for any change to a file that is shipped with the Agent. This includes Python sources under `datadog_checks/`, `pyproject.toml`, and the integration's `conf.yaml.example`. Changes limited to tests, fixtures, or developer-only assets do not need a changelog entry.
135+
136+
**IMPORTANT:** Always open the pull request first and only then add the changelog entry. The entry filename embeds the PR number; creating the file before the PR exists almost always results in the wrong number and a broken entry.
131137

132-
**IMPORTANT:** Changelog files MUST be created using the `ddev release changelog new` command. Do not create or edit changelog files manually.
138+
**IMPORTANT:** Do not use `ddev release changelog new` to create entries. That command resolves the repository from the active `ddev` configuration, which may not match the worktree or branch you are working in, and it can silently target the wrong repo or write to the wrong location. Create the file by hand instead.
133139

134-
Changelog files are named `<PR_NUMBER>.<TYPE>` and placed in the integration's `changelog.d/` directory.
140+
### How to create an entry
135141

136-
### Version Bumping Behavior
142+
1. Open the PR and note the PR number (e.g. `23655`).
143+
2. Pick the entry type from the valid list below.
144+
3. Create the file at `<INTEGRATION>/changelog.d/<PR_NUMBER>.<TYPE>` (for example `ddev/changelog.d/23655.changed`).
145+
4. Write a single line describing the change. End the line with a period.
137146

138-
- `fixed` - Bug fixes. Bumps the **patch** version (e.g., 1.0.0 → 1.0.1)
139-
- `added` - New features. Bumps the **minor** version (e.g., 1.0.0 → 1.1.0)
140-
- `changed` - Breaking changes or significant modifications. Bumps the **major** version (e.g., 1.0.0 → 2.0.0)
147+
### Valid entry types
141148

142-
### Command Format
149+
The valid types are defined in `ddev/src/ddev/release/constants.py` (`ENTRY_TYPES`):
143150

144-
`ddev release changelog new <TYPE> <INTEGRATION> -m "<MESSAGE>"`
151+
- `added` - New features. Bumps the **minor** version (e.g., 1.0.0 → 1.1.0).
152+
- `changed` - Breaking changes or significant modifications. Bumps the **major** version (e.g., 1.0.0 → 2.0.0).
153+
- `deprecated` - Marks functionality as deprecated. Bumps the **minor** version.
154+
- `removed` - Removes functionality. Bumps the **major** version.
155+
- `fixed` - Bug fixes. Bumps the **patch** version (e.g., 1.0.0 → 1.0.1).
156+
- `security` - Security-related fixes. Bumps the **minor** version.
145157

146158
### Examples
147159

148160
```shell
149-
# New feature
150-
ddev release changelog new added kafka_consumer -m "Bump OpenSSL in confluent-kafka to 3.4.1 on Windows."
161+
# New feature for kafka_consumer in PR #23700
162+
echo "Bump OpenSSL in confluent-kafka to 3.4.1 on Windows." > kafka_consumer/changelog.d/23700.added
151163

152-
# Bug fix
153-
ddev release changelog new fixed sqlserver -m "Fix a bug where ``tempdb`` is wrongly excluded from database files metrics due to all instances inherited from ``SqlserverDatabaseMetricsBase`` share the same reference of auto-discovered databases."
154-
155-
# Breaking change
156-
ddev release changelog new changed postgres -m "Update configuration options for connection pooling."
164+
# Bug fix for sqlserver in PR #23701
165+
echo "Fix a bug where ``tempdb`` is wrongly excluded from database files metrics." > sqlserver/changelog.d/23701.fixed
157166
```
158167

168+
## Pull Requests
169+
170+
- Open PRs in draft mode unless explicitly asked otherwise; mark them ready for review once the work is complete and CI passes.
171+
- Always populate the PR body using the repository's template at `.github/PULL_REQUEST_TEMPLATE.md`. Read the template first and fill in every section (`What does this PR do?`, `Motivation`, `Review checklist`). Do not omit, rename, or reorder the template sections, and do not add unrelated sections on top.
172+
- Keep PR titles short and descriptive in plain words. Do not use conventional-commit prefixes (`feat:`, `fix:`, `chore:`).
173+
- Add the `qa/skip-qa` label when the PR doesn't need to be tested during QA, and check the corresponding checkbox in the template.
174+
- Push the branch and open the PR before adding the changelog entry so the entry filename can reference the real PR number.
175+
159176
## Documentation
160177

161178
### New files added

0 commit comments

Comments
 (0)