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

Reduce duplication introduced in weaveworks/common migration #357

Merged

Conversation

charleskorn
Copy link
Contributor

@charleskorn charleskorn commented Aug 11, 2023

What this PR does:

This PR fixes two instances of unnecessary duplication introduced in #342:

  • github.com/grafana/dskit/errors is removed in favour of Go's errors
  • github.com/grafana/dskit/grpcutil.IsGRPCContextCanceled() is removed in favour of IsCanceled in the same package.

As far as I can see, the first change has only minor impact outside this repository, and grpcutil.IsGRPCContextCanceled() is used in a single test in Mimir where the minor difference in behaviour is harmless.

Which issue(s) this PR fixes:

Fixes #343

Checklist

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

Copy link
Collaborator

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

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

Just wondering about why an error is dropped.


ErrNoUserID = errors.Error("no user id")
ErrDifferentUserIDPresent = errors.Error("different user ID already present")
ErrTooManyUserIDs = errors.Error("multiple user IDs present")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this error be dropped? Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not used anywhere.

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK thanks for clarifying.

@charleskorn charleskorn merged commit 8ea6de2 into main Aug 11, 2023
@charleskorn charleskorn deleted the charleskorn/weaveworks-common-to-dskit-migration-cleanup branch August 11, 2023 06:54
@charleskorn charleskorn mentioned this pull request Aug 15, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce duplication introduced in weaveworks/common migration
2 participants