From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.18691.1669830786578370985 for ; Wed, 30 Nov 2022 09:53:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=a95hwLIe; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: osteffen@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669830785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pH2hY1oXFl+HCtmAiZp4YyPTtlVpZnFzOuE0H6J9QAQ=; b=a95hwLIe8SqPCaPuYjBkUfj42NQWcURsXfZsrUdZ1K+qskuDzkovZqdQV0P2niyVcfQ7lT FURuUTIpRX53SRQuikw2aQ1EVLcKEPYkIBsMryf+hf516zDIgeIAQpPttTAMRpCV41/pj/ +I40EWc5AkVM/x8jy/eD1pMUJ48PqSU= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-563-l8EjSVxeN3uzdeL1_roV-g-1; Wed, 30 Nov 2022 12:53:04 -0500 X-MC-Unique: l8EjSVxeN3uzdeL1_roV-g-1 Received: by mail-lf1-f69.google.com with SMTP id be20-20020a056512251400b004aa9aadf60cso6911808lfb.20 for ; Wed, 30 Nov 2022 09:53:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pH2hY1oXFl+HCtmAiZp4YyPTtlVpZnFzOuE0H6J9QAQ=; b=rsmSo3C8vB9z7uQfY0A0qI9KIj1vnXQ2vHl7WW3hSkJukAcIyMh2Qeky5D0JX4GTAu 5xroRmhx7UnMwNntqlTQjiMiJmyYzw0f3GfhmP5xbWHtOBTsomJTLiDU6aSCSweRqUmQ xGq2DylBS4gapLd+zkWg43epa0Hl5bbiRUfK2dj6bpQ71o4gNM82EKI8gN+EyBbP6Dh6 MFfYa12SYmxQk5pz1IUdZ9XHqZ/TOhjOpiX2PrwMDB7OsTW1uMeWNJoqWNnp9J6n9V2G geUaGImR/tlh7aZ2TEqqQY407p0CMcoegqIQPfiDI/qQ54Cv/ejJaemG7TcbOuxAo0sj pYKA== X-Gm-Message-State: ANoB5plojGDMbUjte/KE3pytdAljsvQhA11Aro6XrCTzvb5par3Ug1Uh 1cfzHieOCBsPjwW2Ze8m0uxWaF4m+rgdop66d9vc3GH750Dzm+ikztaAtT/NqquhnpphVsPlyrO WGnX4saLxAKCgWQ2RPplOnKsyKNXdUw== X-Received: by 2002:a05:651c:239e:b0:279:c7b9:c365 with SMTP id bk30-20020a05651c239e00b00279c7b9c365mr1104596ljb.134.1669830782776; Wed, 30 Nov 2022 09:53:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf60RH6lfNnJ36yX4zJ/m/A0ouYe4nsjVzcDc5pTkAxQ9KRsilwnTrytjl0muO8A4uz5H+E2nh092xj35Jce3s4= X-Received: by 2002:a05:651c:239e:b0:279:c7b9:c365 with SMTP id bk30-20020a05651c239e00b00279c7b9c365mr1104585ljb.134.1669830782484; Wed, 30 Nov 2022 09:53:02 -0800 (PST) MIME-Version: 1.0 References: <20221129192625.643896-1-osteffen@redhat.com> <22bdd626-9b32-5e22-edb4-285374e5df2d@linux.microsoft.com> In-Reply-To: <22bdd626-9b32-5e22-edb4-285374e5df2d@linux.microsoft.com> From: "Oliver Steffen" Date: Wed, 30 Nov 2022 18:52:51 +0100 Message-ID: Subject: Re: [PATCH v7 1/6] CI: make Python version configurable To: Michael Kubacki Cc: devel@edk2.groups.io, Abner Chang , Alexei Fedorov , Andrew Fish , Anthony Perard , Ard Biesheuvel , Bob Feng , Brijesh Singh , Chasel Chiu , Daniel Schaefer , Erdem Aktas , Eric Dong , Gerd Hoffmann , Gua Guo , Guo Dong , Guomin Jiang , Hao A Wu , Igor Kulchytskyy , James Bottomley , James Lu , Jian J Wang , Jiaxin Wu , Jiewen Yao , Jordan Justen , Julien Grall , Leif Lindholm , Liming Gao , Maciej Rabeda , Michael D Kinney , Min Xu , Nate DeSimone , Nickle Wang , Peter Grehan , Pierre Gondois , Rahul Kumar , Ray Ni , Rebecca Cran , Sami Mujawar , Sean Brogan , Sean Rhodes , Sebastien Boeuf , Siyuan Fu , Star Zeng , Sunil V L , Supreeth Venkatesh , Tom Lendacky , Wei6 Xu , Xiaoyu Lu , Yuwei Chen , Zhichao Gao , Zhiguang Liu , Pawel Polawski , Chris Fernald X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Hi Michael On Wed, Nov 30, 2022 at 3:13 PM Michael Kubacki wrote: > > This distributes the Python version (as a default value) across several > files - ">=3.10.6". For maintainability, we'd like to manage versioning > more centrally to reduce likelihood of misses on updates. > > You could potentially adjust it such that the default does not specify a > version, put the Python version in a template and call that when needed, > etc. Yes, it sounds like a good idea. Can we work on this in a separate patch set? I am experimenting with this now, but I fear this might delay these patches too much and go for a minimal version for now. Maybe we have a chance to merge something before the CI stops working tomorrow. Thanks, Oliver > Thanks, > Michael > > On 11/29/2022 2:26 PM, Oliver Steffen wrote: > > Add a new parameter "usePythonVersion" to the CI job templates. > > This makes it possible to specify the version of Python to use. > > The default value is ">=3.10.6". > > If '' is specified, Python will not be downloaded at runtime and > > the one provided by the VM/container image will be used. > > > > Signed-off-by: Oliver Steffen > > --- > > .azurepipelines/templates/platform-build-run-steps.yml | 6 +++++- > > .azurepipelines/templates/pr-gate-build-job.yml | 2 ++ > > .azurepipelines/templates/pr-gate-steps.yml | 6 ++++-- > > 3 files changed, 11 insertions(+), 3 deletions(-) > > > > diff --git a/.azurepipelines/templates/platform-build-run-steps.yml > > b/.azurepipelines/templates/platform-build-run-steps.yml > > index 40a31a509fc5..6c9189a20fde 100644 > > --- a/.azurepipelines/templates/platform-build-run-steps.yml > > +++ b/.azurepipelines/templates/platform-build-run-steps.yml > > @@ -34,6 +34,9 @@ parameters: > > - name: extra_install_step > > type: stepList > > default: [] > > +- name: usePythonVersion > > + type: string > > + default: ">=3.10.6" > > > > steps: > > - checkout: self > > @@ -42,8 +45,9 @@ steps: > > > > - task: UsePythonVersion@0 > > inputs: > > - versionSpec: ">=3.10.6" > > + versionSpec: ${{ parameters.usePythonVersion }} > > architecture: "x64" > > + condition: ne('${{ parameters.usePythonVersion }}', '') > > > > - script: pip install -r pip-requirements.txt --upgrade > > displayName: 'Install/Upgrade pip modules' > > diff --git a/.azurepipelines/templates/pr-gate-build-job.yml > > b/.azurepipelines/templates/pr-gate-build-job.yml > > index 7f88b41dc8d3..d0a6ccd10700 100644 > > --- a/.azurepipelines/templates/pr-gate-build-job.yml > > +++ b/.azurepipelines/templates/pr-gate-build-job.yml > > @@ -12,6 +12,7 @@ parameters: > > tool_chain_tag: '' > > vm_image: '' > > arch_list: '' > > + usePythonVersion: '>=3.10.6' > > > > # Build step > > jobs: > > @@ -77,3 +78,4 @@ jobs: > > build_pkgs: $(Build.Pkgs) > > build_targets: $(Build.Targets) > > build_archs: ${{ parameters.arch_list }} > > + usePythonVersion: ${{ parameters.usePythonVersion }} > > diff --git a/.azurepipelines/templates/pr-gate-steps.yml > > b/.azurepipelines/templates/pr-gate-steps.yml > > index cb431e53fcd1..bf6574b33692 100644 > > --- a/.azurepipelines/templates/pr-gate-steps.yml > > +++ b/.azurepipelines/templates/pr-gate-steps.yml > > @@ -12,6 +12,7 @@ parameters: > > build_pkgs: '' > > build_targets: '' > > build_archs: '' > > + usePythonVersion: '>=3.10.6' > > > > steps: > > - checkout: self > > @@ -20,8 +21,9 @@ steps: > > > > - task: UsePythonVersion@0 > > inputs: > > - versionSpec: '>=3.10.6' > > - architecture: 'x64' > > + versionSpec: ${{ parameters.usePythonVersion }} > > + architecture: "x64" > > + condition: ne('${{ parameters.usePythonVersion }}', '') > > > > - script: pip install -r pip-requirements.txt --upgrade > > displayName: 'Install/Upgrade pip modules' >