Skip to content

chore(dev): use lazy variable for CONTAINER_TOOL detection#25523

Merged
thomasqueirozb merged 2 commits into
masterfrom
chore/makefile-container-tool
May 29, 2026
Merged

chore(dev): use lazy variable for CONTAINER_TOOL detection#25523
thomasqueirozb merged 2 commits into
masterfrom
chore/makefile-container-tool

Conversation

@thomasqueirozb

@thomasqueirozb thomasqueirozb commented May 29, 2026

Copy link
Copy Markdown
Member

Summary

The previous CONTAINER_TOOL auto-detection used $(shell ...) inside ifeq blocks, which GNU Make evaluates eagerly at parse time — meaning docker version and podman version ran on every make invocation, including unrelated targets like make check-clippy. If Docker is broken or hangs, it blocks all make commands.

Replaced with a single lazy ?= variable whose shell expansion only runs when $(CONTAINER_TOOL) is actually referenced in a recipe (currently only cross-image-%).

Also removed the unused check-container-tool target.

Vector configuration

NA

How did you test this PR?

Ran make check-clippy locally with Docker in a broken state which hangs on all docker commands.

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

NA

@thomasqueirozb thomasqueirozb added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label May 29, 2026
@thomasqueirozb
thomasqueirozb marked this pull request as ready for review May 29, 2026 14:53
@thomasqueirozb
thomasqueirozb requested a review from a team as a code owner May 29, 2026 14:53
@thomasqueirozb
thomasqueirozb enabled auto-merge May 29, 2026 14:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b4e8f2669d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Makefile Outdated
Comment thread Makefile Outdated
@thomasqueirozb
thomasqueirozb added this pull request to the merge queue May 29, 2026
Merged via the queue into master with commit 12101a7 May 29, 2026
60 checks passed
@thomasqueirozb
thomasqueirozb deleted the chore/makefile-container-tool branch May 29, 2026 15:53
@github-actions github-actions Bot locked and limited conversation to collaborators May 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog Changes in this PR do not need user-facing explanations in the release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants