-
Notifications
You must be signed in to change notification settings - Fork 318
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 namespace
, before
, and after
to search endpoint
#2556
Conversation
Signed-off-by: wslulciuc <[email protected]>
Signed-off-by: wslulciuc <[email protected]>
Signed-off-by: wslulciuc <[email protected]>
Signed-off-by: wslulciuc <[email protected]>
namespace
, before
, and after
to search endpoint
Add support for the following parameters in the SearchDao: * `namespace` - match jobs or datasets within the given namespace. * `before` - match jobs or datasets before YYYY-MM-DD. * `after` - match jobs or datasets after YYYY-MM-DD. Relates to issue: #2550 Signed-off-by: Tatiana Al-Chueyr <[email protected]> Co-authored-by: Willy Lulciuc <[email protected]>
Signed-off-by: wslulciuc <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #2556 +/- ##
============================================
+ Coverage 83.31% 83.33% +0.01%
- Complexity 1289 1291 +2
============================================
Files 243 244 +1
Lines 5940 5940
Branches 280 279 -1
============================================
+ Hits 4949 4950 +1
Misses 844 844
+ Partials 147 146 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Signed-off-by: wslulciuc <[email protected]>
@QueryParam("before") @Valid @Pattern(regexp = YYYY_MM_DD) @Nullable String before, | ||
@QueryParam("after") @Valid @Pattern(regexp = YYYY_MM_DD) @Nullable String after) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wslulciuc Since App Wizard doesn't expose Instant
out of the box, would it be a possibility to define a custom parameter Instant converter and register it up at the MarquezApp.java
? Or would that be overkill for the problem we're solving here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, we'll continue to use the approach taken in our runsAPI:
Response markRunAs(@NonNull RunState runState, @QueryParam("at") String atAsIso) {
runService.markRunAs(runId, runState, Utils.toInstant(atAsIso));
return getRun();
}
But, agree a more long term solution would be to define a custom query param.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Problem
The
searchAPI
does not support filtering search results by namespace or date. See related issue #2550Solution
This PR updates the
search
endpoint to support the following query params:namespace
- will match jobs or datasets within the given namespace.before
- will match jobs or datasets beforeYYYY-MM-DD
.after
- will match jobs or datasets afterYYYY-MM-DD
.Related PRs: #2553, #2555
Checklist
CHANGELOG.md
(Depending on the change, this may not be necessary)..sql
database schema migration according to Flyway's naming convention (if relevant)