Skip to content

Commit d44b095

Browse files
authored
Merge pull request #324 from softwarepub/feature/adr-for-plugin-init
adr for plugin init descision
2 parents d5f5fcc + 24baf04 commit d44b095

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

docs/adr/0013-plugin-init.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2022 German Aerospace Center (DLR), Forschungszentrum Jülich, Helmholtz-Zentrum Dresden-Rossendorf
3+
4+
SPDX-License-Identifier: CC-BY-SA-4.0
5+
-->
6+
# Installing plugins from the marketplace using hermes init
7+
8+
* Status: accepted
9+
* Deciders: nheeb
10+
* Date: 2025-03-04
11+
12+
## Context and Problem Statement
13+
14+
For a smooth user experience common plugins (those which are on the marketplace) should be installable via `hermes init`. That however means we need to decide on a way for the plugins to ask question during that same init process.
15+
16+
## Considered Options
17+
18+
* **Full install**: Plugins are installed locally during `hermes init`, can hook into the init process, and ask questions themselves to adjust the `hermes.toml` or similar.
19+
* **No install**: Plugins are only added to the CI pipeline as `pip install ...` lines. Additional questions for the init process could be added in the marketplace input mask along with a property name under which the answer is stored in the `hermes.toml`.
20+
* **Partial install**: Plugins are only added to the CI pipeline as `pip install ...` lines. Additional questions for the init process are handled in a "detached" script that is downloaded, executed locally, and then deleted again (this script may only have dependencies of Hermes).
21+
22+
## Decision Outcome
23+
24+
Chosen option: "**Partial install**", because it is a good trade-off between giving plugins more controll over their init process and not being too invasive with local installs.
25+
26+
## Pros and Cons of the Options
27+
28+
### Full install
29+
- (+) Plugins have a lot of control over how they design their own init process.
30+
- (+) The plugin can be used locally on the device directly if the user intends to do so.
31+
- (-) The plugin might be installed unnecessarily, as locally only the init part may be executed.
32+
- (-) The plugin may introduce many dependencies that the user doesn’t necessarily need.
33+
- (-) There could be environment complications (e.g., if Hermes was installed with `pipx`).
34+
35+
### No install
36+
- (+) Nothing is installed locally via `hermes init`.
37+
- (+) Overall, slightly less effort for the init command and plugin developers.
38+
- (-) The marketplace would need input masks for an arbitrary number of such questions.
39+
- (-) Plugins have little control over how they design their own init process.
40+
- (-) Plugins intended for local use must be installed manually.
41+
42+
### Partial install
43+
- (+) Nothing is installed locally via `hermes init`.
44+
- (+) Plugins have relatively high control over how they design their own init process.
45+
- (-) Plugins intended for local use must be installed manually.

0 commit comments

Comments
 (0)