Skip to content

Conversation

@colindickson
Copy link
Contributor

Fix Typo: --on-module-hash-mistmatch--on-module-hash-mismatch

Summary

Fixes a long-standing typo in the --on-module-hash-mistmatch flag name, correcting it to --on-module-hash-mismatch. The old flag name remains supported for backward compatibility but is deprecated.

Changes

Flag Registration (cmd/substreams-sink-sql/common_flags.go)

  • Added new --on-module-hash-mismatch flag with full documentation
  • Registered deprecated --on-module-hash-mistmatch flag for backward compatibility
  • Implemented resolveOnModuleHashMismatchFlag() helper function that:
    • Prioritizes the correctly-spelled flag when both are present
    • Logs a deprecation warning when only the old flag is used
    • Logs an info message when both flags are set (confirming the correct value takes precedence)

Updated Callers

All commands that reference this flag now use the resolution helper:

  • setup command (cmd/substreams-sink-sql/setup.go)
  • run command (cmd/substreams-sink-sql/run.go)
  • generate-csv command (cmd/substreams-sink-sql/generate_csv.go)
  • tools commands (cmd/substreams-sink-sql/tools.go)

Core Logic (db_changes/db/cursor.go)

  • Renamed variable mistmatchDetectedmismatchDetected
  • Updated error messages to reference the correct flag name

Documentation (CHANGELOG.md)

  • Added "Unreleased" entry documenting the fix and deprecation

Backward Compatibility

Fully backward compatible - Existing scripts using --on-module-hash-mistmatch will continue to work, but will log a deprecation warning:

flag '--on-module-hash-mistmatch' is deprecated and will be removed in a future version. Use '--on-module-hash-mismatch' instead

Testing

  • Build passes (go build ./...)
  • Unit tests pass (go test ./db_changes/...)
  • Integration tests pass (all except 1 pre-existing TimescaleDB failure unrelated to this change)
  • Both flags visible in --help output
  • Default behavior unchanged (returns "error" when neither flag is explicitly set)

Migration Guide

No action required immediately, but users should update their scripts to use the correct spelling:

# Before (deprecated)
--on-module-hash-mistmatch=warn

# After (correct)
--on-module-hash-mismatch=warn

colindickson and others added 2 commits February 2, 2026 13:45
Co-authored-by: Matthieu Vachon <matthieu.o.vachon@gmail.com>
Co-authored-by: Matthieu Vachon <matthieu.o.vachon@gmail.com>
@colindickson colindickson requested a review from maoueh February 2, 2026 20:11
@colindickson
Copy link
Contributor Author

colindickson commented Feb 2, 2026

checks fail because runner did not run because of an ongoing incident at Github:

https://www.githubstatus.com/

Update - The team continues to investigate issues causing GitHub Actions jobs on hosted runners to remain queued for extended periods, with a percentage of jobs failing. We will continue to provide updates as we make progress toward mitigation.

@maoueh maoueh merged commit 6634288 into streamingfast:develop Feb 3, 2026
1 check passed
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