feat(miner): test connection for PyASIC controller before adding it#47
Merged
markoceri merged 2 commits intoJul 2, 2026
Conversation
Add a way to verify a miner controller's connectivity from the creation form, without persisting it. - New POST /miner-controllers/test-connection endpoint returning a reachability result (MinerControllerTestConnectionSchema) - MinerActionService.test_miner_controller_connection() builds a fresh, uncached adapter and queries the device (status/hashrate/power/info) - AdapterService.build_miner_controller_adapter() instantiates an adapter from a controller entity without using/polluting the adapters cache - Frontend: 'Test Connection' button in the controller form, shown only for the PyASIC adapter type, with inline success/error feedback Refs edge-mining#46
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.
Summary
Adds a way to verify a miner controller's connectivity directly from the creation form, before the controller is saved.
POST /miner-controllers/test-connectionendpoint that tests a non-persisted controller configuration and returns a reachability result (MinerControllerTestConnectionSchema).MinerActionService.test_miner_controller_connection()builds a fresh, uncached adapter from the controller entity and queries the device (status / hashrate / power / device info) to confirm it is reachable.AdapterService.build_miner_controller_adapter()instantiates an adapter from a controller entity without using or polluting the adapters cache.Test plan
vue-tsc -bpasses (no type errors)ruff check/ruff formatclean on changed backend filesCloses #46