You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+33-16Lines changed: 33 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,10 @@ If a single argument is present in the function, `str | bytes` is preferred.
56
56
- Small, focused functions with descriptive names are better than repeated code blocks
57
57
- Reusable helpers improve maintainability and reduce the need for comments
58
58
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.
@@ -127,35 +131,48 @@ Format code with `ddev test -fs <INTEGRATION>`. For example, for the pgbouncer i
127
131
128
132
## Changelog Management
129
133
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.
131
137
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.
133
139
134
-
Changelog files are named `<PR_NUMBER>.<TYPE>` and placed in the integration's `changelog.d/` directory.
140
+
### How to create an entry
135
141
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.
137
146
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
141
148
142
-
### Command Format
149
+
The valid types are defined in `ddev/src/ddev/release/constants.py` (`ENTRY_TYPES`):
143
150
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.
145
157
146
158
### Examples
147
159
148
160
```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
151
163
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
157
166
```
158
167
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.
0 commit comments