Skip to content

Conversation

@sunshowers
Copy link
Contributor

This document will be fetched by installinator and used to determine which host phase 2 and control plane artifacts to fetch.

Unlike artifacts.json, this document is treated as an opaque blob by wicketd and Nexus (hence no KnownArtifactKind for it).

Created using spr 1.3.6-beta.1
Copy link
Collaborator

@iliana iliana left a comment

Choose a reason for hiding this comment

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

It seems like we're going through a lot of effort in the Omicron PR to avoid adding the installinator document as a KnownArtifactKind, and I don't really understand why. We don't need to expect that all KnownArtifactKinds are present in a repository, and "KnownArtifactKind" is intended to mean "does control plane software know what to do with this thing?", which Wicket will (and eventually Nexus too I presume).

Comment on lines 645 to 649
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum IncludeInstallinatorDocument {
Yes,
No,
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This really seems like it should be a bool.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I personally tend to avoid using bools in public APIs because it can be hard to tell what a particular bool means when looking at code. I don't feel strongly about this though.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I find it makes public APIs that much harder to use because you can't use an existing bool you might have from somewhere else; you have to go through the wordy if blah { LongStructName::Yes } else { LongStructName::No }, made even worse by our company-wide policy on 80-character lines :)

If this were a builder API we'd use a bool because the function would be a lot more obvious. I think it'd be nice to move to a builder eventually instead of continuing to tack on arguments here, but that's not something we need to do in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

all right, updated

Created using spr 1.3.6-beta.1
Copy link
Collaborator

@labbott labbott left a comment

Choose a reason for hiding this comment

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

LGTM

@sunshowers sunshowers merged commit 570f7cb into main Aug 1, 2025
5 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/add-support-for-an-installinator-document branch August 1, 2025 20:19
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.

4 participants