kbase / workspace_deluxe

The Workspace Service (WSS) is primarily a language independent remote storage and retrieval system for KBase typed objects (TO) defined with the KBase Interface Description Language (KIDL).
MIT License
1 stars 17 forks source link

Upgrade to MongoDB 7.0.4 #715

Closed Xiangs18 closed 7 months ago

codecov[bot] commented 8 months ago

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 ```diff @@ 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 commented 7 months ago

@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 commented 7 months ago

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 commented 7 months ago

Everything works with Mongo 3.

Xiangs18 commented 7 months ago

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

MrCreosote commented 7 months ago

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 commented 7 months ago
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 commented 7 months ago

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 commented 7 months ago

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

MrCreosote commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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

Xiangs18 commented 7 months ago

@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 commented 7 months ago

Updated as the last commit

MrCreosote commented 7 months ago

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