A fully self-contained 1.5k LoC Drone file isn't very maintainable, and
it makes it hard to reuse parts that are shared across multiple steps
(like SSH and git configuration).
We shouldn't rely on `git diff`. Even when the underlying source code
hasn't changed, and the cache is dumped with `sort_keys=True`, some of
the generated snippets of docstrings may change, leading the CI/CD
pipeline to get stuck in a push loop.
We should instead look for changes to the plugins, backends, events and
schemas folders before and after the CI/CD trigger to infer if we need
to regenerate the file.
The cache is no longer generated at runtime when the application runs -
which may take quite a while, especially on fresh installations.
A `components.json.gz` file is instead generated by the CI/CD process on
every commit to the main branch, and distributed with the package.
The application will read this file when the `inspect` plugin is first
initialized.
This also means that we can no longer cache the `install_cmds`, as they
change depending on the target OS. A new
`application.get_install_commands` action has now been made available to
the UI, so it can get the correct installation commands at runtime.
- `iputils` should be an explicit system dependency for `ping`.
Some minimal systems (like some Docker images) may not have the `ping`
command installed out of the box.
- `hid` and `marshmallow_dataclass` should be among the auto-mocked
modules.
`update-apt-repo` should first copy the existing repo root on the S3
bucket to a local temporary directory, so we don't do expensive (and
very slow) file operations on the s3fs filesystem.
After everything is done, we should do a current->old, tmp->current, rm old
dance to update the repo on S3.
Added an `add_dependencies` plugin to the Sphinx build process that
parses the manifest files of the scanned backends and plugins and
automatically generates the documentation for the required dependencies
and triggered events.
This means that those dependencies are no longer required to be listed
in the docstring of the class itself.
Also in this commit:
- Black/LINT for some integrations that hadn't been touched in a long
time.
- Deleted some leftovers from previous refactors (deprecated
`backend.mqtt`, `backend.zwave.mqtt`, `backend.http.request.rss`).
- Deleted deprecated `inotify` backend - replaced by `file.monitor` (see
#289).