Skip to content

fix: register storage engines for all CLI convert commands#92

Merged
fank merged 1 commit intomainfrom
fix/cli-convert-engine-registration
Jan 31, 2026
Merged

fix: register storage engines for all CLI convert commands#92
fank merged 1 commit intomainfrom
fix/cli-convert-engine-registration

Conversation

@fank
Copy link
Member

@fank fank commented Jan 31, 2026

Summary

  • Move engine registration from convertSingleFile() to the start of runConvert()
  • Ensures engines are available for all convert subcommands (--all, --input, --status, --set-format)

Problem

Running ./app convert --all --format flatbuffers failed with:

Error converting ...: get storage engine: unknown storage engine: flatbuffers

The convertAll() code path was missing the engine registration that convertSingleFile() had.

Solution

Register engines once at the start of runConvert() after loading settings, following the pattern that whoever loads settings is responsible for registering engines:

  • Server path: NewHandler() registers engines
  • CLI path: runConvert() registers engines

Test plan

  • go test ./... passes
  • Verified convert tests cover both single file and batch conversion

Move engine registration from convertSingleFile() to the start of
runConvert(), ensuring engines are available for all convert subcommands
including --all, --status, and --set-format.

Previously, convertAll() was missing engine registration, causing
"unknown storage engine: flatbuffers" errors when using --all --format flatbuffers.
@github-actions
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/OCAP2/web/cmd/ocap-webserver 17.06% (-0.44%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/OCAP2/web/cmd/ocap-webserver/main.go 17.06% (-0.44%) 586 (-8) 100 (-4) 486 (-4) 👎

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@fank fank merged commit c0024f0 into main Jan 31, 2026
4 checks passed
@fank fank deleted the fix/cli-convert-engine-registration branch January 31, 2026 15:35
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