Scanner.CheckGraphQLAvailability (in internal/scanner/scanner.go) contains a
stray assignment that writes the GraphQL availability result into the gRPC
availability field:
func (s *Scanner) CheckGraphQLAvailability(ctx context.Context) {
...
available, err := s.graphqlClient.CheckAvailability(ctx) // GraphQL result
...
s.db.IsGrpcAvailable = available // <-- BUG: sets gRPC availability
...
s.db.IsGraphQLAvailable = available // correct assignment
}
This looks like a copy/paste from CheckGRPCAvailability. The line overwrites
whatever CheckGRPCAvailability previously set on s.db.IsGrpcAvailable with the
GraphQL probe's result.
Impact
Whenever both checks run, gRPC availability ends up reflecting the GraphQL probe
outcome instead of the gRPC one. Depending on the relative results this can:
- mark gRPC available when it is not (GraphQL up, gRPC down) → gRPC tests attempted
against an unavailable endpoint, or
- mark gRPC unavailable when it is (GraphQL down, gRPC up) → gRPC test suite silently
skipped.
Either way the gRPC section of the report can be wrong for reasons unrelated to gRPC.
Fix
Remove the stray line. CheckGRPCAvailability already sets IsGrpcAvailable
correctly from its own probe; CheckGraphQLAvailability should only set
IsGraphQLAvailable.
Scanner.CheckGraphQLAvailability(ininternal/scanner/scanner.go) contains astray assignment that writes the GraphQL availability result into the gRPC
availability field:
This looks like a copy/paste from
CheckGRPCAvailability. The line overwriteswhatever
CheckGRPCAvailabilitypreviously set ons.db.IsGrpcAvailablewith theGraphQL probe's result.
Impact
Whenever both checks run, gRPC availability ends up reflecting the GraphQL probe
outcome instead of the gRPC one. Depending on the relative results this can:
against an unavailable endpoint, or
skipped.
Either way the gRPC section of the report can be wrong for reasons unrelated to gRPC.
Fix
Remove the stray line.
CheckGRPCAvailabilityalready setsIsGrpcAvailablecorrectly from its own probe;
CheckGraphQLAvailabilityshould only setIsGraphQLAvailable.