Skip to content

fix(mongo): Remove aggregate from operations whose arguments get serialized #3102

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

Merged
merged 2 commits into from
Dec 4, 2020

Conversation

lobsterkatie
Copy link
Member

Removing aggregate as an operation whose arguments we serialize because pipeline values are complex nested objects which don't serialize well.

aggregate syntax: db.collection.aggregate(pipeline, options)
(see https://docs.mongodb.com/manual/reference/method/db.collection.aggregate/#db.collection.aggregate)

pipeline syntax: [ <stage>, <...> ]
(see https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/)

Example stage syntax: { $match: { <query> } }
(see https://docs.mongodb.com/manual/reference/operator/aggregation/match/ and https://docs.mongodb.com/manual/reference/operator/aggregation/match/#equality-match)

Stages can even end up nested in other stages:

{ $facet:
   {
      <outputField1>: [ <stage1>, <stage2>, ... ],
      <outputField2>: [ <stage1>, <stage2>, ... ],
      ...
   }
}

(see https://docs.mongodb.com/manual/reference/operator/aggregation/facet/ and https://docs.mongodb.com/manual/reference/operator/aggregation/facet/#example)

@lobsterkatie lobsterkatie changed the title remove aggregate in favor of comment fix(mongo): Remove aggregate from operations whose arguments get serialized Dec 4, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2020

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 19.73 KB (0%)
@sentry/browser - Webpack 20.6 KB (0%)
@sentry/react - Webpack 20.6 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 26.88 KB (0%)

@lobsterkatie
Copy link
Member Author

Going to merge this since the broken tests have nothing to do with this change, and will fix the tests separately.

@lobsterkatie lobsterkatie merged commit b90dfd6 into master Dec 4, 2020
@lobsterkatie lobsterkatie deleted the kmclb-mongo-take-aggregate-back-out branch December 4, 2020 15:46
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.

2 participants