fix(tools): raise error in latestVersion when FLATCAR_VERSION is missing - #688
Draft
deepak0x wants to merge 1 commit into
Draft
fix(tools): raise error in latestVersion when FLATCAR_VERSION is missing#688deepak0x wants to merge 1 commit into
deepak0x wants to merge 1 commit into
Conversation
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>
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.
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