-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[UsePythonV0] Download python from registry #15820
Conversation
…com/microsoft/azure-pipelines-tasks into users/DaniilShmelev/download-python
…com/microsoft/azure-pipelines-tasks into users/DaniilShmelev/download-python
Works well on MS-hosted agents with the default images. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Performed manual testing of this task for installation of unstable versions of Python on all three platforms, everything working as expected.
I don't see python '3.11.0' in the registry, only '3.11.0-alpha.1' and other alpha versions. The task does support a partial package version spec like '3.10.x'. Unfortunately, semver cannot pick up versions with suffixes: console.log(semver.satisfies('3.11.0-alpha.4', '3.11.x')); // false
console.log(semver.satisfies('3.11.0', '3.11.x')); // true So, in this case, the customer needs to specify the version explicitly: '3.11.0-alpha.4'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! Also, please take a look at the comments below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved
@anatolybolshakov , @DaniilShmelev , how did you solve the rate-limit problem to download from GitHub releases? Currently, task doesn't use any GH token and it performs unauthenticated requests. From GitHub docs: https://docs.github.com/en/rest/overview/resources-in-the-rest-api#requests-from-user-accounts
Azure VMs don't have unique IP addresses. There is a limited (and I think small) set of IP addresses that is shared between all machines. It means more than one machine (10, 100, 1000 machines) can have the same IP-address. |
* download python from registry if absent in cache * add unit test * fixes & debug messages * fix manifest branch name * fix debug message for python archive file name * remove unneeded function * fix unit tests failing on unix * only check os version once * add unit test for ubuntu version lookup * adjust error messages * add input to allow unstable versions * fix ubuntu test * add test for unstable version download * add comments * adjust comments * select arch based on input * extract interfaces into separate file * make allowUnstable optional * add a separate debug message for downloading * explain what the registry is more clearly * bump task version due to a new sprint * fix allowUnstable default value * format osutil to unify code style
* Fixed casing for packaging api data * Updated task version * [Maven tasks] Bump the codecoverage-tools package at the dependencies (#15928) * Update cc-tools package for MavenV2 task * Update cc-tools package for MaveV3 task * Disabled percent encoding (#15931) * Update npmauth to handle retries cleanly (#15914) * Update npmauth.ts * Update task.json * Update task.loc.json * Update npmauth.ts * RED Co-authored-by: Your Name <[email protected]> * Updated Helm download Url (#15821) * updated helm download url * bumped task vesrions required for this change * bumped task versions * [FtpUploadV2] Resolve dependabot alert about shelljs (#15881) * fix dependencies * fix build build error are caused by tasklib 3.x return types change from "<type>" to "<type> | undefined" functionally, these method calls should be identical * bump task version * Add simple unit tests to check getting input parameters and start of task * Delete debug * Fix EOL * Updated task version to 201 * Added test for successful execution Co-authored-by: Tatyana Kostromskaya (Akvelon) <[email protected]> Co-authored-by: Tatyana Kostromskaya <[email protected]> Co-authored-by: Denis Tikhomirov <[email protected]> Co-authored-by: Denis Tikhomirov <[email protected]> Co-authored-by: Anatoly Bolshakov <[email protected]> * Fix README.md section on installing Invoke-SqlCommand on an agent (#15693) * Add another way of installing Invoke-SqlCommand. * Fix dead link. Co-authored-by: Kim Jämiä <[email protected]> Co-authored-by: Philipson Joseph V <[email protected]> * updating the azure-pipelines-tasks-azure-arm-rest-v2 to 2.198.2 (#15935) * version update of common module * version update Co-authored-by: rajnish-byte <[email protected]> * Fix shelljs vulnerability for tasks (#15972) * bump shelljs for ArchiveFilesV2 * bump shelljs for BashV3 * bump shelljs for CMakeV1 * bump shelljs for CocoaPodsV0 * bump affected tasks versions * 15646 - Machine Names required", but should not be required, and machine names being prepended to destination folder #15646 (#15870) * Making Machines,AdminLogin,Password as Mandatory * Making Machines,Admin Login and Password required fields * fix no wait result bug (#15957) * fix no wait result bug * bump version Co-authored-by: Anatoly Bolshakov <[email protected]> Co-authored-by: Nikita Ezzhev <[email protected]> * [UsePythonV0] Download python from registry (#15820) * download python from registry if absent in cache * add unit test * fixes & debug messages * fix manifest branch name * fix debug message for python archive file name * remove unneeded function * fix unit tests failing on unix * only check os version once * add unit test for ubuntu version lookup * adjust error messages * add input to allow unstable versions * fix ubuntu test * add test for unstable version download * add comments * adjust comments * select arch based on input * extract interfaces into separate file * make allowUnstable optional * add a separate debug message for downloading * explain what the registry is more clearly * bump task version due to a new sprint * fix allowUnstable default value * format osutil to unify code style * Updated version Co-authored-by: Aasim Malladi <[email protected]> Co-authored-by: Konstantin Tyukalov <[email protected]> Co-authored-by: Anatoly Bolshakov <[email protected]> Co-authored-by: Marcin Strzyz <[email protected]> Co-authored-by: Your Name <[email protected]> Co-authored-by: rajnish-byte <[email protected]> Co-authored-by: Daniil Shmelev <[email protected]> Co-authored-by: Tatyana Kostromskaya (Akvelon) <[email protected]> Co-authored-by: Tatyana Kostromskaya <[email protected]> Co-authored-by: Denis Tikhomirov <[email protected]> Co-authored-by: Denis Tikhomirov <[email protected]> Co-authored-by: Kim Jämiä <[email protected]> Co-authored-by: Kim Jämiä <[email protected]> Co-authored-by: Philipson Joseph V <[email protected]> Co-authored-by: v-hinti <[email protected]> Co-authored-by: v-nagarajku <[email protected]> Co-authored-by: Ruoyu Wang <[email protected]> Co-authored-by: Nikita Ezzhev <[email protected]>
This reverts commit 983849e.
@maxim-lobanov thanks, prepared a revert PR along with the fix proposal (1, 2). |
…t#15820)" (microsoft#16014)" This reverts commit 01337b4.
Task name: UsePythonV0
Description: Currently, this task is only able to find local versions of python.
This PR adds a feature to download python from registry if it was not found locally.
This functionality is limited on self-hosted agents because:
Documentation changes required: Yes
Added unit tests: Yes
Attached related issue: #13319
Checklist: