Skip to content

fix(dgw,agent): backwards-compatibility for update manifest V1#1815

Merged
Vladyslav Nikonov (vnikonov-devolutions) merged 5 commits into
masterfrom
fix/updater-api-backwards-compat
Jun 4, 2026
Merged

fix(dgw,agent): backwards-compatibility for update manifest V1#1815
Vladyslav Nikonov (vnikonov-devolutions) merged 5 commits into
masterfrom
fix/updater-api-backwards-compat

Conversation

@vnikonov-devolutions
Copy link
Copy Markdown
Contributor

@vnikonov-devolutions Vladyslav Nikonov (vnikonov-devolutions) commented Jun 3, 2026

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.1 will work correctly with newer agent

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

Let maintainers know that an action is required on their side

  • Add the label release-required Please cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module) when you request a maintainer to cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module)

  • Add the label release-blocker Follow-up is required before cutting a new release if a follow-up is required before cutting a new release

  • Add the label publish-required Please publish libraries (`Devolutions.Gateway.Utils`, OpenAPI clients, etc) when you request a maintainer to publish libraries (Devolutions.Gateway.Utils, OpenAPI clients, etc.)

  • Add the label publish-blocker Follow-up is required before publishing libraries if a follow-up is required before publishing libraries

@vnikonov-devolutions Vladyslav Nikonov (vnikonov-devolutions) changed the title fix: backwards-compatibility for update manifest V1 fix(dgw,agent): backwards-compatibility for update manifest V1 Jun 3, 2026
Copy link
Copy Markdown
Member

@CBenoit Benoît Cortier (CBenoit) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ProductUpdateInfoV1 type 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.

Comment thread crates/devolutions-agent-shared/src/update_manifest.rs
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@vnikonov-devolutions Vladyslav Nikonov (vnikonov-devolutions) merged commit 389ae7e into master Jun 4, 2026
42 checks passed
@vnikonov-devolutions Vladyslav Nikonov (vnikonov-devolutions) deleted the fix/updater-api-backwards-compat branch June 4, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants