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

Upgrade to MongoDB 7.0.4 #715

Merged
merged 19 commits into from
Feb 24, 2024
Merged

Upgrade to MongoDB 7.0.4 #715

merged 19 commits into from
Feb 24, 2024

Conversation

Xiangs18
Copy link
Collaborator

@Xiangs18 Xiangs18 commented Feb 6, 2024

No description provided.

Copy link

codecov bot commented Feb 6, 2024

Codecov Report

Merging #715 (58fb9e5) into develop (c14e3a6) will increase coverage by 0.00%.
The diff coverage is 83.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #715   +/-   ##
==========================================
  Coverage      87.66%   87.66%           
- Complexity      5328     5329    +1     
==========================================
  Files            228      228           
  Lines          17646    17648    +2     
  Branches        2573     2573           
==========================================
+ Hits           15469    15471    +2     
  Misses          1714     1714           
  Partials         463      463           

@Xiangs18
Copy link
Collaborator Author

Xiangs18 commented Feb 20, 2024

@MrCreosote
https://github.com/kbase/workspace_deluxe/actions/runs/7978938773/job/21785169860?pr=715#step:6:1881
Have you seen errors like this before? There are 5 tests failed for the same reason.

@MrCreosote
Copy link
Member

It looks like the authcontroller isn't starting up properly. Does everything work with Mongo 3? If not we may need to update the auth jar once it's released before the tests will pass

@Xiangs18
Copy link
Collaborator Author

Everything works with Mongo 3.

@Xiangs18
Copy link
Collaborator Author

wait, are you saying we should use new auth2 jar to test?

@MrCreosote
Copy link
Member

MrCreosote commented Feb 20, 2024

If tests pass w/ mongo 3 and fail with 7 it looks like we'll need the new auth jar, yeah. Check the auth server logs to be sure

@Xiangs18
Copy link
Collaborator Author

Xiangs18 commented Feb 21, 2024

Screenshot 2024-02-20 at 4 17 47 PM

we need to do the following:

  1. change us.kbase.test.auth2 to us.kbase.auth2
    • is already in test dir
    • fully convert to gradle format
  2. move authcontroller package into main
    • Authcontroller class file is not a test file
    • Authcontroller can be imported from the new jar created

@MrCreosote
Copy link
Member

I'm not sure why any changes are needed - I got the WS tests to pass with the new auth jar.

  1. The test classes and main classes should not be in the same package to ensure only the public API are tested.
  2. The authcontroller is for tests, hence it's in the test package. It's definitely not for use in non-test code

@Xiangs18
Copy link
Collaborator Author

May I know how did you import AuthController class from the new auth jar?

@MrCreosote
Copy link
Member

I didn't have to change the imports at all from what I recall - unfortunately I deleted the changes once I confirmed it worked. Let me know if you can't get things working and I'll set things up again

@Xiangs18
Copy link
Collaborator Author

Xiangs18 commented Feb 21, 2024

Here is what I am struggling:

  1. ./gradlew jar in auth2 to create the new auth2 jar
  2. Try to use the new auth2 jar in the ws repo, but failed to import us.kbase.test.auth2.authcontroller.AuthController;

I would love to know how did you make it work. Ah, us.kbase.test is not even inside the new auth2 jar.

@MrCreosote
Copy link
Member

MrCreosote commented Feb 21, 2024

You need to use the fatTestJar target: https://github.com/kbase/auth2/blob/develop/build.gradle#L111

@Xiangs18
Copy link
Collaborator Author

Xiangs18 commented Feb 21, 2024

@MrCreosote
I made a temp branch in jars repo to test against v7 on ws. Once you think auth2 is completely ready, I can submit a fat jar PR in jars repo and revert -b changes on build.xml and Dockerfile in the current PR.

@Xiangs18 Xiangs18 changed the title [WIP] Upgrade to MongoDB 7.0.4 Upgrade to MongoDB 7.0.4 Feb 21, 2024
@Xiangs18
Copy link
Collaborator Author

Xiangs18 commented Feb 22, 2024

Updated as the last commit

Copy link
Member

@MrCreosote MrCreosote left a comment

Choose a reason for hiding this comment

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

Looks pretty good, just some minor comments

.github/workflows/test.yml Outdated Show resolved Hide resolved
build.xml Outdated Show resolved Hide resolved
src/us/kbase/workspace/test/WorkspaceMongoIndex.java Outdated Show resolved Hide resolved
src/us/kbase/workspace/test/WorkspaceMongoIndex.java Outdated Show resolved Hide resolved
@MrCreosote
Copy link
Member

Looks good, but I just realized it needs release notes & a version bump to 0.14.3

@Xiangs18 Xiangs18 merged commit 182b08e into develop Feb 24, 2024
9 of 10 checks passed
@Xiangs18 Xiangs18 deleted the dev-mongo_upgrade branch February 25, 2024 22:58
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