{"record":{"id":"553b72008d046b56","repo":"temporalio/temporal","slug":"bucket-not-found","errorCode":null,"errorMessage":"bucket not found","messagePattern":"bucket not found","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/archiver/gcloud/connector/client.go","lineNumber":21,"sourceCode":"package connector\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"os\"\n\n\t\"cloud.google.com/go/storage\"\n\t\"go.temporal.io/server/common/archiver\"\n\t\"go.temporal.io/server/common/config\"\n\t\"go.uber.org/multierr\"\n\t\"google.golang.org/api/iterator\"\n)\n\nvar (\n\t// ErrBucketNotFound is non retryable error that is thrown when the bucket doesn't exist\n\tErrBucketNotFound = errors.New(\"bucket not found\")\n\terrObjectNotFound = errors.New(\"object not found\")\n)\n\ntype (\n\t// Precondition is a function that allow you to filter a query result.\n\t// If subject match params conditions then return true, else return false.\n\tPrecondition func(subject any) bool\n\n\t// Client is a wrapper around Google cloud storages client library.\n\tClient interface {\n\t\tUpload(ctx context.Context, URI archiver.URI, fileName string, file []byte) error\n\t\tGet(ctx context.Context, URI archiver.URI, file string) ([]byte, error)\n\t\tQuery(ctx context.Context, URI archiver.URI, fileNamePrefix string) ([]string, error)\n\t\tQueryWithFilters(ctx context.Context, URI archiver.URI, fileNamePrefix string, pageSize, offset int, filters []Precondition) ([]string, bool, int, error)\n\t\tExist(ctx context.Context, URI archiver.URI, fileName string) (bool, error)\n\t}\n\n\tstorageWrapper struct {","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/common/archiver/gcloud/connector/client.go#L3-L39","documentation":"The HTTP RoundTrip helper picks a random frontend member from cluster membership and rewrites the request address to use the HTTP port. It calls net.SplitHostPort on member.Identity() to strip the original port; if the identity is not in host:port form, SplitHostPort errors and this wrapping error is returned. The error is public API surface on the round-tripper.","triggerScenarios":"Calling RoundTrip (e.g. via an HTTP client using this transport) when the selected frontend member's Identity() string lacks a parseable port — e.g. an identity with no colon, a bare hostname vs an IPv6 literal without brackets, or a corrupted membership record.","commonSituations":"Membership service advertising malformed identities (custom hostnames without ports); IPv6 addresses not bracketed; tests/stubs registering members with identities that don't match the expected host:port format; membership cache populated from stale/bad data.","solutions":["Check the membership provider: ensure frontend members register identities as host:port (bracket IPv6 like [::1]:7233).","Log/inspect member.Identity() for the selected member to find the malformed value.","Fix the frontend service's identity/advertising address configuration (e.g. rpc address or membership bind config).","As a caller, retry — a different random member may be well-formed — while fixing the bad member's registration."],"exampleFix":"// before (membership identity)\nIdentity: \"frontend-1.internal\"\n// after\nIdentity: \"frontend-1.internal:7233\"","handlingStrategy":"try-catch","validationCode":"// Pre-check member identities before issuing HTTP requests\nfor _, m := range members {\n\tif _, _, err := net.SplitHostPort(m.Identity()); err != nil {\n\t\treturn fmt.Errorf(\"member %q has malformed identity: %w\", m.Identity(), err)\n\t}\n}","typeGuard":"func wellFormedMemberIdentity(id string) bool {\n\t_, _, err := net.SplitHostPort(id)\n\treturn err == nil\n}","tryCatchPattern":"resp, err := rt.RoundTrip(req)\nif err != nil {\n\tvar opErr *net.OpError\n\tif errors.As(err, &opErr) || strings.Contains(err.Error(), \"failed to extract port from frontend member\") {\n\t\t// skip malformed member or refresh membership list, then retry once\n\t}\n\treturn nil, err\n}","preventionTips":["Ensure every frontend registers its membership identity as host:port; bracket IPv6 literals.","Add a startup assertion that each member identity passes net.SplitHostPort.","On failure, refresh the membership cache before retrying — the record may be stale."],"tags":["network","membership","http","address-parsing"],"backgroundTag":"missing-port-in-address","analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}