vscode-extension-update: skip Marketplace validation-failed versions#522775
Conversation
…ions Adds a check to filter out extension versions that failed marketplace validation (e.g., virus scan failures). These invalid versions are hidden from the marketplace UI and lack VsixSignature assets, so selecting them could cause issues. The updater now logs debug information when skipping such versions for better traceability.
|
drupol
left a comment
There was a problem hiding this comment.
Approved automatically following the successful run of nixpkgs-review.
@drupol |
|
Should this be backported ? I haven't check whether this upgrade script is available in the current stable version. |
|
Successfully created backport PR for |
Description of changes
vscode_extension_update.pypreviously selected the newest extension versionsatisfying targetPlatform, prerelease, and engine constraints, without
inspecting whether the Marketplace had validated it. Versions that fail
validation (for example virus scan failures) are hidden from the Marketplace
UI and should not be packaged.
This change adds a
_version_passed_validationhelper and filters suchentries in
find_compatible_extension_version. When the Marketplace APIresponse sets
validationResultMessageto a payload whoseresultscontainstatus: "failure", that version is skipped and the next compatible versionis considered.
Reproduced and verified against
vscode-extensions.anthropic.claude-code,where the API was returning a virus-scan-failed 2.1.146 entry while the
Marketplace UI still listed 2.1.145 as current. After the fix, the script
correctly falls back to 2.1.145.
Validation was manual: ran the updater against the affected extension and
confirmed it now selects 2.1.145, then ran
nixos-rebuild switchagainst thebranch and built the resulting package successfully. No Nix files were
changed, and the updater has no test suite, so no automated tests apply.
Fixes #522773.
Relates to #482821.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"./result/bin/)