Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSResourceInfo tags should not include PSResourceGet impl tags #1686

Open
3 tasks done
ThomasNieto opened this issue Aug 16, 2024 · 1 comment
Open
3 tasks done

PSResourceInfo tags should not include PSResourceGet impl tags #1686

ThomasNieto opened this issue Aug 16, 2024 · 1 comment
Labels
Area-Find Issue-Bug Something isn't working

Comments

@ThomasNieto
Copy link
Contributor

ThomasNieto commented Aug 16, 2024

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

PSResourceInfo tags should not include PSResourceGet implementation tags only the ones that the user defined and show up on the gallery.

PSScript
PSModule
PSFunction_*
PSCmdlet_*
PSCommand_*
PSEdition_*
PSIncludes_*
etc

Expected behavior

Azure
Deploy
VM

Actual behavior

Azure
Deploy
VM
PSScript
PSFunction_New-RandomString
PSCommand_New-RandomString
PSFunction_Add-VM
PSCommand_Add-VM
PSIncludes_Function

Error details

n/a

Environment data

1.1.0-preview1

Visuals

No response

@SydneyhSmith SydneyhSmith added Issue-Bug Something isn't working Area-Find and removed Needs-Triage labels Aug 27, 2024
@o-l-a-v
Copy link
Contributor

o-l-a-v commented Sep 19, 2024

That's what the PowerShell Gallery API returns too though.

# Using PSResourceGet
(Find-PSResource -Repository 'PSGallery' -Prerelease -Name 'Microsoft.PowerShell.PSResourceGet' -Debug).'Tags' | Sort-Object

# Using API
(
    Invoke-RestMethod -Method 'Get' -Uri (
        'https://www.powershellgallery.com/api/v2/FindPackagesById()?$filter=Id+eq+%27Microsoft.PowerShell.PSResourceGet%27+and+IsAbsoluteLatestVersion&$inlinecount=allpages&id=%27Microsoft.PowerShell.PSResourceGet%27'
    )
).'properties'.'Tags'.Split(' ') | Sort-Object

What should be done to solve this then?

  • Change what the API returns?
  • Client, filter out tags returned starting with:
    • PSCmdlet_
    • PSCommand_
    • PSFunction_
    • PSIncludes_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Find Issue-Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants