Skip to content

SQL-2544: Merge on-prem-eap branch into master #337

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

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

bucaojit
Copy link
Member

@bucaojit bucaojit commented Apr 1, 2025

Note: Still working through eap integration test and evergreen issues, other area can be reviewed.


Merging the eap branch into master so that we only have one branch to manage and avoid needing to cherry-pick.

Added version check in MongoConnection to only allow eap builds to support direct connection.
Added gradle changes for running eap integration tests.
Added conditional logic for whether to run tasks or not based on the BUILD_TYPE env variable.

jchemburkar and others added 23 commits March 26, 2025 16:04

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
* add eap to jar names; disable publishing to maven

* fix s3 puts

* remove silk

* update bucket name

* cleanup evg  file

* cleanup pt2

* remove final bucket ref

* feedback

Partially verified

This commit is signed with the committer’s verified signature.
bucaojit’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
…mongodb#288)

* SQL-2380: Initial evergreen attempt to fetch library files

* SQL-2380: Do not use variables

* SQL-2380: Fix variables

* SQL-2380: Update build task to fetch all libraries

* SQL-2380: Special case windows for now

* SQL-2380: Remove debug code

* SQL-2380: Debug code to check that files are included in jar

* SQL-2380: Clean up debug code

* SQL-2380: Restore unintended change

* SQL-2380: Parse lib version from tag and use that for fetching

* SQL-2380: Fix typo

* SQL-2380: Properly export new variable

* Update .evg.yml

Co-authored-by: Natacha Bagnard <[email protected]>

* Update .evg.yml

Co-authored-by: Patrick Meredith <[email protected]>

---------

Co-authored-by: Natacha Bagnard <[email protected]>
Co-authored-by: Patrick Meredith <[email protected]>

Partially verified

