Skip to content

Add support for installing to a specific device from tophatctl#122

Merged
lfroms merged 1 commit intomainfrom
specific-device-tophatctl
Mar 10, 2026
Merged

Add support for installing to a specific device from tophatctl#122
lfroms merged 1 commit intomainfrom
specific-device-tophatctl

Conversation

@lfroms
Copy link
Member

@lfroms lfroms commented Mar 9, 2026

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?

  • By updating InstallRecipe so that it supports two types of device info: specific and hinted. hinted is the main workflow which relies on providing "hints" to Tophat as to the expected platform and destination of a particular artifact. specific takes 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.
  • By forking UserSpecifiedRecipeConfiguration into 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.
  • By updating InstallationTicketMachine so that it knows how to interpret recipes with specific device information in order to produce tickets for these installation tasks.
    • Recipes with specific devices take full priority. Any devices explicitly specified are "claimed" first and will not receive any other tickets based on looser recipe requirements.

How can the change be tested?

  1. Using tophatctl, create a JSON file that specifies a few different recipes, with one recipe using the example in the install command's documentation to provide a specific device.
  2. Ensure that the recipes for the artifacts you provide are installed to expected devices with identical behaviour to the current version of Tophat, with the only exception being that "specific device" entries are prioritized over UI-based device selection and are processed for those devices correctly.

@lfroms lfroms self-assigned this Mar 9, 2026
@lfroms lfroms force-pushed the specific-device-tophatctl branch from 241fdc2 to 7393956 Compare March 9, 2026 23:55
@lfroms lfroms force-pushed the specific-device-tophatctl branch from 7393956 to 14ba8f0 Compare March 10, 2026 00:02
Copy link

Choose a reason for hiding this comment

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

As an improvement for later, should we test this file?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, probably. It's very critical logic.

@lfroms lfroms merged commit 94f613a into main Mar 10, 2026
3 checks passed
@lfroms lfroms deleted the specific-device-tophatctl branch March 10, 2026 17:30
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.

2 participants