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

Add GitOps docs for "No team" #22273

Closed
wants to merge 11 commits into from
Closed

Conversation

lucasmrod
Copy link
Member

@lucasmrod lucasmrod commented Sep 20, 2024

  • @noahtalerman: I closed this PR and opened a new one here (w/ same changes) against the docs-v4.57.0 branch.

As of 4.57.0, each minor release has it's own reference docs branch as part of a new process to make sure that every change to how Fleet is used is reflected live on the website in reference documentation at release day: https://github.com/fleetdm/fleet/pull/22284/files#diff-d426c2ae6cac2a2baffd54adae00ad7bb936dbb17a873f93a327d5763f7fb574R141


Docs for #21790.

Copy link
Member

@iansltx iansltx left a comment

Choose a reason for hiding this comment

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

Couple tweaks, but largely LGTM

docs/Configuration/yaml-files.md Outdated Show resolved Hide resolved
platform: linux
description: "This policy checks that Firefox is installed and up to date."
resolution: "Install Firefox version 129.0.2 or higher."
query: "SELECT 1 FROM deb_packages WHERE name = 'firefox' AND version_compare(version, '129.0.2') >= 0;"
Copy link
Member

Choose a reason for hiding this comment

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

Let's use 129.0.3 here; I know the query for 129.0.2 is bugged based on the rest of the build string Mozilla provides, so this is a bad example 😬

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't follow sorry, this example has been working for me on my Ubuntu VM.

Copy link
Member

Choose a reason for hiding this comment

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

So, I tested an upgrade path from Firefox 129.0.0, as https://ftp.mozilla.org/pub/firefox/releases/129.0/linux-x86_64/en-US/firefox-129.0.deb. The version string on that .deb is 129.0~build2, which appears to pass the version_compare call against 129.0.2, so it wouldn't register as outdated and the upgrade wouldn't be pushed.

It looks like this isn't a one-off either, as e.g. the current 129.0.2 for amd64 is build1.

I was able to repro this in my QA of #20895 / #19551. Let me know if you need help repro'ing this.

Copy link
Member Author

@lucasmrod lucasmrod Sep 20, 2024

Choose a reason for hiding this comment

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

Oh gotcha. Makes sense.

Isn't this broken for 129.0.3 too?

osquery> select version_compare('129.0~build2', '129.0.3') >= 0;
+-------------------------------------------------+
| version_compare('129.0~build2', '129.0.3') >= 0 |
+-------------------------------------------------+
| 1                                               |
+-------------------------------------------------+

We could amend the query to remove any build suffixes or add a patch version 0 when it isn't present.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, yep.

And yeah, we should take that into account on the query if we're using FF as an example. I'm sure it's not the only package with an issue like this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, very hard to detect all edge cases with all apps, but... that's the point of this feature, you write a query per app (trade off ease of use vs flexibility). For most cases the compare_version SQL will work, if it doesn't you can modify it for your custom app/scripts.

Copy link
Member

Choose a reason for hiding this comment

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

Yep. Having this for FF May be a good way to show "if you need to customize for edge cases, this is how you could"

fleet-release
fleet-release previously approved these changes Sep 23, 2024
fleet-release
fleet-release previously approved these changes Sep 23, 2024
fleet-release
fleet-release previously approved these changes Sep 23, 2024
fleet-release
fleet-release previously approved these changes Sep 23, 2024
fleet-release
fleet-release previously approved these changes Sep 23, 2024
Copy link
Member

@noahtalerman noahtalerman left a comment

Choose a reason for hiding this comment

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

This is looking good! Added a couple commits to make examples consistent w/ how we're handling them in current reference docs.

@lucasmrod when you get the chance, can you please open a PR against the fleetdm/fleet-gitops repo to add a template teams/no-team.yml file?

@lucasmrod
Copy link
Member Author

when you get the chance, can you please open a PR against the fleetdm/fleet-gitops repo to add a template teams/no-team.yml file?

Will do. (Once we release 4.57.0 because the action uses the last released fleetctl IIRC)

fleet-release
fleet-release previously approved these changes Sep 23, 2024
fleet-release
fleet-release previously approved these changes Sep 23, 2024
@noahtalerman
Copy link
Member

Hey @lucasmrod heads up, I closed this PR and opened a new one here (w/ same changes) against the docs-v4.57.0 branch.

As of 4.57.0, each minor release has it's own reference docs branch as part of a new process to make sure that every change to how Fleet is used is reflected live on the website in reference documentation at release day: https://github.com/fleetdm/fleet/pull/22284/files#diff-d426c2ae6cac2a2baffd54adae00ad7bb936dbb17a873f93a327d5763f7fb574R141

@lucasmrod
Copy link
Member Author

Hey @lucasmrod heads up, I closed this PR and opened a new one here (w/ same changes) against the docs-v4.57.0 branch.

As of 4.57.0, each minor release has it's own reference docs branch as part of a new process to make sure that every change to how Fleet is used is reflected live on the website in reference documentation at release day: https://github.com/fleetdm/fleet/pull/22284/files#diff-d426c2ae6cac2a2baffd54adae00ad7bb936dbb17a873f93a327d5763f7fb574R141

Gotcha. I thought we were starting this new process on v4.58.0 given there was just one PR against docs-v4.57.0 (on Friday).

@noahtalerman
Copy link
Member

I thought we were starting this new process on v4.58.0 given there was just one PR against docs-v4.57.0 (on Friday).

I decided to start it this release (4.57) to give it a test drive :)

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.

5 participants