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

Improve gitops dry run logging for query deletion #23202

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

williamtheaker
Copy link
Contributor

Current fleetctl gitops --dry-run output:

[+] would've applied fleet config
[+] would've applied enroll secrets
[+] syncing 3 policies
[-] would've deleted policy foo
[-] would've deleted policy bar
[-] deleting 2 policies
[+] syncing 1 queries
[-] deleting query foo
[-] deleting query bar
[-] deleting 2 queries
[!] gitops dry run succeeded

^ It's not really deleting queries in a dry run, but the output can be alarming if you're not paying close attention.

Less scary/more accurate output for queries:

[+] would've applied fleet config
[+] would've applied enroll secrets
[+] syncing 3 policies
[-] would've deleted policy foo
[-] would've deleted policy bar
[-] deleting 2 policies
[+] syncing 1 queries
[-] would've deleted query foo
[-] would've deleted query bar
[-] deleting 2 queries
[!] gitops dry run succeeded

@mostlikelee
Copy link
Contributor

@williamtheaker great find!

Copy link
Contributor

@mostlikelee mostlikelee left a comment

Choose a reason for hiding this comment

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

LGTM!

@mostlikelee
Copy link
Contributor

@rachaelshaw can you review the docs update (typo correction)

@lukeheath
Copy link
Member

@williamtheaker This is great, thanks for the contribution!

@lukeheath lukeheath merged commit 86713f1 into fleetdm:main Oct 25, 2024
15 of 20 checks passed
@williamtheaker williamtheaker deleted the patch-2 branch October 25, 2024 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants