Skip to content

Commit 0958291

Browse files
authored
fix(reno): Do not use sparse-checkout with reno (#46061)
### What does this PR do? Removes `sparse-checkout` from the `release-note-check` job in the `label-analysis` workflow. `sparse-checkout` causes Git to set `extensions.worktreeConfig = true` in `.git/config`. `reno` uses `dulwich` (a Python Git library) which doesn't support that extension, resulting in: ``` dulwich.repo.UnsupportedExtension: b'worktreeConfig' ``` See https://github.com/DataDog/datadog-agent/actions/runs/21820574446/job/62952555264?pr=46059 for a failed run example. ### Motivation The `release-note-check` job has been failing on all PRs since #45330 was merged. ### Describe how you validated your changes - Reproduced the error locally by enabling `sparse-checkout` and running `reno lint` - Confirmed the error disappears once `sparse-checkout` (and its `extensions.worktreeConfig` side effect) is removed ### Additional Notes `sparse-checkout` is not needed for this job because: - It checks out `ref: main` (trusted code), not PR code - It already uses `fetch-depth: 0` for full git history (needed by reno) - PR-specific releasenotes are safely fetched separately via `git checkout FETCH_HEAD -- releasenotes ...` Co-authored-by: nicolas.schweitzer <nicolas.schweitzer@datadoghq.com>
1 parent 81c0489 commit 0958291

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

.github/workflows/label-analysis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
# Checkout base repo for trusted code (tasks, dda install)
22+
# NOTE: Do NOT use sparse-checkout here — reno uses dulwich which doesn't
23+
# support the extensions.worktreeConfig that sparse-checkout enables.
2224
- name: Checkout repository
2325
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2426
with:
2527
ref: main
2628
fetch-depth: 0
27-
sparse-checkout: |
28-
.gitlab-ci.yml
29-
.github/actions/install-dda
30-
tasks
3129
persist-credentials: false
3230
# Fetch and checkout only releasenotes folders from PR (data only, no code execution)
3331
# Using refs/pull/NUMBER/head works for both fork and non-fork PRs

0 commit comments

Comments
 (0)