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

Public Registry Module Versions Are Not Ordered From Latest To Oldest #14530

Open
jtracey93 opened this issue Jul 11, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jtracey93
Copy link

jtracey93 commented Jul 11, 2024

Describe the bug
When you declare a module from the public registry and go to select a version where VS Code intellisense provides the available versions as a drop-down list; this list is not ordered from latest version to oldest (top-down).
image

As you can see they are not even ordered in the matching order of the tags list from MAR/MCR: https://mcr.microsoft.com/v2/bicep/avm/res/storage/storage-account/tags/list

We should add some logic to order them in the VS Code extension/language server to always populate the list in order from latest semantic version, which should be selected by default, to oldest.

Cc: @shenglol

Related to: Azure/Azure-Verified-Modules#1181

jtracey93 added a commit to Azure/bicep-registry-modules that referenced this issue Jul 15, 2024
…antic version (latest last) (#2711)

## Description

Fix `moduleIndex.json` generation to order tags for module by semantic
version (latest last)

Part of fix for
Azure/Azure-Verified-Modules#1181 and
Azure/bicep#14530

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
| [![.Platform - Publish
[moduleIndex.json]](https://github.com/jtracey93/bicep-registry-modules/actions/workflows/platform.publish-module-index-json.yml/badge.svg?branch=fix-tags-version-ordering-moduleindex)](https://github.com/jtracey93/bicep-registry-modules/actions/workflows/platform.publish-module-index-json.yml)
|

## Evidence of local testing

CI test wont pass as no access to storage account but artifacts and
local running/testing of script produces the correct results

**before:**

![image](https://github.com/user-attachments/assets/de75ef40-89d5-4ba5-934b-f11f1cb780e3)

**after:**

![image](https://github.com/user-attachments/assets/c2cfc124-5563-4163-92cb-ae59edb6eaf9)

**local test run ending**

![image](https://github.com/user-attachments/assets/0aff55f5-f680-4a3c-a123-d847e59e641c)

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [x] Update to CI Environment or utilities (Non-module affecting
changes)
- [ ] Azure Verified Module updates:
- [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation

## Checklist

- [x] I'm sure there are no other open Pull Requests for the same
update/change
- [ ] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [x] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->
@jtracey93
Copy link
Author

Being noticed in community more and more now https://x.com/johnlokerse/status/1813283919367696581?s=46&t=4I1PEfJog-kNAV4zqFNBGA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

3 participants