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 version collations to column definitions #8222

Merged

Conversation

Micah-Kolide
Copy link
Contributor

@Micah-Kolide Micah-Kolide commented Dec 19, 2023

Adding the new version collation sequences to various version columns.

Since I was already in a lot of the specs I also added some known NOCASE collations onto some columns:

macos apps bundle_identifier
macos managed_policies domain
macos system_extensions identifier
windows services name
windows windows_security_products type
windows windows_security_products state
osquery> .schema apps
CREATE TABLE apps(`name` TEXT, `path` TEXT, `bundle_executable` TEXT, `bundle_identifier` TEXT COLLATE NOCASE, `bundle_name` TEXT, `bundle_short_version` TEXT COLLATE VERSION, `bundle_version` TEXT COLLATE VERSION, `bundle_package_type` TEXT, `environment` TEXT, `element` TEXT, `compiler` TEXT, `development_region` TEXT, `display_name` TEXT, `info_string` TEXT, `minimum_system_version` TEXT COLLATE VERSION, `category` TEXT, `applescript_enabled` TEXT, `copyright` TEXT, `last_opened_time` DOUBLE, PRIMARY KEY (`path`)) WITHOUT ROWID;
osquery> SELECT name, bundle_identifier, bundle_version FROM apps WHERE bundle_identifier = 'io.osquery.AGENT' AND bundle_version > '5.10.1';
                  name = osquery.app
     bundle_identifier = io.osquery.agent
        bundle_version = 5.10.2
osquery> SELECT name, bundle_identifier, bundle_version FROM apps WHERE bundle_identifier = 'io.osquery.AGENT' AND bundle_version > '5.10.10';

@Micah-Kolide Micah-Kolide requested review from a team as code owners December 19, 2023 22:01
directionless
directionless previously approved these changes Dec 20, 2023
Copy link
Member

@directionless directionless left a comment

Choose a reason for hiding this comment

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

Awesome!

I'll give other folks a chance to review, but this looks good.

@directionless
Copy link
Member

I suspect the test failure is real

@Micah-Kolide
Copy link
Contributor Author

Micah-Kolide commented Dec 20, 2023

I suspect the test failure is real

Yeah I accidentally put the wrong value in for the rhel collation bitmask. Should be fixed now.

@directionless directionless merged commit cc2ece7 into osquery:master Dec 27, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants