Skip to content

Commit

Permalink
Remove cortexmetrics references (#1140)
Browse files Browse the repository at this point in the history
* Remove cortexmetrics references

Signed-off-by: Marco Pracucci <[email protected]>

* Replace 'Cortex' with 'Grafana Mimir' in touched files

Signed-off-by: Marco Pracucci <[email protected]>

* More cleanup

Signed-off-by: Marco Pracucci <[email protected]>
  • Loading branch information
pracucci authored Feb 9, 2022
1 parent 0fe836a commit 76f5b0b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 19 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Contributing to Cortex
# Contributing to Grafana Mimir

See [https://cortexmetrics.io/docs/contributing/](https://cortexmetrics.io/docs/contributing/).
See [https://github.com/grafana/mimir/tree/main/docs/sources/contributing](https://github.com/grafana/mimir/tree/main/docs/sources/contributing).
12 changes: 6 additions & 6 deletions docs/sources/contributing/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Welcome! We're excited that you're interested in contributing. Below are some ba

## Workflow

Cortex follows a standard GitHub pull request workflow. If you're unfamiliar with this workflow, read the very helpful [Understanding the GitHub flow](https://guides.github.com/introduction/flow/) guide from GitHub.
Grafana Mimir follows a standard GitHub pull request workflow. If you're unfamiliar with this workflow, read the very helpful [Understanding the GitHub flow](https://guides.github.com/introduction/flow/) guide from GitHub.

You are welcome to create draft PRs at any stage of readiness - this
can be helpful to ask for assistance or to develop an idea. But before
Expand All @@ -18,14 +18,14 @@ a piece of work is finished it should:
- Be organised into one or more commits, each of which has a commit message that describes all changes made in that commit ('why' more than 'what' - we can read the diffs to see the code that changed).
- Each commit should build towards the whole - don't leave in back-tracks and mistakes that you later corrected.
- Have unit and/or [integration](./how-integration-tests-work.md) tests for new functionality or tests that would have caught the bug being fixed.
- Include a CHANGELOG message if users of Cortex need to hear about what you did.
- Include a CHANGELOG message if users of Grafana Mimir need to hear about what you did.
- If you have made any changes to flags or config, run `make doc` and commit the changed files to update the config file documentation.

## Formatting

Cortex projects uses `goimports` tool (`go get golang.org/x/tools/cmd/goimports` to install) to format the Go files, and sort imports. We use goimports with `-local github.com/cortexproject/cortex` parameter, to put Cortex internal imports into a separate group. We try to keep imports sorted into three groups: imports from standard library, imports of 3rd party packages and internal Cortex imports. Goimports will fix the order, but will keep existing newlines between imports in the groups. We try to avoid extra newlines like that.
Grafana Mimir uses `goimports` tool (`go get golang.org/x/tools/cmd/goimports` to install) to format the Go files, and sort imports. We use goimports with `-local github.com/grafana/mimir` parameter, to put Grafana Mimir internal imports into a separate group. We try to keep imports sorted into three groups: imports from standard library, imports of 3rd party packages and internal Grafana Mimir imports. Goimports will fix the order, but will keep existing newlines between imports in the groups. We try to avoid extra newlines like that.

You're using an IDE you may find useful the following settings for the Cortex project:
You're using an IDE you may find useful the following settings for the Grafana Mimir project:

- [VSCode](vscode-goimports-settings.json)

Expand All @@ -39,7 +39,7 @@ git commit -s -m "Here is my signed commit"

You can find further instructions [here](https://github.com/probot/dco#how-it-works).

## Building Cortex
## Building Grafana Mimir

To build:

Expand Down Expand Up @@ -91,6 +91,6 @@ Please see the dedicated "[Design patterns and Code conventions](design-patterns

## Documentation

The Cortex documentation is compiled into a website published at [cortexmetrics.io](https://cortexmetrics.io/). Please see "[How to run the website locally](./how-to-run-website-locally.md)" for instructions.
The Grafana Mimir documentation is compiled into a website published at [grafana.com](https://grafana.com/). Please see "[How to run the website locally](./how-to-run-website-locally.md)" for instructions.

Note: if you attempt to view pages on Github, it's likely that you might find broken links or pages. That is expected and should not be addressed unless it is causing issues with the site that occur as part of the build.
2 changes: 1 addition & 1 deletion docs/sources/contributing/vscode-goimports-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"go.formatTool": "goimports",
"go.formatFlags": [
"-local",
"github.com/cortexproject/cortex"
"github.com/grafana/mimir"
],
"go.languageServerExperimentalFeatures": {
"format": false
Expand Down
3 changes: 1 addition & 2 deletions docs/sources/tools/mimirtool/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,14 @@ prometheus --storage.tsdb.path ./local-tsdb --config.file=<(echo "")

#### Overrides Exporter

The Overrides Exporter allows to continuously export [per tenant configuration overrides][runtime-config] as metrics. Optionally it can also export a presets file (cf. example [override config file] and [presets file]).
The Overrides Exporter allows to continuously export per tenant configuration overrides as metrics. Optionally it can also export a presets file (cf. example [override config file] and [presets file]).

```bash
mimirtool overrides-exporter --overrides-file overrides.yaml --presets-file presets.yaml
```

[override config file]: ./pkg/commands/testdata/overrides.yaml
[presets file]: ./pkg/commands/testdata/presets.yaml
[runtime-config]: https://cortexmetrics.io/docs/configuration/arguments/#runtime-configuration-file

#### Generate ACL Headers

Expand Down
8 changes: 2 additions & 6 deletions integration/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Mimir integration tests
# Grafana Mimir integration tests

See "[How integration tests work](https://cortexmetrics.io/docs/contributing/how-integration-tests-work/)".

## Owners

The `integration/e2e` package is used by other projects than Mimir. When modifying please ask @pracucci @bwplotka for review.
See "[How integration tests work](https://github.com/grafana/mimir/blob/main/docs/sources/contributing/how-integration-tests-work.md)".
2 changes: 1 addition & 1 deletion pkg/tenant/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ type MultiResolver struct {
// NewMultiResolver creates a tenant resolver, which allows request to have
// multiple tenant ids submitted separated by a '|' character. This enforces
// further limits on the character set allowed within tenants as detailed here:
// https://cortexmetrics.io/docs/guides/limitations/#tenant-id-naming)
// https://github.com/grafana/mimir/blob/main/docs/sources/guides/limitations.md)
func NewMultiResolver() *MultiResolver {
return &MultiResolver{}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/tenant/tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func JoinTenantIDs(tenantIDs []string) string {
}

// this checks if a rune is supported in tenant IDs (according to
// https://cortexmetrics.io/docs/guides/limitations/#tenant-id-naming)
// https://github.com/grafana/mimir/blob/main/docs/sources/guides/limitations.md)
func isSupported(c rune) bool {
// characters
if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') {
Expand Down

0 comments on commit 76f5b0b

Please sign in to comment.