Skip yanked runtime versions when picking default image tags#2094
Open
jedcunningham wants to merge 1 commit intomainfrom
Open
Skip yanked runtime versions when picking default image tags#2094jedcunningham wants to merge 1 commit intomainfrom
jedcunningham wants to merge 1 commit intomainfrom
Conversation
The updates.astronomer.io runtime feed marks bad releases with `yanked: true` (e.g. 3.0-9), but the CLI ignored that field. Two code paths picked yanked versions: - getAstroRuntimeTag (used by `astro dev init`, `dev upgrade-runtime`, client image resolution, and cloud default-runtime lookups) - ResolveFloatingTag (used by `astro dev start --standalone` to map a floating tag in the user's Dockerfile to a pinned runtime version) Both now skip entries where Metadata.Yanked is true. The floating-tag selection is extracted into a pure helper so it can be unit-tested without the HTTP layer. Fixes #1923
Coverage Report for CI Build 0Coverage increased (+0.02%) to 39.399%Details
Uncovered Changes
Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
astro dev initandastro dev start --standalonewere selecting yanked Astro Runtime versions (e.g.3.0-9, yanked 2025-08-20 for broken connection-extras deserialization) because the version-selection logic only filtered onChannel, not on theyankedfield now present in theupdates.astronomer.io/astronomer-runtimeJSON feed.This PR:
Yanked/YankedReasontoRuntimeVersionMetadata.getAstroRuntimeTag(used bydev init,dev upgrade-runtime, client image resolution, and cloud default-runtime lookups).ResolveFloatingTag(used bydev start --standaloneto map a floating tag in the user's Dockerfile to a concrete pinned runtime version). The selection logic is extracted into a pure helper so it's testable without the HTTP layer.Note: existing projects that pin a floating tag in their Dockerfile (e.g.
FROM astrocrpublic.azurecr.io/runtime:3.0) aren't helped by this PR — Docker pulls whatever the registry says that tag points to. A separate RUNTIME-team issue will track repointing floating tags at yank time.🎟 Issue(s)
Fixes #1923
🧪 Functional Testing
The live
updates.astronomer.io/astronomer-runtimefeed has no "latest of a line is yanked" scenario — yanks so far haven't hit the top of a line. To exercise the fix end-to-end, I served a locally-doctored copy of the feed (marking the current top of each3.xline as yanked) viapython3 -m http.server, temporarily pointedRuntimeReleaseURLat it, and ran the CLI.go test ./airflow_versions/...passes.astro dev initgenerated a Dockerfile withFROM astrocrpublic.azurecr.io/runtime:3.1-13— the highest non-yanked version — skipping the yanked3.1-14,3.2-1, and3.2-2.FROM astrocrpublic.azurecr.io/runtime:3.1(floating),astro dev start --standaloneinstalledapache-airflow==3.1.7(from3.1-13, non-yanked), not3.1.8(which is the yanked3.1-14).📸 Screenshots
N/A
📋 Checklist
make testbefore taking out of draftmake lintbefore taking out of draft