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 ability to search promises by tag #144

Merged
merged 7 commits into from
Dec 19, 2023
Merged

Add ability to search promises by tag #144

merged 7 commits into from
Dec 19, 2023

Conversation

dfarr
Copy link
Member

@dfarr dfarr commented Dec 8, 2023

Optionally search by tags, if tags are provided all key/value pairs must match exactly. Example

{
  "a": "a",
  "b": "b"
}

Matches the promise:

{
  "id": "foo",
  "tags": {"a": "a", "b": "b", "c": "c"}
}

But not the promise:

{
  "id": "bar",
  "tags": {"a": "a"}
}

Additionally, we extract the tag resonate:invocation into a generated column and add an index on this column. This tag/column will be used to search for "top level" promises. This detail is not part of the promise specification and if not implemented will fall back to a standard tag search.

Right now we will only permit for a search by a single tag at a
time, used to implement invocation=true.
@@ -1,653 +0,0 @@
package service
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed because these are duplicates of the http/grpc tests

Copy link

codecov bot commented Dec 8, 2023

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (f8ac97f) 67.08% compared to head (8519918) 67.29%.

Files Patch % Lines
internal/api/errors.go 50.00% 6 Missing ⚠️
internal/app/subsystems/api/grpc/api/promise.pb.go 16.66% 5 Missing ⚠️
internal/app/coroutines/schedulePromises.go 0.00% 3 Missing ⚠️
...rnal/app/subsystems/aio/store/postgres/postgres.go 82.35% 2 Missing and 1 partial ⚠️
test/dst/model.go 25.00% 2 Missing and 1 partial ⚠️
internal/app/subsystems/aio/store/test/utils.go 75.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #144      +/-   ##
==========================================
+ Coverage   67.08%   67.29%   +0.20%     
==========================================
  Files          76       76              
  Lines        7213     7308      +95     
==========================================
+ Hits         4839     4918      +79     
- Misses       2062     2071       +9     
- Partials      312      319       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dfarr dfarr requested a review from guergabo December 18, 2023 21:28
@dfarr dfarr merged commit 657098b into main Dec 19, 2023
6 checks passed
@dfarr dfarr deleted the feature/tag-search branch December 19, 2023 20:29
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.

1 participant