Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid jenkinsapi trying to fetch all jobs. #1045

Merged
merged 3 commits into from
May 2, 2024

Commits on Apr 26, 2024

  1. Use lazy argument to prevent an initial "poll" of Jenkins jobs.

    By default the jenkinsapi Jenkins class will trigger an eager loading of
    all Jenkins jobs via the API. Our Jenkins server buckles under the
    weight of this and so we do not want to do this until we need to and
    ideally future changes will replace unfiltered polling completely.
    nuclearsandwich committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    b15a01f View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2024

  1. Avoid triggering spurious HTTP request of all jenkins jobs.

    There's a malinteraction with the jenkinsapi library and Python
    convention which has been causing extremely large HTTP requests whenever
    the truthiness of an instance of the Jenkins class is tested.
    
    Jenkins defines a `__len__` method which is used to determine
    truthiness. But this method triggers a fetch of every job on our Jenkins
    host which can take 2 - 5 minutes to return due to the sheer volume of
    jobs.
    
    By avoiding this in favor of an explicit check whether jenkins is an
    instance of the JenkinsProxy class we can save taking a really big
    runtime hit and cut down on spurious failures due to timeouts.
    nuclearsandwich committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    5ecbe8f View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2024

  1. Whitespace.

    nuclearsandwich committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    0e57936 View commit details
    Browse the repository at this point in the history