-
Notifications
You must be signed in to change notification settings - Fork 45
[22/n] [reconfigurator-cli] specify sled by serial number #8489
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
Merged
sunshowers
merged 2 commits into
main
from
sunshowers/spr/22n-reconfigurator-cli-specify-sled-by-serial-number
Jul 1, 2025
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this change overall quite a lot; there are other places (e.g., omdb) I've wanted to refer to sleds by serial instead of ID too. This might be too bikesheddy, but I don't love the syntax where UUIDs get parsed as-is and serials have a special prefix. What would you think about either of these?
2
)id:SOME-UUID
/serial:SERIAL
or as more of a CLI-like argument like--id SOME-UUID
/--serial SERIAL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I agree, in that I like that you can specify a serial number, but I also want to be able to do this with data from real systems whose serials don't start with
serial
. I don't think actual serials can overlap with uuids, so I like the idea of: if it parses as a uuid, make it a uuid. Otherwise, it's a serial number. @jgallagher was that what you meant as your first bullet?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! Although I misunderstood the
serial
prefix here. I saw the parsing check for it as a prefix and assumed it stripped that prefix (e.g., the serial number of this simulated sled is actually2
), but going back you're right that this only works if serials are literallyserialSomething
. So my first bullet is off a little because of that misunderstanding.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point re real sleds — thoughts on using the BRM prefix? Mostly I was concerned about a slightly typo'd UUID causing it to be treated as a serial, resulting in confusing error messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using BRM as a prefix for simulated sleds seems a little sketchy to me. A slightly typo'd UUID seems like it would give a pretty clear error message, right? "No sled with serial $ALMOST_A_UUID"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I mean "serial" for simulated sleds and "BRM" for real sleds loaded in via JSON.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think that's a bit more confusing than the error messages produced by explicitly checking for the
serial
andBRM
prefixes, but maybe it's okay anyway.edit: what I mean is changing this to:
serial
prefix, treat it as a serial numberBRM
prefix, treat it as a serial numberThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ug, sorry for just remembering this, but there are least three other sources of serial numbers:
g0
,g1
, ...?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh, hmm. In that case I guess treating any non-UUID strings as serials makes the most sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done -- the error messages are something like
which seems fine.