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

Configure CLI arguments from environment variables #482

Closed
fracek opened this issue Jun 4, 2024 · 1 comment · Fixed by #483
Closed

Configure CLI arguments from environment variables #482

fracek opened this issue Jun 4, 2024 · 1 comment · Fixed by #483
Assignees
Labels
enhancement New feature or request

Comments

@fracek
Copy link

fracek commented Jun 4, 2024

I'm using starknet-devnet-rs to test Starknet React V3 and we're hitting an issue with pending blocks and accounts (related to #474). The --blocks-on-demand flag helps with the issue.

We're running devnet as a service in our github actions, but github actions doesn't allow passing additional arguments to the container. I propose to make all cli arguments configurable through environment variables so that they can be used in ci.

@FabijanC FabijanC added the enhancement New feature or request label Jun 4, 2024
@FabijanC FabijanC self-assigned this Jun 4, 2024
@FabijanC
Copy link
Contributor

FabijanC commented Jun 4, 2024

I'm assigning myself. Seems like it could be as simple as

  • expanding the clap features in Cargo.toml with env
  • using #[arg(env = VAR_NAME)] on each CLI param in cli.rs.

Note

--cli-params take precedence over ENV_VARS

I.e. ACCOUNTS=0 cargo run -- --accounts 1 would spawn one predeployed account

Would also enable closing of #475.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants