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

[Refactor] Improve file download functionality #37

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

TinaMor
Copy link
Contributor

@TinaMor TinaMor commented Sep 2, 2024

PR description

Github issue/discussion(s)

  1. Issue #8: Support for Multiple OS Architectures

    • Expanded the installation process to support architectures other than AMD64, including ARM64 and x86.

    • Added logic to dynamically select the appropriate architecture when downloading container tools, making the installation process more versatile and inclusive.

      Install-Containerd -OSArchitecture "amd64"
  2. Issue #18: Allow for CNI 1.0.0

    • Added explicit support for installing CNI version 1.0.0. Ensured that the installation process can correctly identify and download the appropriate version of CNI, even when tag formats vary.

      Install-WinCNIPlugin -SourceRepo "containernetworking/plugins"
  3. Fix Release Tags Parsing for Windows Container Networking

    • Enhanced the robustness of the versioning system for release assets, making it resilient to changes in version formats. This prevents failures during installation when new versions of tools are released with different tagging conventions.

    • Corrected the inconsistency in release tags between e.g. v1.0.0 and 1.0.0. Both are now considered the same version, ensuring that the correct assets are downloaded regardless of the tag format.

    • Shifted from parsing URLs to using GitHub's API /releases endpoint to reliably obtain the download URLs for assets. This change improves the accuracy and reliability of the download process, ensuring that the correct files are fetched regardless of tag inconsistencies.

      Install-Containerd -Version 'v1.7.6'

      ...is the same as:

      Install-Containerd -Version '1.7.6'

Checklist

As part of our commitment to engineering excellence, before submitting this PR, please make sure:

  • You've tested this code in both Desktop & Server environments and AMD & ARM64 enviroments (functional testing).
  • You've added unit tests for new code.
  • You've added/updated documentation in the cmdlet docs, command-reference.md and the modules help files.
  • You've reviewed the PR/code best practices defined in the CONTRIBUTING.md.

In addition, after this PR has been reviewed, please agree to:

  • If changes have been made to your PR in the process of addressing comments, please make sure to test again the final version in both AMD and ARM64 environments.
  • Validate your changes have not introduced any regressions.

@TinaMor TinaMor force-pushed the tinamor/refactor-download-uri branch from 67cec45 to 7956f90 Compare September 2, 2024 23:28
@TinaMor TinaMor marked this pull request as ready for review September 3, 2024 06:53
@TinaMor TinaMor requested a review from iankingori as a code owner September 3, 2024 06:53
billywr
billywr previously approved these changes Sep 3, 2024
    - Add support for non-AMD64 architectures
    - add support for containernetworking/plugins (Instal-WinCNIPlugin)
    - Enhance robustness against versioning changes in release assets: e.g. "v1.0.0" and "1.0.0" are now considered the same version
Copy link
Member

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the rest looks ok.

@billywr billywr self-requested a review September 30, 2024 17:16
@TinaMor TinaMor merged commit fe99eda into microsoft:main Oct 28, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants