thanos-io/thanos · error
required flag --details not provided
Error message
required flag --details not provided
What it means
A flag-combination guard in the mark-block command: marking a block for deletion or no-compaction without --remove-marker requires a --details string explaining the manual action. The guard fires purely from missing CLI input to enforce an auditable reason for the mark.
Solutions
- Pass --details explaining why the block is marked
- Use --remove-marker if you intended to remove a mark
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cmd/thanos/tools_bucket.go:1124 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07).
Data as JSON: /api/errors/7b4b9d4cfdfa8cba.
Report an issue: GitHub.
Appendix: source
Thrown at cmd/thanos/tools_bucket.go:1124
}
bkt, err := client.NewBucket(logger, confContentYaml, component.Mark.String(), nil)
if err != nil {
return err
}
insBkt := objstoretracing.WrapWithTraces(objstore.WrapWithMetrics(bkt, extprom.WrapRegistererWithPrefix("thanos_", reg), bkt.Name()))
var ids []ulid.ULID
for _, id := range tbc.blockIDs {
u, err := ulid.Parse(id)
if err != nil {
return errors.Errorf("block.id is not a valid UUID, got: %v", id)
}
ids = append(ids, u)
}
if !tbc.removeMarker && tbc.details == "" {
return errors.Errorf("required flag --details not provided")
}
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
g.Add(func() error {
for _, id := range ids {
if tbc.removeMarker {
err := block.RemoveMark(ctx, logger, insBkt, id, promauto.With(nil).NewCounter(prometheus.CounterOpts{}), tbc.marker)
if err != nil {
return errors.Wrapf(err, "remove mark %v for %v", id, tbc.marker)
}
continue
}
switch tbc.marker {
case metadata.DeletionMarkFilename:
if err := block.MarkForDeletion(ctx, logger, insBkt, id, tbc.details, promauto.With(nil).NewCounter(prometheus.CounterOpts{})); err != nil {
return errors.Wrapf(err, "mark %v for %v", id, tbc.marker)
}
case metadata.NoCompactMarkFilename:View on GitHub (pinned to 35b8b99117)