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

MODELIX-1064 Bulk sync based MPS plugin (sync-plugin 3) #1396

Merged
merged 37 commits into from
Feb 28, 2025

Conversation

slisson
Copy link
Member

@slisson slisson commented Feb 18, 2025

This adds a new MPS plugin (org.modelix.mps:mps-sync-plugin3) which uses the algorithm in bulk-model-sync-lib.
It replaces the two sync plugins in modelix.mps-plugins.

The legacy-sync-plugin is still used in modelix.workspaces and uses the deprecated RestWebModelClient (aka "model client V1"). After migrating workspaces to this new plugin we can finally stop maintaining the old model client and its API in the model-server.

The second sync-plugin uses the ModelClientV2, but was never mature enough to be actually used. It is completely replaced by this new plugin, which is more stable and more feature complete.

Looking at how many changes were necessary in all the other modelix.core components, it makes sense to maintain the new plugin as part of this repository instead of the modelix.mps-plugins repository.

More work on this plugin will be necessary to further improve the stability (higher code coverage) and for the workspaces use case, but it's a first working version that can be used to collect feedback.

Copy link
Contributor

github-actions bot commented Feb 18, 2025

Test Results

  198 files  + 1    198 suites  +1   44m 27s ⏱️ + 12m 7s
1 103 tests +15  1 095 ✅ +15  8 💤 ±0  0 ❌ ±0 
1 113 runs  +15  1 105 ✅ +15  8 💤 ±0  0 ❌ ±0 

Results for commit 1187b88. ± Comparison against base commit b0f06ad.

This pull request removes 1 and adds 16 tests. Note that renamed tests count towards both.
org.modelix.model.sync.bulk.lib.test.RecreateProjectFromModelServerTest ‑ test same file content
org.modelix.model.client2.OAuthTest ‑ test()[jvm]
org.modelix.mps.sync3.ProjectSyncTest ‑ test binding can be disabled
org.modelix.mps.sync3.ProjectSyncTest ‑ test checkout into empty project
org.modelix.mps.sync3.ProjectSyncTest ‑ test descendants of new node are synchronized
org.modelix.mps.sync3.ProjectSyncTest ‑ test initial sync to server
org.modelix.mps.sync3.ProjectSyncTest ‑ test loading disabled persisted binding
org.modelix.mps.sync3.ProjectSyncTest ‑ test loading enabled persisted binding
org.modelix.mps.sync3.ProjectSyncTest ‑ test new node on model-server
org.modelix.mps.sync3.ProjectSyncTest ‑ test saving binding state
org.modelix.mps.sync3.ProjectSyncTest ‑ test sync after MPS change
…

♻️ This comment has been updated with latest results.

@slisson slisson force-pushed the MODELIX-1064-Bulk-sync-based-MPS-plugin-(sync-plugin-3) branch 3 times, most recently from 39a3bc7 to cb50e92 Compare February 19, 2025 12:15
Copy link
Contributor

github-actions bot commented Feb 19, 2025

JVM coverage report

Overall Project 57.59% -1.17%
Files changed 77.81%

