{"record":{"id":"339b8173bc9c11b6","repo":"risingwavelabs/risingwave","slug":"obs-access-key-id-not-found-from-environment-varia","errorCode":null,"errorMessage":"OBS_ACCESS_KEY_ID not found from environment variables","messagePattern":"OBS_ACCESS_KEY_ID not found from environment variables","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"src/object_store/src/object/opendal_engine/obs.rs","lineNumber":40,"sourceCode":"use super::{MediaType, OpendalObjectStore, new_operator};\nuse crate::object::ObjectResult;\nuse crate::object::object_metrics::ObjectStoreMetrics;\n\nimpl OpendalObjectStore {\n    /// create opendal obs engine.\n    pub fn new_obs_engine(\n        bucket: String,\n        root: String,\n        config: Arc<ObjectStoreConfig>,\n        metrics: Arc<ObjectStoreMetrics>,\n    ) -> ObjectResult<Self> {\n        // Create obs backend builder.\n        let mut builder = Obs::default().bucket(&bucket).root(&root);\n\n        let endpoint = std::env::var(\"OBS_ENDPOINT\")\n            .unwrap_or_else(|_| panic!(\"OBS_ENDPOINT not found from environment variables\"));\n        let access_key_id = std::env::var(\"OBS_ACCESS_KEY_ID\")\n            .unwrap_or_else(|_| panic!(\"OBS_ACCESS_KEY_ID not found from environment variables\"));\n        let secret_access_key = std::env::var(\"OBS_SECRET_ACCESS_KEY\").unwrap_or_else(|_| {\n            panic!(\"OBS_SECRET_ACCESS_KEY not found from environment variables\")\n        });\n\n        builder = builder\n            .endpoint(&endpoint)\n            .access_key_id(&access_key_id)\n            .secret_access_key(&secret_access_key);\n\n        let op = new_operator(\n            &config,\n            Operator::new(builder)?.layer(LoggingLayer::default()),\n        );\n\n        Ok(Self {\n            op,\n            media_type: MediaType::Obs,\n            config,","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/object_store/src/object/opendal_engine/obs.rs#L22-L58","documentation":"new_obs_engine reads the OBS access key id from OBS_ACCESS_KEY_ID and panics if unset, because OBS authentication cannot proceed without credentials. The panic occurs at object store build time after OBS_ENDPOINT is successfully read.","triggerScenarios":"Using an obs:// remote store with OBS_ENDPOINT set but OBS_ACCESS_KEY_ID missing from the process environment.","commonSituations":"Partially configured deployments where the endpoint was added but credentials were not, secret not mounted in Kubernetes, or credential variable renamed.","solutions":["Export OBS_ACCESS_KEY_ID with a valid Huawei Cloud access key before starting RisingWave","Mount the credential via your secret manager and expose it as OBS_ACCESS_KEY_ID","Double-check spelling/case of the variable name in your deployment config","Also ensure OBS_SECRET_ACCESS_KEY is set to avoid the next panic"],"exampleFix":"# before\nenv OBS_ENDPOINT=... ./risingwave  # OBS_ACCESS_KEY_ID missing -> panic\n# after\nenv OBS_ENDPOINT=... OBS_ACCESS_KEY_ID=<key> OBS_SECRET_ACCESS_KEY=<secret> ./risingwave","handlingStrategy":"validation","validationCode":"if std::env::var(\"OBS_ACCESS_KEY_ID\").is_err() {\n    eprintln!(\"OBS_ACCESS_KEY_ID must be set for obs:// object store\");\n    std::process::exit(1);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Store the access key id in a secret manager and mount it as OBS_ACCESS_KEY_ID","Validate credential env vars alongside OBS_ENDPOINT at startup","Avoid renaming credential variables when templating deployments"],"tags":["rust","obs","huawei","credentials","env-var","panic"],"backgroundTag":"missing-env-var","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}