Skip to content

Conversation

@AAraKKe
Copy link
Contributor

@AAraKKe AAraKKe commented Nov 26, 2025

What does this PR do?

This PR updates the build wheels workflow to allow us running it on workflow_dispatch.

The way this work is as follows:

  • If we are running on a push or PR: Calculate the files that have changed between the current commit and the previous one and only run the resolution if any new dependency or bump is present.
  • If we run on workflow dispatch: do the resolution even if nothing has changed.

We decide this based on the Check if build should run job. This job will skip the files changed validation on workflow dispatch, which is more expensive, and define the following variables:

  • should_run_build=true
  • builder_changed=false

This ensures that we do not rebuild builders when running on demand, which is only done to build wheels but triggers the build down the line.

If we are running on a push or PR, builder_changed will only be true if we have modified the builders code and a new image needs to be recreated. The should_run_build variable is set to true only if we have modified the agent_requirements.in file or if the builders have changed (since we need to make sure to build with the latest version).

Motivation

We recently updated it to be able to run always, since we need it to always run to produce a standard workflow when generating sizes (i.e. run sizes calculation after this finishes and use the sizes built by it when needed or not but ensure it always finish running before size calculation starts).

We forgot that we need to be able to run this workflow also on demand if we need to resolve dependencies in master or a release branch. This changes brings back this feature while maintaining what we need.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@AAraKKe AAraKKe added the qa/skip-qa Automatically skip this PR for the next QA label Nov 26, 2025
@AAraKKe AAraKKe marked this pull request as ready for review November 26, 2025 17:26
@AAraKKe AAraKKe requested a review from a team as a code owner November 26, 2025 17:26
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@github-actions
Copy link

⚠️ The qa/skip-qa label has been added with shippable changes

The following files, which will be shipped with the agent, were modified in this PR and
the qa/skip-qa label has been added.

You can ignore this if you are sure the changes in this PR do not require QA. Otherwise, consider removing the label.

List of modified files that will be shipped with the agent
datadog_checks_base/pyproject.toml

@AAraKKe AAraKKe changed the title Ensure image digest is persisted if we are going to build and lock files Fix build wheels workflow to allow triggering it on workflow dispatch Nov 26, 2025
lucia-sb
lucia-sb previously approved these changes Nov 28, 2025
HadhemiDD
HadhemiDD previously approved these changes Nov 28, 2025
iliakur
iliakur previously approved these changes Dec 1, 2025
@temporal-github-worker-1 temporal-github-worker-1 bot dismissed stale reviews from lucia-sb, HadhemiDD, and iliakur December 2, 2025 09:01

Review from lucia-sb is dismissed. Related teams and files:

  • agent-integrations
    • .github/workflows/resolve-build-deps.yaml
    • .github/workflows/scripts/resolve_deps_check_should_run.sh
    • .github/workflows/scripts/resolve_deps_define_diff_commits.sh

Review from HadhemiDD is dismissed. Related teams and files:

  • agent-integrations
    • .github/workflows/resolve-build-deps.yaml
    • .github/workflows/scripts/resolve_deps_check_should_run.sh
    • .github/workflows/scripts/resolve_deps_define_diff_commits.sh

Review from iliakur is dismissed. Related teams and files:

  • agent-integrations
    • .github/workflows/resolve-build-deps.yaml
    • .github/workflows/scripts/resolve_deps_check_should_run.sh
    • .github/workflows/scripts/resolve_deps_define_diff_commits.sh
@AAraKKe AAraKKe enabled auto-merge December 2, 2025 10:08
Copy link
Contributor

@iliakur iliakur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sooo much easier to read the workflow file now!

@AAraKKe AAraKKe added this pull request to the merge queue Dec 2, 2025
Merged via the queue into master with commit 15351d3 Dec 2, 2025
32 checks passed
@AAraKKe AAraKKe deleted the aarakke/fix-build-wheels-job branch December 2, 2025 16:04
@HadhemiDD HadhemiDD mentioned this pull request Dec 4, 2025
3 tasks
@datadog-agent-integrations-bot
Copy link
Contributor

The backport to 7.74.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-7.74.x 7.74.x
# Navigate to the new working tree
cd .worktrees/backport-7.74.x
# Create a new branch
git switch --create backport-21985-to-7.74.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 15351d3c2121a5a3c6b4c7a43f403a20447b0d58
# Push it to GitHub
git push --set-upstream origin backport-21985-to-7.74.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-7.74.x

Then, create a pull request where the base branch is 7.74.x and the compare/head branch is backport-21985-to-7.74.x.

AAraKKe added a commit that referenced this pull request Dec 5, 2025
…#21985)

* Fix build wheels workflow to allow running on dispatch

* Ensure image digest is persisted if we are going to build and lock files

* Unindent EOF

* Pin krb5 to avoid the failed build

* Revert "Pin krb5 to avoid the failed build"

This reverts commit 71154ef.

* Try new krb5 pin

* wip: Work in Progress

* Add back dependency on dcb alongside requests-kerberos

* Remove pin and opened a separate PR for that

* Remove redundant if condition and chomping pipes

* Extract complex logic to separate bash scripts

* Ensure we checkout the repo to get the scritps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants