OutSystems / outsystems-pipeline

Python package and pipeline examples to accelerate the integration of OutSystems with third-party CI/CD tools
Apache License 2.0
38 stars 54 forks source link

Azure DevOps pipeline: step "install outsystems-pipeline package" fails #42

Closed stevendecock closed 2 years ago

stevendecock commented 2 years ago

Hi,

Since last week we see our Azure DevOps pipeline failing on the "install outsystems-pipeline package" step.

Output:

2022-03-02T08:37:19.3237127Z` ##[section]Starting: Install OutSystems Pipeline Package
2022-03-02T08:37:19.3394993Z ==============================================================================
2022-03-02T08:37:19.3395380Z Task         : PowerShell
2022-03-02T08:37:19.3395694Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2022-03-02T08:37:19.3395979Z Version      : 2.198.0
2022-03-02T08:37:19.3396230Z Author       : Microsoft Corporation
2022-03-02T08:37:19.3396591Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2022-03-02T08:37:19.3397022Z ==============================================================================
2022-03-02T08:37:20.5637254Z Generating script.
2022-03-02T08:37:20.6259445Z ========================== Starting Command Output ===========================
2022-03-02T08:37:20.6651434Z ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\8c232ff9-cf08-4902-80ce-186cb004842b.ps1'"
2022-03-02T08:37:45.3749879Z Collecting outsystems-pipeline==0.3.1
2022-03-02T08:37:45.4474799Z   Downloading outsystems-pipeline-0.3.1.tar.gz (21 kB)
2022-03-02T08:37:45.5871162Z   Preparing metadata (setup.py): started
2022-03-02T08:37:47.9596661Z   Preparing metadata (setup.py): finished with status 'done'
2022-03-02T08:37:48.0237398Z Collecting python-dateutil==2.7.5
2022-03-02T08:37:48.0428561Z   Downloading python_dateutil-2.7.5-py2.py3-none-any.whl (225 kB)
2022-03-02T08:37:48.0916755Z      -------------------------------------- 225.7/225.7 KB 4.6 MB/s eta 0:00:00
2022-03-02T08:37:48.2174172Z Collecting requests==2.20.1
2022-03-02T08:37:48.2345750Z   Downloading requests-2.20.1-py2.py3-none-any.whl (57 kB)
2022-03-02T08:37:48.2672256Z      ---------------------------------------- 58.0/58.0 KB 1.5 MB/s eta 0:00:00
2022-03-02T08:37:48.3317769Z Collecting unittest-xml-reporting==2.2.1
2022-03-02T08:37:48.3496400Z   Downloading unittest_xml_reporting-2.2.1-py2.py3-none-any.whl (15 kB)
2022-03-02T08:37:48.5248091Z Collecting xunitparser==1.3.3
2022-03-02T08:37:48.6879961Z   Downloading xunitparser-1.3.3.tar.gz (13 kB)
2022-03-02T08:37:48.8208909Z   Preparing metadata (setup.py): started
2022-03-02T08:37:49.1816510Z   Preparing metadata (setup.py): finished with status 'error'
2022-03-02T08:37:49.1881221Z   error: subprocess-exited-with-error
2022-03-02T08:37:49.1882337Z   
2022-03-02T08:37:49.1882838Z   python setup.py egg_info did not run successfully.
2022-03-02T08:37:49.1883746Z   exit code: 1
2022-03-02T08:37:49.1884318Z   
2022-03-02T08:37:49.1884708Z   [1 lines of output]
2022-03-02T08:37:49.1885182Z   error in xunitparser setup command: use_2to3 is invalid.
2022-03-02T08:37:49.1886896Z   [end of output]
2022-03-02T08:37:49.1887287Z   
2022-03-02T08:37:49.1889251Z   note: This error originates from a subprocess, and is likely not a problem with pip.
2022-03-02T08:37:49.1895257Z error: metadata-generation-failed
2022-03-02T08:37:49.1895817Z 
2022-03-02T08:37:49.1896369Z Encountered error while generating package metadata.
2022-03-02T08:37:49.1896680Z 
2022-03-02T08:37:49.1897065Z See above for output.
2022-03-02T08:37:49.1897305Z 
2022-03-02T08:37:49.1897860Z note: This is an issue with the package mentioned above, not pip.
2022-03-02T08:37:49.1898488Z hint: See above for details.
2022-03-02T08:37:50.3386368Z ##[error]PowerShell exited with code '1'.
2022-03-02T08:37:50.3864425Z ##[section]Finishing: Install OutSystems Pipeline Package
duarte-castano commented 2 years ago

Hi @stevendecock, which Python version are you attempting to use to run pip? Unfortunately, some of our code's dependencies are not yet available for the most recent Python version.

I would suggest using an older version of Python, such as 3.7.

stevendecock commented 2 years ago

Hi @duarte-castano,

Indeed, that helped. If anyone else is struggling with this, I added this task in the beginning of my pipeline to set the python version to 3.7:

# Use Python version
# Use the specified version of Python from the tool cache, optionally adding it to the PATH
- task: UsePythonVersion@0
  inputs:
    versionSpec: '3.7' 
    addToPath: true 
    #architecture: 'x64' # Options: x86, x64 (this argument applies only on Windows agents)