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

Support v3 dependencies for pwsh packages #1575

Open
3 tasks done
nbarnwell opened this issue Feb 26, 2024 · 8 comments
Open
3 tasks done

Support v3 dependencies for pwsh packages #1575

nbarnwell opened this issue Feb 26, 2024 · 8 comments

Comments

@nbarnwell
Copy link

nbarnwell commented Feb 26, 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

  1. Register an authenticated Azure DevOps Artifacts PSResourceRepository that has the PowerShell Gallery configured as an upstream source. Use the Microsoft.PowerShell.SecureVault module as the source of credentials.
  2. Unregister the PowerShell Gallery resource repository.
  3. Install-PSResource PSWindowsUpdate

Expected behavior

The `PSWindowsUpdate` module and any dependencies are installed.

Actual behavior

The install appears to work, but the following warning is shown:

> WARNING: Installing dependencies is not currently supported for V3 server protocol repositories. The package will be installed without installing dependencies.

Error details

No response

Environment data

PS C:\temp> Get-Module Microsoft.PowerShell.PSResourceGet; $PSVersionTable

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     1.0.2                 Microsoft.PowerShell.PSResourceGet  {Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository, Get-PSScriptFileInfo…}

Key   : PSVersion
Value : 7.4.0
Name  : PSVersion


Key   : PSEdition
Value : Core
Name  : PSEdition


Key   : GitCommitId
Value : 7.4.0
Name  : GitCommitId


Key   : OS
Value : Microsoft Windows 10.0.19044
Name  : OS


Key   : Platform
Value : Win32NT
Name  : Platform


Key   : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0…}
Name  : PSCompatibleVersions


Key   : PSRemotingProtocolVersion
Value : 2.3
Name  : PSRemotingProtocolVersion


Key   : SerializationVersion
Value : 1.1.0.1
Name  : SerializationVersion


Key   : WSManStackVersion
Value : 3.0
Name  : WSManStackVersion

Visuals

No response

@SydneyhSmith
Copy link
Collaborator

SydneyhSmith commented Feb 26, 2024

Thanks @nbarnwell what repository are you seeing this with? and what is the apiversion?

@nbarnwell
Copy link
Author

I updated the reproduction steps.

@SydneyhSmith
Copy link
Collaborator

Thanks, if you register this as a v2 feed instead of a v3 feed you can get rid of this warning message

@SydneyhSmith SydneyhSmith changed the title Installing dependencies is not currently supported for V3 server protocol repositories. Packages will be installed without installing dependencies. Support v3 dependencies for pwsh packages Mar 4, 2024
@nbarnwell
Copy link
Author

I'll try it again but I'm pretty sure I couldn't get it to work at all with a v2 feed, I think because it's an authenticated feed.

@nbarnwell
Copy link
Author

nbarnwell commented Mar 5, 2024

@SydneyhSmith Indeed it doesn't work for authenticated repositories. In fact, I get the error I previously reported in #1491, which I don't think anyone cares about, either. PowerShell module stuff isn't fit for purpose when it comes to authenticated feeds. It's all very well and good encouraging folks to publish to the PowerShell gallery, but to have this massive blind spot when it comes to corporate packages in private feeds is a real surprise. I'd have thought the PowerShellGet team would've been dogfooding on Azure DevOps Artifacts feeds themselves, but I guess not or these issues (there are several) would get looked at.

Also, I wasn't trying to get rid of a warning message - I need dependency support on v3 feeds. V2 feeds are broken so telling me to go back to that when I've been on a several-month-long journey trying to get all this to hang together is a bit hard to swallow.

@Gijsreyn
Copy link

Gijsreyn commented Mar 7, 2024

I don't know if this issue is related to the topic here.

What I find strange, is when adding PowerShellGallery as upstream source, it works with the old PowerShellGet to install a module through there. When using Install-PSResource, if the module has not been downloaded from PowerShellGallery, it throws an error it cannot find the module.

@SydneyhSmith
Copy link
Collaborator

@Gijsreyn can you please open a new issue for that-- that is not expected

@Gijsreyn
Copy link

Gijsreyn commented Mar 9, 2024

@SydneyhSmith I'll run some more test to see the different endpoint urls from Azure Artifacts and open a issue if it persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants