Skip to content

Conversation

@James9074
Copy link
Contributor

@James9074 James9074 commented Jun 17, 2025

As per #2386, this PR uncomments gocritic, govet, and testifylint, and resolves all outstanding lint findings. Note that govet did not actually return anything, but gocritic and testifylint did. Those were resolved, along with a number of stubborn yaml comment spacing complaints within the github workflows yamls.

I generally resolved each finding in its own commit, for clarity. Additionally, I ran the full suite of unit tests after each fix and ensured no bloat in test execution time. The test suite took ~2.5 minutes before and after all changes on my machine.

Before:

See this for the raw output of all findings as of main/HEAD

After:

mage lint:all                                                                                                                                                    ✔  at 04:25:57 PM  
generating buf
generating go
Generating options for common.SchemaInformation...
Generated 1 options
Generating options for graph.ConcurrencyLimits...
Generated 1 options
Generating options for options.ExperimentalServerOptions...
Generated 1 options
Generating options for datastore.ConnPoolConfig...
Generated 1 options
Generating options for datastore.Config...
Generated 1 options
Generating options for datastore.RelIntegrityKey...
Generated 1 options
Generating options for server.CacheConfig...
Generated 1 options
Generating options for server.MiddlewareOption...
Generated 1 options
Generating options for server.Config...
Generated 1 options
Generating options for testserver.Config...
Generated 1 options
Generating options for util.GRPCServerConfig, HTTPServerConfig...
Generated 1 options
Generating options for options.QueryOptions, ReverseQueryOptions, RWTOptions...
Generated 1 options
Generating options for options.DeleteOptions...
Generated 1 options
running vulncheck
formatting go
running golangci-lint
running analyzers
0 issues.

@github-actions github-actions bot added area/cli Affects the command line area/schema Affects the Schema Language area/api v1 Affects the v1 API area/datastore Affects the storage system area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) area/dispatch Affects dispatching of requests area/api http Affects the HTTP Gateway API labels Jun 17, 2025
@github-actions
Copy link

github-actions bot commented Jun 17, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@James9074
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

authzedbot added a commit to authzed/cla that referenced this pull request Jun 17, 2025
tstirrat15
tstirrat15 previously approved these changes Jun 18, 2025
Copy link
Contributor

@tstirrat15 tstirrat15 left a comment

Choose a reason for hiding this comment

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

This looks good to me!

@James9074
Copy link
Contributor Author

@tstirrat15 Anything else I need to get this merged before it gets stale? Unable to merge it myself - not sure if @vroldanbet has to review or if he was auto-included.

Copy link
Contributor

@vroldanbet vroldanbet left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! ✨ I understand it can get stale easily, but please be patient while we review this low-priority PR; it's a bit lengthy.

@James9074 James9074 requested a review from vroldanbet June 19, 2025 18:21
@tstirrat15
Copy link
Contributor

@James9074 just wanted to update - this is still something we're interested in and we haven't had the bandwidth to look at it yet. Apologies for the delay.

@tstirrat15
Copy link
Contributor

@James9074 we're finally done with the push and should have some more bandwidth now. do you have the time and energy to get this rebased and ready? If not, we can take over the PR and make sure that you're attributed.

@James9074
Copy link
Contributor Author

@James9074 we're finally done with the push and should have some more bandwidth now. do you have the time and energy to get this rebased and ready? If not, we can take over the PR and make sure that you're attributed.

Awesome! No worries, I'll rebase this week and resubmit for review.

Copy link
Contributor

@vroldanbet vroldanbet left a comment

Choose a reason for hiding this comment

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

Thanks with your patience with this one, we appreciate it ✨
I finished reviewing all the files. There are a handful of things I'd like to clarify before we move forward.

Please address the conflicts and I'll review again.

Comment on lines +146 to +152
var nsNotFoundErr datastore.NamespaceNotFoundError
if err == nil || !errors.As(err, &nsNotFoundErr) {
t.Errorf("expected NamespaceNotFoundError, got: %v", err)
}
if wcache.namespaceCache.inFallbackMode {
t.Errorf("expected inFallbackMode to be false")
}
Copy link
Contributor

@vroldanbet vroldanbet Aug 27, 2025

Choose a reason for hiding this comment

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

What happened here? require ultimately causes t to fail. And why does not abide by the same recommendations described here?

same for all other instances in this file


if index > len(expected)-1 {
tc.Require.Fail("expected %s, but found no additional results", expectedStr)
tc.Require.Fail("expected more results, but found no additional results", expectedStr)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you tell me what you're trying to fix here? How is expected more results, but found no additional results a better error message?

leftOps := collapseOps(leftOperation, lookup)
rightOps := collapseOps(rightOperation, lookup)
ops := append(leftOps, rightOps...)
ops := append(collapseOps(leftOperation, lookup), collapseOps(rightOperation, lookup)...)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you tell me the reason for this change?

@James9074
Copy link
Contributor Author

@tstirrat15 Feel free to take this one over or close it out, unfortunately I'm short on time this quarter and don't think I'll be able to wrap this up before it's too stale.

@tstirrat15
Copy link
Contributor

Sounds good. Thank you so much for the work you put into it!

@miparnisari
Copy link
Contributor

Thank you @James9074! Your hard work doesn't go unnoticed. We'll take this over the finish line :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api http Affects the HTTP Gateway API area/api v1 Affects the v1 API area/cli Affects the command line area/datastore Affects the storage system area/dispatch Affects dispatching of requests area/schema Affects the Schema Language area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants