diff --git a/CHANGELOG.md b/CHANGELOG.md index f9a21790357..3ac3a5b59e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel - [2603](https://github.com/thanos-io/thanos/pull/2603) Store/Querier: Significantly optimize cases where StoreAPIs or blocks returns exact overlapping chunks (e.g Store GW and sidecar or brute force Store Gateway HA). - [#2671](https://github.com/thanos-io/thanos/pull/2671) *breaking* Tools: bucket replicate flag `--resolution` is now in Go duration format. - [#2671](https://github.com/thanos-io/thanos/pull/2671) Tools: bucket replicate now replicates by default all blocks. - +- [#2739](https://github.com/thanos-io/thanos/pull/2739) Changed `bucket tool bucket verify` `--id-whitelist` flag to `--id-allowlist`. ### Added diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 91b6c28c2df..5785fd6ab60 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,6 +53,14 @@ method with the owners of this repository before making a change. Adding a large new feature or/and component to Thanos should be done by first creating a [proposal](docs/proposals) document outlining the design decisions of the change, motivations for the change, and any alternatives that might have been considered. +## General Naming + +In the code and documentation prefer non-offensive terminology, for example: + +* `allowlist` / `denylist` (instead of `whitelist` / `blacklist`) +* `primary` / `replica` (instead of `master` / `slave`) +* `openbox` / `closedbox` (instead of `whitebox` / `blackbox`) + ## Components Naming Thanos is a distributed system composed with several services and CLI tools as listed [here](cmd/thanos). diff --git a/cmd/thanos/tools_bucket.go b/cmd/thanos/tools_bucket.go index 9d7d27de4d9..dd4e9eb82c1 100644 --- a/cmd/thanos/tools_bucket.go +++ b/cmd/thanos/tools_bucket.go @@ -84,7 +84,7 @@ func registerBucketVerify(m map[string]setupFunc, root *kingpin.CmdClause, name Short('r').Default("false").Bool() issuesToVerify := cmd.Flag("issues", fmt.Sprintf("Issues to verify (and optionally repair). Possible values: %v", allIssues())). Short('i').Default(verifier.IndexIssueID, verifier.OverlappedBlocksIssueID).Strings() - idWhitelist := cmd.Flag("id-whitelist", "Block IDs to verify (and optionally repair) only. "+ + ids := cmd.Flag("id", "Block IDs to verify (and optionally repair) only. "+ "If none is specified, all blocks will be verified. Repeated field").Strings() deleteDelay := modelDuration(cmd.Flag("delete-delay", "Duration after which blocks marked for deletion would be deleted permanently from source bucket by compactor component. "+ "If delete-delay is non zero, blocks will be marked for deletion and compactor component is required to delete blocks from source bucket. "+ @@ -153,18 +153,18 @@ func registerBucketVerify(m map[string]setupFunc, root *kingpin.CmdClause, name } var idMatcher func(ulid.ULID) bool = nil - if len(*idWhitelist) > 0 { - whilelistIDs := map[string]struct{}{} - for _, bid := range *idWhitelist { + if len(*ids) > 0 { + idsMap := map[string]struct{}{} + for _, bid := range *ids { id, err := ulid.Parse(bid) if err != nil { - return errors.Wrap(err, "invalid ULID found in --id-whitelist flag") + return errors.Wrap(err, "invalid ULID found in --id-allowlist flag") } - whilelistIDs[id.String()] = struct{}{} + idsMap[id.String()] = struct{}{} } idMatcher = func(id ulid.ULID) bool { - if _, ok := whilelistIDs[id.String()]; !ok { + if _, ok := idsMap[id.String()]; !ok { return false } return true diff --git a/docs/components/tools.md b/docs/components/tools.md index a5ca3c853c0..f88752d2103 100644 --- a/docs/components/tools.md +++ b/docs/components/tools.md @@ -273,8 +273,7 @@ Flags: Issues to verify (and optionally repair). Possible values: [duplicated_compaction index_issue overlapped_blocks] - --id-whitelist=ID-WHITELIST ... - Block IDs to verify (and optionally repair) only. If + --id=ID ... Block IDs to verify (and optionally repair) only. If none is specified, all blocks will be verified. Repeated field --delete-delay=0s Duration after which blocks marked for deletion would