hive otel: keep file_storage defined when the collector authenticates upstream
The hive collector's `settings` was `{ extensions.file_storage = …; … }
// lib.optionalAttrs senderAuth { extensions.oauth2client/swarm = …; }`.
`//` is shallow, so whenever senderAuth held (every valid hive config)
the right-hand `extensions` replaced the left one and `file_storage`
vanished, while `service.extensions` still listed it. `otelcol validate`
then failed the config.yaml build:
Error: service::extensions: references extension "file_storage" which is not configured
Broken by 02831fb5e (PR #5178), which added `extensions.file_storage`
to the left-hand attrset; the `//` block for the auth extension predates
it (cb787997bd). Both extensions now live in one `extensions` attrset.
module-eval-hive-otel gains a case that every name in
`service.extensions` is defined under `extensions`; it evaluates false
on the parent commit and true here.
Fixes #5240
This commit is contained in:
parent
c7fdedd08c
commit
38ee68c31d
2 changed files with 46 additions and 31 deletions
|
|
@ -111,6 +111,16 @@ let
|
|||
!(builtins.elem "deltatocumulative" hiveOtelPipelines.logs.processors)
|
||||
&& builtins.elem "deltatocumulative" hiveOtelPipelines.metrics.processors;
|
||||
}
|
||||
{
|
||||
# `otelcol validate` refuses a `service.extensions` entry with no
|
||||
# definition, and that runs when the unit is built, not in this suite.
|
||||
# `hiveOtel` authenticates upstream, so both extensions are listed;
|
||||
# the length clause keeps the check from passing on an empty list.
|
||||
name = "the hive collector defines every extension its service lists";
|
||||
ok =
|
||||
lib.length hiveOtelSettings.service.extensions == 2
|
||||
&& lib.all (e: hiveOtelSettings.extensions ? ${e}) hiveOtelSettings.service.extensions;
|
||||
}
|
||||
{
|
||||
# The counters that say telemetry is being LOST — refused, failed,
|
||||
# queue depth — are served on loopback and reach no store unless
|
||||
|
|
|
|||
Loading…
Reference in a new issue