Skip to content

Conversation

@dongsupark
Copy link
Member

@dongsupark dongsupark commented Sep 26, 2025

Before PR #87, target_filename was almost always None, which had hidden an issue of setting pkg_verified. In case of target_filename being a valid String, for example oem-azure.gz, pkg_verified ended up having an extension .gz, which is not expected.

Now that the PR was merged, DownloadVerify module gets created with .target_filename(args.target_filename.unwrap_or(TARGET_FILENAME_DEFAULT.into())), where TARGET_FILENAME_DEFAULT is with .gz extension. That uncovered the hidden issue.

Fix that with explicitly setting extension .raw for both a valid String and None for the input string.

Since the target filename could vary for many update payload types and OEMs, it does not make sense to set a default filename to a specific target file name. Remove TARGET_FILENAME_DEFAULT and PAYLOAD_URL_DEFAULT.

Let target_filename() & payload_url() take Option<String> parameter, to be able to pass either Some(String) or None, to fix a wrong target_filename issue.

Testing done

Local test passed, Jenkins CI will run soon.

Before PR #87, target_filename was
almost always `None`, which had covered an issue of setting pkg_verified.
In case of target_filename being a valid String, for example
"oem-azure.gz", pkg_verified ended up having an extension `.gz`, which
is not expected.

Now that the PR was merged, DownloadVerify module gets created with
.target_filename(args.target_filename.unwrap_or(TARGET_FILENAME_DEFAULT.into())),
where TARGET_FILENAME_DEFAULT is with ".gz" extension. That uncovered
the hidden issue.

Fix that with explicitly setting extension ".raw" for both a valid
String and None for the input string.

Signed-off-by: Dongsu Park <[email protected]>
@dongsupark dongsupark requested a review from a team as a code owner September 26, 2025 15:37
dongsupark added a commit to flatcar/scripts that referenced this pull request Sep 26, 2025
dongsupark added a commit to flatcar/scripts that referenced this pull request Sep 27, 2025
Since the target filename could vary for many update payload types and
OEMs, it does not make sense to set a default filename to a specific
target file name. Remove TARGET_FILENAME_DEFAULT and PAYLOAD_URL_DEFAULT.

Let target_filename() & payload_url() take Option<String> parameter, to
be able to pass either Some(String) or None, to fix a wrong target_filename
issue.

Signed-off-by: Dongsu Park <[email protected]>
@dongsupark dongsupark force-pushed the dongsu/fix-pkg-verified-extension branch from 01c4c4b to 2ec9c23 Compare September 27, 2025 13:31
dongsupark added a commit to flatcar/scripts that referenced this pull request Sep 27, 2025
@dongsupark
Copy link
Member Author

CI of flatcar/scripts#3310 passed, so this PR fixes the regression.

@dongsupark dongsupark merged commit c22367c into main Sep 29, 2025
4 checks passed
@dongsupark dongsupark deleted the dongsu/fix-pkg-verified-extension branch September 29, 2025 16:49
dongsupark added a commit to flatcar/scripts that referenced this pull request Sep 30, 2025
sambonbonne pushed a commit to sambonbonne/flatcar-scripts that referenced this pull request Oct 3, 2025
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.

3 participants