apache/beam · error
unable to provide %v to worker
Error message
unable to provide %v to worker
What it means
GetArtifact serves staged artifacts to the worker from the server's in-memory artifacts map, keyed by the artifact's type payload. If the requested artifact's key is not present, the server logs a warning and returns 'unable to provide <prototext> to worker'. This means the prism server never staged (or already discarded) the artifact the SDK harness asked for.
Source
Thrown at sdks/go/pkg/beam/runners/prism/internal/jobservices/artifact.go:107
s.artifacts[string(dep.GetTypePayload())] = buf.Bytes()
}
}
return nil
}
func (s *Server) ResolveArtifacts(_ context.Context, req *jobpb.ResolveArtifactsRequest) (*jobpb.ResolveArtifactsResponse, error) {
return &jobpb.ResolveArtifactsResponse{
Replacements: req.GetArtifacts(),
}, nil
}
func (s *Server) GetArtifact(req *jobpb.GetArtifactRequest, stream jobpb.ArtifactRetrievalService_GetArtifactServer) error {
info := req.GetArtifact()
buf, ok := s.artifacts[string(info.GetTypePayload())]
if !ok {
pt := prototext.Format(info)
slog.Warn("unable to provide artifact to worker", "artifact_info", pt)
return fmt.Errorf("unable to provide %v to worker", pt)
}
chunk := 128 * 1024 * 1024 // 128 MB
var i int
for i+chunk < len(buf) {
stream.Send(&jobpb.GetArtifactResponse{
Data: buf[i : i+chunk],
})
i += chunk
}
stream.Send(&jobpb.GetArtifactResponse{
Data: buf[i:],
})
return nil
}
View on GitHub (pinned to 12126d8942)
Solutions
- Check the warning log line 'unable to provide artifact to worker' for the exact artifact_info requested and compare it to what was staged.
- Ensure the artifact staging step ran before workers request dependencies (e.g. correct --artifact/staging flags).
- Verify prism server and harness agree on the artifact type payload encoding; upgrade both to the same version.
Example fix
// before: artifact never staged // ensure staging before running: jobStager.Stage(artifacts...) // after: server has s.artifacts[typePayload] populated, GetArtifact succeeds
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check artifact availability before requesting from the worker
if _, ok := stagedArtifacts[string(info.GetTypePayload())]; !ok {
return fmt.Errorf("artifact with type payload %q was never staged", info.GetTypePayload())
} Try / catch
err := stream.Recv() // or the client-side equivalent
if err != nil && strings.Contains(err.Error(), "unable to provide") {
log.Fatalf("artifact missing from prism server staging; re-stage artifacts: %v", err)
} Prevention
- Run artifact staging before workers start requesting dependencies
- Reuse the same prism server instance across staging and execution
- Compare the warning log's artifact_info against staged payloads when debugging
When it happens
Trigger: A worker requests an artifact whose type payload has no entry in s.artifacts — e.g. the artifact was never registered via the staging path, or the request's type payload doesn't match what was stored.
Common situations: Reverse-artifact retrieval setups where the harness computes a different artifact type payload than the server stored; jobs restarted against a fresh prism server that lost staged artifacts; custom artifact staging omitted.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- unexpected ResolveArtifactResponse to GetArtifact: %v
- Unknown context parameter: ${param.parDoParamName}
- Unsupported window mapping fn: ${sideInput.windowMappingFn.u
- Unimplemented access pattern: ${accessPattern}
- State stream is closed.
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/34f0a533ad72941b.
Report an issue: GitHub.