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

[JENKINS-73119] Catch the class not found exception #26

Merged

Conversation

MarkEWaite
Copy link

@MarkEWaite MarkEWaite commented May 9, 2024

JENKINS-73119 Catch the class not found exception

If the folders plugin is not installed, jobs fail to start and report: "Exception evaluating if the gueue can run the task"

Once the class not found exception is caught, then the job runs as expected.

Users that need the fix before a release is available can download it from Artifactory and install it on their controller. If plugin installation manager tool is being used, then the syntax to use the pull request build is:

build-blocker-plugin:incrementals;org.jenkins-ci.plugins;166.v7992612cb_4b_5

Testing done

Confirmed the failure by running Jenkins 2.426.3 with the build blocker plugin 165.v5ecb_fb_f61520 installed. I created a freestyle job and ran it. The run failed with the message "Exception evaluating if the gueue can run the task".

Confirmed the failure is resolved by installing the build of this commit and ran the same job without error. Confirmed that the class not found exception was written to the Jenkins logger when I enabled FINE logging for the BuildBlockerQueueTaskDispatcher. FINE logging is disabled by default, so the Jenkins log will not be cluttered by those exception messages unless an administrator specifically enables it.

Submitter checklist

Edit tasklist title
Beta Give feedback Tasklist Submitter checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
    Options
  2. Ensure that the pull request title represents the desired changelog entry
    Options
  3. Please describe what you did
    Options
  4. Link to relevant issues in GitHub or Jira
    Options
  5. Link to relevant pull requests, esp. upstream and downstream changes
    Options
  6. Ensure you have provided tests - that demonstrates feature works or fixes the issue
    Options

If the folders plugin is not installed, jobs fail to start and report:
"Exception evaluating if the gueue can run the task"

Once the class not found exception is caught, then the job runs as expected.

Confirmed the failure by running Jenkins 2.426.3 with the build blocker
plugin 165.v5ecb_fb_f61520 installed.  I created a freestyle job and
ran it.  The run failed with the message "Exception evaluating if the
gueue can run the task".

Confirmed the failure is resolved by installing the build of this commit
and ran the same job without error.  Confirmed that the class not found
exception was written to the Jenkins logger when I enabled FINE logging
for the BuildBlockerQueueTaskDispatcher.  FINE logging is disabled by
default, so the Jenkins log will not be cluttered by those exception
messages unless an administrator specifically enables it.
@jonesbusy
Copy link

@Denis1990 Hi, can you take a look at this ? I think its' worth to merge and let the CD do a release

I think the fine logger is fine. If the folder plugin is not installed, it just mean we cannot check if the property exists on parent folder. Therefore the job can run.

Perhaps the code could be improved to check if the plugin is installed instead of try/catch error

@Denis1990
Copy link

Thank you for the fix guys.
Will merge.

@Denis1990 Denis1990 merged commit c82fc20 into jenkinsci:master May 19, 2024
14 checks passed
@jonesbusy
Copy link

Note: The main branch didn't build for some reason (flaky test ?). Also this PR must be labeled 'bug' for the CD to create a release

@MarkEWaite MarkEWaite deleted the catch-class-not-found-exception branch May 20, 2024 09:50
@MarkEWaite
Copy link
Author

Note: The main branch didn't build for some reason (flaky test ?).

That looks like a flaky test. I've started the build on ci.jenkins.io again in hopes of confirming that.

Also this PR must be labeled 'bug' for the CD to create a release

Agreed.

@Denis1990
Copy link

I triggered a release manually, in order to publish the new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants