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

[Feature]: Create mirror for when PowerShell Gallery is down #27001

Open
o-l-a-v opened this issue Jan 13, 2025 · 3 comments
Open

[Feature]: Create mirror for when PowerShell Gallery is down #27001

o-l-a-v opened this issue Jan 13, 2025 · 3 comments
Labels
customer-reported feature-request This issue requires a new behavior in the product in order be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team.

Comments

@o-l-a-v
Copy link

o-l-a-v commented Jan 13, 2025

Description of the new feature

PowerShell Gallery is not reliable, and currently it experiences problems due to the *.azureedge.net CDN retirement.

I have a meta issue / feature request that tracks more issues I've encountered.

AWS hosts a mirror of their modules, which is great for when PowerShell Gallery is down.

Maybe you could do the same?

Proposed implementation details (optional)

Add release artifacts as ZIP to GitHub releases?

  • Az currently releases MSI installers, which is helpful for Windows users. Linux and Mac?

Publish modules to MCR too? Seems you've started testing with that already.

@o-l-a-v o-l-a-v added feature-request This issue requires a new behavior in the product in order be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Jan 13, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported needs-triage This is a new issue that needs to be triaged to the appropriate team. and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Jan 13, 2025
@isra-fel
Copy link
Member

isra-fel commented Jan 16, 2025

Hi @o-l-a-v thanks for bringing this up! A mirror gallery makes sense, but since we are investing in MCR already we might not want to start working on a new solution. We'll share the progress later.

As for the offline options, besides MSI installer, we also offer a tar archive for Linux and MacOS. Check out Install from tar archive

@o-l-a-v
Copy link
Author

o-l-a-v commented Jan 17, 2025

@isra-fel

Following the Install from tar archive guide, the PowerShell command to get URL for latest TAR archive does not work / return anything.

$tarSourceUrl = (
    Invoke-RestMethod -Uri https://api.github.com/repos/azure/azure-powershell/releases/latest |
    Select-Object -ExpandProperty assets | Where-Object content_type -eq 'application/x-gzip'
).browser_download_url

Seems the latest release does not have any assets?

PS > Invoke-RestMethod -Method 'Get' -Uri 'https://api.github.com/repos/azure/azure-powershell/releases/latest' | ConvertTo-Json -Depth 5

{
  "url": "https://api.github.com/repos/Azure/azure-powershell/releases/194835124",
  "assets_url": "https://api.github.com/repos/Azure/azure-powershell/releases/194835124/assets",
  "upload_url": "https://uploads.github.com/repos/Azure/azure-powershell/releases/194835124/assets{?name,label}",
  "html_url": "https://github.com/Azure/azure-powershell/releases/tag/Az.Accounts-v4.0.2",
  "id": 194835124,
  "author": {
    "login": "VeryEarly",
    "id": 19599311,
    "node_id": "MDQ6VXNlcjE5NTk5MzEx",
    "avatar_url": "https://avatars.githubusercontent.com/u/19599311?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/VeryEarly",
    "html_url": "https://github.com/VeryEarly",
    "followers_url": "https://api.github.com/users/VeryEarly/followers",
    "following_url": "https://api.github.com/users/VeryEarly/following{/other_user}",
    "gists_url": "https://api.github.com/users/VeryEarly/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/VeryEarly/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/VeryEarly/subscriptions",
    "organizations_url": "https://api.github.com/users/VeryEarly/orgs",
    "repos_url": "https://api.github.com/users/VeryEarly/repos",
    "events_url": "https://api.github.com/users/VeryEarly/events{/privacy}",
    "received_events_url": "https://api.github.com/users/VeryEarly/received_events",
    "type": "User",
    "user_view_type": "public",
    "site_admin": false
  },
  "node_id": "RE_kwDOAWyM-s4LnPK0",
  "tag_name": "Az.Accounts-v4.0.2",
  "target_commitish": "oob/Accouonts",
  "name": "Az.Accounts v4.0.2",
  "draft": false,
  "prerelease": false,
  "created_at": "2025-01-15T03:30:01Z",
  "published_at": "2025-01-15T06:56:31Z",
  "assets": [],
  "tarball_url": "https://api.github.com/repos/Azure/azure-powershell/tarball/Az.Accounts-v4.0.2",
  "zipball_url": "https://api.github.com/repos/Azure/azure-powershell/zipball/Az.Accounts-v4.0.2",
  "body": "* Fixed unsigned dll:\r\n    - `System.Buffers.dll`\r\n    - `System.Memory.dll`"
}

PS >

Edit: The latest one I could find with assets is v13.1.0:

@isra-fel
Copy link
Member

isra-fel commented Jan 20, 2025

Apologies. I've marked Az v13.1.0 latest so it works now. Will keep it that way in the future.

PS /Users/azps [0.01s]> $tarSourceUrl = (
>>     Invoke-RestMethod -Uri https://api.github.com/repos/azure/azure-powershell/releases/latest |
>>     Select-Object -ExpandProperty assets | Where-Object content_type -eq 'application/x-gzip'
>> ).browser_download_url
PS /Users/azps [0.74s]> $tarSourceUrl
https://github.com/Azure/azure-powershell/releases/download/v13.1.0-January2025/Az-Cmdlets-13.1.0.39555.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported feature-request This issue requires a new behavior in the product in order be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team.
Projects
None yet
Development

No branches or pull requests

2 participants