Skip to content

evaluate-jenkins fails to import with GitLabApi timeout parameter error after upgrade

Summary

After a customer upgraded the evaluate tool to the latest version, the evaluate-jenkins command fails with a TypeError related to an unexpected timeout keyword argument in the GitLabApi class initialization.

Steps to Reproduce

  1. Upgrade the evaluate tool to the latest version
  2. Run the command: evaluate-jenkins -i -s https://jenkins.dev.aws.q2e.io/jenkins -u [username] -t [token]
  3. Error occurs immediately on import

Environment Details:

  • Tool: evaluate-jenkins
  • Python Version: 3.8.18
  • Jenkins URL: https://jenkins.dev.aws.q2e.io/jenkins
  • Command Used: evaluate-jenkins -i -s https://jenkins.dev.aws.q2e.io/jenkins -u [username] -t [token]

Log traces

root@3XQ5GX3-LT:~/Temp/GL_ProServ/new_release/evaluate-main# evaluate-jenkins -i -s https://jenkins.dev.aws.q2e.io/jenkins -u pmcvey -t [token here]
Traceback (most recent call last):
  File "/root/.pyenv/versions/3.8.18/bin/evaluate-jenkins", line 5, in <module>
    from gitlab_evaluate.main import evaluate_jenkins
  File "/root/.pyenv/versions/3.8.18/lib/python3.8/site-packages/gitlab_evaluate/main.py", line 5, in <module>
    from gitlab_evaluate.migration_readiness.gitlab.report_generator import ReportGenerator as GLReportGenerator
  File "/root/.pyenv/versions/3.8.18/lib/python3.8/site-packages/gitlab_evaluate/migration_readiness/gitlab/__init__.py", line 6, in <module>
    glapi = GitLabApi(app_path=getcwd(), log_name='evaluate', timeout=120)
TypeError: __init__() got an unexpected keyword argument 'timeout'

Error Analysis: The error occurs in:

  • File: /root/.pyenv/versions/3.8.18/lib/python3.8/site-packages/gitlab_evaluate/migration_readiness/gitlab/__init__.py
  • Line: 6
  • Issue: GitLabApi.__init__() method no longer accepts the timeout keyword argument