Skip to content

fix: match sink-sql flag typo for --on-module-hash-mistmatch#5

Merged
rodrigopavezi merged 2 commits intomainfrom
fix/sink-flag-typo
Apr 29, 2026
Merged

fix: match sink-sql flag typo for --on-module-hash-mistmatch#5
rodrigopavezi merged 2 commits intomainfrom
fix/sink-flag-typo

Conversation

@rodrigopavezi
Copy link
Copy Markdown
Member

Summary

  • The substreams-sink-sql v4.12.0 binary has a typo in its flag name: it registers --on-module-hash-mistmatch (extra t) instead of --on-module-hash-mismatch
  • Our entrypoint was passing the correctly-spelled flag, which caused an unknown flag error and a crash-loop on stage
  • Changed the flag to match the binary's misspelling so the sink starts successfully

Test plan

  • Deploy to staging and verify the sink starts without the unknown flag: --on-module-hash-mismatch error
  • Confirm the sink successfully connects and begins processing blocks

The substreams-sink-sql v4.12.0 binary registers the flag as
--on-module-hash-mistmatch (with an extra 't'). Passing the
correctly spelled --on-module-hash-mismatch causes an "unknown flag"
error, making the sink crash-loop on stage.
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This PR fixes a crash-loop caused by passing --on-module-hash-mismatch (correctly spelled) to the substreams-sink-sql v4.12.0 binary, which registers the flag as --on-module-hash-mistmatch (with an extra t). The binary is explicitly pinned to v4.12.0 in the Dockerfile, so the intentional misspelling is scoped correctly. Version is bumped from 0.1.0 to 0.1.1 consistently across Cargo.toml, Cargo.lock, and substreams.yaml.

Confidence Score: 5/5

Safe to merge — the fix is minimal, the binary is pinned to v4.12.0 where the typo exists, and all version bumps are consistent.

No P0 or P1 issues found. The flag name change is intentional and correct for the pinned binary version. Version bumps are consistent across all three files.

No files require special attention. When substreams-sink-sql is upgraded past v4.12.0 and the upstream typo is fixed, Dockerfile.sink will need the flag reverted.

Important Files Changed

Filename Overview
Dockerfile.sink Corrects the CLI flag from --on-module-hash-mismatch to --on-module-hash-mistmatch to match the upstream typo in the pinned substreams-sink-sql v4.12.0 binary
tron/Cargo.toml Bumps package version from 0.1.0 to 0.1.1 to reflect this fix
tron/Cargo.lock Lock file updated to reflect the 0.1.0 → 0.1.1 version bump in Cargo.toml
tron/substreams.yaml Package version bumped from v0.1.0 to v0.1.1, consistent with Cargo.toml

Sequence Diagram

sequenceDiagram
    participant Docker as Docker Entrypoint
    participant Setup as substreams-sink-sql setup
    participant Run as substreams-sink-sql run
    participant DB as PostgreSQL

    Docker->>Setup: setup "$DSN" "$SPKG" || true
    Setup->>DB: Initialize schema
    Docker->>Run: run --on-module-hash-mistmatch=${ON_MODULE_HASH_MISMATCH:-warn} "$DSN" "$SPKG"
    Note over Run: Flag matches v4.12.0 binary's registered name (intentional typo)
    Run->>DB: Stream & persist events
Loading

Reviews (2): Last reviewed commit: "chore: bump version to v0.1.1" | Re-trigger Greptile

Comment thread Dockerfile.sink
@rodrigopavezi rodrigopavezi merged commit 8edffc5 into main Apr 29, 2026
3 checks passed
@rodrigopavezi rodrigopavezi deleted the fix/sink-flag-typo branch April 29, 2026 13:36
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.

2 participants