Migration Guide¶
This guide helps users migrate from older TofuSoup versions to the current unified harness architecture.
Unified Harness (soup-go)¶
What Changed¶
Previously, TofuSoup used separate Go harnesses for each component:
- go-cty - CTY operations
- go-hcl - HCL parsing
- go-rpc - RPC server/client
- go-wire - Wire protocol encoding/decoding
Now: All functionality is unified in a single soup-go harness with subcommands.
Command Migration¶
Old harness commands:
# OLD - separate binaries
./bin/go-cty validate-value ...
./bin/go-hcl parse ...
./bin/go-rpc server-start ...
./bin/go-wire encode ...
New harness commands:
# NEW - unified soup-go with subcommands
./harnesses/bin/soup-go cty validate-value ...
./harnesses/bin/soup-go hcl parse ...
./harnesses/bin/soup-go rpc server-start ...
./harnesses/bin/soup-go wire encode ...
Harness Management¶
Old commands:
# OLD
soup harness build go-cty
soup harness build go-hcl go-rpc go-wire
soup harness verify-cli go-cty
New commands:
Binary Paths¶
Old paths:
tofusoup/src/tofusoup/harness/go/bin/go-cty
tofusoup/src/tofusoup/harness/go/bin/go-hcl
tofusoup/src/tofusoup/harness/go/bin/go-rpc
tofusoup/src/tofusoup/harness/go/bin/go-wire
New paths:
Configuration File Updates¶
If you have soup.toml configurations referencing old harnesses:
Before:
After:
Testing & Scripts¶
If you have test scripts or CI/CD pipelines using the old harnesses:
Before:
# In test scripts
GO_CTY_BIN="./bin/go-cty"
$GO_CTY_BIN validate-value ...
# In Python tests
harness_path = Path("bin/go-cty")
After:
# In test scripts
SOUP_GO_BIN="./harnesses/bin/soup-go"
$SOUP_GO_BIN cty validate-value ...
# In Python tests
harness_path = Path("harnesses/bin/soup-go")
# Use with subcommand: soup-go cty ...
Deprecated Command Removal¶
Test Commands¶
The following test commands have been removed in favor of the unified soup test command:
Old (Deprecated):
New (Current):
Why This Change?¶
The unified soup test command:
- Provides consistent interface across all test suites
- Supports better configuration via soup.toml
- Enables easier CI/CD integration
- Allows passing pytest arguments directly
Migration Steps¶
-
Update harness builds:
-
Update scripts to use new harness paths
-
Update test commands to use
soup test <suite> -
Update
soup.tomlif you have harness-specific configurations -
Verify everything works:
Troubleshooting Migration¶
Harness Not Found¶
Error: harness 'go-cty' not found
Solution:
Path Issues¶
Error: No such file or directory: 'bin/go-cty'
Solution: Update paths to harnesses/bin/soup-go
Configuration Errors¶
Error: Unknown harness 'go-rpc' in soup.toml
Solution: Update configuration to use soup-go instead of individual harnesses
Benefits of Migration¶
- Simpler Builds: One harness to build instead of four
- Consistent Interface: All functionality accessible via subcommands
- Smaller Footprint: Single binary vs multiple binaries
- Easier Maintenance: One codebase for all harness functionality
- Better Documentation: Unified documentation and help system
Getting Help¶
If you encounter issues during migration:
- Check this migration guide
- Review Troubleshooting
- Check FAQ
- Open an issue on GitHub