fix(dgw,agent): backwards-compatibility for update manifest V1#1815
Conversation
Let maintainers know that an action is required on their side
|
There was a problem hiding this comment.
Pull request overview
This PR fixes backward compatibility for legacy UpdateManifest V1 (update.json) by correcting the expected V1 field name from the incorrectly used "Version" to the canonical "TargetVersion", while still accepting "Version" as an alias to remain compatible with already released gateway/agent builds.
Changes:
- Introduces a dedicated
ProductUpdateInfoV1type that deserializes"TargetVersion"and accepts"Version"as an alias, while serializing back to"TargetVersion". - Updates V1→V2 normalization/upgrade paths in both Gateway and Agent to convert V1 product payloads into the V2
ProductUpdateInfo. - Updates and extends unit tests for V1 parsing (including alias acceptance).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| devolutions-gateway/src/api/update.rs | Converts legacy V1 product entries to V2 ProductUpdateInfo via into() during in-memory upgrade. |
| devolutions-agent/src/updater/mod.rs | Converts legacy V1 product entries to V2 ProductUpdateInfo via into() during in-memory upgrade. |
| crates/devolutions-agent-shared/src/update_manifest.rs | Splits V1 vs V2 product payload schemas (TargetVersion vs Version), adds aliasing, and updates tests/docs accordingly. |
| crates/devolutions-agent-shared/src/lib.rs | Re-exports ProductUpdateInfoV1 from the shared crate API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
389ae7e
into
master
Fixes issue with invalid parsing/serialziation of UpdateManifest V1 (update.json).
Initial PR introduced bug where we expected "Version" field for product instead of "TargetVersion". This PR fixes this invalid behavior. (Also, "Version" is still will be accepted on agent side as field alias, so gateway
v2026.2.1will work correctly with newer agent