bundle_failed_load_counter
broken for bundles without revision
#4822
Labels
bundle_failed_load_counter
broken for bundles without revision
#4822
Short description
At the moment, the
bundle_failed_load_counter
metric is broken for bundles without arevision
field in their.manifest
files.To determine whether a bundle load failed and the
bundle_failed_load_counter
should be incremented, OPA currently usesbundle.Code
andbundle.ActiveRevision
:opa/plugins/status/plugin.go
Line 484 in e9d8353
However, according to the docs, providing a
.manifest
file as well as specifying a revision is optional.So if there's a bundle without a revision,
bundle.ActiveRevision
will be""
and OPA will always assume a bundle load failed andbundle_failed_load_counter
will be incremented on every bundle load, regardless of success.Expected behavior
I'd expect
bundle_failed_load_counter
not to rely on the the revision of a bundle.I'd be happy to provide a fix, e.g. like
The text was updated successfully, but these errors were encountered: