Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manifest: change the serializeStart() to take a new Inputs arg #1139

Merged

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented Jan 14, 2025

The signature of serializeStart() is a bit unwieldy and when adding librepo based sources this prompted for this proposed cleanup. The idea is to just pass a single "Inputs" struct to the serialization so that if we add field we don't need to change the signature all over the place. It also makes the calls easier to read (IMHO).

This contains only mechanical changes so the review shouldbe straightforward.

Unfortunately there will be conflicts with https://github.com/osbuild/images/pull/1095/files but after this is merged the other PR will be a lot smaller

We should merge this relatively soon as pretty much any PR will conflict with this one.

[edit: happy to discuss naming, I think manifest.Inputs makes sense in the context and serializeStart(inputs) too but open for ideas, some other possibilities:

  • manifest.Sources
  • manifest.SerializationInputs, SerialkzationSources
  • manifest.Resources
  • manifest.InputData
  • ...
  • ?

The signature of serializeStart() is a bit unwieldy and when
adding librepo based sources this prompted for this proposed
cleanup. The idea is to just pass a single "Inputs" struct
to the serialization so that if we add field we don't need
to change the signature all over the place. It also makes
the calls easier to read (IMHO).
Copy link
Member

@thozza thozza left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks!

Copy link
Member

@supakeen supakeen left a comment

Choose a reason for hiding this comment

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

Quite like this; could argue the name but seems unnecessary.

@ondrejbudai ondrejbudai added this pull request to the merge queue Jan 14, 2025
Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

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

Love it!

Merged via the queue into osbuild:main with commit 5fafb37 Jan 14, 2025
19 checks passed
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.

5 participants