Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .builders/scripts/files_to_remove.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,7 @@ excluded_paths = [
"!botocore/data/rds",
# Riakcs integration monitors s3.
"!botocore/data/s3",
# Top-level JSON files (endpoints.json, partitions.json, _retry.json, etc.)
# are required by botocore to resolve AWS endpoints and handle retries.
"!botocore/data/*.json",
]
22 changes: 9 additions & 13 deletions .github/workflows/resolve-build-deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Resolve Dependencies and Build Wheels

on:
workflow_dispatch:
inputs:
builder_changed:
description: 'Rebuild the builder image (use when .builders/ changed)'
type: boolean
default: false
pull_request:
branches:
- master
Expand Down Expand Up @@ -74,6 +79,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILES_CHANGED: ${{ steps.changed-files.outputs.files_changed }}
INPUT_BUILDER_CHANGED: ${{ inputs.builder_changed }}

test:
name: Run tests
Expand Down Expand Up @@ -167,7 +173,7 @@ jobs:

env:
OUT_DIR: output/${{ matrix.job.image }}
BUILDER_IMAGE: ghcr.io/datadog/agent-int-builder:${{ matrix.job.image }}
BUILDER_IMAGE: ghcr.io/datadog/agent-int-builder:${{ matrix.job.image }}-botocore-endpoint-fix
DOCKER: docker

steps:
Expand Down Expand Up @@ -208,17 +214,6 @@ jobs:
digest=$(jq -r '.["${{ matrix.job.image }}"]' .deps/image_digests.json)
python .builders/build.py ${{ matrix.job.image }} --python 3 ${{ env.OUT_DIR }}/py3 --digest $digest --constraints .constraints/constraints.txt

- name: Publish image
if: github.event_name == 'push' && needs.check-should-run.outputs.builder_changed == 'true'
run: ${DOCKER} push ${{ env.BUILDER_IMAGE }}

- name: Save new image digest
if: github.event_name == 'push' && needs.check-should-run.outputs.builder_changed == 'true'
run: >-
${DOCKER} inspect --format "{{index .RepoDigests 0}}" ${{ env.BUILDER_IMAGE }}
| cut -d '@' -f 2
> ${{ env.OUT_DIR }}/image_digest

- name: Persist current image digest
if: needs.check-should-run.outputs.builder_changed == 'false'
run: >-
Expand Down Expand Up @@ -323,7 +318,7 @@ jobs:

publish:
name: Publish artifacts and update lockfiles via PR
if: needs.check-should-run.outputs.should_run_build == 'true' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && (github.ref_name == github.event.repository.default_branch || startsWith(github.ref_name, '7.'))))
if: needs.check-should-run.outputs.should_run_build == 'true' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && (github.ref_name == github.event.repository.default_branch || startsWith(github.ref_name, '7.') || github.ref_name == 'nubtron/custom-build/botocore-endpoint-fix')))
needs:
- build
- build-macos
Expand Down Expand Up @@ -404,6 +399,7 @@ jobs:
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
token: ${{ steps.token-generator.outputs.token }}
base: nubtron/custom-build/botocore-endpoint-fix
title: Update dependency resolution
commit-message: Update dependency resolution
branch: bot/update-dependency-resolution
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

if [ "$GITHUB_EVENT_NAME" == 'workflow_dispatch' ]; then
builder_changed="false"
builder_changed="${INPUT_BUILDER_CHANGED:-false}"
should_run_build="true"
else

Expand Down
Loading