-
Notifications
You must be signed in to change notification settings - Fork 134
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
Mirror feature #586
Mirror feature #586
Conversation
79b140d
to
7d039aa
Compare
server/src/main/java/org/eclipse/openvsx/UpstreamRegistryService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/eclipse/openvsx/HttpConnPollConfiguration.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/eclipse/openvsx/eclipse/EclipseServiceTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/eclipse/openvsx/search/DatabaseSearchServiceTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/eclipse/openvsx/search/ElasticSearchServiceTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/eclipse/openvsx/storage/AzureBlobStorageServiceTest.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/eclipse/openvsx/mirror/DataMirrorJobRequestHandler.java
Outdated
Show resolved
Hide resolved
I'm working on addressing issues that were noted in the review. This is why some discussions are marked as resolved; the fixing commit is not yet pushed. |
9fbc9ad
to
98e50a5
Compare
aab1f24
to
9b195d9
Compare
I have compared 7d039aa and the changes made in this branch and reverted hopefully the remaining changes that should not be included here – hence 9b195d9. Also reverted the elastic replicas disabling in 5907b37. Left unsquashed for now so that it's hopefully easier understood / easier to work with if we want to revert or similar. Will squash after everything compiles and everyone is good with the changes. Closed and re-opened by a keyboard combo accident 😄 |
4ab6338
to
b596704
Compare
@amvanbaren could you please take another look? Me and @akosyakov settled on refraining from big structural refactors, it would be great to bring this to |
@filiptronicek I think we need to rebase and squash commits again, please preserve authorship and co contributors. |
fc22ab6
to
795a3ac
Compare
Rebased and squashed ✅ cc @akosyakov |
server/src/main/java/org/eclipse/openvsx/adapter/VSCodeAPI.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/eclipse/openvsx/adapter/VSCodeAPI.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/eclipse/openvsx/adapter/VSCodeAPI.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/eclipse/openvsx/adapter/VSCodeAPI.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/eclipse/openvsx/adapter/VSCodeAPI.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/eclipse/openvsx/search/DatabaseSearchServiceTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/eclipse/openvsx/search/ElasticSearchServiceTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/eclipse/openvsx/storage/AzureBlobStorageServiceTest.java
Outdated
Show resolved
Hide resolved
@filiptronicek I'll add fixes for the remaining open conversations. |
Thank you, I have tried implementing the Conditional Interceptors, but I had a pretty hard time, will see afterwards to see how you did it! |
e29bd3b
to
c69991d
Compare
@jeanp413 Can you test mirror mode performance with the new changes? |
I will do some testing today. But we had a chat with @akosyakov and we agreed that we are confident in general this latest changes doesn't affect production reliability we can just merge it, then we can deploy internally in staging and if there's some fixes needed we can create more PRs cc @laushinka just so you have this in your radar |
I'm seeing this error, any idea @amvanbaren ?
|
|
c69991d
to
b68d8bf
Compare
@amvanbaren I tested it yesterday and was working fine, performance seems slightly better 👍, is something else missing so we can merge it? |
e0a2302
to
f257bc8
Compare
Co-authored-by: Jean Pierre <jeanpierre@gitpod.io> Co-authored-by: Pudong <tianshi8650@gmail.com> Co-authored-by: Huiwen <huiwen@gitpod.io> Co-authored-by: akosyakov <anton@gitpod.io>
c9bc314
to
df16f98
Compare
Thanks @amvanbaren 🎉 |
Fixes #505
In the mirror mode OpenVSX registry allows only read-only access to metadata and in the background mirrors metadata from the upstream, i.e. open-vsx.org. Upstream storage is still used to fetch actual content.
Search queries are performed against the upstream first to ensure that latest extension versions are available. But if requests take more than 2secs then they are interrupted and the mirror falls back to local DB. It ensures that the mirror is responsive even if upstream is not, additionally preventing heavy request to run on upstream. Metadata for concrete versions are first looked up from the local mirror and only from the upstream.
ovsx_mirror_versions
metric allows to observe progress of mirroring individual extension versions. Detailed logs are available for troubleshooting on jobrun dashboard for the mirror data job. Exception during mirroring logged as well to the registry logs.The mirror mode was load tested and tuned to sustain 15x load which is generated by Gitpod, i.e 250 requests per second to search for random extensions or resolve its versions from VS Code. The test was performed in different scenarios when upstream is up, down or slow. It was enough to run one instance with 4Gb of RAM and 3 CPUs to sustain it and at the same time mirror all extension versions within 18 hours. This PR adds observability metrics which were necessary to track down performance issues and monitor the app during load testing.
How to test
TODO:...