Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • H haf
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 45
    • Issues 45
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • hivehive
  • haf
  • Merge requests
  • !195

Remove PYTHONPATH hack when requiring test-tools

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Mateusz Żebrak requested to merge mzebrak/fix-test-tools-tox-installation into develop Nov 24, 2022
  • Overview 0
  • Commits 3
  • Pipelines 3
  • Changes 3

For updating HIVE submodule, it requires: hive!769 (merged)

Test-tools have it's own dependencies like requests or recently added python-dateutil.

When using hack by injecting test_tools/package/ into to PYTHONPATH env variable, these dependencies are not installed and it is required to specify them explicitly in the deps section of tox.ini.

This could lead to mismatch between test-tools and tox.ini versions of dependencies, so this change makes test-tools installable inside tox instead of using it's source code directly.

Additionaly, some dependencies might not be even included so pipeline will fail immediatelly. Such situation takes place when test-tools introduce new, mandatory dependencies, like recently python-dateutil. Pipeline not failed just by luck, because other dependency (pandas) was installing python-dateutil. If pandas would not install it, pipeline will fail in such way (ModuleNotFoundError: No module named ...).

This MR fixes it and installs test-tools (including all of their required deps) by specifing theirs path in tox.ini deps section.

Now they are installed and it could be observed here
The line 623 shows it:
py38 installdeps: pytest==6.2.5, pytest-timeout==2.0.1, pytest-repeat==0.9.1, sqlalchemy==1.4.25, sqlalchemy-utils==0.37.9, psycopg2==2.9.1, requests==2.25.1, pandas==1.4.0, /builds/hive/haf/hive/tests/test_tools

FYI: @kudmich

Edited Nov 24, 2022 by Mateusz Żebrak
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: mzebrak/fix-test-tools-tox-installation