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

Use product-versions.json instead of latest-aziot-*.json #7270

Merged
merged 28 commits into from
Apr 26, 2024

Conversation

damonbarry
Copy link
Member

@damonbarry damonbarry commented Apr 22, 2024

This change updates the iotedge CLI and the packages release pipeline to query/update product-versions.json instead of latest-aziot-edge.json and latest-aziot-identity-service.json. The previous json files were specific to a particular release channel + version (1.4 LTS), whereas product-versions.json represents the current state of supported products and components across all stable and LTS releases. This is allow the CLI and our releases to operate smoothly during the coming phase where both 1.5 LTS and 1.6 LTS are supported side by side.

CLI details:

  • Added a dependency on the semver crate to the iotedge CLI
  • Updated the iotedge CLI to use and document a new vanity link for product-versions.json : https://aka.ms/azure-iotedge-latest-versions
  • Updated the iotedge CLI to parse product-versions.json and extract the latest version of aziot-edge and aziot-identity-service. It uses the MAJOR.MINOR version of the currently installed CLI to determine which product versions (e.g., 1.4.x vs. 1.5.x) to get.
  • Tested the CLI manually with/without the --expected-aziot-edged-version option against various versions of product-versions.json

Release pipeline details:

  • Renamed update_latest_version_json() function in udpateLatestVersion.sh to update_product_versions_json()
  • Added product-versions.jq alongside updateLatestVersion.sh to hold all the custom filters we use to query and update versions in the package release pipeline
  • Currently, updateLatestVersion.sh determines the new product version by (1) grabbing the MAJOR.MINOR product version from the branch name, and (2) querying GitHub for the latest matching version. Since 1.5 will be serviced out of the main branch, I changed the logic to get the new product version from the release tag in the Azure/iotedge repo, and the current product version from the release tag in Azure/azure-iotedge.
  • Removed some functions in updateLatestVersion.sh that were no longer needed since we don't query GitHub for release versions
  • Added logic in updateLatestVersion.sh to use the filters in product-versions.jq to get and update information in product-versions.json. This logic also supports creating a new product in product-versions.json, which will allow for releasing 1.5 LTS side-by-side with 1.4 LTS.
  • Tested product-versions.jq directly and via updateLatestVersion.sh, all from my desktop. *.jq files support some sort of unit testing, which I'd like to look into at a future date.

Azure IoT Edge PR checklist:

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines and Best Practices

  • I have read the contribution guidelines.
  • Title of the pull request is clear and informative.
  • Description of the pull request includes a concise summary of the enhancement or bug fix.

Testing Guidelines

  • Pull request includes test coverage for the included changes.
  • Description of the pull request includes
    • concise summary of tests added/modified
    • local testing done.

@damonbarry damonbarry marked this pull request as ready for review April 23, 2024 17:25
@damonbarry damonbarry requested a review from yophilav April 23, 2024 17:25
@damonbarry
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

yophilav
yophilav previously approved these changes Apr 23, 2024
edgelet/iotedge/src/check/checks/aziot_edged_version.rs Outdated Show resolved Hide resolved
@damonbarry damonbarry requested a review from yophilav April 25, 2024 21:13
@kodiakhq kodiakhq bot merged commit fad7ea1 into Azure:main Apr 26, 2024
19 checks passed
@damonbarry damonbarry deleted the product-versions-json branch April 26, 2024 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants