jenkinsci / jenkinsci/lockable-resources-plugin

Update to 1309.ve21874387edf claims "Unreadable Data": "CannotResolveClassException: lockedResources"

Open
#705 1 comment 1 reaction 1 assignee Claimed by @mPokornyETM View on GitHub
Triage
Dominant language
Java
Stars
99
Forks
205
Avg merge
2d 13h
Merged PRs (30d)
8

Description

### Jenkins and plugins versions report

Environment


```text
Paste the output here
```

### What Operating System are you using (both controller, and any agents involved in the problem)?

OpenIndiana, JDK21

### Reproduction steps

Had LR installed since forever, regularly updated, many builds running and historic data retained.

Updated to current release [1309.ve21874387edf](https://updates.jenkins.io/download/plugins/lockable-resources/1309.ve21874387edf/lockable-resources.hpi) after [1301.v0e3b_da_4b_4462](https://updates.jenkins.io/download/plugins/lockable-resources/1301.v0e3b_da_4b_4462/lockable-resources.hpi) installed a few days ago, and today I saw the "Unreadable Data" warnings. I think they were not present with the previous Jenkins uptime (it would take some time to wait until this instance is quiet to roll back the plugin and double-check), so if this really is a very new regression, gotta be fallout of PR #673 with a lot of wonderful changes, including renamed/removed API calls etc.

The `lockedResources` in question *may be* the list and count of resources used by a build and saved into its `build.xml` file (IIRC this feature got added during the past year or so?):
````



dynamatrix-stash:nut-ci-src:jenkins-nut-nut-PR-2480-15

224


gitcache-dynamatrix:ci-oi

15

...

gitcache-dynamatrix:ci-bsd

8



````

In $BUILD_URL/locked-resources/ pages there is now a table which only displays "Loading - please wait ..." for older builds.

NOTE: Information *is* displayed for builds that happened after the update (more thoughts on this below). The new structure in `build.xml` indeed relies on different class `logs` to contain the differently structured entries:
````



try
Resource: dynamatrix-stash:nut-ci-src:jenkins-nut-nut-PR-2629-3
dynamatrix-stash:nut-ci-src:jenkins-nut-nut-PR-2629-3
1726647049346


acquired
Resource: dynamatrix-stash:nut-ci-src:jenkins-nut-nut-PR-2629-3
dynamatrix-stash:nut-ci-src:jenkins-nut-nut-PR-2629-3
1726647049350

...

released
Resource: dynamatrix-stash:nut-ci-src:jenkins-nut-nut-PR-2629-3
dynamatrix-stash:nut-ci-src:jenkins-nut-nut-PR-2629-3
1726695088424


released
Resource: gitcache-dynamatrix:fhnutci-bsd
gitcache-dynamatrix:fhnutci-bsd
1726695242740




````

### Expected Results

Usage data should be still available to be seen. Maybe converted to a new structure if needed, as many plugins do to handle upgrades after large refactoring, but still usable.

UPDATE: Comparing the new `build.xml` logs to the old ones, I see the new ones auditing each operation like try to lock, acquired, released - yielding over 1500 detailed entries in the new build vs. 14 summaries in the old one (how many times a certain lock name was held). I think they both have different valuability for troubleshooting, optimization (what is a hot spot?) etc. so I'd rather add having such a summary page into the Expected Results bucket. Should not be hard to calculate the resulting Map from detailed audit info...

### Actual Results

Warnings are issued. Data about resources used by an older build is not displayed.

Suspected PR #673 description does not seem to imply that such behavior change could be intentional.

### Anything else?

_No response_

### Are you interested in contributing a fix?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.