Commit 100dc11
authored
feat(ci): add days-since-last-pin daily workflow (DataDog#22951)
* feat(ci): add days-since-last-pin daily workflow
- Add .github/workflows/days-since-last-pin.yml that runs daily at 9:42 UTC
- Computes days since INTEGRATIONS_CORE_VERSION was last updated in datadog-agent/release.json
- Posts gauge metric integrations_core.days_since_last_pin{team:agent-integrations} to Datadog API v2
Rationale: AI-6462 — need a CI dashboard counter that turns red when the agent repo hasn't been pinned in >4 days
* refactor(ci): extract inline script and fix error handling in days-since-last-pin
- Extract 90-line embedded Python heredoc to .github/workflows/scripts/days_since_last_pin.py
- Add actions/checkout step so the workflow can access the script file
- Replace silent break-on-error with raise to fail the job on fetch errors
- Split single step into compute + submit for step-level failure attribution
- Add comment explaining the per_page=30 assumption
Rationale: PR review found inline heredoc diverged from repo convention, and a mid-walk fetch failure would silently submit a falsely-healthy metric
This commit made by [/dd:git:commit:quick](https://github.com/DataDog/claude-marketplace/tree/main/dd/commands/git/commit/quick.md)
* fix(ci): bound commit walk by 30-day window instead of fixed page count
- Replace per_page=30 with a since=30-days-ago query parameter and full pagination
- release.json is updated for many dep changes (JMXFETCH, OMNIBUS_RUBY, etc.),
so a fixed page count could exhaust without finding the pin-change commit
- When no commits found in the window, report days=30 (pin is at least that old)
Rationale: the sparse-commit assumption was wrong; time-bounded window is the correct approach
This commit made by [/dd:git:commit:quick](https://github.com/DataDog/claude-marketplace/tree/main/dd/commands/git/commit/quick.md)
* refactor(ci): replace GITHUB_TOKEN with dd-octo-sts for cross-repo access
- Add dd-octo-sts-action step to exchange OIDC token for a scoped token on
DataDog/datadog-agent (contents:read only)
- Pass dd-octo-sts token as GITHUB_TOKEN to the compute step instead of the
built-in secrets.GITHUB_TOKEN
- Add id-token:write permission to the job for OIDC federation
Trust policy PR: DataDog/datadog-agent#48035
Rationale: scoped short-lived token is more secure than using the default
GITHUB_TOKEN for cross-repo access
This commit made by [/dd:git:commit:quick](https://github.com/DataDog/claude-marketplace/tree/main/dd/commands/git/commit/quick.md)
* refactor(ci): add type hints and fix spurious page increment in days-since-last-pin
- Add type annotations to fetch_json and get_integrations_core_version
- Guard page += 1 behind `if not pin_changed` to avoid incrementing after pin change is detected
Rationale: page was incremented even when pin_changed became True at the end of the loop body, which is unnecessary; also adds explicit types for clarity
This commit made by [/dd:git:commit:quick](https://github.com/DataDog/claude-marketplace/tree/main/dd/commands/git/commit/quick.md)1 parent f0b0b59 commit 100dc11
2 files changed
Lines changed: 127 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
0 commit comments