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

Eliminate implicit magic from the rpk codebase #4530

Closed
twmb opened this issue May 3, 2022 · 2 comments
Closed

Eliminate implicit magic from the rpk codebase #4530

twmb opened this issue May 3, 2022 · 2 comments

Comments

@twmb
Copy link
Contributor

twmb commented May 3, 2022

rpk currently contains a lot of implicit magic:

  • viper auto mangles types when reading and writing the redpanda.yaml file; this has resulted in bugs or unexplained behavior
  • --set does not validate any input and just passes through text, attempting to marshal into whatever exists and silently accepting invalid input
  • rpk redpanda start passes through any unknown flags to redpanda
  • rpk container start passes through any unknown flags to each container's rpk container start
  • rpk container start has a hidden --image flag

This magic makes it very difficult to know what can be changed and what cannot be changed safely. We should eliminate this implicit magic to make every aspect above explicit. We likely want to preserve blind flag passing from rpk {redpanda,container} start, but something about it can likely be made more obvious.

The first step to this is to make everything implicit explicit. Doing so will allow us to remove viper, and then we can percolate up the changes from there.

@r-vasquez
Copy link
Contributor

We are close to this, do you know why --image flag in rpk container is hidden? Introduced by 9398696.

cc: @0x5d

@twmb
Copy link
Contributor Author

twmb commented May 19, 2023

I think this is done-enough, and the pass through flags aspect is no longer a goal to change. Closing.

@twmb twmb closed this as completed May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants