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

Propogate SQLTransactionTimeout #5345

Merged
merged 3 commits into from
Aug 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ func (s *Server) newEndpointsServer(ctx context.Context, catalog catalog.Catalog
CacheReloadInterval: s.config.CacheReloadInterval,
EventsBasedCache: s.config.EventsBasedCache,
PruneEventsOlderThan: s.config.PruneEventsOlderThan,
SQLTransactionTimeout: s.config.SQLTransactionTimeout,
Copy link
Member

@amoore877 amoore877 Jul 31, 2024

Choose a reason for hiding this comment

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

it'd be nice to unit test, considering lack thereof caused the gap

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @amoore877 That was my first thought too. Unfortunately I dont know where to work in a unit test here as the fields just end up as unexported fields in the endpoints object.

Copy link
Member

Choose a reason for hiding this comment

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

ah, and there's no way to easily test with a running module and infer behavior from config I guess. sad times.

the most I've done sometimes in such cases at least verify those unexported fields (which would be accessible in a same-package test) are set as expected. it's one of those kinds of tests that seems silly at first, but catches simple mistakes.

better though would be that behavioral check, but that seems hard compared to the effort of the fix :)

AuditLogEnabled: s.config.AuditLogEnabled,
AuthPolicyEngine: authPolicyEngine,
BundleManager: bundleManager,
Expand Down
Loading