Problem
includeTags is a list of regular expressions, but the delimiter depends on how it is configured:
DIUN_DEFAULTS_INCLUDETAGS is decoded as a slice and uses commas as separators.
diun.include_tags Docker labels use semicolons as separators.
This is easy to miss and creates a regex-specific trap. A valid regex such as:
^(?:\\d+\\.){2,}\\d+-alpine$
contains a comma in {2,}. It works in diun.include_tags, but the same expression breaks through DIUN_DEFAULTS_INCLUDETAGS, because the comma is interpreted as a list separator.
Why this is confusing
The two configuration paths represent the same setting but use different delimiters, and the environment-variable delimiter cannot safely represent all regular expressions. The documentation shows the environment variable form but does not prominently document the delimiter behavior or this collision.
Suggested improvements
- Use the same delimiter for environment variables and labels, preferably one that does not commonly occur in regex syntax, or support a structured/repeated environment-variable form for regex lists.
- Clearly document the delimiter for both
DIUN_DEFAULTS_INCLUDETAGS and diun.include_tags.
- Add an example showing a regex containing a quantifier such as
{2,}.
- Consider validation or a more actionable error when a comma-split environment value produces invalid regex fragments.
The current workaround is to rewrite the environment regex without a comma, for example using explicit repetition and an optional repeated suffix.
Problem
includeTagsis a list of regular expressions, but the delimiter depends on how it is configured:DIUN_DEFAULTS_INCLUDETAGSis decoded as a slice and uses commas as separators.diun.include_tagsDocker labels use semicolons as separators.This is easy to miss and creates a regex-specific trap. A valid regex such as:
contains a comma in
{2,}. It works indiun.include_tags, but the same expression breaks throughDIUN_DEFAULTS_INCLUDETAGS, because the comma is interpreted as a list separator.Why this is confusing
The two configuration paths represent the same setting but use different delimiters, and the environment-variable delimiter cannot safely represent all regular expressions. The documentation shows the environment variable form but does not prominently document the delimiter behavior or this collision.
Suggested improvements
DIUN_DEFAULTS_INCLUDETAGSanddiun.include_tags.{2,}.The current workaround is to rewrite the environment regex without a comma, for example using explicit repetition and an optional repeated suffix.