Skip to content

Fix ListResources for WindowsDesktops#17093

Merged
rosstimothy merged 3 commits into
masterfrom
tross/list_resources_desktops
Oct 6, 2022
Merged

Fix ListResources for WindowsDesktops#17093
rosstimothy merged 3 commits into
masterfrom
tross/list_resources_desktops

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

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 to match GetWindowsDesktopService allows ListResources to provide the correct resources.

A new test case for WindowsDesktops was added to local.TestListResources to prevent any regressions.

rosstimothy and others added 2 commits October 5, 2022 16:09
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.
Copy link
Copy Markdown
Contributor

@GavinFrazar GavinFrazar left a comment

Choose a reason for hiding this comment

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

LGTM

@rosstimothy rosstimothy enabled auto-merge (squash) October 6, 2022 12:23
@rosstimothy rosstimothy merged commit e0ca6e6 into master Oct 6, 2022
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 6, 2022

@rosstimothy See the table below for backport results.

Branch Result
branch/v10 Failed
branch/v11 Create PR

rosstimothy added a commit that referenced this pull request Oct 6, 2022
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.
@zmb3 zmb3 deleted the tross/list_resources_desktops branch October 6, 2022 14:57
rosstimothy added a commit that referenced this pull request Oct 6, 2022
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants