Skip to content

Conversation

@aknuds1
Copy link
Contributor

@aknuds1 aknuds1 commented Aug 20, 2021

What this PR does:
In this PR I propose to refactor to use dskit's kv package instead of pkg/ring/kv.

Which issue(s) this PR fixes:

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

We should upgrade Thanos first in a separate PR and double check all other dependencies which are getting updated here.

For example, I think the grpc 1.39.0 upgrade is not safe here, because of the change introduced by grpc/grpc-go#4416.

@aknuds1
Copy link
Contributor Author

aknuds1 commented Aug 20, 2021

We should upgrade Thanos first in a separate PR and double check all other dependencies which are getting updated here.

For example, I think the grpc 1.39.0 upgrade is not safe here, because of the change introduced by grpc/grpc-go#4416.

@pracucci thanks for the feedback, I can make a PR to upgrade in another PR then.

@aknuds1 aknuds1 force-pushed the chore/use-dskit-kv branch 6 times, most recently from 5bb503d to 13a6d26 Compare August 27, 2021 09:07
@aknuds1 aknuds1 force-pushed the chore/use-dskit-kv branch from 13a6d26 to 6d04cae Compare August 27, 2021 09:17
@aknuds1 aknuds1 marked this pull request as ready for review August 27, 2021 09:20
@aknuds1 aknuds1 requested a review from pracucci August 27, 2021 09:20
@aknuds1
Copy link
Contributor Author

aknuds1 commented Aug 27, 2021

The PR should be ready for review now.

Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

Very good job! Flawless to me 👏

Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

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

Good job, thank you!

@pstibrany pstibrany merged commit 32b1b40 into cortexproject:master Aug 27, 2021
Copy link
Contributor

@bboreham bboreham left a comment

Choose a reason for hiding this comment

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

Couple of thoughts.

# IP, hostname or an entry specified in the DNS Service Discovery format (see
# https://cortexmetrics.io/docs/configuration/arguments/#dns-service-discovery
# for more details).
# IP, hostname or an entry specified in the DNS Service Discovery format.
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this changed because we didn't want a reference from dskit to Cortex, but should we not still have a reference to the details?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bboreham what would be a good way to solve this? I personally don't know.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could add the text from https://cortexmetrics.io/docs/configuration/arguments/#dns-service-discovery to the dskit repo, then point to it there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bboreham good suggestion, thanks.

Comment on lines +128 to +133

// Make sure that no DNS failures occurred.
// No actual DNS lookups are necessarily performed, so we can't really assert on that.
mlMatcher := labels.MustNewMatcher(labels.MatchEqual, "name", "memberlist")
require.NoError(t, cortex1.WaitSumMetricsWithOptions(e2e.Equals(0), []string{"cortex_dns_failures_total"}, e2e.WithLabelMatchers(mlMatcher)))
require.NoError(t, cortex2.WaitSumMetricsWithOptions(e2e.Equals(0), []string{"cortex_dns_failures_total"}, e2e.WithLabelMatchers(mlMatcher)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain why this is relevant to the PR?

Copy link
Contributor Author

@aknuds1 aknuds1 Aug 27, 2021

Choose a reason for hiding this comment

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

@bboreham it's in order to catch a potential regression where the metric will become dns_failures_total unless the Cortex code passes a registerer with prefix cortex_ to dskit/kv. Does that clarify the connection to the PR?

The test was added due to initially having this regression while working on the PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

That would be a good thing to explain in the commit message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bboreham OK will keep it in mind for the future.

@aknuds1 aknuds1 deleted the chore/use-dskit-kv branch August 27, 2021 10:49
aknuds1 added a commit to aknuds1/cortex that referenced this pull request Jan 13, 2022
aknuds1 added a commit to aknuds1/cortex that referenced this pull request Jan 13, 2022
pracucci pushed a commit that referenced this pull request Jan 13, 2022
alvinlin123 pushed a commit to ac1214/cortex that referenced this pull request Jan 14, 2022
alvinlin123 pushed a commit to ac1214/cortex that referenced this pull request Jan 14, 2022
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.

4 participants