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

Feature: devrunner config refactor #146

Merged
merged 17 commits into from
Aug 6, 2024
Merged

Conversation

sambukowski
Copy link
Contributor

@sambukowski sambukowski commented Aug 1, 2024

This pr updates the networks and base config of the cli to allow for dynamic loading and configuration of different services.

For the networks config, the networks-config.toml has been overhauled to allow for any number of services to be added to a given network. The internals of dev run have also been update to create and run the ProcessRunners based on the config. As a result, all networks (regardless of the services running) are now controlled by the config and dynamically created at runtime.

For the base config, the base-config.toml can now have any key-value pair added to the file and it will be parsed and added to the environment that the services are run in. To allow for this, the toml is no longer type specific and all entries are of the form snake_case_var_name = 'string value'

closes #145
closes #103

@sambukowski sambukowski marked this pull request as ready for review August 6, 2024 17:27
Copy link
Member

@steezeburger steezeburger left a comment

Choose a reason for hiding this comment

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

Let's rename baseConfig.go to base.go and networksConfig.go to networks.go.

This follows Go convention. Filenames should be all lower case and ideally should not duplicate the parent folder name. Since the files are in config/, I think we can drop the Config.go suffixes.

Edit for posterity: https://go.dev/blog/package-names

@steezeburger
Copy link
Member

Let's put the values from serviceVersions.go into constants.go and delete serviceVersions.go

Copy link
Member

@steezeburger steezeburger left a comment

Choose a reason for hiding this comment

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

Looks great!

@sambukowski sambukowski merged commit 0fd7d93 into main Aug 6, 2024
1 check passed
@sambukowski sambukowski deleted the feature/devrunner-config branch August 6, 2024 21:30
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.

Update devrunner config Add ability to add custom env vars to the environment.
2 participants