{"record":{"id":"e3fa907d00408f9b","repo":"risingwavelabs/risingwave","slug":"no-allow-alter-on-fly-fields-registered-for-connec-e3fa90","errorCode":null,"errorMessage":"No allow_alter_on_fly fields registered for connector: {connector_name}","messagePattern":"No allow_alter_on_fly fields registered for connector: (.+?)","errorType":"validation","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/with_options_test.rs","lineNumber":801,"sourceCode":"/// Get all connection names that have `allow_alter_on_fly` fields\npub fn get_connection_names_with_allow_alter_on_fly_fields() -> Vec<&'static str> {{\n    CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS.keys().map(|s| s.as_str()).collect()\n}}\n\n/// Checks if all given fields are allowed to be altered on the fly for the specified source connector.\n/// Returns Ok(()) if all fields are allowed, otherwise returns a `ConnectorError`.\npub fn check_source_allow_alter_on_fly_fields(\n    connector_name: &str,\n    fields: &[String],\n) -> crate::error::ConnectorResult<()> {{\n    // Convert connector name to the type name key\n    let Some(type_name) = source_properties::source_name_to_prop_type_name(connector_name) else {{\n        return Err(ConnectorError::from(anyhow::anyhow!(\n            \"Unknown source connector: {{connector_name}}\"\n        )));\n    }};\n    let Some(allowed_fields) = SOURCE_ALLOW_ALTER_ON_FLY_FIELDS.get(type_name) else {{\n    return Err(ConnectorError::from(anyhow::anyhow!(\n        \"No allow_alter_on_fly fields registered for connector: {{connector_name}}\"\n    )));\n    }};\n    for field in fields {{\n        if !allowed_fields.contains(field) {{\n            return Err(ConnectorError::from(anyhow::anyhow!(\n                \"Field '{{field}}' is not allowed to be altered on the fly for connector: {{connector_name}}\"\n            )));\n        }}\n    }}\n    Ok(())\n}}\n\npub fn check_connection_allow_alter_on_fly_fields(\n    connection_name: &str,\n    fields: &[String],\n) -> crate::error::ConnectorResult<()> {{\n    use crate::source::connection_name_to_prop_type_name;","sourceCodeStart":783,"sourceCodeEnd":819,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/with_options_test.rs#L783-L819","documentation":"Raised when the connector name resolves to a known source type but SOURCE_ALLOW_ALTER_ON_FLY_FIELDS has no entry for it, meaning no fields have been registered as alterable on the fly for that source connector.","triggerScenarios":"Calling check_source_allow_alter_on_fly_fields with a valid connector name whose allow-alter-on-fly field list was never generated/registered (the generator did not run or the connector has no eligible fields).","commonSituations":"Hand-editing a new connector without re-running the code generator; connector exists but intentionally (or mistakenly) has no allow_alter_on_fly registry entry; stale build where generated code is outdated.","solutions":["Re-run the code generation that populates SOURCE_ALLOW_ALTER_ON_FLY_FIELDS (generate_allow_alter_on_fly_fields_combined / build step).","If the connector genuinely supports no on-the-fly field alterations, do not call this validation for it (guard on registration first).","Add an allow_alter_on_fly field list for the connector in the source definition and regenerate."],"exampleFix":"// before\ncheck_source_allow_alter_on_fly_fields(connector, fields)?;\n// after\nif source_properties::source_name_to_prop_type_name(connector).and_then(|t| SOURCE_ALLOW_ALTER_ON_FLY_FIELDS.get(t)).is_some() {\n    check_source_allow_alter_on_fly_fields(connector, fields)?;\n}","handlingStrategy":"type-guard","validationCode":"fn source_has_alter_fields(connector: &str) -> bool {\n    source_properties::source_name_to_prop_type_name(connector)\n        .and_then(|t| SOURCE_ALLOW_ALTER_ON_FLY_FIELDS.get(t))\n        .is_some()\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = check_source_allow_alter_on_fly_fields(connector, &fields) {\n    log::warn!(\"skipping on-the-fly alteration check: {e}\");\n}","preventionTips":["Re-run code generation after adding or renaming any source connector","Never hand-edit generated registry maps","Add a unit test asserting every registered connector has an allow-list entry"],"tags":["connector","registry","generated-code"],"backgroundTag":"missing-required-config-field","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}