mirror of
https://github.com/fleetdm/fleet
synced 2026-05-09 18:20:48 +00:00
For #26366 # Checklist for submitter - [X] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. # Details This PR fixes an issue where the SQL parser in the UI doesn't recognize window functions like `OVER()` and marks the SQL as having syntax errors. The fix here is to update to a more modern parsing library. This involved updating some AST-parsing code we have for determining which tables are used in a query, for the purposes of feeding autocomplete and determining query compatibility. # Testing I tested this with the query mentioned in #26366 in Chrome, Firefox and Safari on MacOS. I also added new unit tests for our SQL helper functions. # Notes During testing I discovered that we were bundling two versions of the ACE editor into our frontend package. By upgrading one version by a couple of patches to make the two dependencies equal, we chop out ~300k from our bundle. |
||
|---|---|---|
| .. | ||
| valid_email | ||
| valid_jwt_token | ||
| valid_password | ||
| valid_url | ||
| validate_equality | ||
| validate_numericality | ||
| validate_presence | ||
| validate_query | ||
| validate_yaml | ||