Add support for installing to a specific device from tophatctl#122
Merged
Add support for installing to a specific device from tophatctl#122
Conversation
241fdc2 to
7393956
Compare
7393956 to
14ba8f0
Compare
tmgsca
approved these changes
Mar 10, 2026
tmgsca
reviewed
Mar 10, 2026
There was a problem hiding this comment.
As an improvement for later, should we test this file?
Member
Author
There was a problem hiding this comment.
Yes, probably. It's very critical logic.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this change accomplish?
This change adds support for specifying a particular device to install a particular artifact to when installing via
tophatctl, Tophat's CLI remote controller. This is intended for advanced automated workflows where tooling may leverage Tophat's artifact downloading/installing functionality without user interaction.This feature will not be exposed to URL-based installs or Quick Launch as all user-initiated workflows should use user-selected devices in the Tophat menu in order to provide predictable behaviour.
How have you achieved it?
InstallRecipeso that it supports two types of device info:specificandhinted.hintedis the main workflow which relies on providing "hints" to Tophat as to the expected platform and destination of a particular artifact.specifictakes specific information about a particular device. Note: In both cases, Tophat still validates that the provided information matches that of the downloaded artifact and raises an error if hinted or specific device info does not match what was downloaded.UserSpecifiedRecipeConfigurationinto separate types for dealing with install commands and Quick Launch configuration commands, as these two features now rely on different data structures. Note: There should still be large overlap between these two types to provide a good user experience, with the main differentiator being the optionality of some properties.InstallationTicketMachineso that it knows how to interpret recipes with specific device information in order to produce tickets for these installation tasks.How can the change be tested?
tophatctl, create a JSON file that specifies a few different recipes, with one recipe using the example in theinstallcommand's documentation to provide a specific device.