File Coverage
ValidatingJob.kt 100% 🍏
ModelImporter.kt 100% 🍏
IModelClientV2.kt 100% 🍏
BuiltinLanguages.kt 100% 🍏
Collections.kt 100% 🍏
InvalidatingVisitor.kt 97.62% 🍏
AppLevelModelSyncService.kt 97.12% -2.88% 🍏
MPSProjectSyncMask.kt 96.72% 🍏
BindingWorker.kt 94.37% -5.63% 🍏
SolutionProducer.kt 92.18% -1.69% 🍏
MPSReferences.kt 92% 🍏
MPSRepositoryAsNode.kt 90.42% -5.65%
ModelSynchronizer.kt 90.38% -3.46% 🍏
PNodeReference.kt 89.83% 🍏
OTWriteTransaction.kt 88.67% 🍏
ModelClientV2.kt 88.48% -0.68% 🍏
KeyValueLikeModelServer.kt 87.87% -5.09%
ValueWithMutex.kt 87.85% -12.15% 🍏
MPSModuleReferenceAsNode.kt 87.8% -8.13%
ModelixJWTUtil.kt 87.41% 🍏
MPSModuleAsNode.kt 86.17% -8.94%
MPSWritableNode.kt 84.65% -0.45% 🍏
MPSModelImportAsNode.kt 83.91% -12.64%
MPSInvalidatingListener.kt 83.71% -16.29% 🍏
AuthorizationConfig.kt 82.87% 🍏
NodeAssociationToModelServer.kt 80% 🍏
MPSProjectModuleAsNode.kt 80% -10.53%
IWritableNode.kt 79.44% -8.89%
MPSModelAsNode.kt 79.09% -10.87%
BackoffStrategy.kt 78.18% -21.82%
INodeReference.kt 76.04% -3.13%
AuthorizationPlugin.kt 75.74% -4.58% 🍏
AddNewChildOp.kt 75.51% -11.43%
ModelSyncService.kt 75.5% -24.5%
MPSSingleLanguageDependencyAsNode.kt 75.22% -2.99%
ModelPersistenceWithFixedId.kt 74.73% -1.08% 🍏
OperationSerializer.kt 73.6% -0.09% 🍏
ModelixAuthClient.kt 72.56% -5.64%
MPSArea.kt 68.71% -0.6% 🍏
MPSDevKitDependencyAsNode.kt 66.67% -5.46%
MPSGenericNodeAdapter.kt 66.33% -8.08%
MPSJavaModuleFacetAsNode.kt 66.17% -24.06%
MPSModuleDependencyAsNode.kt 56.26% -1.87%
InvalidationTree.kt 56.08% -21.79%
AccessTokenPrincipal.kt 55.56% -29.63%
LazyLoading.kt 52.13% 🍏
MPSProjectAsNode.kt 50.74% -47.78%
IModelMask.kt 50% -50%
MPSBulkSynchronizer.kt 38.57% -0.64%
IModelSyncService.kt 26.32% -73.68%
INode.kt 18.3% -0.57%
ModelSyncStartupActivity.kt 0%
HistoryHandler.kt 0% -17.2%
CompositeFilter.kt 0% -21.74%
IncludedModulesFilter.kt 0% 🍏

@slisson slisson force-pushed the MODELIX-1064-Bulk-sync-based-MPS-plugin-(sync-plugin-3) branch from 1ed0dc5 to 2066ff8 Compare February 19, 2025 12:44
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

detekt found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@slisson slisson force-pushed the MODELIX-1064-Bulk-sync-based-MPS-plugin-(sync-plugin-3) branch 5 times, most recently from 3284d17 to 9df98d7 Compare February 26, 2025 14:23
…x node

Nodes stored on the model-server used to have the format `pnode:<nodeId>@<branchId>`.
Since version 3.17.0, Modelix is already prepared for switching to the preferred format
`modelix:<branchId>@<nodeId>`.

BREAKING CHANGE: model-client versions before 3.17.0 are incompatible to this new release
At least on Mac with temurin 21 the executable isn't found if no absolute path is used.
An exception may heal itself if the user continues editing. Without ignoring exceptions,
the synchronization will just stop.
Otherwise, it can't be used for debugging authentication issues.
Otherwise, the client is blocked forever if there is no user doing the login.
… model-server

Instead of copying all the jar libraries and having our own shell script we can just use the gradle
plugin, that already assembles everything properly.
@slisson slisson force-pushed the MODELIX-1064-Bulk-sync-based-MPS-plugin-(sync-plugin-3) branch 2 times, most recently from 120a9b7 to a8b6fcc Compare February 28, 2025 09:13
@slisson slisson marked this pull request as ready for review February 28, 2025 15:29
@slisson slisson requested review from mhuster23 and a team as code owners February 28, 2025 15:29
@slisson slisson merged commit 60780bd into main Feb 28, 2025
22 checks passed
@slisson slisson deleted the MODELIX-1064-Bulk-sync-based-MPS-plugin-(sync-plugin-3) branch February 28, 2025 15:58
@slisson
Copy link
Member Author

slisson commented Feb 28, 2025

🎉 This PR is included in version 12.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant