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

cmd/loki: minor consistency patch #6364

Merged
merged 2 commits into from
Jun 10, 2022
Merged

cmd/loki: minor consistency patch #6364

merged 2 commits into from
Jun 10, 2022

Conversation

michaelgrigoryan25
Copy link
Contributor

What this PR does / why we need it:

Consider this PR as a refactor.

Checklist

  • Documentation added
  • Tests updated
  • Is this an important fix or new feature? Add an entry in the CHANGELOG.md.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/upgrading/_index.md

@michaelgrigoryan25 michaelgrigoryan25 requested a review from a team as a code owner June 10, 2022 13:50
@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
-        distributor	-0.3%
+            querier	0%
+ querier/queryrange	0.1%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution @michaelgrigoryan25, but I'm hesitant to merge this because it might have side-effects that are not immediately obvious. To be honest I don't see the value this PR brings besides for slightly more idiomatic Go in this one file.

So maybe you can help me understand by elaborating on what the problem was that you encountered and why you submitted the PR?

@CLAassistant
Copy link

CLAassistant commented Jun 10, 2022

CLA assistant check
All committers have signed the CLA.

@michaelgrigoryan25
Copy link
Contributor Author

michaelgrigoryan25 commented Jun 10, 2022

Hey @dannykopping, thanks for reviewing my PR!

So maybe you can help me understand by elaborating on what the problem was that you encountered and why you submitted the PR?

It makes the code just a bit more idiomatic, and easier to read. Besides that, nothing has changed functionally.

I'm hesitant to merge this because it might have side effects that are not immediately obvious.

What side effects might it have? I don't think that it would have any, since all the errors are initialized separately (except the last one), and are immediately returned after being checked. Kindly correct me if I'm wrong though :)

Edit: Also, in the latest commit, I fixed a typo in the word initializing.

@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

@dannykopping
Copy link
Contributor

@michaelgrigoryan25 OK, thank you. Looking at it more closely I can't see any issues.
Please sign the CLA and I will merge it

@michaelgrigoryan25
Copy link
Contributor Author

Thank you @dannykopping. I have successfully signed the CLA.

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