-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Background
Some agents cannot perform restarts and package upgrades themselves, which means there must be a supervisor.
Agents with integrated OpAmp client can connect directly or via a supervisor to a backend, which creates a conflict in capabilities depending on whether the agent is directly connected or connected via a supervisor.
The capabilities in question are:
AgentCapabilities.AcceptsRestartCommand
AgentCapabilities.AcceptsPackages
Possible solutions
AgentCapabilities.AcceptsRestartCommand seems easy to handle. I think in 99% of cases, the supervisor doesn't need to consult the agent to determine, if it can perform restart or not. So the agent always reports missing the capability and the supervisor adds this capability when relaying the message to the backend.
AgentCapabilities.AcceptsPackages seems quite tricky. Usually, there is a global installation which you can possibly update using a supervisor. On the other hand, it's possible that the agent is integrated into a customer's application at build time (like using a NuGet package), which definitely is not upgradable. Now the agent must indicate that the package is locked and not upgradable, so the supervisor is not going to add the capability.
These cases can be solved by custom capabilities in my mind (even though "capability" seems like an incorrect word for this). I'm just wondering if such standard cases can be more clearly defined... or does anybody have better opinions?