diff --git a/.github/workflows/run-since-updater.yml b/.github/workflows/run-since-updater.yml index e0986b5e74..619adca29c 100644 --- a/.github/workflows/run-since-updater.yml +++ b/.github/workflows/run-since-updater.yml @@ -29,7 +29,7 @@ jobs: id: run_script shell: bash - name: Create Pull Request - uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7 + uses: peter-evans/create-pull-request@dd2324fc52d5d43c699a5636bcf19fceaa70c284 # v7 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: Fill in since annotations diff --git a/cli/pom.xml b/cli/pom.xml index 2473629d23..cf30714cac 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -15,7 +15,7 @@ https://github.com/jenkinsci/jenkins - 2.14.0 + 2.15.0 diff --git a/core/src/main/java/hudson/model/Queue.java b/core/src/main/java/hudson/model/Queue.java index 28b5acb696..797cba56f3 100644 --- a/core/src/main/java/hudson/model/Queue.java +++ b/core/src/main/java/hudson/model/Queue.java @@ -1615,9 +1615,6 @@ public class Queue extends ResourceController implements Saveable { // Ensure that identification of blocked tasks is using the live state: JENKINS-27708 & JENKINS-27871 updateSnapshot(); - // JENKINS-75152. Save the label and blockage reasons of items that have no candidates into this map. - // It is used to speed up the judgement of other buildable items with the same label. - Map> noCandidateLabelsMap = new HashMap<>(); // allocate buildable jobs to executors for (BuildableItem p : new ArrayList<>( buildables)) { // copy as we'll mutate the list in the loop @@ -1644,13 +1641,6 @@ public class Queue extends ResourceController implements Saveable { updateSnapshot(); } } else { - // JENKINS-75152. Skip the remaining steps if the label of this item has been determined - // to have no candidate executors in the previous allocation process. - Label itemLabel = p.getAssignedLabel(); - if (noCandidateLabelsMap.containsKey(itemLabel)) { - p.transientCausesOfBlockage = noCandidateLabelsMap.get(itemLabel); - continue; - } List candidates = new ArrayList<>(parked.size()); Map reasonMap = new HashMap<>(); @@ -1683,11 +1673,6 @@ public class Queue extends ResourceController implements Saveable { new Object[]{p, candidates, parked.values()}); List reasons = reasonMap.values().stream().filter(Objects::nonNull).collect(Collectors.toList()); p.transientCausesOfBlockage = reasons.isEmpty() ? null : reasons; - // If no candidates, save the label and blockage reasons. - if (candidates.isEmpty()) { - noCandidateLabelsMap.put(itemLabel, p.transientCausesOfBlockage); - LOGGER.log(Level.FINEST, "{0} changes to the state of no candidate executor", itemLabel); - } continue; } diff --git a/core/src/main/java/hudson/model/UpdateCenter.java b/core/src/main/java/hudson/model/UpdateCenter.java index 437444feb4..c4e7880325 100644 --- a/core/src/main/java/hudson/model/UpdateCenter.java +++ b/core/src/main/java/hudson/model/UpdateCenter.java @@ -1273,6 +1273,9 @@ public class UpdateCenter extends AbstractModelObject implements Loadable, Savea * @throws IOException if the validation fails */ public void preValidate(DownloadJob job, URL src) throws IOException { + if (job.site != null) { + job.site.preValidate(src); + } } /** @@ -1410,6 +1413,10 @@ public class UpdateCenter extends AbstractModelObject implements Loadable, Savea * how the connection gets established. */ protected URLConnection connect(DownloadJob job, URL src) throws IOException { + if (job.site != null) { + return job.site.connect(src); + } + // fall back to just using the normal ProxyConfiguration if the site is null return ProxyConfiguration.open(src); } diff --git a/core/src/main/java/hudson/model/UpdateSite.java b/core/src/main/java/hudson/model/UpdateSite.java index 22764fd403..b0c30e861e 100644 --- a/core/src/main/java/hudson/model/UpdateSite.java +++ b/core/src/main/java/hudson/model/UpdateSite.java @@ -37,6 +37,7 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import hudson.ExtensionList; import hudson.PluginManager; import hudson.PluginWrapper; +import hudson.ProxyConfiguration; import hudson.Util; import hudson.lifecycle.Lifecycle; import hudson.model.UpdateCenter.UpdateCenterJob; @@ -48,6 +49,7 @@ import java.io.File; import java.io.IOException; import java.net.URI; import java.net.URL; +import java.net.URLConnection; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.time.Instant; @@ -202,6 +204,27 @@ public class UpdateSite { } } + /** + * Opens a connection to the given URL + * @param src the url to connect to + * @return A {@code URLConnection} for the given src URL + * @since TODO + */ + public URLConnection connect(URL src) throws IOException { + return ProxyConfiguration.open(src); + } + + /** + * Validate the URL of the resource before downloading it. + * + * @param src The location of the resource on the network + * @throws IOException if the validation fails + * @since TODO + */ + public void preValidate(URL src) throws IOException { + // no validation needed in the default setup + } + /** * Forces an update of the data file from the configured URL, irrespective of the last time the data was retrieved. * @return A {@code FormValidation} indicating the if the update metadata was successfully downloaded from the configured update site diff --git a/package.json b/package.json index 338d2330d1..7152a1156c 100644 --- a/package.json +++ b/package.json @@ -26,12 +26,12 @@ "@babel/cli": "7.26.4", "@babel/core": "7.26.9", "@babel/preset-env": "7.26.9", - "@eslint/js": "9.20.0", + "@eslint/js": "9.21.0", "babel-loader": "9.2.1", "clean-webpack-plugin": "4.0.0", "css-loader": "7.1.2", "css-minimizer-webpack-plugin": "7.0.0", - "eslint": "9.20.1", + "eslint": "9.21.0", "eslint-config-prettier": "10.0.1", "eslint-formatter-checkstyle": "8.40.0", "globals": "16.0.0", diff --git a/pom.xml b/pom.xml index 67aa08ddab..74fe1325fc 100644 --- a/pom.xml +++ b/pom.xml @@ -73,9 +73,9 @@ THE SOFTWARE. - 2.499 + 2.500 -SNAPSHOT - 2025-02-18T14:10:14Z + 2025-02-25T15:56:49Z github @@ -281,7 +281,7 @@ THE SOFTWARE. com.puppycrawl.tools checkstyle - 10.21.2 + 10.21.3 diff --git a/test/pom.xml b/test/pom.xml index 12910f3491..63e98847f4 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -80,12 +80,12 @@ THE SOFTWARE. io.jenkins.plugins ionicons-api - 74.v93d5eb_813d5f + 82.v0597178874e1 io.jenkins.plugins javax-activation-api - 1.2.0-7 + 1.2.0-8 io.jenkins.plugins @@ -95,7 +95,7 @@ THE SOFTWARE. org.jenkins-ci.plugins ant - 511.v0a_a_1a_334f41b_ + 513.vde9e7b_a_0da_0f org.jenkins-ci.plugins @@ -128,7 +128,7 @@ THE SOFTWARE. org.jenkins-ci.plugins.workflow workflow-step-api - 686.v603d058a_e148 + 700.v6e45cb_a_5a_a_21 @@ -156,13 +156,13 @@ THE SOFTWARE. io.jenkins.plugins javax-mail-api - 1.6.2-10 + 1.6.2-11 test org.awaitility awaitility - 4.2.2 + 4.3.0 test @@ -212,7 +212,7 @@ THE SOFTWARE. org.jenkins-ci.plugins antisamy-markup-formatter - 162.v0e6ec0fcfcf6 + 173.v680e3a_b_69ff3 test @@ -230,7 +230,7 @@ THE SOFTWARE. org.jenkins-ci.plugins junit - 1316.v13ec14a_de230 + 1317.v5b_35d792b_06a_ test @@ -254,7 +254,7 @@ THE SOFTWARE. org.jenkins-ci.plugins structs - 338.v848422169819 + 343.vdcf37b_a_c81d5 test @@ -360,7 +360,7 @@ THE SOFTWARE. io.jenkins.plugins bootstrap5-api - 5.3.3-2 + 5.3.3-3 hpi ${project.build.outputDirectory}/plugins bootstrap5-api.jpi diff --git a/war/pom.xml b/war/pom.xml index 1723486c95..4a7d62d991 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -295,7 +295,7 @@ THE SOFTWARE. org.jenkins-ci.plugins antisamy-markup-formatter - 162.v0e6ec0fcfcf6 + 173.v680e3a_b_69ff3 hpi @@ -316,7 +316,7 @@ THE SOFTWARE. org.jenkins-ci.plugins junit - 1316.v13ec14a_de230 + 1317.v5b_35d792b_06a_ hpi @@ -337,7 +337,7 @@ THE SOFTWARE. io.jenkins.plugins bootstrap5-api - 5.3.3-2 + 5.3.3-3 hpi @@ -374,7 +374,7 @@ THE SOFTWARE. io.jenkins.plugins eddsa-api - 0.3.0-4.v84c6f0f4969e + 0.3.0-13.v7cb_69ed68f00 hpi @@ -413,7 +413,7 @@ THE SOFTWARE. org.jenkins-ci.plugins.workflow workflow-step-api - 686.v603d058a_e148 + 700.v6e45cb_a_5a_a_21 hpi @@ -427,7 +427,7 @@ THE SOFTWARE. org.jenkins-ci.plugins structs - 338.v848422169819 + 343.vdcf37b_a_c81d5 hpi @@ -469,21 +469,21 @@ THE SOFTWARE. org.jenkins-ci.plugins trilead-api - 2.147.vb_73cc728a_32e + 2.190.v1ed19f8137f8 hpi io.jenkins.plugins javax-activation-api - 1.2.0-7 + 1.2.0-8 hpi io.jenkins.plugins javax-mail-api - 1.6.2-10 + 1.6.2-11 hpi @@ -532,7 +532,7 @@ THE SOFTWARE. io.jenkins.plugins ionicons-api - 74.v93d5eb_813d5f + 82.v0597178874e1 hpi diff --git a/yarn.lock b/yarn.lock index a4587edeec..4be9571e00 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1649,38 +1649,29 @@ __metadata: languageName: node linkType: hard -"@eslint/config-array@npm:^0.19.0": - version: 0.19.1 - resolution: "@eslint/config-array@npm:0.19.1" +"@eslint/config-array@npm:^0.19.2": + version: 0.19.2 + resolution: "@eslint/config-array@npm:0.19.2" dependencies: - "@eslint/object-schema": "npm:^2.1.5" + "@eslint/object-schema": "npm:^2.1.6" debug: "npm:^4.3.1" minimatch: "npm:^3.1.2" - checksum: 10c0/43b01f596ddad404473beae5cf95c013d29301c72778d0f5bf8a6699939c8a9a5663dbd723b53c5f476b88b0c694f76ea145d1aa9652230d140fe1161e4a4b49 + checksum: 10c0/dd68da9abb32d336233ac4fe0db1e15a0a8d794b6e69abb9e57545d746a97f6f542496ff9db0d7e27fab1438546250d810d90b1904ac67677215b8d8e7573f3d languageName: node linkType: hard -"@eslint/core@npm:^0.10.0": - version: 0.10.0 - resolution: "@eslint/core@npm:0.10.0" +"@eslint/core@npm:^0.12.0": + version: 0.12.0 + resolution: "@eslint/core@npm:0.12.0" dependencies: "@types/json-schema": "npm:^7.0.15" - checksum: 10c0/074018075079b3ed1f14fab9d116f11a8824cdfae3e822badf7ad546962fafe717a31e61459bad8cc59cf7070dc413ea9064ddb75c114f05b05921029cde0a64 + checksum: 10c0/d032af81195bb28dd800c2b9617548c6c2a09b9490da3c5537fd2a1201501666d06492278bb92cfccac1f7ac249e58601dd87f813ec0d6a423ef0880434fa0c3 languageName: node linkType: hard -"@eslint/core@npm:^0.11.0": - version: 0.11.0 - resolution: "@eslint/core@npm:0.11.0" - dependencies: - "@types/json-schema": "npm:^7.0.15" - checksum: 10c0/1e0671d035c908175f445864a7864cf6c6a8b67a5dfba8c47b2ac91e2d3ed36e8c1f2fd81d98a73264f8677055559699d4adb0f97d86588e616fc0dc9a4b86c9 - languageName: node - linkType: hard - -"@eslint/eslintrc@npm:^3.2.0": - version: 3.2.0 - resolution: "@eslint/eslintrc@npm:3.2.0" +"@eslint/eslintrc@npm:^3.3.0": + version: 3.3.0 + resolution: "@eslint/eslintrc@npm:3.3.0" dependencies: ajv: "npm:^6.12.4" debug: "npm:^4.3.2" @@ -1691,31 +1682,31 @@ __metadata: js-yaml: "npm:^4.1.0" minimatch: "npm:^3.1.2" strip-json-comments: "npm:^3.1.1" - checksum: 10c0/43867a07ff9884d895d9855edba41acf325ef7664a8df41d957135a81a477ff4df4196f5f74dc3382627e5cc8b7ad6b815c2cea1b58f04a75aced7c43414ab8b + checksum: 10c0/215de990231b31e2fe6458f225d8cea0f5c781d3ecb0b7920703501f8cd21b3101fc5ef2f0d4f9a38865d36647b983e0e8ce8bf12fd2bcdd227fc48a5b1a43be languageName: node linkType: hard -"@eslint/js@npm:9.20.0": - version: 9.20.0 - resolution: "@eslint/js@npm:9.20.0" - checksum: 10c0/10e7b5b9e628b5192e8fc6b0ecd27cf48322947e83e999ff60f9f9e44ac8d499138bcb9383cbfa6e51e780d53b4e76ccc2d1753b108b7173b8404fd484d37328 +"@eslint/js@npm:9.21.0": + version: 9.21.0 + resolution: "@eslint/js@npm:9.21.0" + checksum: 10c0/86c24a2668808995037e3f40c758335df2ae277c553ac0cf84381a1a8698f3099d8a22dd9c388947e6b7f93fcc1142f62406072faaa2b83c43ca79993fc01bb3 languageName: node linkType: hard -"@eslint/object-schema@npm:^2.1.5": - version: 2.1.5 - resolution: "@eslint/object-schema@npm:2.1.5" - checksum: 10c0/5320691ed41ecd09a55aff40ce8e56596b4eb81f3d4d6fe530c50fdd6552d88102d1c1a29d970ae798ce30849752a708772de38ded07a6f25b3da32ebea081d8 +"@eslint/object-schema@npm:^2.1.6": + version: 2.1.6 + resolution: "@eslint/object-schema@npm:2.1.6" + checksum: 10c0/b8cdb7edea5bc5f6a96173f8d768d3554a628327af536da2fc6967a93b040f2557114d98dbcdbf389d5a7b290985ad6a9ce5babc547f36fc1fde42e674d11a56 languageName: node linkType: hard -"@eslint/plugin-kit@npm:^0.2.5": - version: 0.2.5 - resolution: "@eslint/plugin-kit@npm:0.2.5" +"@eslint/plugin-kit@npm:^0.2.7": + version: 0.2.7 + resolution: "@eslint/plugin-kit@npm:0.2.7" dependencies: - "@eslint/core": "npm:^0.10.0" + "@eslint/core": "npm:^0.12.0" levn: "npm:^0.4.1" - checksum: 10c0/ba9832b8409af618cf61791805fe201dd62f3c82c783adfcec0f5cd391e68b40beaecb47b9a3209e926dbcab65135f410cae405b69a559197795793399f61176 + checksum: 10c0/0a1aff1ad63e72aca923217e556c6dfd67d7cd121870eb7686355d7d1475d569773528a8b2111b9176f3d91d2ea81f7413c34600e8e5b73d59e005d70780b633 languageName: node linkType: hard @@ -1750,10 +1741,10 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/retry@npm:^0.4.1": - version: 0.4.1 - resolution: "@humanwhocodes/retry@npm:0.4.1" - checksum: 10c0/be7bb6841c4c01d0b767d9bb1ec1c9359ee61421ce8ba66c249d035c5acdfd080f32d55a5c9e859cdd7868788b8935774f65b2caf24ec0b7bd7bf333791f063b +"@humanwhocodes/retry@npm:^0.4.2": + version: 0.4.2 + resolution: "@humanwhocodes/retry@npm:0.4.2" + checksum: 10c0/0235525d38f243bee3bf8b25ed395fbf957fb51c08adae52787e1325673071abe856c7e18e530922ed2dd3ce12ed82ba01b8cee0279ac52a3315fcdc3a69ef0c languageName: node linkType: hard @@ -3524,20 +3515,20 @@ __metadata: languageName: node linkType: hard -"eslint@npm:9.20.1": - version: 9.20.1 - resolution: "eslint@npm:9.20.1" +"eslint@npm:9.21.0": + version: 9.21.0 + resolution: "eslint@npm:9.21.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.2.0" "@eslint-community/regexpp": "npm:^4.12.1" - "@eslint/config-array": "npm:^0.19.0" - "@eslint/core": "npm:^0.11.0" - "@eslint/eslintrc": "npm:^3.2.0" - "@eslint/js": "npm:9.20.0" - "@eslint/plugin-kit": "npm:^0.2.5" + "@eslint/config-array": "npm:^0.19.2" + "@eslint/core": "npm:^0.12.0" + "@eslint/eslintrc": "npm:^3.3.0" + "@eslint/js": "npm:9.21.0" + "@eslint/plugin-kit": "npm:^0.2.7" "@humanfs/node": "npm:^0.16.6" "@humanwhocodes/module-importer": "npm:^1.0.1" - "@humanwhocodes/retry": "npm:^0.4.1" + "@humanwhocodes/retry": "npm:^0.4.2" "@types/estree": "npm:^1.0.6" "@types/json-schema": "npm:^7.0.15" ajv: "npm:^6.12.4" @@ -3569,7 +3560,7 @@ __metadata: optional: true bin: eslint: bin/eslint.js - checksum: 10c0/056789dd5a00897730376f8c0a191e22840e97b7276916068ec096341cb2ec3a918c8bd474bf94ccd7b457ad9fbc16e5c521a993c7cc6ebcf241933e2fd378b0 + checksum: 10c0/558edb25b440cd51825d66fed3e84f1081bd6f4cb2cf994e60ece4c5978fa0583e88b75faf187c1fc21688c4ff7072f12bf5f6d1be1e09a4d6af78cff39dc520 languageName: node linkType: hard @@ -4381,12 +4372,12 @@ __metadata: "@babel/cli": "npm:7.26.4" "@babel/core": "npm:7.26.9" "@babel/preset-env": "npm:7.26.9" - "@eslint/js": "npm:9.20.0" + "@eslint/js": "npm:9.21.0" babel-loader: "npm:9.2.1" clean-webpack-plugin: "npm:4.0.0" css-loader: "npm:7.1.2" css-minimizer-webpack-plugin: "npm:7.0.0" - eslint: "npm:9.20.1" + eslint: "npm:9.21.0" eslint-config-prettier: "npm:10.0.1" eslint-formatter-checkstyle: "npm:8.40.0" globals: "npm:16.0.0"