cmd: fix external def file in create cluster#4559
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4559 +/- ##
=======================================
Coverage 57.08% 57.09%
=======================================
Files 245 245
Lines 33218 33220 +2
=======================================
+ Hits 18963 18967 +4
+ Misses 11867 11857 -10
- Partials 2388 2396 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Fixes charon create cluster so that when an external cluster definition file is provided, the definition file’s values are correctly applied to the generated cluster artifacts (instead of being partially overridden/omitted by CLI config defaults).
Changes:
- When
--definition-fileis used, propagateTargetGasLimitandCompoundingfrom the loaded definition into the runtime config used during cluster creation. - Add an internal test asserting the definition file is authoritative for gas limit, compounding, deposit amounts, and fee recipient addresses.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/createcluster.go | Ensures TargetGasLimit and Compounding from the loaded definition file are applied during cluster creation. |
| cmd/createcluster_internal_test.go | Adds regression test to confirm definition file values are authoritative and flow into the produced cluster-lock.json and validator data. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| b, err := os.ReadFile(path.Join(nodeDir(clusterDir, 0), "cluster-lock.json")) | ||
| require.NoError(t, err) |



Some values from definition file were omitted when using
charon create clusterwith external definition file.category: bug
ticket: none