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

cli: factor out genpolicy #764

Merged
merged 2 commits into from
Aug 1, 2024
Merged

cli: factor out genpolicy #764

merged 2 commits into from
Aug 1, 2024

Conversation

burgerdev
Copy link
Contributor

@burgerdev burgerdev commented Jul 26, 2024

This PR moves the invocation of the genpolicy tool into its own package, to reduce the amount of code in cmd and allow for better testing.

This new package also knows which settings are appropriate for which platform. We would like to keep backward compatibility with respect to the cli flags for rules and settings. This is why the config is separate from the runner: the CLI gets the default config, (maybe) writes it to the files, and then starts the runner with the files.

@burgerdev burgerdev added the breaking change A user-affecting breaking change label Jul 26, 2024
@burgerdev burgerdev force-pushed the burgerdev/rules branch 4 times, most recently from f94bbff to 74967b6 Compare July 29, 2024 11:46
@burgerdev burgerdev marked this pull request as ready for review July 29, 2024 11:56
@burgerdev burgerdev requested a review from katexochen as a code owner July 29, 2024 11:56
cli/genpolicy/assets/allow-all.rego Outdated Show resolved Hide resolved
cli/genpolicy/genpolicy.go Outdated Show resolved Hide resolved
cli/genpolicy/genpolicy.go Outdated Show resolved Hide resolved
@burgerdev burgerdev added no changelog PRs not listed in the release notes and removed breaking change A user-affecting breaking change labels Jul 31, 2024
@burgerdev
Copy link
Contributor Author

Hey folks! I rewrote the PR - it's now fully backwards compatible.

@burgerdev burgerdev requested a review from Freax13 August 1, 2024 06:17
cli/cmd/generate.go Outdated Show resolved Hide resolved
packages/by-name/cli-release/package.nix Outdated Show resolved Hide resolved
cli/cmd/generate.go Outdated Show resolved Hide resolved
@burgerdev burgerdev merged commit a7c44d3 into main Aug 1, 2024
9 checks passed
@burgerdev burgerdev deleted the burgerdev/rules branch August 1, 2024 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog PRs not listed in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants