Skip to content

Fix redshift recipe: correct the community-build accelerator error message - #549

Open
claudespice wants to merge 1 commit into
spiceai:trunkfrom
claudespice:fix-redshift-accelerator-error-message
Open

Fix redshift recipe: correct the community-build accelerator error message#549
claudespice wants to merge 1 commit into
spiceai:trunkfrom
claudespice:fix-redshift-accelerator-error-message

Conversation

@claudespice

Copy link
Copy Markdown
Contributor

What the recipe said

redshift/README.md Step 3 tells readers what a stock-installed runtime does with the write spicepod's engine: postgresql:

a stock-installed runtime rejects it with Unknown engine: postgres

What the code does

Unknown engine: {engine} exists, but it is not the message a reader hits here. It lives in DataAccelerator::create_accelerated_table (crates/runtime/src/dataaccelerator/mod.rs#L266-L271) — reached only after dataset init, which performs its own availability check first and fails there:

// crates/runtime/src/init/dataset.rs#L1312-L1320
self.accelerator_engine_registry
    .get_accelerator_engine(acceleration_settings.engine)
    .await
    .context(AcceleratorEngineNotAvailableSnafu {
        name: accelerator_engine.to_string(),
    })?;

engine: postgresql parses successfully — Engine::try_from accepts both postgres and postgresql (crates/runtime-acceleration/src/engine.rs#L57-L73) — so the engine is never "unknown". It is simply not registered when the binary is built without postgres-accel, and AcceleratorEngineNotAvailable is cfg-gated to render the community variant (crates/runtime/src/lib.rs#L318-L328):

#[cfg(not(feature = "postgres-accel"))]
#[snafu(display(
    "The accelerator engine {name} is not available. Valid engines are arrow, cayenne, duckdb, and sqlite."
))]
AcceleratorEngineNotAvailable { name: String },

Engine::PostgreSQL renders as postgres via Display, so the reader sees:

The accelerator engine postgres is not available. Valid engines are arrow, cayenne, duckdb, and sqlite.

This also matches what postgres/accelerator/README.md already says, so the two recipes now agree.

What changed

Quoted the actual error message. The rest of the note is unchanged and verified against v2.1.1: postgres-accel is still a real, non-default spiced feature (bin/spiced/Cargo.toml#L152), and release and models in the suggested cargo run line both exist.

Static verification only — confirming at runtime would require provisioning a Redshift cluster.

…ssage

A stock binary rejects 'engine: postgresql' during dataset init with
'The accelerator engine postgres is not available. Valid engines are
arrow, cayenne, duckdb, and sqlite.', not 'Unknown engine: postgres'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant