eclipse / openvsx

An open-source registry for VS Code extensions
https://open-vsx.org/
Eclipse Public License 2.0
1.23k stars 134 forks source link

[Mirror] Stops mirroring versions when one fails validation #923

Open alvsan09 opened 4 months ago

alvsan09 commented 4 months ago

The current logic when mirroring versions stops the loop when a version fails, This prevents publishing of versions that may pass the validation, and if the failure happen of the oldest version, the new ones will not get published.

The relevant line of code is at: https://github.com/eclipse/openvsx/blob/e388b7e2f692c9446f648366145e8fcc3857177b/server/src/main/java/org/eclipse/openvsx/mirror/MirrorExtensionService.java#L146

An example is: BroadcomMFD.ccf The validation error below impacts earlier versions of it, but with the current logic non of the versions are mirrored.

2024-05-28T23:42:36.447Z ERROR 1 --- [ool-10-thread-2] o.e.o.m.DataMirrorJobRequestHandler : failed to mirror BroadcomMFD.ccf

org.eclipse.openvsx.util.ErrorResultException: Invalid URL in field 'homepage': .

amvanbaren commented 3 months ago

@akosyakov I thought there was a reason why we stop mirroring versions when one fails validation, but it's been a while. Do you know why?

akosyakov commented 3 months ago

I cannot remember already sorry, but we are using our fork for last year and have not upgraded, not sure how would it work.

Maybe it was to avoid inconsistency which could lead to problems on the next sync.