quickwit-oss/quickwit · error
source type {} cannot be updated
Error message
source type {} cannot be updated What it means
SourceConfig::validate_update's catch-all arm: when source types match but the specific SourceParams variant has no dedicated update validator (e.g. file, ingest, or void sources whose params are not updatable), the update is rejected with this message naming the current source type.
Source
Thrown at quickwit/quickwit-config/src/source_config/mod.rs:294
SourceParams::File(FileSourceParams::Notifications(new)),
) => current.validate_update(new),
(SourceParams::Kafka(current), SourceParams::Kafka(new)) => {
current.validate_update(new)
}
(SourceParams::Kinesis(current), SourceParams::Kinesis(new)) => {
current.validate_update(new)
}
(SourceParams::PubSub(current), SourceParams::PubSub(new)) => {
current.validate_update(new)
}
(SourceParams::Pulsar(current), SourceParams::Pulsar(new)) => {
current.validate_update(new)
}
(current, new) if current.source_type() != new.source_type() => Err(anyhow::anyhow!(
"source type cannot be changed, current type {}",
current.source_type(),
)),
_ => Err(anyhow::anyhow!(
"source type {} cannot be updated",
self.source_type(),
)),
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Serialize, Deserialize, utoipa::ToSchema)]
#[serde(rename_all = "snake_case")]
pub enum FileSourceMessageType {
/// See <https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-content-structure.html>
S3Notification,
/// A string with the URI of the file (e.g `s3://bucket/key`)
RawUri,
}
#[derive(Clone, Debug, Eq, PartialEq, Hash, Serialize, Deserialize, utoipa::ToSchema)]
pub struct FileSourceSqs {View on GitHub (pinned to a39730c5cd)
Solutions
- Delete and recreate the source with the desired parameters (`quickwit source delete` then `quickwit source create`).
- Only update source types that support in-place updates — kafka and pulsar sources validate param diffs; other types are effectively immutable.
- If the parameters truly did not change, skip the update call in your automation (compare configs before pushing).
Example fix
# before (attempting update on an 'ingest' source) quickwit source update --index my-index --source my-source --source-config cfg.yaml # after quickwit source delete --index my-index --source my-source quickwit source create --index my-index --source-config cfg.yaml
Defensive patterns
Strategy: validation
Validate before calling
const UPDATABLE_TYPES = new Set(['kafka', 'pulsar']);
if (!UPDATABLE_TYPES.has(sourceType)) {
throw new Error(`source type ${sourceType} does not support updates; delete and recreate`);
} Type guard
const isUpdatableSourceType = (t) => ['kafka', 'pulsar'].includes(t);
Try / catch
try {
await updateSource(indexId, sourceId, cfg);
} catch (e) {
if (String(e).includes('cannot be updated')) {
await deleteSource(indexId, sourceId);
await createSource(indexId, sourceId, cfg);
} else throw e;
} Prevention
- Only call the update API for kafka/pulsar sources; recreate others when params change.
- Diff the new config against the current one in automation and skip no-op updates.
- Document per-type mutability in your source management tooling.
- When in doubt, delete + create is always safe for source parameter changes.
When it happens
Trigger: Calling the source update API/CLI on a source whose type does not support parameter updates (its SourceParams variant has no validate_update implementation, falling to `_ =>`), even with the same type on both sides.
Common situations: Trying to edit an ingest or file source's params via `quickwit source update`; automation that regenerates source configs and pushes updates for every source type; assuming all source types are mutable like kafka/pulsar.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- source type cannot be changed, current type {}
- updating timestamp field is not allowed, current timestamp f
- index ID pattern `{pattern}` is invalid: patterns must not c
- index ID pattern `{pattern}` is invalid: an index ID must ha
- index config merge policy `max_merge_factor` must be superio
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/8a6ff026b44c2946.
Report an issue: GitHub.