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

Re-visit restart policy and equivalent #495

Open
mangas opened this issue Apr 29, 2021 · 0 comments
Open

Re-visit restart policy and equivalent #495

mangas opened this issue Apr 29, 2021 · 0 comments
Labels

Comments

@mangas
Copy link
Contributor

mangas commented Apr 29, 2021

Restart policy is now split between 2 places:

https://github.com/appvia/kev/blob/5a1c05c568427024fb3ef76a9fc0a5d6bdd1e341/pkg/kev/config/extensions.go#L187
https://github.com/appvia/kev/blob/5a1c05c568427024fb3ef76a9fc0a5d6bdd1e341/pkg/kev/converter/kubernetes/project_service.go#L408

and some really inconvenient assertions (IMO)
https://github.com/appvia/kev/blob/5a1c05c568427024fb3ef76a9fc0a5d6bdd1e341/pkg/kev/converter/kubernetes/project_service_test.go#L1052

A better way in my view would be to ensure all the logic for restart policy gets moved to extensions.go and that a type of errors gets introduced (e.g ErrUnsupportedRestartPolicy). This makes the separation between presentation and validation by making it possible to assert the error occurred and moving the output handling to the UI.

@marcinc marcinc added enhancement New feature or request refactor and removed enhancement New feature or request labels Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants