boulder/sa
Aaron Gable b92581d620
Better compile-time type checking for gRPC server implementations (#7504)
Replaced our embeds of foopb.UnimplementedFooServer with
foopb.UnsafeFooServer. Per the grpc-go docs this reduces the "forwards
compatibility" of our implementations, but that is only a concern for
codebases that are implementing gRPC interfaces maintained by third
parties, and which want to be able to update those third-party
dependencies without updating their own implementations in lockstep.
Because we update our protos and our implementations simultaneously, we
can remove this safety net to replace runtime type checking with
compile-time type checking.

However, that replacement is not enough, because we never pass our
implementation objects to a function which asserts that they match a
specific interface. So this PR also replaces our reflect-based unittests
with idiomatic interface assertions. I do not view this as a perfect
solution, as it relies on people implementing new gRPC servers to add
this line, but it is no worse than the status quo which relied on people
adding the "TestImplementation" test.

Fixes https://github.com/letsencrypt/boulder/issues/7497
2024-05-28 09:26:29 -07:00
..
db Deprecate LeaseCRLShards feature (#7009) 2023-08-07 15:17:00 -07:00
db-next sa: eliminate requestedNames table (#7471) 2024-05-06 09:15:51 -07:00
db-users sa: eliminate requestedNames table (#7471) 2024-05-06 09:15:51 -07:00
proto Use generic types for gRPC stream implementations (#7501) 2024-05-24 13:54:25 -07:00
satest Finish migration from int64 timestamps to timestamppb (#7142) 2023-11-27 13:37:31 -08:00
testdata Support writing OCSP to Redis on revocation (#6012) 2022-04-01 13:59:56 -06:00
database.go sa: eliminate requestedNames table (#7471) 2024-05-06 09:15:51 -07:00
database_test.go SA: Enforce microsecond granularity for long_query_time and max_statement_time (#7224) 2023-12-21 13:06:30 -05:00
ip_range_test.go Remove all stray copyright headers and appends the initial line to LICENSE.txt (#1853) 2016-05-31 12:32:04 -07:00
metrics.go sa: refactor db initialization (#6930) 2023-06-13 10:15:40 -07:00
migrations.sh test: Support multiple database schemas (#6344) 2022-09-07 14:59:08 -07:00
model.go sa: eliminate requestedNames table (#7471) 2024-05-06 09:15:51 -07:00
model_test.go SA: store and return certificate profile name (#7352) 2024-03-20 13:08:31 -04:00
rate_limits.go Finish migration from int64 timestamps to timestamppb (#7142) 2023-11-27 13:37:31 -08:00
rate_limits_test.go Replace explicit int loops with range-over-int (#7434) 2024-04-22 10:34:51 -07:00
sa.go Better compile-time type checking for gRPC server implementations (#7504) 2024-05-28 09:26:29 -07:00
sa_test.go Better compile-time type checking for gRPC server implementations (#7504) 2024-05-28 09:26:29 -07:00
saro.go Better compile-time type checking for gRPC server implementations (#7504) 2024-05-28 09:26:29 -07:00
sysvars.go SA: Check MariaDB system variables at startup (#6791) 2023-04-18 11:02:33 -04:00
sysvars_test.go SA: Check MariaDB system variables at startup (#6791) 2023-04-18 11:02:33 -04:00
type-converter.go Upgrade go-jose from v2.6.1 to v.4.0.1 (#7345) 2024-04-02 17:49:51 -04:00
type-converter_test.go Upgrade go-jose from v2.6.1 to v.4.0.1 (#7345) 2024-04-02 17:49:51 -04:00