Skip to content

[v10] Fix ListResources for WindowsDesktops (#17093)#17117

Merged
rosstimothy merged 2 commits into
branch/v10from
tross/backport-17093-branch/v10
Oct 6, 2022
Merged

[v10] Fix ListResources for WindowsDesktops (#17093)#17117
rosstimothy merged 2 commits into
branch/v10from
tross/backport-17093-branch/v10

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

Backport #17093 to branch/v10

ListResources was adding the namespace to the backend key when
retrieving WindowsDesktopServices, however UpsertWindowsDesktopService
doesn't include the namespace in the prefix. This results in never
getting any items from the backend.

Removing the namespace in the prefix to match GetWindowsDesktopService
revealed that we were also trying to unmarshal the resource as a
types.Server. Switching the unmarshal function to use
`services.UnmarshalWindowsDesktopService` as GetWindowsDesktopService
allows ListResources to provide the correct resources.

A new test case for WindowsDesktops was added to `local.TestListResources` to
prevent any regressions.
@rosstimothy rosstimothy enabled auto-merge (squash) October 6, 2022 17:09
@github-actions github-actions Bot removed the request for review from GavinFrazar October 6, 2022 17:20
@rosstimothy rosstimothy merged commit 7afac6a into branch/v10 Oct 6, 2022
@rosstimothy rosstimothy deleted the tross/backport-17093-branch/v10 branch January 5, 2023 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants