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

🤖 backported "Mongo java driver upgrade" #38461

Merged

Conversation

metabase-bot[bot]
Copy link
Contributor

@metabase-bot metabase-bot bot commented Feb 6, 2024

#38017

Important

Manual conflict resolution is required.
Checkout the branch and run ./backport.sh script. Force push your changes after cherry-picking.

@metabase-bot metabase-bot bot added the was-backported apply this to PRs that are themselves backports label Feb 6, 2024
* tmp: patched monger for 4.11.1 mongo java driver

* tmp: Update monger utils

Aggregation probably wont work now, but we are not using those from monger anyway. With this change in place I'm able to load needed namespaces and create test-data dataset successfully.

Commit contains lot of condo errors that should be resolved while porting.

* WIP: Monger removed in favor of java driver wrapper

* Update java driver wrapper

* Update srv test

* Update comments

* Use non keywordized run-command for `dbms-version`

* Fix according to e2e tests

* Cleanup

* Separate `java-driver-wrapper` into multiple namespaces

* Fix semantic type inference for serialized json

* Fix options for run-command

* Cleanup json namespace

* Cleanup conversion namespace

* Cleanup operators

* Update kondo in operators ns

* Cleanup connection namespace

* Cleanup mongo namespace

* Cleanup util namespace

* Add todo

* Move session related code to util

* Cleanup database namespace

* Update docstring for conn string generation

* Update docstrings

* Update tests

* Update linter for with macros

* Update modules/drivers/mongo/src/metabase/driver/mongo/connection.clj

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Update modules/drivers/mongo/src/metabase/driver/mongo/connection.clj

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Use transient in from-document for building a map

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Update can-connect to use let form

- Avoid nested `with-mongo-database` call.
- Avoid creating a set used for searching for database name.

* Remove redundant set use from describe-database

* Change from-document keywordize default to false

* Remove log message translation

* Update maybe-add-ssl-context-to-builder! to always return builder

* Indent from-document

* Remove redundant ConvertToDocument extensions

* Use oredered-map in do-find's sort

* Use ex-info in details-normalized

* Add imports and update comment in execute ns

* Update fixme comment

* Pass opts instead of a selection to from-document in do-find

* Avoid unnecessary double dot call

* Update connection test ns according to review remarks

* Make tests parallel

* Docstring update

* Update docstring

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
Copy link

replay-io bot commented Feb 6, 2024

StatusIn Progress ↗︎ 53 / 54
Commit5f87e6c
Results
1 Failed
  • should order columns correctly in saved native query exports
      AssertionError: Timed out retrying after 4000ms: Unable to find an element with the text: Started from. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
      Ignored nodes: comments, <script />, <style />
      <html
        lang="en"
        translate="no"
      >
        <head>
          <meta
            charset="utf-8"
          />
          <meta
            content="IE=edge"
            http-equiv="X-UA-Compatible"
          />
          <meta
            content...
⚠️ 1 Flaky
  • should create a new pulse
2104 Passed

@lbrdnk
Copy link
Contributor

lbrdnk commented Feb 6, 2024

Conflicts occured because of metabase.driver/describe-table-indexes (defined in modules/drivers/mongo/src/metabase/driver/mongo.clj). Method should be available since 49 according to docs/developers-guide/driver-changelog.md.

Method definition and its tests (metabase.driver.mongo-test/describe-table-indexes-test, metabase.driver.mongo-test/sync-indexes-info-test) has been removed. Also tx/create-db! defined in modules/drivers/mongo/test/metabase/test/data/mongo.clj was adjusted to avoid use of the method.

@lbrdnk lbrdnk requested review from calherries and a team February 6, 2024 12:41
@calherries calherries merged commit 0eb4c57 into release-x.48.x Feb 6, 2024
109 checks passed
@calherries calherries deleted the backport-113c05589ba920ab2f6f53a3269491fce3c93f18 branch February 6, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Database/Mongo was-backported apply this to PRs that are themselves backports
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants