Skip to main content

Module tag

Module tag 

Source
Expand description

Implementation of the tag sub-command and shared tag utilities.

Tag format rules:

  • A stored tag is a non-empty dot-separated sequence of segments.
  • Each segment consists of alphanumeric characters and hyphens only.
  • Tags may NOT end with .* (that syntax is reserved for list filter patterns).
  • A list filter pattern is either an exact stored tag, or a stored-tag prefix terminated with .* (e.g. hoge.*, hoge.fuga.*).

Structs§

InvalidTag
Error type for invalid tag values or filter patterns.
TagOpts
Options for the tag set sub-command.

Functions§

dedup_tags
Deduplicate tags, preserving first-seen order, and validate each one.
execute
Execute tag set: replace tags on an existing job’s meta.json atomically.
matches_all_patterns
Check whether a job’s tags satisfy all filter patterns (logical AND).
validate_filter_pattern
Validate a list filter pattern.
validate_stored_tag
Validate a stored tag value.