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

chore: improve dependency handling and use the DataGrip connector to MongoDB #6

Merged
merged 16 commits into from
May 23, 2024

Conversation

kmruiz
Copy link
Contributor

@kmruiz kmruiz commented May 17, 2024

Description

Checklist

Open Questions

@kmruiz kmruiz requested review from mcasimir and himanshusinghs May 17, 2024 12:45
@github-actions github-actions bot added the no release notes It's a chore and doesn't require release notes. label May 17, 2024
@kmruiz kmruiz changed the title chore: improve dependency handling and remove the mongodb driver chore: improve dependency handling and use the DataGrip connector to MongoDB May 23, 2024
@kmruiz kmruiz requested a review from addaleax May 23, 2024 15:18
maxParameterListSize: '10'
- name: FILE_NAME_INCORRECT
enabled: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to add comments to the YAML about why we're adding new rules here? That might not be easy to figure out in the future based on the file contents alone

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a comment for each rule explaining why it's disabled / enabled.

) = withContext(Dispatchers.IO) {
runQuery(
"""db.getSiblingDB("${namespace.database}")
.getCollection("${namespace.collection}")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want to account for escaping here? (This might already be addressed by your updates locally, but just checking)

Otherwise some kind of TODO might be nice, even if this is still WIP :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added some escaping now, thanks for pointing out! I was escaping only when converting a string to a namespace using the .toNs method, but not in the namespace constructor. Now I fixed it and it should be safe.


override fun beforeAll(context: ExtensionContext?) {
val annotation = context!!.requiredTestClass.getAnnotation(IntegrationTest::class.java)
val container = MongoDBContainer("mongo:${annotation.mongodb.versionString}-jammy")
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a clarifying question: container usage = We're not planning to run tests on platforms other than Linux?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure I follow, they should run on any environment with Docker/Podman (I'm running them on my Mac with Podman right now). Do you see any concern here?

Copy link

github-actions bot commented May 23, 2024

Coverage Report

Overall Project 87.42% -12.43%
Files changed 75.59%

Module Coverage
jetbrains-plugin 98.92% -0.77%
mongodb-access-adapter 79.31% -20.69%
datagrip-access-adapter 75.26% -24.74%
Files
Module File Coverage
jetbrains-plugin BuildInformation.kt 100%
ActivatePluginPostStartupActivity.kt 89.8% -10.2%
mongodb-access-adapter BuildInfo.kt 100%
MongoDbDriver.kt 74.55% -25.45%
datagrip-access-adapter DataGripBasedReadModelProvider.kt 100%
DataGripMongoDbDriver.kt 65.7% -34.3% 🚫

@kmruiz kmruiz merged commit d531866 into main May 23, 2024
11 checks passed
@kmruiz kmruiz deleted the chore/subproject-build-improvements branch May 23, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no release notes It's a chore and doesn't require release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants