lp:~hashar/python-jenkins/fast-job-existence-check

Created by Antoine "hashar" Musso and last modified
Get this branch:
bzr branch lp:~hashar/python-jenkins/fast-job-existence-check
Only Antoine "hashar" Musso can upload to this branch. If you are Antoine "hashar" Musso please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Antoine "hashar" Musso
Project:
Python Jenkins
Status:
Merged

Recent revisions

19. By Antoine "hashar" Musso

speed up job existence test by fetching less informations

The job_exists() methods rely on an API call that cause Jenkins to LazyLoad the
build history. Whenever a job has a huge build history, that would be awfully
slow. The API let you fetch only a subset of the information you need by using
the 'tree' parameter, by requesting only the name of the job, we ensure the
server is only going to do a very simple operation.

It is then only a matter of checking the job name returned the API is equal to
the one requested, that validates the job exists and is accessible.

Tested out on a dev setup with a job having a million builds:

import jenkins
from pprint import pprint

j = jenkins.Jenkins('https://localhost:8080/')

for job_name in ['huge-history', 'Idonotexist']:
    print "Getting job name of %s" % job_name
    pprint(j.get_job_name(job_name))
    print "Does it exist?"
    pprint(j.job_exists(job_name))

Output:

Getting job name of huge-history
u'huge-history'
Does it exist?
True
Getting job name of Idonotexist
None
Does it exist?
None

18. By Antoine "hashar" Musso

overhaul the sphinx documentation

Sphinx:
* Build dir is now named `build` and the files are under `source`.
* MakeFile learned texinfo, info and gettext targets
* include __init__ documentation (autoclass_content)
* keep file ordering for methods (autodoc_member_order)
* comment out html_static_path to get rid of a warning

Doc:
* Index is now... an index! Takes advantage of :glob: to automatically
  create a complete table of content.
* Creates API reference which list the documentation directly from the
  jenkins/__init__.py file. That will avoid the documentation duplication
  and some out of sync documentation.
* insert the module in the path to document it
* the example were both in index.rst and __init__.py create a new section
  with example.rst. That can be later be improved with some typical use
  cases.
* A couple documentation update to some methods. The inline documentation
  was out of sync though the index.rst got updated.

17. By Antoine "hashar" Musso

pass pep8 on all files

pep8 is the python style standard. I have ignored long lines though.

16. By James Page

Merged new node management features including using SSH and Windows slaves plus cancel job/queue methods

15. By James Page

Merged bug fix and tests for job names with spaces

14. By James Page

Open for 0.3 development

13. By James Page

Merged branch to add get_build_info method

12. By Ken Conley <email address hidden>

Documentation updates. Sphinx no longer uses automodule. Filled in some missing API methods. Corrected references
to Hudson in doc strings.

11. By Ken Conley <email address hidden>

Converting documentation to sphinx

10. By James Page

Release 0.2

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:~python-jenkins-developers/python-jenkins/trunk
This branch contains Public information 
Everyone can see this information.