Skip to content

Commit

Permalink
Upgrade Python version from 3.6 to 3.7 (#203)
Browse files Browse the repository at this point in the history
* Upgrade Python version from 3.6 to 3.10

Upgrade to 3.10 for the job that runs Wheel, PyLint, Flake, etc., since 3.6 is not supported anymore by hosted-agent-software.

* Upgrade to Python 3.10 from 3.6

Upgrade to 3.10 as 3.6 is not supported

* Switch PyLink to 1.9.4

Switch PyLink to 1.9.4 from 1.9.5, as 1.9.5 is not supported with Python 3.10

* Use Python 3.7 for Static Analysis

Use 3.7, as 3.10 does not support certain properties used by astpeephole.py that is used by Static Analysis tools

* Try unpinned version of PyLint

PyLint 1.9.5 doesn't work with Python 3.7.  So, trying to see if it automatically pulls the latest compatible version.

* Run pylint as a separate command

* Update pylintrc (#204)

* Update pylintrc

* Update k8s-custom-pipelines.yml

* Disable PyLint (#205)

Disable PyLint for now, as the new version has breaking changes and requires lot more fixes

* Disable PyLint on CI scripts

* Fixes for script errors

* Upgrade Static Analysis Python version

Upgrade the Python version for Static Analysis to 3.10, from 3.7, now that PyLint is disabled

* Try 3.9, as 3.10 has breaking changes for Flake8

* Remove version pinning for flake8

Try Python 3.10, without pinning flake8 to a version

* Update k8s-custom-pipelines.yml

* Use Python 3.8.1 & flake8 6.0.0

* Use Python 3.8 instead of 3.8.1

* Update k8s-custom-pipelines.yml

* Update .flake8

Update to reflect breaking change in flake8 6.0

* Update source_code_static_analysis.py

Scope static analysis tools to only k8s-extension module's source in our branch.

* Update k8s-custom-pipelines.yml

* Update k8s-custom-pipelines.yml

* Update k8s-custom-pipelines.yml

* Update pool name in StaticAnalysis

To mirror what is in main of azure-cli-extensions

* Update k8s-custom-pipelines.yml

* Fix indentation

* Update k8s-custom-pipelines.yml

* Update k8s-custom-pipelines.yml

* Revert changes

* Revert changes

* Revert changes to source_code_static_analysis.py

* Update source_code_static_analysis.py

* Revert changes

* Use Ubuntu 20.4 for BuiltTestPublish stage

* Switch to ubuntu-20.04 from latest

Co-authored-by: Rishik Hombal <hombalrishik@gmail.com>
  • Loading branch information
NarayanThiru and blazepower committed Dec 15, 2022
1 parent d54d6ab commit b2f1319
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions testing/pipeline/k8s-custom-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ stages:
path: ./test/extensions/public/Flux.Tests.ps1
- job: BuildPublishExtension
pool:
vmImage: 'ubuntu-latest'
vmImage: 'ubuntu-20.04'
displayName: "Build and Publish the Extension Artifact"
variables:
CLI_REPO_PATH: $(Agent.BuildDirectory)/s
Expand Down Expand Up @@ -105,10 +105,11 @@ stages:
azdev verify license
- job: StaticAnalysis
displayName: "Static Analysis"
pool:
vmImage: 'ubuntu-latest'
vmImage: 'ubuntu-20.04'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.6'
Expand Down Expand Up @@ -209,4 +210,4 @@ stages:
displayName: "CLI Linter on Modified Extension"
env:
ADO_PULL_REQUEST_LATEST_COMMIT: $(System.PullRequest.SourceCommitId)
ADO_PULL_REQUEST_TARGET_BRANCH: $(System.PullRequest.TargetBranch)
ADO_PULL_REQUEST_TARGET_BRANCH: $(System.PullRequest.TargetBranch)
2 changes: 1 addition & 1 deletion testing/pipeline/templates/build-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ steps:
azdev --version
azdev setup -c ../azure-cli -r ${{ parameters.CLI_REPO_PATH }} -e $(EXTENSION_NAME)
azdev extension build $(EXTENSION_NAME)
azdev extension build $(EXTENSION_NAME)
4 changes: 2 additions & 2 deletions testing/pipeline/templates/run-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parameters:
jobs:
- job: ${{ parameters.jobName}}
pool:
vmImage: 'ubuntu-latest'
vmImage: 'ubuntu-20.04'
variables:
${{ if eq(variables['IS_PRIVATE_BRANCH'], 'False') }}:
EXTENSION_NAME: "k8s-extension"
Expand Down Expand Up @@ -101,4 +101,4 @@ jobs:
inlineScript: |
.\Cleanup.ps1 -CI
workingDirectory: $(TEST_PATH)
condition: succeededOrFailed()
condition: succeededOrFailed()

0 comments on commit b2f1319

Please sign in to comment.