Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update vendored cortex and add new replace overrides #3256

Merged
merged 4 commits into from
Jan 29, 2021

Conversation

jtlisi
Copy link
Contributor

@jtlisi jtlisi commented Jan 28, 2021

What this PR does / why we need it:

  • Updates the vendored Cortex to latest
  • Updates the K8s replace overrides to the same overrides used by upstream Cortex

@CLAassistant
Copy link

CLAassistant commented Jan 28, 2021

CLA assistant check
All committers have signed the CLA.

@jtlisi jtlisi force-pushed the 20210128_update_vendored_cortex branch from fd5ee1f to 9c87416 Compare January 28, 2021 21:16
Signed-off-by: Jacob Lisi <[email protected]>
@jtlisi jtlisi marked this pull request as ready for review January 28, 2021 21:39
@@ -90,7 +91,7 @@ func (t *table) compact() error {

errChan := make(chan error)
readObjectChan := make(chan string)
n := util.Min(len(objects), readDBsParallelism)
n := math.Min(len(objects), readDBsParallelism)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind making these consistently util_math?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@owen-d owen-d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few nits, then LGTM

@@ -11,6 +11,7 @@ import (
"github.com/cortexproject/cortex/pkg/chunk"
chunk_util "github.com/cortexproject/cortex/pkg/chunk/util"
"github.com/cortexproject/cortex/pkg/util"
"github.com/cortexproject/cortex/pkg/util/math"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"github.com/cortexproject/cortex/pkg/util/math"
util_math "github.com/cortexproject/cortex/pkg/util/math"

@@ -90,7 +91,7 @@ func (t *table) compact() error {

errChan := make(chan error)
readObjectChan := make(chan string)
n := util.Min(len(objects), readDBsParallelism)
n := math.Min(len(objects), readDBsParallelism)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
n := math.Min(len(objects), readDBsParallelism)
n := util_math.Min(len(objects), readDBsParallelism)

@@ -7,7 +7,7 @@ import (

"github.com/cortexproject/cortex/pkg/chunk"
chunk_util "github.com/cortexproject/cortex/pkg/chunk/util"
"github.com/cortexproject/cortex/pkg/util"
"github.com/cortexproject/cortex/pkg/util/math"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"github.com/cortexproject/cortex/pkg/util/math"
util_math "github.com/cortexproject/cortex/pkg/util/math"

@@ -34,7 +34,7 @@ func DoParallelQueries(ctx context.Context, tableQuerier TableQuerier, queries [
errs := make(chan error)

for i := 0; i < len(queries); i += maxQueriesPerGoroutine {
q := queries[i:util.Min(i+maxQueriesPerGoroutine, len(queries))]
q := queries[i:math.Min(i+maxQueriesPerGoroutine, len(queries))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
q := queries[i:math.Min(i+maxQueriesPerGoroutine, len(queries))]
q := queries[i:util_math.Min(i+maxQueriesPerGoroutine, len(queries))]

Signed-off-by: Jacob Lisi <[email protected]>
@owen-d owen-d merged commit c3d1937 into master Jan 29, 2021
@owen-d owen-d deleted the 20210128_update_vendored_cortex branch January 29, 2021 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants