Need a mechanism to detect, repair, or purge extension versions broken by async-publish failures

未关闭
#2,271 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
28/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
java
领域
backend, databases

调研方向

Start from the doPublish flow in PublishExtensionVersionHandler and the size backfill in FileResourceSizeJobRequestHandler / FileResourceSizeMigration, which leave size unset on FileNotFoundInStorageException. Read FixMissingFilesJobRequestHandler (FixMissingFilesMigration, V1_55) and AdminService.purgeExtension / purgeExtensionAndReferencingExtensions. Done means a decided detect/repair/purge path for versions with a confirmed-missing download versus missing secondaries only, after the backfill has drained.

由索引模型根据 Issue 内容生成。

描述

enhancement priority:medium server

A version of bugs in the async publish pipeline (storage upload failing outright - #1378; a package large enough to exhaust the JVM heap during signing/checksumming - #1450) leave extension_version committed and permanently active = false, sometimes with some or all of its file_resource rows never persisted (see the doPublish flow in PublishExtensionVersionHandler: files are stored, then persisted, in that order, so a failure mid-way leaves a partial or empty set). #2171 made this diagnosable going forward - it records why an attempt failed (extension_version.publish_error) and fixed a retry that #1529 had silently disabled - but it does nothing for versions that are already stuck from before that fix, and it does not repair or remove anything.

We now have a way to actually find them. v1.2.0 (#1777, via #2089/#2094/#2095) added file_resource.size and a FileResourceSizeMigration backfill that does a metadata-only lookup (e.g. an S3 HEAD) against storage for every resource. Critically, when the backing object is confirmed absent (FileNotFoundInStorageException), the job does not fail - it logs a warning and leaves that resource's size unset, then moves on (FileResourceSizeJobRequestHandler). Once this backfill has run to completion across the registry, file_resource.size IS NULL stops being just "not measured yet" and becomes a reliable, queryable signal that the DB row exists but the object it points to is actually gone from storage.

There is already a partial repair path: FixMissingFilesJobRequestHandler (FixMissingFilesMigration, seeded once in V1_55) re-derives missing secondary files (readme, license, icon, changelog, manifest, vsixmanifest) by downloading the main package and re-extracting them - but it explicitly bails out ("No vsix package available") when the download file itself is missing or confirmed empty. That is exactly the failure mode #1378/#1450 produce: nothing to rebuild from.

What's needed

A mechanism to actually clean up the fallout, now that it can be found:

  1. Detect extension versions with a confirmed-missing download resource (unrepairable) once the size backfill has completed for them - distinguishing "not backfilled yet" from "confirmed missing" matters here, since size IS NULL alone conflates the two until the migration has fully drained.
  2. Repair what can be repaired: confirm versions with a present download but missing secondary files actually get picked up (FixMissingFilesMigration was seeded once for versions existing at V1_55's release - it's not clear anything reruns it for versions that broke afterwards, up to and including right now, before #2171).
  3. Decide and implement what happens to versions with no download at all and therefore nothing to repair: purge them (AdminService.purgeExtension/purgeExtensionAndReferencingExtensions already exists as the underlying mechanism) automatically, or surface them for admin review first. This needs a decision, not just code.

Not attempting to design the mechanism here - filing this to track that it's needed and capture the pieces already in place to build it from.

🤖 Generated with Claude Code

主要语言
Java
星标
2.1k
派生
362
平均合并
1 天 3 小时
30 天内合并 PR
44

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

eclipse-openvsx/openvsx 的其他 Issue

查看 eclipse-openvsx/openvsx 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。