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

feat(subs,deno): advanced filters + context util + replay aware logger #930

Merged
merged 10 commits into from
Dec 9, 2024

Conversation

michael-0acf4
Copy link
Contributor

@michael-0acf4 michael-0acf4 commented Nov 28, 2024

Solves MET-720, MET-749 and MET-760.

Basic overview

Given an expression tree, a field can represent either an operator (e.g., and, or, lte, etc.) or a 'special' field (started_at, ended_at, status).

We can now answer queries such as: 'List all failed runs that started between x and y but did not end at z, where the value is not null, or alternatively completed but returned null'

Example:

{
  or: [
    {
      and: [
        { status: { contains: '"ERROR"' } },
        { started_at: { gte: <x> } },
        { started_at: { lt: <y> } },
        { ended_at: { not: { eq: <z> } } }
      ]
    },
    {
      and: [
        { status: { eq: '"COMPLETED"' } },
        {  eq: 'null' }
      ]
    }
  ]
}

Migration notes

None

  • The change comes with new or modified tests
  • Hard-to-understand functions have explanatory comments
  • End-user documentation is updated to reflect the change

@michael-0acf4 michael-0acf4 marked this pull request as draft November 28, 2024 16:28
@michael-0acf4 michael-0acf4 changed the title feat(sub,deno): advanced filters + context util + replay aware logger feat(subs,deno): advanced filters + context util + replay aware logger Nov 28, 2024
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 84.34164% with 44 lines in your changes missing coverage. Please review.

Project coverage is 77.75%. Comparing base (0787087) to head (06499d8).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../typegate/src/runtimes/substantial/filter_utils.ts 84.48% 36 Missing ⚠️
src/typegraph/deno/src/runtimes/deno.ts 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #930      +/-   ##
==========================================
+ Coverage   77.68%   77.75%   +0.06%     
==========================================
  Files         149      152       +3     
  Lines       18500    18840     +340     
  Branches     1795     1868      +73     
==========================================
+ Hits        14372    14649     +277     
- Misses       4105     4167      +62     
- Partials       23       24       +1     

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

@michael-0acf4 michael-0acf4 marked this pull request as ready for review December 3, 2024 18:16
zifeo
zifeo previously approved these changes Dec 4, 2024
@michael-0acf4 michael-0acf4 merged commit 2ea7a48 into main Dec 9, 2024
9 of 11 checks passed
@michael-0acf4 michael-0acf4 deleted the advanced-filters branch December 9, 2024 07:54
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.

3 participants