Trust docker inspect exit code for runtime label detection by bmanan7 · Pull Request #1976 · astronomer/astro-cli

@bmanan7

Description

  • Ignore benign stderr produced by Podman’s docker shim when reading the runtime label so astro deploy no longer aborts for valid runtime images.
  • Update the warning copy to reference supported Astronomer runtime registries.

🎟 Issue(s)

Related #1975

🧪 Functional Testing

  • Configure docker to print the Podman compatibility banner (shim wraps the real Docker binary).
  • Run astro deploy -n <deployment name> with a Dockerfile using FROM astrocrpublic.azurecr.io/runtime:3.1-2; deployment now proceeds past the runtime check.
  • Run astro deploy with a non-runtime base image (FROM python:3.11-slim); warning still fires and deploy cancels (confirming real failures remain intact).

📸 Screenshots

Add screenshots to illustrate the validity of these changes.

📋 Checklist

  • Rebased from the main (or release if patching) branch (before testing)
  • Ran make test before taking out of draft
  • Ran make lint before taking out of draft
  • Added/updated applicable tests
  • Tested against Astro-API (if necessary).
  • Tested against Houston-API and Astronomer (if necessary).
  • Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • Updated any related documentation

@bmanan7 bmanan7 marked this pull request as ready for review

November 1, 2025 09:19

@coveralls-official

karankhanchandani

Choose a reason for hiding this comment

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

Thanks for the PR. LGTM. Need additional review from astro team as this will affect their functionality as well.

neel-astro

Comment on lines +521 to +522

if execWarn := strings.TrimSpace(stderr.String()); execWarn != "" {
logger.Debugf("container runtime stderr while inspecting %s: %s", imageName, execWarn)

Choose a reason for hiding this comment

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

Why are we ignoring this? It's still not clear to me 🤔. The image that is mentioned in the issue description astrocrpublic.azurecr.io/astronomer/astro-runtime:3.1-2 is invalid, and thus the get label fails at this point, right?

Choose a reason for hiding this comment

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

Oops, I didn’t update the issue description correctly before - that's on me. The screenshot was still accurate. I've now updated the description; please take another look and let me know if it makes sense.

Choose a reason for hiding this comment

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

Can we then specifically ignore when stderr has the string Emulate Docker CLI using podman, so that we still catch other issues?