Skip to content

cmd: fix external def file in create cluster#4559

Open
KaloyanTanev wants to merge 1 commit into
mainfrom
kalo/fix-values-from-def
Open

cmd: fix external def file in create cluster#4559
KaloyanTanev wants to merge 1 commit into
mainfrom
kalo/fix-values-from-def

Conversation

@KaloyanTanev

Copy link
Copy Markdown
Collaborator

Some values from definition file were omitted when using charon create cluster with external definition file.

category: bug
ticket: none

@KaloyanTanev KaloyanTanev requested a review from pinebit June 12, 2026 11:47
@KaloyanTanev KaloyanTanev self-assigned this Jun 12, 2026
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.09%. Comparing base (576c67b) to head (7862a1b).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-file is used, propagate TargetGasLimit and Compounding from 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.

Comment on lines +807 to +808
b, err := os.ReadFile(path.Join(nodeDir(clusterDir, 0), "cluster-lock.json"))
require.NoError(t, err)
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.

3 participants