Skip to content

♻️ refactor(eest): Migrate env_init to eest make env #996

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

Merged
merged 6 commits into from
Dec 5, 2024

Conversation

raxhvl
Copy link
Member

@raxhvl raxhvl commented Dec 5, 2024

🗒️ Description

This tiny PR introduces the eest make config command. It would be nice to have this included in the upcoming release; I'd rather not have a dangling module in it.

🔗 Related Issues

Closes #970

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
  • Tests: A PR with removal of converted JSON/YML tests from ethereum/tests have been opened.
  • Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

Copy link
Member

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

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

Thanks @raxhvl! It would def be nice to have this cleaned up in the upcoming release.

I had in mind we'd name this make sub-comand env, i.e.,

uv run eest make env

as I think we're likely to subsequently add a config sub-command that helps users create a user-specific config profile for use within EEST.

Were you anticipating having the env.vaml generation just one step of creating a broader user config profile? Ideas welcome.

Btw, we're suffering from unrelated fails again in the CI - fix in progress.

@raxhvl
Copy link
Member Author

raxhvl commented Dec 5, 2024

Thanks for flagging this @danceratopz!

I now remember our earlier discussion about the name. eest make env is 🤌.

@danceratopz danceratopz added type:refactor Type: Refactor scope:eest Scope: Changes to eest CLI command labels Dec 5, 2024
Copy link
Member

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

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

Thanks for the update @raxhvl, just fixed up a couple of other instances in the docs. Otherwise, looks good to me!

@danceratopz danceratopz self-assigned this Dec 5, 2024
Copy link
Contributor

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

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

LGTM! Nice addition :)

Just one question - was there a reason to opt for env.yaml over .env?
My gut would have said to use .env instead - and load the env vars directly with loadenv() etc

@danceratopz danceratopz changed the title ♻️ refactor(eest): Migrate env_init to eest make config ♻️ refactor(eest): Migrate env_init to eest make env Dec 5, 2024
@raxhvl raxhvl force-pushed the feat/eest-make-config branch from 9ac7ab8 to 8d6c517 Compare December 5, 2024 13:39
@danceratopz
Copy link
Member

Just one question - was there a reason to opt for env.yaml over .env?
My gut would have said to use .env instead - and load the env vars directly with loadenv() etc

A .env normally contains key-value pairs, we're using a yaml file. 🙂

@raxhvl
Copy link
Member Author

raxhvl commented Dec 5, 2024

My gut would have said to use .env instead - and load the env vars directly with loadenv() etc

.env was my first consideration too.

YAML is preferred over .env primarily because it allows for nested configurations. For example, consider the gentest config:

remote_nodes:
  - name: mainnet_archive
    # Replace with your Ethereum RPC node URL
    node_url: http://example.com/
    # Optional: Headers for RPC requests
    rpc_headers:
      client-secret: <secret>

@danceratopz danceratopz merged commit c1eeddb into ethereum:main Dec 5, 2024
3 checks passed
@raxhvl raxhvl deleted the feat/eest-make-config branch December 11, 2024 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:eest Scope: Changes to eest CLI command type:refactor Type: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

♻️ cli(eest): Move environment config generation under make CLI
3 participants