← Back to team overview

python-jenkins-developers team mailing list archive

[Bug 1687551] Re: "HTTP Error 414: Request-URI Too Long" while submitting a build

 

I use airflow with it's jenkins operator using python-jenkins, and I am facing the same ploblem. 
With local file on machine modified, I walk around the problem, these is the relevant code:

https://github.com/liuxhit/airflow/blob/main/airflow/providers/jenkins/operators/jenkins_job_trigger.py#L142
"""
request = Request(method='POST', url=jenkins_server.build_job_url(self.job_name, params, None))
"""

https://opendev.org/jjb/python-jenkins/src/branch/master/jenkins/__init__.py#L1349
"""
return (self._build_url(BUILD_WITH_PARAMS_JOB, locals()) +
                    '?' + urlencode(parameters))
"""

I am reading python-jenkins' developer-manual to commit a patch for this
problem.

** Changed in: python-jenkins
       Status: New => Confirmed

** Changed in: python-jenkins
     Assignee: (unassigned) => liuxun (liuxhit)

-- 
You received this bug notification because you are a member of Python
Jenkins Developers, which is subscribed to Python Jenkins.
https://bugs.launchpad.net/bugs/1687551

Title:
  "HTTP Error 414: Request-URI Too Long" while submitting a build

Status in Python Jenkins:
  Confirmed

Bug description:
  The Jenkins job I wanted to trigger was composed with multi parameters. One is a multi-lines parameters that is too long to exceed the limitation set for the url length in this request. 
   
  """
  self.jek_ins.build_job(self.job_name, self.build_vars, self.user_token)
  """

  python-jenkins-0.4.8-1.el7.noarch

  How to reproduce:
  1. pass a parameter including a very long strings to the jenkins params when calling function build_job

  Actual Result:
  HTTP Error 414: Request-URI Too Long

  Excepted result:
  Http request for triggering the build succeed even if a long string included.

To manage notifications about this bug go to:
https://bugs.launchpad.net/python-jenkins/+bug/1687551/+subscriptions



References