Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: kt run . without --args-file should run without error #166

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/per-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ jobs:
- name: Run Starlark
run: kurtosis run ${{ github.workspace }} --args-file ${{ matrix.file_name }} --verbosity detailed

# Make sure that `kurtosis run .` without an --args-file works fine (the defaults in input_parser.star are correct)
run_without_args:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Kurtosis
run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
sudo apt update
sudo apt install kurtosis-cli
kurtosis analytics disable

- name: Run Starlark
run: kurtosis run ${{ github.workspace }} --verbosity detailed

lint:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion main.star
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def run(plan, args):

# need to do a raw get here in case only optimism_package is provided.
# .get will return None if the key is in the config with a None value.
optimism_args = args.get("optimism_package") or input_parser.default_optimism_args()
optimism_args = args.get("optimism_package") or input_parser.default_optimism_params()
optimism_args_with_right_defaults = input_parser.input_parser(plan, optimism_args)
global_tolerations = optimism_args_with_right_defaults.global_tolerations
global_node_selectors = optimism_args_with_right_defaults.global_node_selectors
Expand Down
8 changes: 7 additions & 1 deletion src/package_io/input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def default_optimism_params():
return {
"observability": default_observability_params(),
"interop": default_interop_params(),
"altda": default_altda_deploy_config(),
"altda_deploy_config": default_altda_deploy_config(),
"chains": default_chains(),
"op_contract_deployer_params": default_op_contract_deployer_params(),
"global_log_level": "info",
Expand Down Expand Up @@ -614,6 +614,12 @@ def default_op_contract_deployer_params():

def default_ethereum_package_network_params():
return {
"participants": [
{
"el_type": "geth",
"cl_type": "teku",
}
],
"network_params": {
"preset": "minimal",
"genesis_delay": 5,
Expand Down
21 changes: 21 additions & 0 deletions src/package_io/sanity_check.star
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,28 @@ PARTICIPANT_CATEGORIES = {
"cl_max_mem",
"el_builder_type",
"el_builder_image",
"el_builder_log_level",
"el_builder_extra_env_vars",
"el_builder_extra_labels",
"el_builder_extra_params",
"el_builder_tolerations",
"el_builder_volume_size",
"el_builder_min_cpu",
"el_builder_max_cpu",
"el_builder_min_mem",
"el_builder_max_mem",
"cl_builder_type",
"cl_builder_image",
"cl_builder_log_level",
"cl_builder_extra_env_vars",
"cl_builder_extra_labels",
"cl_builder_extra_params",
"cl_builder_tolerations",
"cl_builder_volume_size",
"cl_builder_min_cpu",
"cl_builder_max_cpu",
"cl_builder_min_mem",
"cl_builder_max_mem",
"node_selectors",
"tolerations",
"count",
Expand Down Expand Up @@ -103,6 +123,7 @@ SUBCATEGORY_PARAMS = {
"proposer_params": ["image", "extra_params", "game_type", "proposal_interval"],
"mev_params": ["rollup_boost_image", "builder_host", "builder_port"],
"da_server_params": [
"enabled",
"image",
"cmd",
],
Expand Down