-
-
Notifications
You must be signed in to change notification settings - Fork 59
Add adapter compatibility checks for GitHub installations #3120
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
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Apollon77 <[email protected]>
Co-authored-by: Apollon77 <[email protected]>
Co-authored-by: Apollon77 <[email protected]>
Co-authored-by: Apollon77 <[email protected]>
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.
@copilot remove changed the package-lock.json file from this PR. This was not part of the order.
Additional please adjust to not only check the Nogit flag when loading of the io-package was possible but do all checks normally done when adding an adapter with known details from repository object or such. But ensure that nogit is checked in all cases.
…lations Co-authored-by: Apollon77 <[email protected]>
Done in commit 52a8302. Reverted package-lock.json changes and enhanced the implementation to perform all adapter compatibility checks (OS compatibility, nogit flag, etc.) when io-package.json is successfully fetched from GitHub, not just the nogit check. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: Apollon77 <[email protected]>
Description
Fixes installation of adapters from GitHub URLs by validating adapter compatibility before installation begins. Previously, the CLI would install adapters from GitHub without checking if they support GitHub installation (
common.nogit
flag) or are compatible with the current system, resulting in startup errors due to missing files or incompatible configurations.Changes
This PR implements comprehensive pre-installation validation by fetching and checking the
io-package.json
file directly from GitHub:Added
_fetchAndValidateIoPackage
method that:io-package.json
from GitHub's raw content API using the commit hashAdded
_performAdapterChecks
method that performs compatibility checks:common.nogit
istrue
common.os
)Modified
installAdapterFromUrl
to validate before installation:https://github.com/user/repo
) and short format (user/repo#commit
)Behavior
When installing an adapter from GitHub:
If
common.nogit
istrue
: Installation is blocked with error:If OS is incompatible: Installation is blocked with error:
If
io-package.json
cannot be fetched: Installation continues with a warning that the adapter may not support GitHub installationIf the commit hash cannot be determined: Installation continues with a warning
If all checks pass: Installation proceeds normally
Example
For adapters like
ioBroker.modbus
that havecommon.nogit: true
, the command:Will now fail with a descriptive error instead of installing and causing runtime errors.
Closes #2623
Fixes #3119
Original prompt
Fixes #3119
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.