pycontribs / jenkinsapi

A Python API for accessing resources and configuring Hudson & Jenkins continuous-integration servers
http://pypi.python.org/pypi/jenkinsapi
MIT License
858 stars 485 forks source link

Unknown Job issue #848

Open r8or0pz opened 1 year ago

r8or0pz commented 1 year ago
ISSUE TYPE
Jenkinsapi VERSION

Latest

Jenkins VERSION

2.414.1

SUMMARY

I am facing jenkinsapi.custom_exceptions.UnknownJob: 'ScheduleScaleAllDBs' issue when I'm trying to access Jenkins Master by IP address. To solve this problem I'm using modified version of Requester class with Host header added, but the problem persists anyway. Also httplib cannot be installed because of this issue: Could not find a version that satisfies the requirement httplib (from versions: none).

How may I solve it?

EXPECTED RESULTS

No jenkinsapi.custom_exceptions.UnknownJob happening

ACTUAL RESULTS
Traceback (most recent call last):
  File "/opt/./main.py", line 19, in <module>
    ).main()
      ^^^^^^
  File "/opt/e2e_invoke/E2EInvoke.py", line 61, in main
    self.scale_out()
  File "/opt/e2e_invoke/E2EInvoke.py", line 97, in scale_out
    self.build_job(job_name=job_name, parameters=self.__get_parameters(job_name=job_name, action='scale_out'))
  File "/opt/e2e_invoke/E2EInvoke.py", line 107, in build_job
    self.jenkins_instance.build_job(job_name, parameters)
  File "/root/.local/share/virtualenvs/opt-zvmYt2-H/lib/python3.11/site-packages/jenkinsapi/jenkins.py", line 221, in build_job
    self[jobname].invoke(build_params=params or {})
    ~~~~^^^^^^^^^
  File "/root/.local/share/virtualenvs/opt-zvmYt2-H/lib/python3.11/site-packages/jenkinsapi/jenkins.py", line 287, in __getitem__
    return self.jobs[jobname]
           ~~~~~~~~~^^^^^^^^^
  File "/root/.local/share/virtualenvs/opt-zvmYt2-H/lib/python3.11/site-packages/jenkinsapi/jobs.py", line 91, in __getitem__
    raise UnknownJob(job_name)
jenkinsapi.custom_exceptions.UnknownJob: 'ScheduleScaleAllDBs'
libo850 commented 10 months ago

I also have the same question, has this been resolved?