Commit 0188175
Resolve and build dependency wheels in one PR with the dependency bump that triggers the build (DataDog#23063)
* Pass PACKAGE_BASE_URL to triggered agent builds
When integrations-core triggers agent CI builds, pass PACKAGE_BASE_URL
pointing to dev storage. This prepares for lockfiles switching to
${PACKAGE_BASE_URL}/... format so PR-triggered builds use dev wheels.
No-op today since current lockfiles use hardcoded URLs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Update ddev size tools to handle both lockfile URL formats
Support both the legacy hardcoded URL format and the new
\${PACKAGE_BASE_URL}/... template format in lockfile entries.
Resolves \${PACKAGE_BASE_URL} to the stable base URL before
downloading wheels for size calculations.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Upload wheels to dev/ prefix and use \${PACKAGE_BASE_URL} in lockfiles
Wheels are now uploaded to dev/{artifact_type}/{project_name}/ paths
in GCS instead of the unprefixed paths. Lockfile entries are templated
with \${PACKAGE_BASE_URL} so pip resolves the URL at install time using
either the dev or stable base URL depending on the environment.
Also fix brittle index extraction in generate_artifact_listings and
list_wheels_with_prefix to use split('/')[-1] and split('/')[-2]
instead of hardcoded indices.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Update promote.py to parse \${PACKAGE_BASE_URL} lockfile format
Lockfiles now use \${PACKAGE_BASE_URL}/... template entries instead of
hardcoded URLs. Update url_to_blob_path to extract the relative path
from \${PACKAGE_BASE_URL}/... entries, then prepend dev/ when looking up
blobs in GCS and stable/ for the promotion destination.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Change publish job to run on PRs only and commit lockfiles to branch
Instead of creating a separate PR with updated lockfiles, the publish
job now commits them directly to the PR branch. This collapses the
two-PR dependency update workflow into a single PR.
- Trigger: pull_request only (remove push and workflow_dispatch)
- Permission: contents: write (needed for git push)
- Token: GitHub App token checked out before checkout so push works
- Replace peter-evans/create-pull-request with a git commit + push step
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add promote-gate and promote-wheels workflows
promote-gate.yaml runs on every PR push to master/7.*.*. If dependency
files (agent_requirements.in or .deps/resolved/) changed, it sets the
promote-wheels commit status to pending, blocking merge. Otherwise it
sets it to success (no promotion needed).
promote-wheels.yaml is triggered via workflow_dispatch (by ddev promote).
It checks out the PR branch at the given SHA, runs .builders/promote.py
to copy wheels from dev/ to stable/ in GCS, then sets the promote-wheels
commit status to success and posts a comment on the PR.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Update upload tests and add promote tests for new lockfile format
test_upload.py: update all blob path assertions to use dev/ prefix
and all lockfile URL assertions to use \${PACKAGE_BASE_URL} format.
Update generate_artifact_listings assertions to use dev/-prefixed paths.
test_promote.py (new): test lockfile parsing, url_to_blob_path,
collect_relative_paths, GCS copy with correct dev/stable paths,
idempotency, and failure on missing source blobs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* add changelog
* Update dependency resolution [skip ci]
* Replace PACKAGE_BASE_URL with INTEGRATIONS_WHEELS_STORAGE
PACKAGE_BASE_URL was a full URL env var, which is more than needed and
potentially dangerous. Replace it with INTEGRATIONS_WHEELS_STORAGE whose
value is only "dev" or "stable".
Lockfile entries now use the form:
https://agent-int-packages.datadoghq.com/\${INTEGRATIONS_WHEELS_STORAGE}/...
The base domain is hardcoded; only the storage tier is variable. This
limits what a compromised env var could redirect to.
Update all affected files: upload.py, promote.py, size tools, tests,
build_agent.yaml, and the promotion workflows.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Rename promotion workflows to dependency-wheel-promotion{,-gate}
Rename promote-gate.yaml -> dependency-wheel-promotion-gate.yaml and
promote-wheels.yaml -> dependency-wheel-promotion.yaml so the two
related workflows sort next to each other and their purpose is explicit.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix promote-gate to use GitHub API instead of git diff
The actions/checkout shallow clone does not include the base branch,
so git diff --name-only against origin/<base> fails. Replace the git
command with a GitHub API call (pulls.listFiles) which does not require
a checkout at all.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Skip publish job for fork PRs in resolve-build-deps
Fork PRs cannot access repo secrets (GCS credentials, GitHub App key)
or the Workload Identity Provider used by google-github-actions/auth.
Add !github.event.pull_request.head.repo.fork to the publish job condition
so it only runs on PRs from branches within the repo.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add ddev dep promote command to trigger wheel promotion
ddev dep promote <PR_URL> extracts the PR number from the URL, fetches
the head SHA and branch from the GitHub API, then dispatches the
dependency-wheel-promotion workflow via workflow_dispatch.
This avoids both wasted runner minutes (no issue_comment polling) and
new infrastructure (no webhook handler). The workflow only runs when
explicitly dispatched.
Also add get_pr_head() and dispatch_workflow() to GitHubManager.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix lint
* codex feedback
* Update dependency resolution [skip ci]
* Enable CI when resolving deps
* Address feedback
* Update dependency resolution [skip ci]
* Temporarily use push trigger on promotion gate for testing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Update dependency resolution [skip ci]
* Update dependency resolution [skip ci]
* Fix dependency resolution commit message (again)
* Update dependency resolution
* Fix build-agent-auto glob to match .deps subdirectories
The `.deps/*` glob only matches files directly in `.deps/`, not in
subdirectories like `.deps/resolved/`. Use `**/*` to recurse.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Revert "Temporarily use push trigger on promotion gate for testing"
This reverts commit 28fb9d5.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: dd-agent-integrations-bot[bot] <dd-agent-integrations-bot[bot]@users.noreply.github.com>1 parent 71bd116 commit 0188175
20 files changed
Lines changed: 1197 additions & 697 deletions
File tree
- .builders
- tests
- .deps
- resolved
- .github/workflows
- .gitlab
- ddev
- changelog.d
- src/ddev
- cli
- dep
- size
- utils
- utils
| 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 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 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 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
0 commit comments