jenkinsci / lockable-resources-plugin

Lock resources against concurrent use
https://plugins.jenkins.io/lockable-resources
MIT License
86 stars 183 forks source link

Adapt plugin for Data Table API 2.0.x #634

Closed alecharp closed 4 months ago

alecharp commented 6 months ago

Jenkins and plugins versions report

Environment Jenkins 2.426+ Data Table API 2.0.1-1 `master`

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

N/A

Reproduction steps

Apply patch

diff --git a/pom.xml b/pom.xml
index 08de185..7c3f052 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,7 +59,7 @@

   <properties>
     <changelist>999999-SNAPSHOT</changelist>
-    <jenkins.version>2.387.3</jenkins.version>
+    <jenkins.version>2.426.3</jenkins.version>
     <gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
     <spotbugs.effort>Max</spotbugs.effort>
     <spotbugs.threshold>Low</spotbugs.threshold>
@@ -70,11 +70,16 @@
     <dependencies>
       <dependency>
         <groupId>io.jenkins.tools.bom</groupId>
-        <artifactId>bom-2.387.x</artifactId>
-        <version>2543.vfb_1a_5fb_9496d</version>
+        <artifactId>bom-2.426.x</artifactId>
+        <version>2857.v01a_0144eb_20b_</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
+      <dependency>
+        <groupId>io.jenkins.plugins</groupId>
+        <artifactId>data-tables-api</artifactId>
+        <version>2.0.1-1</version>
+      </dependency>
     </dependencies>
   </dependencyManagement>

And visualize the resources of the instance.

You can also run mvn clean test -Dtest=org.jenkins.plugins.lockableresources.LockStepTest#unlockButtonWithWaitingRuns,org.jenkins.plugins.lockableresources.LockableResourceApiTest#reserveUnreserveApi

Expected Results

Tests are passing

Actual Results

Tests are failing.

Anything else?

This is blocking the release of BOM since the bump of Data Table API plugin https://github.com/jenkinsci/data-tables-api-plugin/pull/424

Are you interested in contributing a fix?

No response

alecharp commented 6 months ago

I tried to look at how the table is created but I fail to find the culprit.

mPokornyETM commented 6 months ago

Ohoho . Ok I see . This need a little bit refactoring. I need to provide 2 new features first, but when this means, the plugin will be no more usable. This one will win 😉🤷‍♂️

jimklimov commented 5 months ago

Can confirm the issue visually too: the data table seems to have a fixed size now (so overflows into scrolling when a browser window is too small, and the "Search" element above levitates far from the table when the window is too wide. With that said, about two fifths to half of the table (depending on unwrappable token length - some of our resources have long names, others don't) is a content-less gray area, literally:

image

mPokornyETM commented 5 months ago

nice, this will be really tricky to analyze. :-(

jimklimov commented 5 months ago

Per browser console, there are two colgroup's each with a series of col entries. The first colgroup is our usual content. The second one is the offender, specifically the first col in it:

image

mPokornyETM commented 5 months ago

May somebody looks here pls

642

thx