This commit is signed with the committer’s verified signature.
bucaojit’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
…er (mongodb#290)

* Add integration tests

* Load library based on JVMplatform/os info
---------

Co-authored-by: Oliver Bucaojit <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
This reverts commit d3d606c.

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
…fetch function in JDBC (mongodb#291)

* remove fetch mongosqltranslate windows

* rename windows folder to be consistent with evergreen

Partially verified

This commit is signed with the committer’s verified signature.
bucaojit’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
* Release artifacts to translators-connectors-releases/eap/mongo-jdbc-driver-eap/
Co-authored-by: Oliver Bucaojit <[email protected]>

Partially verified

This commit is signed with the committer’s verified signature.
bucaojit’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
* Update logic to extract versions

* Use correct input

Co-authored-by: Oliver Bucaojit <[email protected]>

---------

Co-authored-by: Oliver Bucaojit <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
* SQL-2385: JDBC documentation

* feedback and formatting

Partially verified

This commit is signed with the committer’s verified signature.
bucaojit’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
* Use property to flag tag triggered releases

* Simplify logic

* Fix typ

* Adding useful build logs

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
* SQL-2387: upload jdbc docs

* udpate name

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
* SQL-2423: correctly report db version

* test length

* spotless

* rework to be more streamlined

* SQL-2423: update logic

* spotless

* add logging

* reset libmongosqltranslate

* refactor

* add comment

* spotless

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
* SQL-2461: Add getCursorName

* SQL-2461: Add getCursorName

* SQL-2461: Add getCursorName

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
* SQL-2436: Split variables intialization for JDBC

* SQL-2436: Move SSDLC variables to first logging command

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
* add handling for non-integer indexes

* change null to empty string

* add filter to stream to remove non-integer indexes

* add boolean valueType to sortableBsonDoc

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
* SQL-2463: update release instructions

* change pr base

* remove files

* add quotes

* wording change

* clarify tags

* clarify versioning

* clarifications

Partially verified

This commit is signed with the committer’s verified signature.
bucaojit’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.

Partially verified

This commit is signed with the committer’s verified signature.
bucaojit’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
* Augment original uri for specific auth mech

* remove redundant comments

* Throw instead of returning Null when the augment the uri won't work

* Don't forget to wrap the exception in a SQLException

* Spotless

Partially verified

This commit is signed with the committer’s verified signature.
bucaojit’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
* Add THIRDPARTY-LICENSE notice

* Clean-up

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
)

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
@bucaojit bucaojit requested a review from a team as a code owner April 1, 2025 16:28
.evg.yml Outdated
@@ -713,11 +832,21 @@ functions:
script: |
ARTIFACTS_DIR=artifacts
S3_ARTIFACTS_DIR='mongo-jdbc-driver/artifacts/${version_id}/${build_variant}'
export BUILD_TYPE="snapshot"
Copy link
Member Author

Choose a reason for hiding this comment

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

Added this BUILD_TYPE variable to use for the tasks to determine whether the eap or standard build is running.

mongosqlTranslate.getMongosqlTranslateVersion().version;
if (!mongosqlTranslate.checkDriverVersion().compatible) {
String version = MongoDriver.getVersion();
if (MongoDriver.isEapBuild()) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Added check for build type based on whether the version contains libv

@@ -12,6 +12,8 @@ import com.github.jk1.license.render.TextReportRenderer

if (project.hasProperty('isTagTriggered')) {
version = getAbbreviatedGitVersion()
} else if (project.hasProperty('isEapBuild')){
Copy link
Member Author

Choose a reason for hiding this comment

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

Added this property for integration tests to set the version to the eap format.

bucaojit added 2 commits April 1, 2025 09:54

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
Copy link
Member

@terakilobyte terakilobyte left a comment

Choose a reason for hiding this comment

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

Really good work! I had one question/concern, and a request: Can you run an eap build to make sure it all functions?

.evg.yml Outdated
@@ -167,6 +134,8 @@ tasks:
- func: "run smoke test"

- name: "publish-maven"
# TODO: remove this before merging eap branch back into main branch, to allow download center to update.
Copy link
Member

Choose a reason for hiding this comment

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

Wondering if we should put a check in the publish-maven task that prevents it from functioning if eap.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, sure I added some checks for publish-maven, publish-s3, download center, and ssdlc tasks.

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
@bucaojit bucaojit requested a review from nbagnard April 2, 2025 22:34

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
@bucaojit
Copy link
Member Author

bucaojit commented Apr 4, 2025

@terakilobyte Here's a run with the eap build:
https://evergreen.mongodb.com/version/67edcb5c187a62000708bd14
I manually set the variables:

+          export BUILD_TYPE="eap"
+          export MDBJDBC_VER=v3.0.0-beta-2-libv1.0.0-beta-3

The release has one smoke test failure, it looks like the version wasn't set to the EAP version I suspect because the git tag isn't set. I'll find something else I can set to fake that.

Verified

This commit was signed with the committer’s verified signature.
bucaojit Oliver Bucaojit
@bucaojit
Copy link
Member Author

bucaojit commented Apr 7, 2025

The last commit fixes the issue I was seeing with trying to manually test the eap build with setting the env variables to BUILD_TYPE=eap.
Here's the evergreen results for that:
https://evergreen.mongodb.com/version/67f45a798c388b00076b053d

Copy link
Collaborator

@nbagnard nbagnard left a comment

Choose a reason for hiding this comment

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

Pretty good work getting all the way there already! 🔥

I reviewed as thoroughly as I could and noted a couple of things.
But I will likely have to pull it and use it to do the final review pass.

./gradlew :smoketest:test -Psmoketest
EXITCODE=$?
./resources/run_adf.sh stop
exit $EXITCODE

"export variables":
- command: shell.exec
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think something happened and the commands have been duplicated/added to each other.
My guess it that you want to dedup this and tune the step where MDBJBC_VER and LIBMONGOSQLTRANSLATE are calculated.

Comment on lines +897 to +907
if [[ "${triggered_by_git_tag}" == *"-libv"* ]]; then
echo "Detected EAP tag format."
export BUILD_TYPE="eap"
else
echo "Setting standard build."
export BUILD_TYPE="standard"
fi
export MDBJDBC_VER=$(echo ${triggered_by_git_tag} | sed s/v//)
else
export MDBJDBC_VER=snapshot
export BUILD_TYPE=snapshot
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if [[ "${triggered_by_git_tag}" == *"-libv"* ]]; then
echo "Detected EAP tag format."
export BUILD_TYPE="eap"
else
echo "Setting standard build."
export BUILD_TYPE="standard"
fi
export MDBJDBC_VER=$(echo ${triggered_by_git_tag} | sed s/v//)
else
export MDBJDBC_VER=snapshot
export BUILD_TYPE=snapshot
if [[ "${triggered_by_git_tag}" == *"-libv"* ]]; then
echo "Detected EAP tag format."
export BUILD_TYPE="eap"
# tag should be formatted as 'v<JDBC major>.<minor>.<patch>-libv<libmongosqltranslate major>.<minor>.<patch>
export MDBJDBC_VER=$(echo ${triggered_by_git_tag} | awk -F'-libv' '{print $1}' | sed s/v// )
export LIBMONGOSQLTRANSLATE_VER=$(echo ${triggered_by_git_tag} | awk -F'-libv' '{print $2}')
else
echo "Setting standard build."
export BUILD_TYPE="standard"
export MDBJDBC_VER=$(echo ${triggered_by_git_tag} | sed s/v//)
fi
else
export MDBJDBC_VER=snapshot
export LIBMONGOSQLTRANSLATE_VER=snapshot
export BUILD_TYPE=snapshot

Comment on lines +185 to +186
private int serverMajorVersion;
private int serverMinorVersion;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these variables used?

GetNamespacesResult namespaceResult =
mongoSQLTranslate.getNamespaces(currentDB.getName(), sql);

logger.log(Level.FINE, "Namespaces: " + namespaceResult);
Copy link
Collaborator

Choose a reason for hiding this comment

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

We want to keep the logs. It's probably because I pushed the PR after you started the merge work

Copy link
Collaborator

Choose a reason for hiding this comment

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

You don't want to revert the changes in src/main/java/com/mongodb/jdbc/mongosql. I believe.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Keep file from master here too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Keep file from master here too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Keep file from master here too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This one is trickier. You want to keep the first 186 lines from master, but incorporate the fixes for empty schemas done later in the file.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Keep file from master here too.

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.

None yet

7 participants