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

feat(starknet_integration_tests): add db path argument to node_setup … #3925

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

nadin-Starkware
Copy link
Collaborator

@nadin-Starkware nadin-Starkware commented Feb 3, 2025

…for configurable DB storage

commit-id:2e49fc49

@reviewable-StarkWare
Copy link

This change is Reviewable

@nadin-Starkware nadin-Starkware changed the title feat(starknet_integration_tests): add base_db_path_dir argument to node_setup for configurable DB storage feat(starknet_integration_tests): add db path argument to node_setup for configurable DB storage Feb 3, 2025
Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @nadin-Starkware)


crates/starknet_integration_tests/src/node_setup.rs line 48 at r1 (raw file):

        }
    }
}

Arg parsing of a single given binary should probably in that binary module.

Code quote:

// TODO(Nadin): Improve the argument parsing.
pub fn get_base_db_path(args: Vec<String>) -> PathBuf {
    let arg_name = "--base_db_path_dir";
    match args.as_slice() {
        [] => PathBuf::from("./data"),
        [arg, path] if arg == arg_name => PathBuf::from(path),
        _ => {
            eprintln!("Error: Bad argument. The only allowed argument is '{}'.", arg_name);
            std::process::exit(1);
        }
    }
}

Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @nadin-Starkware)


crates/starknet_integration_tests/src/node_setup.rs line 48 at r1 (raw file):

        }
    }
}

PTAL at how the node binary parses args:

https://github.com/starkware-libs/sequencer/blob/main/crates/papyrus_config/src/command.rs#L10-L16

Code quote:

pub fn get_base_db_path(args: Vec<String>) -> PathBuf {
    let arg_name = "--base_db_path_dir";
    match args.as_slice() {
        [] => PathBuf::from("./data"),
        [arg, path] if arg == arg_name => PathBuf::from(path),
        _ => {
            eprintln!("Error: Bad argument. The only allowed argument is '{}'.", arg_name);
            std::process::exit(1);
        }
    }
}

Copy link
Collaborator Author

@nadin-Starkware nadin-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @Itay-Tsabary-Starkware)


crates/starknet_integration_tests/src/node_setup.rs line 48 at r1 (raw file):

Previously, Itay-Tsabary-Starkware wrote…

Arg parsing of a single given binary should probably in that binary module.

Done.

Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @nadin-Starkware)

Copy link
Collaborator Author

@nadin-Starkware nadin-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r1, 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @nadin-Starkware)

@nadin-Starkware nadin-Starkware changed the title feat(starknet_integration_tests): add db path argument to node_setup for configurable DB storage feat(starknet_integration_tests): add db path argument to node_setup … Feb 5, 2025
@nadin-Starkware nadin-Starkware changed the base branch from spr/main/675b21e5 to main February 5, 2025 14:13
@nadin-Starkware nadin-Starkware changed the title feat(starknet_integration_tests): add db path argument to node_setup … feat(starknet_integration_tests): add db path argument to node_setup for configurable DB storage Feb 5, 2025
Copy link

github-actions bot commented Feb 5, 2025

Artifacts upload workflows:

Copy link
Collaborator Author

@nadin-Starkware nadin-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 8 of 8 files at r4.
Reviewable status: 6 of 8 files reviewed, all discussions resolved (waiting on @nadin-Starkware)

Copy link
Collaborator Author

@nadin-Starkware nadin-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @nadin-Starkware)

@nadin-Starkware nadin-Starkware added this pull request to the merge queue Feb 5, 2025
@nadin-Starkware nadin-Starkware changed the title feat(starknet_integration_tests): add db path argument to node_setup for configurable DB storage feat(starknet_integration_tests): add db path argument to node_setup … Feb 5, 2025
Merged via the queue into main with commit af0c11e Feb 5, 2025
30 of 31 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants