{"record":{"id":"7b4b9d4cfdfa8cba","repo":"thanos-io/thanos","slug":"required-flag-details-not-provided","errorCode":null,"errorMessage":"required flag --details not provided","messagePattern":"required flag --details not provided","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/tools_bucket.go","lineNumber":1124,"sourceCode":"\t\t}\n\n\t\tbkt, err := client.NewBucket(logger, confContentYaml, component.Mark.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinsBkt := objstoretracing.WrapWithTraces(objstore.WrapWithMetrics(bkt, extprom.WrapRegistererWithPrefix(\"thanos_\", reg), bkt.Name()))\n\n\t\tvar ids []ulid.ULID\n\t\tfor _, id := range tbc.blockIDs {\n\t\t\tu, err := ulid.Parse(id)\n\t\t\tif err != nil {\n\t\t\t\treturn errors.Errorf(\"block.id is not a valid UUID, got: %v\", id)\n\t\t\t}\n\t\t\tids = append(ids, u)\n\t\t}\n\n\t\tif !tbc.removeMarker && tbc.details == \"\" {\n\t\t\treturn errors.Errorf(\"required flag --details not provided\")\n\t\t}\n\n\t\tctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)\n\t\tg.Add(func() error {\n\t\t\tfor _, id := range ids {\n\t\t\t\tif tbc.removeMarker {\n\t\t\t\t\terr := block.RemoveMark(ctx, logger, insBkt, id, promauto.With(nil).NewCounter(prometheus.CounterOpts{}), tbc.marker)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn errors.Wrapf(err, \"remove mark %v for %v\", id, tbc.marker)\n\t\t\t\t\t}\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tswitch tbc.marker {\n\t\t\t\tcase metadata.DeletionMarkFilename:\n\t\t\t\t\tif err := block.MarkForDeletion(ctx, logger, insBkt, id, tbc.details, promauto.With(nil).NewCounter(prometheus.CounterOpts{})); err != nil {\n\t\t\t\t\t\treturn errors.Wrapf(err, \"mark %v for %v\", id, tbc.marker)\n\t\t\t\t\t}\n\t\t\t\tcase metadata.NoCompactMarkFilename:","sourceCodeStart":1106,"sourceCodeEnd":1142,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/tools_bucket.go#L1106-L1142","documentation":"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.","triggerScenarios":"Thrown at cmd/thanos/tools_bucket.go:1124 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass --details explaining why the block is marked","Use --remove-marker if you intended to remove a mark"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}