Skip to content

Conversation

darkrift
Copy link
Contributor

@darkrift darkrift commented Sep 24, 2025

DIFFERENT_* miss reason were regrouped into a single DIGEST_MISMATCH reason in bazelbuild/bazel@ec10da4

Using Bazel 9.0.0 pre-release results in this crash:

panic: runtime error: index out of range [7] with length 7

goroutine 80 [running]:
github.com/buildbarn/bb-portal/pkg/summary.MissReason.String(...)
	pkg/summary/summary.go:58
github.com/buildbarn/bb-portal/pkg/processing.SaveActor.saveMissDetails.func1(0xc000aad9f0, 0x7fda65ce6108?)
	pkg/processing/save.go:539 +0x128
github.com/buildbarn/bb-portal/ent/gen/ent.(*MissDetailClient).MapCreateBulk(0xc00097cde0, {0x2ec5920?, 0xc000b3b728?}, 0xc000882648)
	ent/gen/ent/client.go:3777 +0x13e
github.com/buildbarn/bb-portal/pkg/processing.SaveActor.saveMissDetails({0xc000ce71e0?, {0xc0008dc9f0?}}, {0x3ca9a10, 0xc000d97340}, {0xc000d5ec40, 0x8, 0x8})
	pkg/processing/save.go:535 +0xaa
github.com/buildbarn/bb-portal/pkg/processing.SaveActor.saveActionCacheStatistics({0xc000ce71e0?, {0xc0008dc9f0?}}, {0x3ca9a10, 0xc000d97340}, {0x9c, 0x2, 0x0, 0x0, 0x1, {0xc000d5ec40, ...}})
	pkg/processing/save.go:544 +0x5f
github.com/buildbarn/bb-portal/pkg/processing.SaveActor.saveActionSummary({0xc000ce71e0?, {0xc0008dc9f0?}}, {0x3ca9a10, 0xc000d97340}, {0x0, 0x0, 0x1, {0xc000aa0700, 0x1, 0x1}, ...})
	pkg/processing/save.go:591 +0x85
github.com/buildbarn/bb-portal/pkg/processing.SaveActor.saveMetrics({_, {_}}, {_, _}, {{0x0, 0x0, 0x1, {0xc000aa0700, 0x1, 0x1}, ...}, ...})
	pkg/processing/save.go:756 +0x85
github.com/buildbarn/bb-portal/pkg/processing.SaveActor.saveSummary({0xc000ce71e0, {0xc0008dc9f0}}, {0x3ca9a10, 0xc000d97340}, 0xc000c90d88)
	pkg/processing/save.go:74 +0x3e8
github.com/buildbarn/bb-portal/pkg/processing.SaveActor.SaveSummary({0xc000b7f520?, {0xc0008dc9f0?}}, {0x3ca9a10, 0xc000d97340}, 0xc000c90d88)
	pkg/processing/save.go:47 +0x87
github.com/buildbarn/bb-portal/internal/api/grpc/bes.(*buildEventChannel).Finalize(0xc000f00000)
	internal/api/grpc/bes/channel.go:85 +0x6fa
github.com/buildbarn/bb-portal/internal/api/grpc/bes.BuildEventServer.PublishBuildToolEventStream({0x10?}, {0x3cb7458, 0xc000c9b2a0})
	internal/api/grpc/bes/server.go:121 +0x949
google.golang.org/genproto/googleapis/devtools/build/v1._PublishBuildEvent_PublishBuildToolEventStream_Handler({0x30d6ba0?, 0xc000787538}, {0x3cb2608, 0xc000c03f40})
	external/gazelle++go_deps+org_golang_google_genproto/googleapis/devtools/build/v1/publish_build_event.pb.go:817 +0xd8
github.com/buildbarn/bb-storage/pkg/grpc.NewServersFromConfigurationAndServe.NewAuthenticatingStreamInterceptor.func5({0x30d6ba0, 0xc000787538}, {0x3cb2d10, 0xc000c9d8a8}, 0x38?, 0x384e330)
	external/com_github_buildbarn_bb_storage+/pkg/grpc/authenticating_interceptor.go:43 +0x13c
google.golang.org/grpc.getChainStreamHandler.func1({0x30d6ba0, 0xc000787538}, {0x3cb2d10, 0xc000c9d8a8})
	external/gazelle++go_deps+org_golang_google_grpc/server.go:1574 +0xa8
github.com/buildbarn/bb-storage/pkg/grpc.RequestMetadataTracingStreamInterceptor({0x30d6ba0, 0xc000787538}, {0x3cb2d10, 0xc000c9d8a8}, 0xc000c9d890?, 0xc0003511c0)
	external/com_github_buildbarn_bb_storage+/pkg/grpc/request_metadata_tracing_interceptor.go:29 +0x56
google.golang.org/grpc.getChainStreamHandler.func1({0x30d6ba0, 0xc000787538}, {0x3cb2d10, 0xc000c9d8a8})
	external/gazelle++go_deps+org_golang_google_grpc/server.go:1574 +0xa8
github.com/grpc-ecosystem/go-grpc-prometheus.init.(*ServerMetrics).StreamServerInterceptor.func4({0x30d6ba0, 0xc000787538}, {0x3cb27b8, 0xc000c841c0}, 0xc000c9d890, 0xc000351180)
	external/gazelle++go_deps+com_github_grpc_ecosystem_go_grpc_prometheus/server_metrics.go:121 +0xd2
google.golang.org/grpc.NewServer.chainStreamServerInterceptors.chainStreamInterceptors.func2({0x30d6ba0, 0xc000787538}, {0x3cb27b8, 0xc000c841c0}, 0xc000c9d890, 0xc000c9b1d0?)
	external/gazelle++go_deps+org_golang_google_grpc/server.go:1565 +0x7c
google.golang.org/grpc.(*Server).processStreamingRPC(0xc000792200, {0x3ca99a0, 0xc000c80ed0}, 0xc0009583c0, 0xc0008dd170, 0x5ada560, 0x0)
	external/gazelle++go_deps+org_golang_google_grpc/server.go:1728 +0x1231
google.golang.org/grpc.(*Server).handleStream(0xc000792200, {0x3caa8a8, 0xc000796d00}, 0xc0009583c0)
	external/gazelle++go_deps+org_golang_google_grpc/server.go:1845 +0xb47
google.golang.org/grpc.(*Server).serveStreams.func2.1()
	external/gazelle++go_deps+org_golang_google_grpc/server.go:1061 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 79
	external/gazelle++go_deps+org_golang_google_grpc/server.go:1072 +0x11d
	```

@isakstenstrom
Copy link
Collaborator

Nice!
From what I can find, the new value would also need to be handled in these files so that the new value would be stored and displayed correctly:

ent/schema/missdetail.go
frontend/src/components/ActionCacheMetrics/ActionCacheMissTag.tsx
frontend/src/components/ActionCacheMetrics/index.module.css

Could you please make the necessary changes in these files as well?

@darkrift
Copy link
Contributor Author

@isakstenstrom any color preference ? I see you are also modifying them in another PR, I could simply add it in missdetail.go if we merge your other pr first.

@isakstenstrom
Copy link
Collaborator

Oh yeah I forgot that those changes would conflict. That sounds good. I don't have any preference for color.

@isakstenstrom isakstenstrom mentioned this pull request Sep 29, 2025
@darkrift
Copy link
Contributor Author

darkrift commented Sep 29, 2025

@isakstenstrom you can also include this change in your other PR if you want. It would be easier to manage that way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants