-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Summary <!-- Ideally, there is an attached Linear ticket that will describe the "why". If relevant, use this section to call out any additional information you'd like to _highlight_ to the reviewer. --> Currently, we can only do a direct match for key attributes (e.g. `workspace_id:1`). This PR improves the matching, namely: * Add wildcard support (`service:*foo*` will match `service:barfoobaz`) * Add multi-word support `service:'image processor'` will match `service:image processor`) Additionally this PR improves code quality: * Use a true query builder instead of rolling our code. I chose to use [squirrel](https://github.com/Masterminds/squirrel). This makes conditional queries a lot easier and removes usages of `fmt.Sprintf` which is just ripe for a sql injection. * Drop support for [testify suite](https://github.com/stretchr/testify#suite-package). This is currently unusable with vscode (golang/vscode-go#2414). ## How did you test this change? Verified space search works ![Screenshot 2023-02-21 at 10 50 49 AM](https://user-images.githubusercontent.com/58678/220422792-fb2dcd79-5ad8-453f-9feb-81f354f539ab.png) Verified wildcard search works ![Screenshot 2023-02-21 at 10 56 00 AM](https://user-images.githubusercontent.com/58678/220422942-34fdf347-268a-4372-8fee-19280e2ef39b.png) Verified we can search with body as well ![Screenshot 2023-02-21 at 10 56 36 AM](https://user-images.githubusercontent.com/58678/220423058-e8770d97-7a12-437a-bbce-b3a3a340895c.png) ## Are there any deployment considerations? <!-- Backend - Do we need to consider migrations or backfilling data? --> N/A
- Loading branch information
Showing
7 changed files
with
272 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.