Skip to content

fix(tools): raise error in latestVersion when FLATCAR_VERSION is missing - #688

Draft
deepak0x wants to merge 1 commit into
flatcar:mainfrom
deepak0x:fix/fcl-fetch-version-none
Draft

fix(tools): raise error in latestVersion when FLATCAR_VERSION is missing#688
deepak0x wants to merge 1 commit into
flatcar:mainfrom
deepak0x:fix/fcl-fetch-version-none

Conversation

@deepak0x

@deepak0x deepak0x commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

latestVersion() in tools/fcl-fetch-version-data.py implicitly returned None when the fetched version.txt contained no FLATCAR_VERSION= line. That None propagated into the generated YAML as null, silently corrupting version data.

The fetch/HTTPError handling is now reordered so a successful fetch with no matching line raises RuntimeError instead of falling through. The existing 404 behavior (treated as unreleased) and the non-404 re-raise path are preserved.

Added tools/test_fcl_fetch_version_data.py covering the missing-version case, the 404 path, and the re-raise path.

Fixes flatcar/Flatcar#2365

latestVersion() in tools/fcl-fetch-version-data.py implicitly returned None
when the fetched version.txt contained no FLATCAR_VERSION= line. That None
propagated into the generated YAML as null, silently corrupting version data.

Reorder the fetch/HTTPError handling so a successful fetch with no matching
line now raises RuntimeError instead of falling through. Existing 404 behavior
(unreleased) and non-404 re-raise are preserved.

Fixes flatcar/flatcar-website#686

Signed-off-by: Deepak Bhagat <deepak988088@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: latestVersion silently returns None when FLATCAR_VERSION regex has no match

1 participant