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

[Proposal] Support DocumentDB by replacing certain MongoDB operations #4812

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kwx4957
Copy link
Contributor

@kwx4957 kwx4957 commented Aug 6, 2024

Proposed changes

  • Add mongoDB features proposal

the two operators $facet and $bucket are not supported by AWS. We are using the following features in graphQL and expect that modifying them with other features or code will make it easier to run LitmusChaos on AWS DocumentDB

Also $lookup does not supported multiple join

Related issue: #4459

Before

he following 2 unsupported operators were found:
  $facet | found 8 time(s)
  $bucket | found 1 time(s)

Unsupported operators by filename and line number:
  $facet | lines = found 8 time(s)
    ../../litmus/chaoscenter/graphql/server/pkg/chaos_infrastructure/service.go | lines = [664, 841]
    ../../litmus/chaoscenter/graphql/server/pkg/chaos_experiment/handler/handler.go | lines = [733, 955, 1131]
    ../../litmus/chaoscenter/graphql/server/pkg/chaos_experiment_run/handler/handler.go | lines = [531]
    ../../litmus/chaoscenter/graphql/server/pkg/environment/handler/handler.go | lines = [346]
    ../../litmus/chaoscenter/graphql/server/pkg/chaoshub/service.go | lines = [922]
  $bucket | lines = found 1 time(s)
    ../../litmus/chaoscenter/graphql/server/pkg/chaos_experiment/handler/handler.go | lines = [1106]
msg:"DB aggregate stage error: Aggregation stage not supported: '$lookup on multiple join conditions'"

After

Auth server

Processed 71 files, skipped 0 files
No unsupported operators found.
The following 24 supported operators were found:

Graphql server

Processed 149 files, skipped 0 files
No unsupported operators found.
The following 37 supported operators were found:

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have signed the commit for DCO to be passed.
  • Lint and unit tests pass locally with my changes

Special notes for your reviewer:

AWS support api scanning

@namkyu1999 namkyu1999 changed the title Add: replace mongoDB features proposal [Proposal] Support DocumentDB by replacing certain MongoDB operations Aug 6, 2024
@SarthakJain26
Copy link
Contributor

@kwx4957 thanks for the PR, the changes looks good to me, but we also need some way to restrict usage of mongo operators that are not supported by DocumentDB. Adding a pre-commit check or PR check would help here.

@namkyu1999
Copy link
Member

namkyu1999 commented Sep 2, 2024

+He will validate his PRs using Litmus-e2e tests.

Copy link
Member

@namkyu1999 namkyu1999 left a comment

Choose a reason for hiding this comment

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

We need to replace $lookup also

@kwx4957
Copy link
Contributor Author

kwx4957 commented Sep 8, 2024

seperate proposal and feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

3 participants