Skip to content

Conversation

@jakub-nt
Copy link
Contributor

@jakub-nt jakub-nt commented Sep 8, 2025

No description provided.

@jakub-nt jakub-nt marked this pull request as ready for review September 8, 2025 13:47
Copy link
Contributor

@larsewi larsewi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 🚀 Some smaller comments

return download_urls, reported_checksums


def get_all_download_urls(min_version=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe s/decoupled/refactored/ in commit message?

else:
print("There are no files from other versions of masterfiles.")
print(
"The next conversion step is to handle files which have custom modifications."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This functions has grown to over 260 lines of code. Maybe we should start thinking about refactoring? The different steps could be separated into to different functions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a code implementation of a long interactive process like this, I don't mind the function being long.

Perhaps the implementation could be moved to convert.py?

try:
cfbs_convert_git_commit(commit_message)
except:
log.warning("Git commit failed, continuing without committing...")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be nice to have the option to abort here?

…sn't exist

Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
Comment on lines +57 to +58
download_urls[version] = HARDCODED_URLS[version]
reported_checksums[version] = HARDCODED_CHECKSUMS[version]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you could even have the URLs and SHAs as a tuple within the object

Suggested change
download_urls[version] = HARDCODED_URLS[version]
reported_checksums[version] = HARDCODED_CHECKSUMS[version]
download_urls[version], reported_checksums[version] = WHAT_EVER_YOU_WANT_TO CALL_IT[version]

Copy link
Member

@olehermanse olehermanse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, I might have more feedback after testing it again :)

@olehermanse olehermanse merged commit d6838f5 into cfengine:master Sep 26, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants