Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,763
    • Issues 44,763
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,329
    • Merge requests 1,329
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #325604
Closed
Open
Issue created Mar 22, 2021 by Kate Grechishkina@kategrechishkina🇺🇦Developer

Defining ASDF_PYTHON_VERSION for License Scanning job doesn't install the version

Summary

In a recent interaction with the customer in ticket #190317 (internal), following the subsequent docs MR: !57019 (merged) it was uncovered that the License Scanning job defined with ASDF_PYTHON_VERSION variable doesn't work as expected. The license finder doesn't install the version defined in ASDF_PYTHON_VERSION.

Steps to reproduce

  1. Create a test python project with some modules in reqirements.txt
  2. Setup the License Compliance job by including the job in your existing .gitlab-ci.yml file
  3. Add ASDF_PYTHON_VERSION variable selecting the non-default Python version, for example 3.7.2, create .tool-versions file with python 3.7.2 in it.
  4. Run the job.

Example Project

https://gitlab.com/gitlab-gold/kategrechishkinatestgroup/190317-license-scanning

What is the current bug behavior?

The license scan doesn't scan the project, instead it errors out with these warnings:

[v3.28.8] debconf: delaying package configuration, since apt-utils is not installed
python 3.8.5 is already installed
asdf: No preset version installed for command virtualenv
Please install the missing version by running one of the following:
asdf install python 3.7.2
or add one of the following in your .tool-versions file:
python 3.8.5
[v3.28.8] sh -c '. .venv/bin/activate && pip install -v -r requirements.txt'
[v3.28.8] sh: 1: .: Can't open .venv/bin/activate
[v3.28.8] /opt/asdf/bin/asdf exec python /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/license_finder-6.12.0/bin/license_finder_pip.py /builds/gitlab-gold/kategrechishkinatestgroup/190317-license-scanning/requirements.txt
[v3.28.8] asdf: No preset version installed for command python
Please install the missing version by running one of the following:
asdf install python 3.7.2
or add one of the following in your .tool-versions file:
python 3.8.5

What is the expected correct behavior?

The License Compliance doc mentions that setting ASDF_PYTHON_VERSION should be enough to run the setup of custom not pre-installed Python version. But it doesn't seem to be happening right now.

Relevant logs and/or screenshots

https://gitlab.com/gitlab-gold/kategrechishkinatestgroup/190317-license-scanning/-/jobs/1118687443

Output of checks

This bug happens on GitLab.com

Possible fixes

Edited Mar 22, 2021 by Kate Grechishkina
Assignee
Assign to
Time tracking