{"record":{"id":"31cf02bb05ba3fc6","repo":"cloudflare/pingora","slug":"dial9-s3-service-name-must-not-be-empty","errorCode":null,"errorMessage":"dial9 s3 service_name must not be empty","messagePattern":"dial9 s3 service_name must not be empty","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"pingora-runtime/src/lib.rs","lineNumber":371,"sourceCode":"\n    let mut traced = TracedRuntime::builder()\n        .with_trace_path(opts.trace_path.clone())\n        .with_runtime_name(runtime_name)\n        .with_task_tracking(opts.task_tracking);\n    if let Some(worker_poll_interval) = opts.worker_poll_interval {\n        traced = traced.with_worker_poll_interval(worker_poll_interval);\n    }\n\n    #[cfg(feature = \"dial9-worker-s3\")]\n    if let Some(s3_upload) = &opts.s3_upload {\n        if s3_upload.bucket.trim().is_empty() {\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                \"dial9 s3 bucket must not be empty\",\n            ));\n        }\n        if s3_upload.service_name.trim().is_empty() {\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                \"dial9 s3 service_name must not be empty\",\n            ));\n        }\n        let s3_config = dial9_tokio_telemetry::background_task::s3::S3Config::builder()\n            .bucket(s3_upload.bucket.clone())\n            .service_name(s3_upload.service_name.clone())\n            .maybe_prefix(s3_upload.prefix.clone())\n            .maybe_region(s3_upload.region.clone())\n            .maybe_instance_path(s3_upload.instance_path.clone());\n        let traced = traced.with_s3_uploader(s3_config.build());\n        if let Some(client) = s3_upload.client.clone() {\n            return traced\n                .with_s3_client(client)\n                .build_and_start(builder, writer);\n        }\n        return traced.build_and_start(builder, writer);\n    }","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/cloudflare/pingora/blob/0046038bd402bc82912da862dadf9a479f31e9f1/pingora-runtime/src/lib.rs#L353-L389","documentation":"Companion check to the bucket validation in build_dial9_runtime() (pingora-runtime/src/lib.rs:371): with the dial9-worker-s3 feature and s3_upload configured, the service_name used for S3 request signing must be a non-empty string after trimming. An empty service name would make signing ambiguous, so construction returns ErrorKind::InvalidInput.","triggerScenarios":"Dial9RuntimeOpts with s3_upload = Some(...) where service_name is empty or whitespace, under the dial9-worker-s3 feature; validated at dial9 runtime construction right after the bucket check.","commonSituations":"S3 block configured with only bucket/region while service_name was assumed to default; non-AWS endpoints (MinIO etc.) where the field seems irrelevant but is still required; config templating that omits the key.","solutions":["Set service_name explicitly, normally \"s3\" for AWS S3 and S3-compatible stores","For non-AWS endpoints keep \"s3\" unless the provider documents otherwise","Validate bucket + service_name as a pair wherever S3 upload config is parsed"],"exampleFix":"// before\ns3_upload: Some(S3Upload { bucket: \"my-trace-bucket\".into(), service_name: String::new(), ..Default::default() })\n\n// after\ns3_upload: Some(S3Upload { bucket: \"my-trace-bucket\".into(), service_name: \"s3\".into(), ..Default::default() })","handlingStrategy":"validation","validationCode":"if let Some(s3) = &opts.s3_upload {\n    if s3.service_name.trim().is_empty() {\n        return Err(std::io::Error::new(std::io::ErrorKind::InvalidInput, \"s3 service_name must be set\"));\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Default service_name to \"s3\" in your config layer when the S3 block is enabled","Validate bucket and service_name as a pair wherever the S3 upload config is parsed","Cover the S3 block with a config unit test so blank fields never reach the runtime build"],"tags":["rust","pingora-runtime","dial9","s3","config-validation"],"backgroundTag":"s3-misconfiguration","analyzedSha":"0046038bd402bc82912da862dadf9a479f31e9f1","analyzedAt":"2026-08-16T21:33:22.341Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}