-
Notifications
You must be signed in to change notification settings - Fork 9
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
genpolicy: add flag for cache path #593
Conversation
b8b4bfd
to
a7cd4d0
Compare
cli/cmd/generate.go
Outdated
@@ -391,7 +391,7 @@ func addWorkloadOwnerKeyToManifest(manifst *manifest.Manifest, keyPath string) e | |||
func generatePolicyForFile(ctx context.Context, genpolicyPath, regoPath, policyPath, yamlPath string, logger *slog.Logger) ([32]byte, error) { | |||
args := []string{ | |||
"--raw-out", | |||
"--use-cached-files", | |||
"--layers-cache-file-path=./layers-cache.json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be made configurable through a flag, defaulting to the file being at a default location within the configured workspaceDir.
bae60df
to
228a55c
Compare
Done. Do we already have a use for this e.g. somewhere in the CI? We currently don't list explicit CLI features in the docs, so there's also nothing to add here, I assume. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we already have a use for this e.g. somewhere in the CI?
As you correctly merge cache-path with workspace-dir, this change will already have effect on the dev workflow where the workspace is set. We will now generate on every just generate
invocation, where we would previously often use the cache. A shift towards more correctness at the cost of performance, let's see how it goes.
228a55c
to
0e7f658
Compare
Upstream PR: kata-containers/kata-containers#9864
For now, this should have no change to the user.
The question is, how we now want to use this option. Also have a similar flag in our CLI or just have a general home/.config path.
TODO:
git format-patch
to create initial patch file