Trust docker inspect exit code for runtime label detection by bmanan7 · Pull Request #1976 · astronomer/astro-cli
Description
- Ignore benign stderr produced by Podman’s docker shim when reading the runtime label so
astro deployno longer aborts for valid runtime images. - Update the warning copy to reference supported Astronomer runtime registries.
🎟 Issue(s)
Related #1975
🧪 Functional Testing
- Configure
dockerto print the Podman compatibility banner (shim wraps the real Docker binary). - Run
astro deploy -n <deployment name>with a Dockerfile usingFROM astrocrpublic.azurecr.io/runtime:3.1-2; deployment now proceeds past the runtime check. - Run
astro deploywith 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 testbefore taking out of draft - Ran
make lintbefore 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
marked this pull request as ready for review
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.
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?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters