Giter VIP home page Giter VIP logo

jobcacher-plugin's Introduction

Job Cacher Plugin

Build Status Jenkins Plugin Jenkins Plugin Installs

Introduction

This plugin provides caching for dependencies and build artefacts to reduce build execution times. This is especially useful for Jenkins setups with ephemeral executors which always start from a clean state, such as container based ones.

Features

Extension Points

  • jenkins.plugins.itemstorage.ItemStorage for adding custom cache storages
  • jenkins.plugins.jobcacher.Cache for adding custom caches

Other known consumer plugins that implement the jenkins.plugins.itemstorage.ItemStorage extension point to provide other backend storage options:

Configuration

Global Configuration Options

By default, the plugin is configured to use on-controller storage for the cache. In addition, a storage implementation for Amazon S3 and S3 compatible services is also available.

The storage type can be configured in the global configuration section of Jenkins.

Cache Configuration Options

The following cache configuration options apply to all supported job types.

Option Mandatory Description
maxCacheSize no The maximum size in megabytes of all configured caches that Jenkins will allow until it deletes all completely and starts the next build from an empty cache. This prevents caches from growing indefinitely with the downside of periodic fresh builds without a cache. Set to zero or empty to skip checking cache size.
skipSave no If set to true, skip saving the cache. Default false
skipRestore no If set to true, skip restoring the cache. Default false
defaultBranch no If the current branch has no cache, it will seed its cache from the specified branch. Leave empty to generate a fresh cache for each branch.
caches yes Defines the caches to use in the job (see below).

ArbitraryFileCache

Option Mandatory Default value Description
path yes The path to cache. It can be absolute or relative to the workspace.
cacheName no The name of the cache. Useful if caching the same path multiple times in a pipeline.
includes no **/* The pattern to match files that should be included in caching.
excludes no The pattern to match files that should be excluded from caching.
useDefaultExcludes no true Whether to use default excludes (see DirectoryScanner.java#L170 for more details).
cacheValidityDecidingFile no The workspace-relative path to one or multiple files which should be used to determine whether the cache is up-to-date or not. Only up-to-date caches will be restored and only outdated caches will be created.
compressionMethod yes TARGZ The compression method (ZIP, TARGZ, TARGZ_BEST_SPEED, TAR_ZSTD, TAR) to use. Some are without compression. Note that method NONE is not supported anymore and is now treated as TARGZ.

Fine-tuning cache validity

The cacheValidityDecidingFile option can be used to fine-tune the cache validity. At its simplest, you specify a file and the cache will be considered outdated if the file changes. You can also specify a folder, in which case all the files in the folder (recursively found) will be used to determine the cache validity. This can be too coarse if you have generated files lumped in with source files. To fine-tune this, you can specify an arbitrary list of patterns to include and exclude paths from the cache validity check. The patterns are relative to the workspace root. These patterns are paths or glob patterns, separated by commas. Exclude patterns start with the ! character. The order of the patterns does not matter. You can mix include and exclude patterns freely.

For example, to cache everything in a folder src except files named *.generated:

arbitraryFileCache(
    path: 'my-cache',
    cacheValidityDecidingFile: 'src,!src/**/*.generated',
    includes: '**/*',
    excludes: '**/*.generated'
)

Choosing the compression method

Different situations might require different packaging and compression methods, controlled by the compressionMethod option.

TARGZ use gzip with a compression level which is a "sweet spot" between compression speed and size (Deflate compression level 6). If you cache lots of text files, for instance source code or node_modules-directories in Javascript-builds, this is a good choice.

TARGZ_BEST_SPEED use gzip with the lowest compression level, for best throughput. If high speed at cache creation is important, and you cache directories with a mix of both text and binary files, this option might be a good choice.

TAR use no compression. If you cache directories with lots of binary files, this option might be best.

TAR_ZSTD use a JNI-binding to machine architecture dependent Zstandard binaries, with pre-built binaries for many architectures are available. It offers better compression speed and ratio than gzip.

ZIP packages the cache in a zip archive.

Usage in Jobs

Freestyle Jobs

The plugin provides a "Job Cacher" build environment. The cache(s) will be restored at the start of the build and updated at the end of the build.

Pipeline Jobs

The plugin provides a cache build step that can be used within the pipeline definition. The cache(s) will be restored before calling the closure and updated after executing it.

cache(maxCacheSize: 250, defaultBranch: 'develop', caches: [
        arbitraryFileCache(path: 'node_modules', cacheValidityDecidingFile: 'package-lock.json')
]) {
    // ...
}

Note about using within Docker containers

If you use the plugin within a Docker container through the Docker Pipeline plugin, the path to cache must be located within the workspace. Everything outside is not visible to the plugin and therefore not cacheable.

Contributing

See contribution guidelines

Changelog

See releases

jobcacher-plugin's People

Contributors

andrewradamis-paay avatar darxriggs avatar davidvanlaatum avatar dependabot[bot] avatar jetersen avatar jonesbusy avatar knut-olav-hoven-ske avatar msarahan avatar offa avatar petehayes avatar renovate-bot avatar renovate[bot] avatar repolevedavaj avatar stephanh avatar strangelookingnerd avatar viceice avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jobcacher-plugin's Issues

File names containing spaces may cause caching failure

Jenkins and plugins versions report

Environment
Paste the output here

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

CentOS 7 and CentOS 8 containers, encoding is UTF-8.

                                   sh "npm i"
                                   sh 'npm run build:h5'

Reproduction steps

image

Expected Results

Caused by: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /data/jenkins-slave03/workspace/ehospital.dev.frontend.ehospital-front-mobile/node_modules/uview-plus/components/u-slider/nvue - .js

Actual Results

This document with spaces and Chinese characters in the file name may lead to compilation failure.

Anything else?

No response

Are you interested in contributing a fix?

No response

Configurable cache directory for LocalItemStorage

What feature do you want to see added?

It would be useful if it was possible to configure the directory used for local item storage cache, to have the possiblity of placing it outside the job folder.

The reason for this is to better separate and control disk usage, and the possibility to have the data on two different mounted volumes.

Recent update to 252.v3b_9c37dfa_a_33 caused Amazon S3 storage to stop working

Jenkins and plugins versions report

Environment
Jenkins: 2.346.1
OS: Linux - 5.4.196-108.356.amzn2.x86_64
---
ace-editor:1.1
all-changes:1.5
ansicolor:1.0.1
ant:475.vf34069fef73c
antisamy-markup-formatter:2.7
apache-httpcomponents-client-4-api:4.5.13-1.0
authentication-tokens:1.4
aws-credentials:191.vcb_f183ce58b_9
aws-java-sdk:1.12.215-343.v953e693f0e86
aws-java-sdk-cloudformation:1.12.215-343.v953e693f0e86
aws-java-sdk-codebuild:1.12.215-343.v953e693f0e86
aws-java-sdk-ec2:1.12.215-343.v953e693f0e86
aws-java-sdk-ecr:1.12.215-343.v953e693f0e86
aws-java-sdk-ecs:1.12.215-343.v953e693f0e86
aws-java-sdk-elasticbeanstalk:1.12.215-343.v953e693f0e86
aws-java-sdk-iam:1.12.215-343.v953e693f0e86
aws-java-sdk-logs:1.12.215-343.v953e693f0e86
aws-java-sdk-minimal:1.12.215-343.v953e693f0e86
aws-java-sdk-sqs:1.12.215-343.v953e693f0e86
aws-java-sdk-ssm:1.12.215-343.v953e693f0e86
bootstrap4-api:4.6.0-5
bootstrap5-api:5.1.3-7
bouncycastle-api:2.26
branch-api:2.1046.v0ca_37783ecc5
build-failure-analyzer:2.2.1
build-timeout:1.21
build-user-vars-plugin:1.8
build-with-parameters:1.6
caffeine-api:2.9.3-65.v6a_47d0f4d1fe
categorized-view:1.12
checks-api:1.7.4
cloudbees-folder:6.729.v2b_9d1a_74d673
cobertura:1.17
code-coverage-api:2.0.4
collapsing-console-sections:1.8.0
command-launcher:84.v4a_97f2027398
conditional-buildstep:1.4.2
copyartifact:1.46.4
credentials:1129.vef26f5df883c
credentials-binding:523.vd859a_4b_122e6
dashboard-view:2.432.va_712ce35862d
data-tables-api:1.12.1-1
display-upstream-changes:0.3.2
display-url-api:2.3.6
docker-build-publish:1.3.3
docker-commons:1.19
docker-workflow:1.28
downstream-buildview:1.9
durable-task:496.va67c6f9eefa7
echarts-api:5.3.3-1
embeddable-build-status:2.0.4
extended-read-permission:3.2
extensible-choice-parameter:1.8.0
external-monitor-job:191.v363d0d1efdf8
extra-columns:1.25
font-awesome-api:6.1.1-1
forensics-api:1.15.1
git:4.11.3
git-client:3.11.0
git-parameter:0.9.17
git-server:1.11
google-login:1.6
greenballs:1.15.1
handlebars:3.0.8
jackson2-api:2.13.3-285.vc03c0256d517
javadoc:217.v905b_86277a_2a_
javax-activation-api:1.2.0-3
javax-mail-api:1.6.2-6
jaxb:2.3.6-1
jdk-tool:1.5
jira:3.7.1
jnr-posix-api:3.1.7-3
job-import-plugin:3.5
jobConfigHistory:1148.v8607da_ef251e
jobcacher:252.v3b_9c37dfa_a_33
jquery:1.12.4-1
jquery-detached:1.2.1
jquery3-api:3.6.0-4
jsch:0.1.55.2
junit:1119.1121.vc43d0fc45561
junit-attachments:101.v82f494a_00e9e
ldap:2.10
leastload:3.0.0
locale:144.v1a_998824ddb_3
lockable-resources:2.15
mailer:414.vcc4c33714601
matrix-auth:2.6.8
matrix-project:771.v574584b_39e60
maven-plugin:3.19
metrics:4.1.6.2
metrics-graphite:3.0.0
mina-sshd-api-common:2.8.0-21.v493b_6b_db_22c6
mina-sshd-api-core:2.8.0-21.v493b_6b_db_22c6
momentjs:1.1.1
monitoring:1.91.0
next-executions:1.0.15
nodelabelparameter:1.11.0
notification:1.15
pam-auth:1.8
parameterized-trigger:2.44
pipeline-build-step:2.18
pipeline-github-lib:38.v445716ea_edda_
pipeline-graph-analysis:195.v5812d95a_a_2f9
pipeline-groovy-lib:593.va_a_fc25d520e9
pipeline-input-step:449.v77f0e8b_845c4
pipeline-milestone-step:101.vd572fef9d926
pipeline-model-api:2.2097.v33db_b_de764b_e
pipeline-model-definition:2.2097.v33db_b_de764b_e
pipeline-model-extensions:2.2097.v33db_b_de764b_e
pipeline-rest-api:2.24
pipeline-stage-step:293.v200037eefcd5
pipeline-stage-tags-metadata:2.2097.v33db_b_de764b_e
pipeline-stage-view:2.24
plain-credentials:1.8
plugin-util-api:2.17.0
popper-api:1.16.1-3
popper2-api:2.11.5-2
rebuild:1.34
resource-disposer:0.19
role-strategy:488.v0634ce149b_8c
run-condition:1.5
s3:0.12.1
saml:2.298.vc7a_2b_3958628
scm-api:608.vfa_f971c5a_a_e9
script-security:1175.v4b_d517d6db_f0
sectioned-view:1.25
snakeyaml-api:1.30.1
ssh-credentials:277.v95c2fec1c047
sshd:3.242.va_db_9da_b_26a_c3
strict-crumb-issuer:2.1.0
structs:318.va_f3ccb_729b_71
swarm:3.33
systemloadaverage-monitor:1.2
template-project:1.5.2
thinBackup:1.10
throttle-concurrents:2.8
timestamper:1.18
token-macro:293.v283932a_0a_b_49
trilead-api:1.57.v6e90e07157e1
variant:1.4
view-job-filters:2.3
windows-slaves:1.8.1
workflow-aggregator:581.v0c46fa_697ffd
workflow-api:1164.v760c223ddb_32
workflow-basic-steps:948.v2c72a_091b_b_68
workflow-cps:2725.v7b_c717eb_12ce
workflow-durable-task-step:1146.v1a_d2e603f929
workflow-job:1186.v8def1a_5f3944
workflow-multibranch:716.vc692a_e52371b_
workflow-scm-step:400.v6b_89a_1317c9a_
workflow-step-api:625.vd896b_f445a_f8
workflow-support:820.vd1a_6cc65ef33
ws-cleanup:0.42
ws-ws-replacement:1.0.1

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

We are running the controller using unmodified jenkins/jenkins:lts docker image and the agents are real iron running Ubuntu 20.04 LTS

Reproduction steps

  1. With the jobcacher-plugin installed
  2. And configured globally to use a valid, existing AWS bucket:
    • Storage implementation: Amazon S3 storage
    • Credentials: xxxx
    • S3 Bucker Name: xxxx
    • Region: eu-west-1
  3. In a pipeline we use this to cache between runs a few small json files containing some timing information:
stage("Run Task") {
    steps {
        wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'xterm']) {
            cache(
                maxCacheSize: 250,
                caches: [
                   [$class: 'ArbitraryFileCache', excludes: '', includes: '*.json', path: "timing"]
                ]
            ) {
                .... task definition continues here

Expected Results

The jobs should be executed properly and end with success (given the tests pass, heh)

Actual Results

The execution doesn't happen, the task finishes immediately after the cache use, with some traces that gave me the clue to come to this plugin. (example failed job)

Anything else?

  • All the jobs were working perfectly until a few hours ago, when we performed the upgrade (from plugin 1.0, I think).
  • it has been checked that the bucket is up and contains files from executions 2-3 hours ago. For example:
2022-06-24 14:36        62684  s3://xxxx/xxxx/cache/4ad8aa3a3571ea912a6ec5ea5fdcc93c/default.json
  • Changing the storage implementation to Built-in Jenkins storage makes the jobs to be back to run.

Allow setting worker threads on zstd to automatic

What feature do you want to see added?

I like to set the zstd worker threads to 0 (automatic, uses number oth cores)

https://github.com/luben/zstd-jni/blob/bb156dcb84c79b76b3178046f4df64213dd881e8/src/main/java/com/github/luben/zstd/ZstdOutputStream.java#L136

Sadly it's not possible via commons.compress

https://github.com/apache/commons-compress/blob/d2841ff43cbc401378231820e71018c1cbb0c240/src/main/java/org/apache/commons/compress/compressors/zstandard/ZstdCompressorOutputStream.java#L34

it's probably a good idea to set it to 0 by default to support faster compression on multithreaded systems

Upstream changes

No response

ClassNotFoundException: Zstd compression doesn't work

Jenkins and plugins versions report

Environment
Jenkins: 2.361.3
OS: Linux - 5.15.0-1021-azure
---
Office-365-Connector:4.17.0
ace-editor:1.1
additional-identities-plugin:1.1
analysis-model-api:10.19.0
ansicolor:1.0.2
antisamy-markup-formatter:155.v795fb_8702324
apache-httpcomponents-client-4-api:4.5.13-138.v4e7d9a_7b_a_e61
authentication-tokens:1.4
authorize-project:1.4.0
aws-credentials:191.vcb_f183ce58b_9
aws-java-sdk:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-cloudformation:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-codebuild:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-ec2:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-ecr:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-ecs:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-efs:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-elasticbeanstalk:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-iam:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-logs:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-minimal:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-sns:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-sqs:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-ssm:1.12.287-357.vf82d85a_6eefd
basic-branch-build-strategies:71.vc1421f89888e
blueocean-autofavorite:1.2.5
blueocean-commons:1.25.8
blueocean-config:1.25.8
blueocean-core-js:1.25.8
blueocean-dashboard:1.25.8
blueocean-display-url:2.4.1
blueocean-events:1.25.8
blueocean-git-pipeline:1.25.8
blueocean-github-pipeline:1.25.8
blueocean-i18n:1.25.8
blueocean-jwt:1.25.8
blueocean-personalization:1.25.8
blueocean-pipeline-api-impl:1.25.8
blueocean-pipeline-editor:1.25.8
blueocean-pipeline-scm-api:1.25.8
blueocean-rest:1.25.8
blueocean-rest-impl:1.25.8
blueocean-web:1.25.8
bootstrap4-api:4.6.0-5
bootstrap5-api:5.2.1-3
bouncycastle-api:2.26
branch-api:2.1051.v9985666b_f6cc
build-token-root:151.va_e52fe3215fc
caffeine-api:2.9.3-65.v6a_47d0f4d1fe
checks-api:1.8.0
cloudbees-folder:6.758.vfd75d09eea_a_1
code-coverage-api:3.2.0
command-launcher:90.v669d7ccb_7c31
commons-lang3-api:3.12.0-36.vd97de6465d5b_
commons-text-api:1.10.0-27.vb_fa_3896786a_7
config-file-provider:3.11.1
credentials:1189.vf61b_a_5e2f62e
credentials-binding:523.vd859a_4b_122e6
data-tables-api:1.12.1-4
display-url-api:2.3.6
docker-commons:1.21
docker-java-api:3.2.13-37.vf3411c9828b9
docker-plugin:1.2.10
docker-workflow:528.v7c193a_0b_e67c
durable-task:501.ve5d4fc08b0be
echarts-api:5.4.0-1
email-ext:2.92
embeddable-build-status:281.vb_047b_375cdb_9
external-monitor-job:203.v683c09d993b_9
favorite:2.4.1
font-awesome-api:6.2.0-3
forensics-api:1.16.0
git:4.13.0
git-client:3.13.0
git-forensics:1.11.0
git-parameter:0.9.18
gitea:1.4.4
gitea-checks:449.v0672c320ee47
github:1.36.0
github-api:1.303-400.v35c2d8258028
github-branch-source:1696.v3a_7603564d04
google-oauth-plugin:1.0.7
gravatar:2.2
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953
htmlpublisher:1.31
instance-identity:116.vf8f487400980
ionicons-api:31.v4757b_6987003
jackson2-api:2.13.4.20221013-295.v8e29ea_354141
jakarta-activation-api:2.0.1-2
jakarta-mail-api:2.0.1-2
javax-activation-api:1.2.0-5
javax-mail-api:1.6.2-8
jaxb:2.3.7-1
jdk-tool:63.v62d2fd4b_4793
jenkins-design-language:1.25.8
jjwt-api:0.11.5-77.v646c772fddb_0
jobcacher:301.v06a_c88b_0fa_f8
jquery:1.12.4-1
jquery3-api:3.6.1-2
jsch:0.1.55.61.va_e9ee26616e7
junit:1156.vcf492e95a_a_b_0
kubernetes:3734.v562b_b_a_627ea_c
kubernetes-client-api:5.12.2-193.v26a_6078f65a_9
kubernetes-credentials:0.9.0
ldap:2.12
lockable-resources:2.18
mailer:438.v02c7f0a_12fa_4
matrix-auth:3.1.5
matrix-project:785.v06b_7f47b_c631
metrics:4.2.10-389.v93143621b_050
mina-sshd-api-common:2.9.1-44.v476733c11f82
mina-sshd-api-core:2.9.1-44.v476733c11f82
momentjs:1.1.1
mstest:1.0.0
nunit:0.28
oauth-credentials:0.5
okhttp-api:4.9.3-108.v0feda04578cf
pam-auth:1.10
pipeline-build-step:2.18
pipeline-graph-analysis:195.v5812d95a_a_2f9
pipeline-groovy-lib:613.v9c41a_160233f
pipeline-input-step:456.vd8a_957db_5b_e9
pipeline-milestone-step:101.vd572fef9d926
pipeline-model-api:2.2118.v31fd5b_9944b_5
pipeline-model-definition:2.2118.v31fd5b_9944b_5
pipeline-model-extensions:2.2118.v31fd5b_9944b_5
pipeline-multibranch-defaults:2.1
pipeline-rest-api:2.27
pipeline-stage-step:296.v5f6908f017a_5
pipeline-stage-tags-metadata:2.2118.v31fd5b_9944b_5
pipeline-stage-view:2.27
pipeline-utility-steps:2.13.1
plain-credentials:139.ved2b_9cf7587b
plugin-util-api:2.18.0
popper-api:1.16.1-3
popper2-api:2.11.6-2
prism-api:1.29.0-1
pubsub-light:1.17
saml:4.372.v89f13e4c9e97
scm-api:621.vda_a_b_055e58f7
scoring-load-balancer:1.0.1
script-security:1189.vb_a_b_7c8fd5fde
sidebar-link:2.2.0
simple-theme-plugin:136.v23a_15f86c53d
snakeyaml-api:1.33-90.v80dcb_3814d35
sse-gateway:1.26
ssh-agent:295.v9ca_a_1c7cc3a_a_
ssh-credentials:305.v8f4381501156
ssh-slaves:2.854.v7fd446b_337c9
sshd:3.249.v2dc2ea_416e33
structs:324.va_f5d6774f3a_d
timestamper:1.21
token-macro:308.v4f2b_ed62b_b_16
translation:1.16
trilead-api:2.72.v2a_3236754f73
variant:59.vf075fe829ccb
versioncolumn:2.2
warnings-ng:9.20.1
windows-slaves:1.8.1
workflow-aggregator:590.v6a_d052e5a_a_b_5
workflow-api:1200.v8005c684b_a_c6
workflow-basic-steps:994.vd57e3ca_46d24
workflow-cps:3536.vb_8a_6628079d5
workflow-durable-task-step:1210.va_1e5d77e122b
workflow-job:1254.v3f64639b_11dd
workflow-multibranch:716.vc692a_e52371b_
workflow-scm-step:400.v6b_89a_1317c9a_
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:839.v35e2736cfd5c

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

controller: official docker image (kubernetes)
agent: ubuntu 20.04 vm

Reproduction steps

stage('frontend') {
  agent {
    docker {
      label 'docker && linux'
      image 'ghcr.visualon.de/visualon/builder:3.0.0@sha256:ac12ad734b17ddb0c4bba17d5db95fa253616f0bea710db1e51acec08ded6e83'
    }
  }
  steps {
    cache(maxCacheSize: 250, defaultBranch: 'main', caches: [arbitraryFileCache(path: '.yarn/cache', cacheValidityDecidingFile: 'yarn.lock', compressionMethod: 'TAR_ZSTD')]) {
      sh 'yarn install'
    }
  }
}

Expected Results

caching with zstd works

Actual Results

Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to channel
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
		at hudson.remoting.Request.call(Request.java:199)
		at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:288)
		at com.sun.proxy.$Proxy6.fetch3(Unknown Source)
		at hudson.remoting.RemoteClassLoader.prefetchClassReference(RemoteClassLoader.java:353)
		at hudson.remoting.RemoteClassLoader.loadWithMultiClassLoader(RemoteClassLoader.java:258)
		at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:228)
		at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
		at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
		at org.apache.commons.compress.compressors.zstandard.ZstdCompressorOutputStream.<init>(ZstdCompressorOutputStream.java:86)
		at org.apache.commons.compress.compressors.CompressorStreamFactory.createCompressorOutputStream(CompressorStreamFactory.java:715)
		at jenkins.plugins.jobcacher.arbitrary.TarArbitraryFileCacheStrategy$CreateTarCallable.createOutputStream(TarArbitraryFileCacheStrategy.java:99)
		at jenkins.plugins.jobcacher.arbitrary.TarArbitraryFileCacheStrategy$CreateTarCallable.invoke(TarArbitraryFileCacheStrategy.java:87)
		at jenkins.plugins.jobcacher.arbitrary.TarArbitraryFileCacheStrategy$CreateTarCallable.invoke(TarArbitraryFileCacheStrategy.java:69)
		at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
		at hudson.remoting.UserRequest.perform(UserRequest.java:211)
		at hudson.remoting.UserRequest.perform(UserRequest.java:54)
		at hudson.remoting.Request$2.run(Request.java:376)
		at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at java.base/java.lang.Thread.run(Thread.java:829)
java.lang.ClassNotFoundException: com.github.luben.zstd.ZstdOutputStream
	at java.base/java.net.URLClassLoader.findClass(Unknown Source)
	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:511)
	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
	at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch4(RemoteClassLoader.java:1000)
	at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch3(RemoteClassLoader.java:1045)
	at jdk.internal.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:924)
	at hudson.remoting.Request$2.run(Request.java:376)
	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
	at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18)
	at hudson.remoting.CallableDecoratorList.lambda$applyDecorator$0(CallableDecoratorList.java:19)
	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:48)
	at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:82)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to docker-d07
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
		at hudson.remoting.Channel.call(Channel.java:1000)
		at hudson.FilePath.act(FilePath.java:1186)
		at hudson.FilePath.act(FilePath.java:1175)
		at jenkins.plugins.jobcacher.arbitrary.TarArbitraryFileCacheStrategy.compress(TarArbitraryFileCacheStrategy.java:36)
		at jenkins.plugins.jobcacher.arbitrary.AbstractCompressingArbitraryFileCacheStrategy.cache(AbstractCompressingArbitraryFileCacheStrategy.java:19)
		at jenkins.plugins.jobcacher.ArbitraryFileCache$SaverImpl.save(ArbitraryFileCache.java:306)
		at jenkins.plugins.jobcacher.CacheManager.save(CacheManager.java:99)
		at jenkins.plugins.jobcacher.pipeline.CacheStep$ExecutionCallback.complete(CacheStep.java:160)
		at jenkins.plugins.jobcacher.pipeline.CacheStep$ExecutionCallback.onSuccess(CacheStep.java:141)
		at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:372)
		at com.cloudbees.groovy.cps.Outcome.resumeFrom(Outcome.java:73)
		at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:155)
		at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:152)
		at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
		at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
		at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:152)
		at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
		at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
		at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:187)
		at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:420)
		at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:95)
		at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330)
		at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294)
		at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
		at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
		at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
		at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:30)
		at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:70)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
		at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
		at java.base/java.lang.Thread.run(Unknown Source)

Anything else?

Less verbose output

What feature do you want to see added?

Would it be possible to only output one line? Or make that configurable?

Currently, I see output like this for every cache (and some jobs have many of them):

15:21:55  [Cache for /var/XXX/.npm with id b2ce9XXX851640b664638e] Searching cache in job specific caches...
15:21:55  [Cache for /var/XXX/.npm with id b2ce908XXXc9851640b664638e] Searching cache in default caches...
15:21:55  [Cache for /var/XXX/.npm with id b2ce908XXXc9851640b664638e] Skip restoring cache as no up-to-date cache exists

For me, only the last line is relevant...

Upstream changes

No response

Help needed for caching Android builds

hello
I have a multibranch pipeline job for Android and I use docker slaves.
Is it possible to have an example of a proper configuration so that gradle libraries are cached and not downloaded at every build? I'm trying with this one:

   cache(maxCacheSize: 10000, defaultBranch: 'develop', caches: [[$class: 'ArbitraryFileCache', path: 'node_modules', cacheValidityDecidingFile: 'build.gradle', compressionMethod: 'TARGZ',excludes: '**/*.lock']])

but I always see in the logs:

  [Cache for node_modules] Skip restoring cache as no up-to-date cache exists

Do I have to create a folder called "node_modules" in the root dir of the controller?

thanks

Move configuration page to AWS

What feature do you want to see added?

https://plugins.jenkins.io/aws-global-configuration/ plugin provides as seperate page for all AWS like plugin.

It would be nice to move the AWS configuration to this page to be consistent with other plugin

Credentials could also be consumed from aws-global-configuration

aws_global_settings

Upstream changes

No response

Are you interested in contributing this feature?

Well on my many todos

restore old cache file with different cache name if hash matches

What feature do you want to see added?

I would like to restore old cache files, when the hash matches.
image

I added new dotnet cache and so i also renamed the yxarn cache file. Not it created a new cache with different name but same hash.

I think we can safely restore any cache file with matching hash. :think

Upstream changes

No response

No jenkins.plugins.itemstorage.ItemStorage implementation found for nonAWSS3

Jenkins and plugins versions report

Environment
Plugin version 399.v12d4fa_dd3db_d
Jenkins version 2.401.3

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

Jenkins running in Kubernetes via https://charts.jenkins.io/jenkins, chart version 4.3.23

Reproduction steps

  1. Install plugin
  2. Go to /manage/configure โ†’ Storage implementation โ†’ Jenkins controller is only available option in dropdown list
  3. Add configuration:
                unclassified:
                  ...
                  globalItemStorage:
                    storage:
                      nonAWSS3:
                        bucketName: jenkins-job-cacher
                        credentialsId: job-cacher-hmac-key
                        endpoint: https://storage.googleapis.com
                        parallelDownloads: false
                        pathStyleAccess: false
  1. Check Jenkins logs, notice No jenkins.plugins.itemstorage.ItemStorage implementation found for nonAWSS3

Expected Results

S3 and nonAWSS3 are configurable storage implementations for plugin

Actual Results

  • Jenkins controller is only available option in dropdown list for Storage implementation
  • No jenkins.plugins.itemstorage.ItemStorage implementation found for nonAWSS3

Anything else?

No response

Allow to define cache ID explicitely

Jenkins and plugins versions report

not applicable

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

not applicable

Reproduction steps

  1. Configure the jobcacher plugin with an ArbitraryFileCache pointing to a Jenkins workspace with an absolute path
  2. See that default caches can't be re-used across builds because the cache identity changed

Expected Results

Cache identity should not be reliant on the path to the data that are stored, but just some unique, user-chosen identifier.

Actual Results

Cache identity is reliant on the path.

Anything else?

In ArbitraryFileCache.java the base name of the cache is generated as follows:

    public String createCacheBaseName() {
        String generatedCacheName = deriveCachePath(path);
        if (StringUtils.isEmpty(this.cacheName)) {
            return generatedCacheName;
        }

        return generatedCacheName + CACHE_FILENAME_PART_SEP + this.cacheName;
    }

Now, if one follows the documentation of the plugin stating

path | yes | ย  | The path to cache. It can be absolute or relative to the workspace.

and configures this variable to be $WORKSPACE/some-path, the absolute, node-specific and even more problematic, job-specific path to the workspace is set to path. This results in the problem that a fallback to a "default" cache can never succeed, as the new jobs / branches $WORKSPACE of course resides somewhere else. The plugin then outputs this, even though there does exist a cache in the configured S3 bucket for the default branch:

16:37:33  [Cache for /home/jenkins/workspace/repo_framework_serializer-bugfix/.gradle (gradle-framework) with id ae37528f1c8477b42d970ef4e4f10fa3] Searching cache in job specific caches...
16:37:33  [Cache for /home/jenkins/workspace/repo_framework_serializer-bugfix/.gradle (gradle-framework) with id ae37528f1c8477b42d970ef4e4f10fa3] Searching cache in default caches...
16:37:33  [Cache for /home/jenkins/workspace/repo_framework_serializer-bugfix/.gradle (gradle-framework) with id ae37528f1c8477b42d970ef4e4f10fa3] Skip restoring cache as no up-to-date cache exists

Are you interested in contributing a fix?

No response

Option to always restore cache

What feature do you want to see added?

Hi,

I would like to use jobCacher to cache the sonar scanner downloaded jars.

In order to avoid updating the cache on each execution, I want to use the cacheValidityDecidingFile. But I'm not sure what to use in case of SonarQube

My idea was to use a Glob Ant pattern to check the if the downloaded jar are the same like **/.sonar/cache/**/sonar-*-plugin.jar (cache would be in the workspace)

But the side effect of this is that the cache is never restored because those files doesn't exists (they exists only when the SonarQube scanner runs)

An option would be a flag to always restore the cache and keep the same behavior for updating the cache based on the cacheValidityDecidingFile

Now we have

1st execution

[Cache for /home/jenkins/agent/workspace/*****/.sonar/cache] Skip restoring cache as no up-to-date cache exists
[Cache for /home/jenkins/agent/workspace/*****/.sonar/cache] Creating cache...

2nd execution (cache is not restored probably cacheValidityDecidingFile is not computed across files

[Cache for /home/jenkins/agent/workspace/*****/.sonar/cache] Skip restoring cache as no up-to-date cache exists
[Cache for /home/jenkins/agent/workspace/****/.sonar/cache] Skip cache creation as the cache is up-to-date

Any idea how to fix this ?

Best regards,

Valentin

Upstream changes

No response

Job cacher not working as expected

Jenkins and plugins versions report

Environment
Jenkins version: 2.319.1
Docker

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

Jenkins version: 2.319.1
Docker
SIngle Node
Agent on master

Reproduction steps

Without job cacher plugin

  1. Create Freestyle Job
  2. Add This App https://github.com/BenShelton/nuxt-example.git'
  3. Add build step to test npm install
  4. Run pipeline, it takes 24Sec

image

With job cacher plugin

  1. Create Freestyle Job
  2. Add This App https://github.com/BenShelton/nuxt-example.git'
  3. Add build step to test npm install
  4. Using Job cacher

image

7. Add build step to test `npm install` 8. Run first pipeline, it takes 49Sec (longer than without cacher)

image

9. Run Second pipeline, it takes 33Secs

image

Expected Results

The build time should be faster than without job cacher

Actual Results

The build time is slower than without job cacher

Anything else?

No response

Fix credentials for IAM role assumption

What feature do you want to see added?

Currently the plugin only takes access key id and secret access key from the credentials but drops the session token. This means that all requests to S3 receive a 403, effectively making this intended behaviour of the aws-credentials-plugin unusable.

A fix doesn't look too wild but I'm a little swamped right now. If I find time in the next days I'll try to submit a PR for this.

Upstream changes

No response

S3 Bucket name cannot include a path

Jenkins and plugins versions report

Version: 420.v16ee76f29824

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

Linux

Reproduction steps

Configure Item Storage to use S3. When setting the bucket name use a path to a directory within the bucket, i.e. my-bucket/my-caches.

AWS returns a 403

Expected Results

Plugin should accept a directory within a bucket. This previously worked in 378.v5e7c64638d63.

Actual Results

After upgrading, the plugin no longer functioned as it did prior to upgrade and needed a config change.

Anything else?

No response

Are you interested in contributing a fix?

No response

Option to silently ignore cache failures

What feature do you want to see added?

In case of InterruptedException (or similar), it would be nice if it was possibly to simply ignore updating the cache, and not fail the build.

Upstream changes

No response

Manually clear cache

What feature do you want to see added?

I want to have the ability to manually clear the cache.

Upstream changes

No response

Support absence of file configured in cacheValidityDecidingFile

What feature do you want to see added?

Expected behaviour
When a cacheValidityDecidingFile is configured but the file does not exist (yet), no error is raised and no cache restore is performed.

Current behaviour
When the file does not exist, the error is as follows:

FATAL: path validity-file cannot be resolved within the current workspace
java.lang.IllegalStateException: path validity-file cannot be resolved within the current workspace
	at jenkins.plugins.jobcacher.ArbitraryFileCache.getCurrentCacheValidityDecidingFileHash(ArbitraryFileCache.java:236)
	at jenkins.plugins.jobcacher.ArbitraryFileCache.matchesCurrentCacheValidityDecidingFileHash(ArbitraryFileCache.java:229)
	at jenkins.plugins.jobcacher.ArbitraryFileCache.isCacheOutdated(ArbitraryFileCache.java:209)
	at jenkins.plugins.jobcacher.ArbitraryFileCache.resolveValidCache(ArbitraryFileCache.java:188)
	at jenkins.plugins.jobcacher.ArbitraryFileCache.resolveValidCache(ArbitraryFileCache.java:167)
	at jenkins.plugins.jobcacher.ArbitraryFileCache.cache(ArbitraryFileCache.java:148)
	at jenkins.plugins.jobcacher.CacheManager.cache(CacheManager.java:64)
	at jenkins.plugins.jobcacher.CacheWrapper.setUp(CacheWrapper.java:104)
	at jenkins.tasks.SimpleBuildWrapper.setUp(SimpleBuildWrapper.java:294)
	at hudson.model.Build$BuildExecution.doRun(Build.java:157)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:514)
	at hudson.model.Run.execute(Run.java:1888)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:99)
	at hudson.model.Executor.run(Executor.java:431)

The config.xml of a simple job to reproduce this:

<?xml version='1.1' encoding='UTF-8'?>
<project>
  <actions/>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties/>
  <scm class="hudson.scm.NullSCM"/>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <builders>
    <hudson.tasks.Shell>
      <command>
echo test &gt; validity-file
echo foo &gt; data-file
      </command>
      <configuredLocalRules/>
    </hudson.tasks.Shell>
  </builders>
  <publishers/>
  <buildWrappers>
    <jenkins.plugins.jobcacher.CacheWrapper plugin="jobcacher@999999-SNAPSHOT">
      <maxCacheSize>32</maxCacheSize>
      <caches>
        <jenkins.plugins.jobcacher.ArbitraryFileCache>
          <path>.</path>
          <includes>**/*</includes>
          <excludes></excludes>
          <useDefaultExcludes>true</useDefaultExcludes>
          <cacheValidityDecidingFile>validity-file</cacheValidityDecidingFile>
          <compressionMethod>ZIP</compressionMethod>
        </jenkins.plugins.jobcacher.ArbitraryFileCache>
      </caches>
      <defaultBranch></defaultBranch>
    </jenkins.plugins.jobcacher.CacheWrapper>
  </buildWrappers>
</project>

The change could be to check for the existence of the file in ArbitraryFileCache::matchesCurrentCacheValidityDecidingFileHash before accessing it and to return false if it is absent.

Upstream changes

No response

Creating the cache fails if there is any disconnection between agents and controller

Jenkins and plugins versions report

Environment
Jenkins: 2.401.1
OS: Linux - 5.4.241-150.347.amzn2.x86_64
Java: 11.0.19 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
---
all-changes:1.5
ansicolor:1.0.2
ant:487.vd79d090d4ea_e
antisamy-markup-formatter:159.v25b_c67cd35fb_
apache-httpcomponents-client-4-api:4.5.14-150.v7a_b_9d17134a_5
authentication-tokens:1.53.v1c90fd9191a_b_
aws-credentials:191.vcb_f183ce58b_9
aws-java-sdk:1.12.481-392.v8b_291cfcda_09
aws-java-sdk-cloudformation:1.12.481-392.v8b_291cfcda_09
aws-java-sdk-codebuild:1.12.481-392.v8b_291cfcda_09
aws-java-sdk-ec2:1.12.481-392.v8b_291cfcda_09
aws-java-sdk-ecr:1.12.481-392.v8b_291cfcda_09
aws-java-sdk-ecs:1.12.481-392.v8b_291cfcda_09
aws-java-sdk-efs:1.12.481-392.v8b_291cfcda_09
aws-java-sdk-elasticbeanstalk:1.12.481-392.v8b_291cfcda_09
aws-java-sdk-iam:1.12.481-392.v8b_291cfcda_09
aws-java-sdk-kinesis:1.12.481-392.v8b_291cfcda_09
aws-java-sdk-logs:1.12.481-392.v8b_291cfcda_09
aws-java-sdk-minimal:1.12.481-392.v8b_291cfcda_09
aws-java-sdk-sns:1.12.481-392.v8b_291cfcda_09
aws-java-sdk-sqs:1.12.481-392.v8b_291cfcda_09
aws-java-sdk-ssm:1.12.481-392.v8b_291cfcda_09
bootstrap5-api:5.3.0-1
bouncycastle-api:2.28
branch-api:2.1109.vdf225489a_16d
build-failure-analyzer:2.4.1
build-timeout:1.31
build-user-vars-plugin:1.9
build-with-parameters:76.v9382db_f78962
caffeine-api:3.1.6-115.vb_8b_b_328e59d8
categorized-view:1.12
checks-api:2.0.0
cloudbees-folder:6.815.v0dd5a_cb_40e0e
cobertura:1.17
code-coverage-api:4.7.0
collapsing-console-sections:1.8.0
command-launcher:100.v2f6722292ee8
commons-lang3-api:3.12.0-36.vd97de6465d5b_
commons-text-api:1.10.0-36.vc008c8fcda_7b_
conditional-buildstep:1.4.2
copyartifact:705.v5295cffec284
credentials:1254.vb_96f366e7b_a_d
credentials-binding:604.vb_64480b_c56ca_
dashboard-view:2.487.vcf0ff9008a_c0
data-tables-api:1.13.4-2
display-upstream-changes:0.3.2
display-url-api:2.3.7
docker-build-publish:1.4.0
docker-commons:419.v8e3cd84ef49c
docker-workflow:563.vd5d2e5c4007f
durable-task:507.v050055d0cb_dd
echarts-api:5.4.0-5
embeddable-build-status:385.vc95f94e91fb_3
extended-read-permission:53.v6499940139e5
extensible-choice-parameter:1.8.0
external-monitor-job:203.v683c09d993b_9
extra-columns:1.25
font-awesome-api:6.4.0-1
forensics-api:2.3.0
git:5.1.0
git-client:4.4.0
git-parameter:0.9.18
git-server:99.va_0826a_b_cdfa_d
google-login:1.7
instance-identity:173.va_37c494ec4e5
ionicons-api:56.v1b_1c8c49374e
jackson2-api:2.15.2-350.v0c2f3f8fc595
jakarta-activation-api:2.0.1-3
jakarta-mail-api:2.0.1-3
javadoc:233.vdc1a_ec702cff
javax-activation-api:1.2.0-6
javax-mail-api:1.6.2-9
jaxb:2.3.8-1
jdk-tool:66.vd8fa_64ee91b_d
jersey2-api:2.39.1-2
jira:3.10
jnr-posix-api:3.1.17-1
job-import-plugin:3.6
jobConfigHistory:1212.vd4470d08ff12
jobcacher:387.v41e893017398
jquery:1.12.4-1
jquery3-api:3.7.0-1
jsch:0.2.8-65.v052c39de79b_2
junit:1207.va_09d5100410f
junit-attachments:167.vf1d139e316b_3
leastload:3.0.0
locale:314.v22ce953dfe9e
lockable-resources:1166.v7ef984f72fe2
mailer:457.v3f72cb_e015e5
matrix-auth:3.1.8
matrix-project:789.v57a_725b_63c79
maven-plugin:3.22
metrics:4.2.18-439.v86a_20b_a_8318b_
mina-sshd-api-common:2.10.0-69.v28e3e36d18eb_
mina-sshd-api-core:2.10.0-69.v28e3e36d18eb_
monitoring:1.94.1
next-executions:179.vb_e011d7e3b_64
nodelabelparameter:1.12.0
notification:1.15
pam-auth:1.10
parameterized-trigger:2.45
pipeline-build-step:496.v2449a_9a_221f2
pipeline-github-lib:42.v0739460cda_c4
pipeline-graph-analysis:202.va_d268e64deb_3
pipeline-groovy-lib:656.va_a_ceeb_6ffb_f7
pipeline-input-step:468.va_5db_051498a_4
pipeline-milestone-step:111.v449306f708b_7
pipeline-model-api:2.2141.v5402e818a_779
pipeline-model-definition:2.2141.v5402e818a_779
pipeline-model-extensions:2.2141.v5402e818a_779
pipeline-rest-api:2.32
pipeline-stage-step:305.ve96d0205c1c6
pipeline-stage-tags-metadata:2.2141.v5402e818a_779
pipeline-stage-view:2.32
plain-credentials:143.v1b_df8b_d3b_e48
plugin-util-api:3.3.0
prism-api:1.29.0-7
rebuild:320.v5a_0933a_e7d61
resource-disposer:0.22
role-strategy:633.v836e5b_3e80a_5
run-condition:1.5
s3:0.12.3445.vda_704535b_5a_d
scm-api:672.v64378a_b_20c60
script-security:1251.vfe552ed55f8d
sectioned-view:1.25
snakeyaml-api:1.33-95.va_b_a_e3e47b_fa_4
ssh-credentials:305.v8f4381501156
sshd:3.303.vefc7119b_ec23
strict-crumb-issuer:2.1.1
structs:324.va_f5d6774f3a_d
swarm:3.40
template-project:1.5.2
thinBackup:1.17
throttle-concurrents:2.13
timestamper:1.25
token-macro:359.vb_cde11682e0c
trilead-api:2.84.v72119de229b_7
validating-string-parameter:2.8
variant:59.vf075fe829ccb
view-job-filters:364.v48a_33389553d
workflow-aggregator:596.v8c21c963d92d
workflow-api:1215.v2b_ee3e1b_dd39
workflow-basic-steps:1017.vb_45b_302f0cea_
workflow-cps:3691.v28b_14c465a_b_b_
workflow-durable-task-step:1247.v7f9dfea_b_4fd0
workflow-job:1308.v58d48a_763b_31
workflow-multibranch:756.v891d88f2cd46
workflow-scm-step:415.v434365564324
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:839.v35e2736cfd5c
ws-cleanup:0.45
ws-ws-replacement:1.0.1

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

Controller: kubernetes pod running upstream Jenkins image with Debian 11.
Agents: iron servers running Ubuntu 22.04.

Reproduction steps

  1. Configure some job, in our case they are some long behat/phpunit runs and, in the pipeline, add the caching. In our case, we use this to cache a simple (100Kb) json file between runs:
            stage("Run Task") {
                steps {
                    wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'xterm']) {
                        cache(
                            maxCacheSize: 250,
                            caches: [
                                [$class: 'ArbitraryFileCache', excludes: '', includes: '*.json', path: "timing"]
                            ]
                        ) {
                          // It is not possible to use the registry with DSL yet.
                          script {
                            docker.withRegistry('', 'dockerhub') {
                              sh task.getPathToRunner(env, steps)
                            }
                          }
                        }
                    }
                }
            }
  1. Normally, the plugin does its work, both restoring from the cache the json file at the beginning and storing it back at the end. See, for example, this run:
[Cache for timing with id 4ad8aa3a3571ea912a6ec5ea5fdcc93c] Searching cache in job specific caches...
[Cache for timing with id 4ad8aa3a3571ea912a6ec5ea5fdcc93c] Found cache in job specific caches
[Cache for timing with id 4ad8aa3a3571ea912a6ec5ea5fdcc93c] Restoring cache...
[Cache for timing with id 4ad8aa3a3571ea912a6ec5ea5fdcc93c] Cache restored in 1880ms
...
...
== Exit summary:
== Exit code: 0
...
...
[Cache for timing with id 4ad8aa3a3571ea912a6ec5ea5fdcc93c] Creating cache...
[Cache for timing with id 4ad8aa3a3571ea912a6ec5ea5fdcc93c] Cache created in 966ms
...
...
Finished: SUCCESS
  1. But, as far as they are very long builds (4 hours or more), sometimes, there is some disconnection between the controller and the agents in the middle. And that's not a problem for the tests, because near always... they continue running and the agent reconnects with the controller automatically.
  2. In those cases, when a disconnection has happened, no matter that the tests have ended ok... there is something in the build post-actions that causes the build to fail. See, for example, this run of the same job above:
 [Cache for timing with id 4ad8aa3a3571ea912a6ec5ea5fdcc93c] Searching cache in job specific caches...
[Cache for timing with id 4ad8aa3a3571ea912a6ec5ea5fdcc93c] Found cache in job specific caches
[Cache for timing with id 4ad8aa3a3571ea912a6ec5ea5fdcc93c] Restoring cache...
[Cache for timing with id 4ad8aa3a3571ea912a6ec5ea5fdcc93c] Cache restored in 208ms
...
...
...................................................................... 9030
.........Cannot contact xxx.xxx.xxx.xxx.xxx: hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@2a344988:JNLP4-connect connection from xxx.xxx.xxx.xxx.xxx": Remote call on JNLP4-connect connection from xxx.xxx.xxx.xxx.xxx failed. The channel is closing down or has closed down
............................................................. 9100
...................................................................... 9170
...................................................................... 9240
...
...
== Exit summary:
== Exit code: 0
...
...
[Pipeline] End of Pipeline
java.nio.channels.ClosedChannelException
	at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:155)
	at org.jenkinsci.remoting.protocol.impl.NIONetworkLayer.ready(NIONetworkLayer.java:143)
	at org.jenkinsci.remoting.protocol.IOHub$OnReady.run(IOHub.java:789)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
	at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)
Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 5447d9be-a08c-48f7-97fa-a2a8797719c0
Caused: hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@2a344988:JNLP4-connect connection from xxx.xxx.xxx.xxx.xxx": Remote call on JNLP4-connect connection from xxx.xxx.xxx.xxx.xxx failed. The channel is closing down or has closed down
	at hudson.remoting.Channel.call(Channel.java:993)
	at hudson.FilePath.act(FilePath.java:1192)
	at hudson.FilePath.act(FilePath.java:1181)
	at jenkins.plugins.jobcacher.ArbitraryFileCache$SaverImpl.calculateSize(ArbitraryFileCache.java:354)
	at jenkins.plugins.jobcacher.CacheManager.exceedsMaxCacheSize(CacheManager.java:116)
	at jenkins.plugins.jobcacher.CacheManager.save(CacheManager.java:77)
	at jenkins.plugins.jobcacher.pipeline.CacheStepExecution$ExecutionCallback.complete(CacheStepExecution.java:93)
	at jenkins.plugins.jobcacher.pipeline.CacheStepExecution$ExecutionCallback.onSuccess(CacheStepExecution.java:74)
	at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:371)
	at com.cloudbees.groovy.cps.Outcome.resumeFrom(Outcome.java:70)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:149)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:146)
	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:146)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:187)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:420)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
	at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Finished: FAILURE
  1. As you can see, the tests end ok, but later, near the end, there is that error which stack-trace points (I think, I may be wrong!) to the JobCacher plugin

Expected Results

The job should end ok and the caches be set normally, no matter the brief disconnection in the middle of the (long) tests run.

Actual Results

Each time (we have been monitoring it since some good time ago and correlation is 1:1) that there is a brief disconnection, the job fails with the information above, no matter the tests themselves have ended ok.

Anything else?

We are still trying some runs not using the plugin, or keeping that json file saved is some other way to be 100% sure if the problem happens only with the plugin (aka, we aren't 100% sure yet). But decided to report it already, because the stack trace really seems to point it it.

We have tried both with S3 and in-controller storage (to discard factors) and the same behaviour happens no matter of the storage configured.

Explicit GCS support in addition to 'S3 Compatible'.

What feature do you want to see added?

I'd love it if (perhaps layering on google-storage-plugin) this plugin could be used to store a cache on GCS.

I'm trying to use jobcacher with Googles interoperability feature (https://cloud.google.com/storage/docs/interoperability), which requires an HMAC keypair https://cloud.google.com/storage/docs/authentication/managing-hmackeys#create and then a custom endpoint for the client, which I've configured up... but am getting a 400 bad request on attempts to read from the cache. It seems likely that this is a missing verb or some such, and using something GCS aware would be easier.

Upstream changes

No response

Add option to disable cache creation

What feature do you want to see added?

It would be great if an additional flag could be supported to allow disabling cache creation in certain scenarios.

In particular: I'd like to be able to only create new cache entries from the default branch, and not create cache entries from e.g. PR builds.

It seems like an additional flag could be a simple solution to this -- something like disableCacheCreation:

cache(
  defaultBranch: 'main',
  caches: [
    arbitraryFileCache(path: 'node_modules', cacheValidityDecidingFile: 'yarn.lock')
  ],
  disableCacheCreation: env.BRANCH_NAME != 'main' // <-- NEW
) {
  // ... 
}

The maxCacheSize option is probably the closest thing to an existing solution for this problem. But, I don't always know the size of the data I want to cache -- I really just want it to be cached once.

I'd be happy to implement this change if a maintainer could point me in the right direction for code changes.

Upstream changes

No response

Cannot create cache as the path does not exist

Jenkins and plugins versions report

Environment
Jenkins: 2.346.4.1
OS: Linux - 3.10.0-1160.76.1.el7.x86_64
---
Office-365-Connector:4.17.0
ace-editor:1.1
active-directory:2.25.1
allure-jenkins-plugin:2.30.3
analysis-model-api:10.13.0
android-emulator:3.1.3
android-signing:2.2.5
ansicolor:1.0.2
ant:475.vf34069fef73c
antisamy-markup-formatter:2.7
apache-httpcomponents-client-4-api:4.5.13-1.0
appcenter:0.11.1
async-http-client:1.7.24.3
authentication-tokens:1.4
aws-credentials:191.vcb_f183ce58b_9
aws-java-sdk:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-cloudformation:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-codebuild:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-ec2:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-ecr:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-ecs:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-elasticbeanstalk:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-iam:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-logs:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-minimal:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-sns:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-sqs:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-ssm:1.12.246-349.v96b_b_f7eb_a_c3c
badge:1.9.1
basic-branch-build-strategies:1.3.2
blueocean:1.25.5
blueocean-autofavorite:1.2.5
blueocean-bitbucket-pipeline:1.25.5
blueocean-commons:1.25.5
blueocean-config:1.25.5
blueocean-core-js:1.25.5
blueocean-dashboard:1.25.5
blueocean-display-url:2.4.1
blueocean-events:1.25.5
blueocean-git-pipeline:1.25.5
blueocean-github-pipeline:1.25.5
blueocean-i18n:1.25.5
blueocean-jira:1.25.5
blueocean-jwt:1.25.5
blueocean-personalization:1.25.5
blueocean-pipeline-api-impl:1.25.5
blueocean-pipeline-editor:1.25.5
blueocean-pipeline-scm-api:1.25.5
blueocean-rest:1.25.5
blueocean-rest-impl:1.25.5
blueocean-web:1.25.5
bootstrap4-api:4.6.0-5
bootstrap5-api:5.1.3-7
bouncycastle-api:2.26
branch-api:2.1046.v0ca_37783ecc5
build-monitor-plugin:1.13+build.202205140447
build-time-blame:64.vd8f4018a2bbe
build-timeout:1.21
build-view-column:0.3
buildtriggerbadge:251.vdf6ef853f3f5
caffeine-api:2.9.3-65.v6a_47d0f4d1fe
checks-api:1.7.4
cloudbees-aborted-builds:1.19
cloudbees-administrative-monitors:1.0.4
cloudbees-analytics:1.42
cloudbees-assurance:2.276.0.23
cloudbees-aws-cli:1.5.20
cloudbees-bitbucket-branch-source:773.v4b_9b_005b_562b_
cloudbees-blueocean-default-theme:0.8
cloudbees-console-log-masker:1.0.5
cloudbees-consolidated-build-view:1.6.1
cloudbees-even-scheduler:3.13
cloudbees-folder:6.729.v2b_9d1a_74d673
cloudbees-folders-plus:3.28
cloudbees-groovy-view:1.14
cloudbees-ha:4.39
cloudbees-jenkins-advisor:3.3.2
cloudbees-jsync-archiver:5.23
cloudbees-label-throttling-plugin:3.9
cloudbees-license:9.68
cloudbees-monitoring:2.14
cloudbees-nodes-plus:1.23
cloudbees-pipeline-policies:1.7
cloudbees-platform-common:1.17
cloudbees-plugin-usage:2.15
cloudbees-quiet-start:1.7
cloudbees-request-filter:1.7
cloudbees-ssh-slaves:2.18
cloudbees-support:3.29
cloudbees-template:4.56
cloudbees-uc-data-api:4.50
cloudbees-unified-ui:1.21
cloudbees-view-creation-filter:1.9
cloudbees-workflow-template:3.18
cloudbees-workflow-ui:2.8
cobertura:1.17
cocoapods-integration:0.2.0
code-coverage-api:3.0.5
command-launcher:84.v4a_97f2027398
commons-lang3-api:3.12.0-36.vd97de6465d5b_
commons-text-api:1.10.0-27.vb_fa_3896786a_7
conditional-buildstep:1.4.2
config-file-provider:3.10.0
configurationslicing:430.v966357576543
credentials:1129.vef26f5df883c
credentials-binding:523.vd859a_4b_122e6
cucumber-reports:5.7.3
dark-theme:262.v0202a_4c8fb_6a
data-tables-api:1.12.1-2
declarative-pipeline-migration-assistant:1.5.2
declarative-pipeline-migration-assistant-api:1.5.2
delivery-pipeline-plugin:1.4.2
display-url-api:2.3.6
docker-commons:1.19
docker-java-api:3.2.13-37.vf3411c9828b9
docker-plugin:1.2.10
docker-slaves:1.0.7
docker-workflow:1.29
durable-task:496.va67c6f9eefa7
echarts-api:5.3.3-1
email-ext:2.89
embeddable-build-status:237.v37e2c03964c9
envinject:2.881.v37c62073ff97
envinject-api:1.199.v3ce31253ed13
external-monitor-job:192.ve979ca_8b_3ccd
favorite:2.4.1
font-awesome-api:6.1.1-1
forensics-api:1.15.1
git:4.11.5
git-changelog:3.25
git-client:3.11.1
git-parameter:0.9.18
git-server:1.11
git-tag-message:1.7.1
github:1.34.5
github-api:1.303-400.v35c2d8258028
github-branch-source:1656.v77eddb_b_e95df
github-organization-folder:1.6
golang:1.4
google-oauth-plugin:1.0.6
google-play-android-publisher:4.2
gradle:1.39.4
greenballs:1.15.1
groovy-postbuild:2.5
h2-api:1.4.199
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953
hashicorp-vault-pipeline:1.4
hashicorp-vault-plugin:336.v182c0fbaaeb7
hidden-parameter:0.0.5
htmlpublisher:1.30
http_request:1.16
ignore-committer-strategy:1.0.4
infradna-backup:3.38.52
ionicons-api:31.v4757b_6987003
jackson2-api:2.13.3-285.vc03c0256d517
jacoco:3.3.2
javadoc:217.v905b_86277a_2a_
javax-activation-api:1.2.0-4
javax-mail-api:1.6.2-6
jaxb:2.3.6-1
jdk-tool:1.5
jenkins-design-language:1.25.5
jira:3.7.1
jira-steps:2.0.141.vd0c6e6dc83f0
jjwt-api:0.11.5-77.v646c772fddb_0
jobConfigHistory:1176.v1b_4290db_41a_5
jobcacher:291.v1b_2284da_5dd7
jquery:1.12.4-1
jquery-detached:1.2.1
jquery3-api:3.6.0-4
jsch:0.1.55.2
junit:1119.1121.vc43d0fc45561
junit-attachments:101.v82f494a_00e9e
kpp-management-plugin:1.0.0
ldap:2.10
lockable-resources:2.18
mailer:414.vcc4c33714601
mapdb-api:1.0.9.0
mask-passwords:3.3
material-theme:0.5.2-rc100.6121925fe229
matrix-auth:3.1.2
matrix-project:772.v494f19991984
maven-plugin:3.19
mercurial:2.16.2
metrics:4.1.6.2
momentjs:1.1.1
monitoring:1.91.0
msbuild:1.30
nectar-license:8.41
nectar-rbac:5.75
next-build-number:1.8
nexus-jenkins-plugin:3.16.459.vcdf273b_29f8c
node-iterator-api:1.5.1
nodejs:1.5.1
nodelabelparameter:1.11.0
oauth-credentials:0.5
okhttp-api:4.9.2-20211102
operations-center-agent:2.346.0.2
operations-center-analytics-config:2.222.0.1
operations-center-analytics-reporter:2.222.0.1
operations-center-client:2.346.0.2
operations-center-cloud:2.346.0.2
operations-center-context:2.346.0.8
pam-auth:1.8
parameterized-trigger:2.45
percentage-du-node-column:0.1.0
pipeline-aggregator-view:1.11
pipeline-aws:1.43
pipeline-build-step:2.18
pipeline-github-lib:38.v445716ea_edda_
pipeline-graph-analysis:195.v5812d95a_a_2f9
pipeline-groovy-lib:593.va_a_fc25d520e9
pipeline-input-step:449.v77f0e8b_845c4
pipeline-maven:1161.v89a_7dcec5d31
pipeline-milestone-step:101.vd572fef9d926
pipeline-model-api:2.2114.v2654ca_721309
pipeline-model-definition:2.2114.v2654ca_721309
pipeline-model-extensions:2.2114.v2654ca_721309
pipeline-multibranch-defaults:2.1
pipeline-npm:0.9.2
pipeline-rest-api:2.24
pipeline-stage-step:293.v200037eefcd5
pipeline-stage-tags-metadata:2.2114.v2654ca_721309
pipeline-stage-view:2.24
pipeline-timeline:1.0.3
pipeline-utility-steps:2.14.0
plain-credentials:1.8
plugin-usage-plugin:3.0
plugin-util-api:2.17.0
popper-api:1.16.1-3
popper2-api:2.11.5-2
port-allocator:1.8
prism-api:1.28.0-2
pubsub-light:1.16
rebuild:1.34
release:2.15
requests:2.2.19
resource-disposer:0.20
run-condition:1.5
sauce-ondemand:1.208
scm-api:608.vfa_f971c5a_a_e9
script-security:1175.v4b_d517d6db_f0
scriptler:3.5
snakeyaml-api:1.30.2-76.vc104f7ce9870
sonar:2.14
splunk-devops:1.10.0
splunk-devops-extend:1.10.0
sse-gateway:1.25
ssh-agent:295.v9ca_a_1c7cc3a_a_
ssh-credentials:291.v8211e4f8efb_c
ssh-slaves:1.821.vd834f8a_c390e
sshd:3.237.v883d165a_c1d3
structs:318.va_f3ccb_729b_71
support-core:1201.v8d1f54a_6ec7c
terraform:1.0.10
text-file-operations:1.3.2
tfs:5.157.1
theme-manager:1.5
throttle-concurrents:2.10
timestamper:1.18
token-macro:293.v283932a_0a_b_49
trilead-api:1.67.vc3938a_35172f
unique-id:2.2.1
user-activity-monitoring:1.7
variant:1.4
versioncolumn:2.2
warnings-ng:9.14.0
wikitext:3.15
windows-slaves:1.8.1
workflow-aggregator:590.v6a_d052e5a_a_b_5
workflow-api:1188.v0016b_4f29881
workflow-basic-steps:969.vc4ec3e4854b_f
workflow-cps:2746.v0da_83a_332669
workflow-cps-checkpoint:2.13
workflow-cps-global-lib:588.v576c103a_ff86
workflow-durable-task-step:1190.vc93d7d457042
workflow-job:1207.ve6191ff089f8
workflow-multibranch:716.vc692a_e52371b_
workflow-scm-step:400.v6b_89a_1317c9a_
workflow-step-api:625.vd896b_f445a_f8
workflow-support:827.v7ef666c4d65c
ws-cleanup:0.43
xray-connector:2.6.1

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

Linux - 3.10.0-1160.76.1.el7.x86_64

Reproduction steps

cache(caches: [[$class: 'ArbitraryFileCache', cacheValidityDecidingFile: 'node_modules/@angular-devkit/build-angular/package.json', compressionMethod: 'ZIP', excludes: '', includes: '**/*', path: '.angular']], defaultBranch: '', maxCacheSize: 0) {
    // some block
}

Expected Results

Cache should be created without any issue.

Actual Results

Cache creation fails with following message "Cannot create cache as the path does not exist"

Anything else?

No response

500 / hudson.init.impl.InstallUncaughtExceptionHandler handleException when selecting S3 storage

Jenkins and plugins versions report

Environment
Jenkins: 2.375.1
OS: Linux - 5.10.127+
---
ace-editor:1.1
antisamy-markup-formatter:155.v795fb_8702324
apache-httpcomponents-client-4-api:4.5.13-138.v4e7d9a_7b_a_e61
authentication-tokens:1.4
basic-branch-build-strategies:71.vc1421f89888e
blueocean:1.26.0
blueocean-autofavorite:1.2.4
blueocean-bitbucket-pipeline:1.26.0
blueocean-commons:1.26.0
blueocean-config:1.26.0
blueocean-core-js:1.26.0
blueocean-dashboard:1.26.0
blueocean-display-url:2.4.1
blueocean-events:1.26.0
blueocean-git-pipeline:1.26.0
blueocean-github-pipeline:1.26.0
blueocean-i18n:1.26.0
blueocean-jira:1.26.0
blueocean-jwt:1.26.0
blueocean-personalization:1.26.0
blueocean-pipeline-api-impl:1.26.0
blueocean-pipeline-editor:1.26.0
blueocean-pipeline-scm-api:1.26.0
blueocean-rest:1.26.0
blueocean-rest-impl:1.26.0
blueocean-web:1.26.0
bootstrap5-api:5.2.0-3
bouncycastle-api:2.26
branch-api:2.1046.v0ca_37783ecc5
build-timeout:1.25
caffeine-api:2.9.3-65.v6a_47d0f4d1fe
checks-api:1.8.0
cloudbees-bitbucket-branch-source:2.9.11
cloudbees-disk-usage-simple:178.v1a_4d2f6359a_8
cloudbees-folder:6.758.vfd75d09eea_a_1
cobertura:1.17
code-coverage-api:3.4.0
command-launcher:90.v669d7ccb_7c31
commons-lang3-api:3.12.0-36.vd97de6465d5b_
commons-text-api:1.10.0-27.vb_fa_3896786a_7
configuration-as-code:1569.vb_72405b_80249
credentials:1214.v1de940103927
credentials-binding:523.vd859a_4b_122e6
data-tables-api:1.12.1-4
display-url-api:2.3.6
durable-task:500.v8927d9fd99d8
echarts-api:5.4.0-1
email-ext:2.92
embeddable-build-status:312.vf2de01b_051d0
emotional-jenkins-plugin:1.2
favorite:2.4.1
font-awesome-api:6.2.1-1
forensics-api:1.15.1
git:4.14.3
git-client:3.13.0
git-server:1.9
github:1.36.0
github-api:1.303-400.v35c2d8258028
github-branch-source:1696.v3a_7603564d04
google-compute-engine:4.3.12
google-login:1.7-SNAPSHOT-recursive-groups
google-oauth-plugin:1.0.3
handy-uri-templates-2-api:2.1.8-1.0
htmlpublisher:1.25
instance-identity:116.vf8f487400980
ionicons-api:31.v4757b_6987003
jackson2-api:2.13.4.20221013-295.v8e29ea_354141
jacoco:3.3.2
jakarta-activation-api:2.0.1-1
jakarta-mail-api:2.0.1-1
javax-activation-api:1.2.0-3
javax-mail-api:1.6.2-5
jaxb:2.3.6-1
jdk-tool:63.v62d2fd4b_4793
jenkins-design-language:1.26.0
jersey2-api:2.36-2
jira:3.8
jjwt-api:0.11.5-77.v646c772fddb_0
job-dsl:1.81
jobcacher:335.vc42a_d6487c25
jquery-detached:1.2.1
jquery3-api:3.6.0-4
jsch:0.1.55.61.va_e9ee26616e7
junit:1166.va_436e268e972
kubernetes:3743.v1fa_4c724c3b_7
kubernetes-client-api:5.12.1-187.v577c3e368fb_6
kubernetes-credentials:0.9.0
lockable-resources:1069.v726298f53f8c
mailer:438.v02c7f0a_12fa_4
matrix-auth:3.1.6
matrix-project:785.v06b_7f47b_c631
metrics:4.2.10-389.v93143621b_050
monitoring:1.91.0
nunit:0.28
oauth-credentials:0.4
okhttp-api:4.9.3-108.v0feda04578cf
parameterized-scheduler:1.1
pipeline-build-step:2.18
pipeline-github:2.8-138.d766e30bb08b
pipeline-githubnotify-step:49.vf37bf92d2bc8
pipeline-graph-analysis:1.11
pipeline-groovy-lib:621.vb_44ce045b_582
pipeline-input-step:466.v6d0a_5df34f81
pipeline-milestone-step:101.vd572fef9d926
pipeline-model-api:2.2118.v31fd5b_9944b_5
pipeline-model-definition:1.9.3
pipeline-model-extensions:2.2114.v2654ca_721309
pipeline-rest-api:2.21
pipeline-stage-step:293.v200037eefcd5
pipeline-stage-tags-metadata:1.9.3
pipeline-utility-steps:2.14.0
plain-credentials:139.ved2b_9cf7587b
plugin-util-api:2.20.0
popper2-api:2.11.5-2
prism-api:1.28.0-2
prometheus:2.0.11
pubsub-light:1.16
scm-api:621.vda_a_b_055e58f7
script-security:1218.v39ca_7f7ed0a_c
slack:631.v40deea_40323b
snakeyaml-api:1.30.2-76.vc104f7ce9870
sse-gateway:1.24
ssh-credentials:305.v8f4381501156
sshd:3.236.ved5e1b_cb_50b_2
structs:324.va_f5d6774f3a_d
swarm:3.39
timestamper:1.21
token-macro:321.vd7cc1f2a_52c8
trilead-api:1.67.vc3938a_35172f
variant:59.vf075fe829ccb
violation-comments-to-github:1.96
workflow-aggregator:590.v6a_d052e5a_a_b_5
workflow-api:1200.v8005c684b_a_c6
workflow-basic-steps:2.24
workflow-cps:3565.v4b_d9b_8c29a_b_3
workflow-cps-global-lib:2.19
workflow-durable-task-step:1206.v8a_d5f86e336b
workflow-job:1207.ve6191ff089f8
workflow-multibranch:716.vc692a_e52371b_
workflow-scm-step:400.v6b_89a_1317c9a_
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:839.v35e2736cfd5c

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

Linux

Reproduction steps

  1. Install the jobcacher plugin using IaaC Jenkins
  2. Head to Manage Jenkins
  3. change Item storage implementation to S3:
    image

Observe the 500 in browser console, and/or system log

Backtrace Jan 05, 2023 8:32:59 PM WARNING hudson.init.impl.InstallUncaughtExceptionHandler handleException Caught unhandled exception with ID e7c2bd60-b8b6-43bd-8b3e-907b3eb5688b org.apache.commons.jelly.JellyTagException: jar:file:/var/jenkins_home/war/WEB-INF/lib/jenkins-core-2.375.1.jar!/lib/form/dropdownDescriptorSelector.jelly:74:94: com/cloudbees/jenkins/plugins/awscredentials/AmazonWebServicesCredentials at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:738) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:285) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:101) at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:265) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:101) at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:265) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:122) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:122) at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:101) at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:265) at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:101) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:66) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:55) at hudson.widgets.RenderOnDemandClosure$1.generateResponse(RenderOnDemandClosure.java:123) at org.kohsuke.stapler.HttpResponseRenderer$Default.handleHttpResponse(HttpResponseRenderer.java:124) at org.kohsuke.stapler.HttpResponseRenderer$Default.generateResponse(HttpResponseRenderer.java:69) at org.kohsuke.stapler.Function.renderResponse(Function.java:159) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:142) at org.kohsuke.stapler.MetaClass$JavaScriptProxyMethodDispatcher.doDispatch(MetaClass.java:661) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:59) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:762) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:894) at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:475) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:762) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:894) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:830) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:894) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:690) at org.kohsuke.stapler.Stapler.service(Stapler.java:201) at javax.servlet.http.HttpServlet.service(HttpServlet.java:590) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764) at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:157) at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:248) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:81) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:129) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:60) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215) at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88) at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:121) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:160) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:154) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:94) at jenkins.security.AcegiSecurityExceptionFilter.doFilter(AcegiSecurityExceptionFilter.java:52) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:54) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:106) at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:97) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:223) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:217) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:97) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:63) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:111) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:172) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:53) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:86) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:38) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:549) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1571) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1383) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1544) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1305) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) at org.eclipse.jetty.server.Server.handle(Server.java:563) at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:505) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:762) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:497) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:139) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:933) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1077) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.NoClassDefFoundError: com/cloudbees/jenkins/plugins/awscredentials/AmazonWebServicesCredentials at java.base/java.lang.Class.getDeclaredMethods0(Native Method) at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166) at java.base/java.lang.Class.getDeclaredMethods(Class.java:2309) at org.kohsuke.stapler.ClassDescriptor.findMethods(ClassDescriptor.java:143) at org.kohsuke.stapler.ClassDescriptor.(ClassDescriptor.java:80) at org.kohsuke.stapler.lang.KlassNavigator$1.getFunctions(KlassNavigator.java:217) at org.kohsuke.stapler.lang.KlassNavigator$1.getFunctions(KlassNavigator.java:142) at org.kohsuke.stapler.lang.Klass.getFunctions(Klass.java:98) at org.kohsuke.stapler.KlassDescriptor.(KlassDescriptor.java:27) at org.kohsuke.stapler.MetaClass.buildDispatchers(MetaClass.java:111) at org.kohsuke.stapler.MetaClass.(MetaClass.java:99) at org.kohsuke.stapler.WebApp$1.computeValue(WebApp.java:230) at org.kohsuke.stapler.WebApp$1.computeValue(WebApp.java:227) at java.base/java.lang.ClassValue.getFromHashMap(ClassValue.java:228) at java.base/java.lang.ClassValue.getFromBackup(ClassValue.java:210) at java.base/java.lang.ClassValue.get(ClassValue.java:116) at org.kohsuke.stapler.WebApp.getMetaClass(WebApp.java:246) at org.kohsuke.stapler.jelly.groovy.GroovyFacet.createRequestDispatcher(GroovyFacet.java:74) at org.kohsuke.stapler.RequestImpl.getView(RequestImpl.java:282) at org.kohsuke.stapler.RequestImpl.getView(RequestImpl.java:277) at hudson.model.Descriptor.getHelpFile(Descriptor.java:773) at hudson.model.Descriptor.getHelpFile(Descriptor.java:755) at jdk.internal.reflect.GeneratedMethodAccessor859.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258) at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104) at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83) at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57) at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51) at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80) at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:76) at org.apache.commons.jelly.tags.core.CoreTagLibrary$3.run(CoreTagLibrary.java:134) at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:122) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:99) at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:172) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:265) ... 134 more Caused by: java.lang.ClassNotFoundException: com.cloudbees.jenkins.plugins.awscredentials.AmazonWebServicesCredentials at hudson.ClassicPluginStrategy$DependencyClassLoader.findClass(ClassicPluginStrategy.java:669) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at hudson.PluginFirstClassLoader2.loadClass(PluginFirstClassLoader2.java:69) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 176 more Caused: java.io.IOException: Failed to evaluate the template closure at hudson.widgets.RenderOnDemandClosure$1.generateResponse(RenderOnDemandClosure.java:126) at org.kohsuke.stapler.HttpResponseRenderer$Default.handleHttpResponse(HttpResponseRenderer.java:124) at org.kohsuke.stapler.HttpResponseRenderer$Default.generateResponse(HttpResponseRenderer.java:69) at org.kohsuke.stapler.Function.renderResponse(Function.java:159) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:142) at org.kohsuke.stapler.MetaClass$JavaScriptProxyMethodDispatcher.doDispatch(MetaClass.java:661) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:59) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:762) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:894) at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:475) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:762) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:894) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:830) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:894) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:690) at org.kohsuke.stapler.Stapler.service(Stapler.java:201) at javax.servlet.http.HttpServlet.service(HttpServlet.java:590) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764) at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:157) at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:248) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:81) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:129) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:60) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215) at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88) at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:121) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:160) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:154) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:94) at jenkins.security.AcegiSecurityExceptionFilter.doFilter(AcegiSecurityExceptionFilter.java:52) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:54) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:106) at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:97) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:223) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:217) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:97) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:63) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:111) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:172) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:53) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:86) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:38) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:549) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1571) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1383) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1544) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1305) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) at org.eclipse.jetty.server.Server.handle(Server.java:563) at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:505) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:762) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:497) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:139) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:933) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1077) at java.base/java.lang.Thread.run(Thread.java:829)

Expected Results

Well, not a 500.

Actual Results

The 500

Anything else?

No response

It skips cache creation when changing `compressionMethod`

Jenkins and plugins versions report

Environment
Jenkins: 2.361.4
OS: Linux - 5.15.0-1021-azure
---
Office-365-Connector:4.17.0
ace-editor:1.1
additional-identities-plugin:1.1
analysis-model-api:10.20.0
ansicolor:1.0.2
antisamy-markup-formatter:155.v795fb_8702324
apache-httpcomponents-client-4-api:4.5.13-138.v4e7d9a_7b_a_e61
authentication-tokens:1.4
authorize-project:1.4.0
aws-credentials:191.vcb_f183ce58b_9
aws-java-sdk:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-cloudformation:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-codebuild:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-ec2:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-ecr:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-ecs:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-efs:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-elasticbeanstalk:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-iam:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-logs:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-minimal:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-sns:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-sqs:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-ssm:1.12.287-357.vf82d85a_6eefd
basic-branch-build-strategies:71.vc1421f89888e
blueocean-autofavorite:1.2.5
blueocean-commons:1.25.8
blueocean-config:1.25.8
blueocean-core-js:1.25.8
blueocean-dashboard:1.25.8
blueocean-display-url:2.4.1
blueocean-events:1.25.8
blueocean-git-pipeline:1.25.8
blueocean-github-pipeline:1.25.8
blueocean-i18n:1.25.8
blueocean-jwt:1.25.8
blueocean-personalization:1.25.8
blueocean-pipeline-api-impl:1.25.8
blueocean-pipeline-editor:1.25.8
blueocean-pipeline-scm-api:1.25.8
blueocean-rest:1.25.8
blueocean-rest-impl:1.25.8
blueocean-web:1.25.8
bootstrap4-api:4.6.0-5
bootstrap5-api:5.2.1-3
bouncycastle-api:2.26
branch-api:2.1051.v9985666b_f6cc
build-token-root:151.va_e52fe3215fc
caffeine-api:2.9.3-65.v6a_47d0f4d1fe
checks-api:1.8.0
cloudbees-folder:6.758.vfd75d09eea_a_1
code-coverage-api:3.2.0
command-launcher:90.v669d7ccb_7c31
commons-lang3-api:3.12.0-36.vd97de6465d5b_
commons-text-api:1.10.0-27.vb_fa_3896786a_7
config-file-provider:3.11.1
credentials:1189.vf61b_a_5e2f62e
credentials-binding:523.vd859a_4b_122e6
data-tables-api:1.12.1-4
display-url-api:2.3.6
docker-commons:1.21
docker-java-api:3.2.13-37.vf3411c9828b9
docker-plugin:1.2.10
docker-workflow:528.v7c193a_0b_e67c
durable-task:501.ve5d4fc08b0be
echarts-api:5.4.0-1
email-ext:2.92
embeddable-build-status:304.vdcf48d6b_d2eb
external-monitor-job:203.v683c09d993b_9
favorite:2.4.1
font-awesome-api:6.2.0-3
forensics-api:1.16.0
git:4.13.0
git-client:3.13.0
git-forensics:1.11.0
git-parameter:0.9.18
gitea:1.4.4
gitea-checks:449.v0672c320ee47
github:1.36.0
github-api:1.303-400.v35c2d8258028
github-branch-source:1696.v3a_7603564d04
google-oauth-plugin:1.0.7
gravatar:2.2
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953
htmlpublisher:1.31
instance-identity:116.vf8f487400980
ionicons-api:31.v4757b_6987003
jackson2-api:2.13.4.20221013-295.v8e29ea_354141
jakarta-activation-api:2.0.1-2
jakarta-mail-api:2.0.1-2
javax-activation-api:1.2.0-5
javax-mail-api:1.6.2-8
jaxb:2.3.7-1
jdk-tool:63.v62d2fd4b_4793
jenkins-design-language:1.25.8
jjwt-api:0.11.5-77.v646c772fddb_0
jobcacher:304.v634d2e1b_2489
jquery:1.12.4-1
jquery3-api:3.6.1-2
jsch:0.1.55.61.va_e9ee26616e7
junit:1160.vf1f01a_a_ea_b_7f
kubernetes:3734.v562b_b_a_627ea_c
kubernetes-client-api:5.12.2-193.v26a_6078f65a_9
kubernetes-credentials:0.9.0
ldap:2.12
lockable-resources:2.18
mailer:438.v02c7f0a_12fa_4
matrix-auth:3.1.5
matrix-project:785.v06b_7f47b_c631
metrics:4.2.10-405.v60a_9cc74e923
mina-sshd-api-common:2.9.2-50.va_0e1f42659a_a
mina-sshd-api-core:2.9.2-50.va_0e1f42659a_a
momentjs:1.1.1
mstest:1.0.0
nunit:0.28
oauth-credentials:0.5
okhttp-api:4.9.3-108.v0feda04578cf
pam-auth:1.10
pipeline-build-step:2.18
pipeline-graph-analysis:195.v5812d95a_a_2f9
pipeline-groovy-lib:621.vb_44ce045b_582
pipeline-input-step:456.vd8a_957db_5b_e9
pipeline-milestone-step:101.vd572fef9d926
pipeline-model-api:2.2118.v31fd5b_9944b_5
pipeline-model-definition:2.2118.v31fd5b_9944b_5
pipeline-model-extensions:2.2118.v31fd5b_9944b_5
pipeline-multibranch-defaults:2.1
pipeline-rest-api:2.27
pipeline-stage-step:296.v5f6908f017a_5
pipeline-stage-tags-metadata:2.2118.v31fd5b_9944b_5
pipeline-stage-view:2.27
pipeline-utility-steps:2.13.2
plain-credentials:139.ved2b_9cf7587b
plugin-util-api:2.18.0
popper-api:1.16.1-3
popper2-api:2.11.6-2
prism-api:1.29.0-1
pubsub-light:1.17
saml:4.372.v89f13e4c9e97
scm-api:621.vda_a_b_055e58f7
scoring-load-balancer:1.0.1
script-security:1218.v39ca_7f7ed0a_c
sidebar-link:2.2.0
simple-theme-plugin:136.v23a_15f86c53d
snakeyaml-api:1.33-90.v80dcb_3814d35
sse-gateway:1.26
ssh-agent:295.v9ca_a_1c7cc3a_a_
ssh-credentials:305.v8f4381501156
ssh-slaves:2.854.v7fd446b_337c9
sshd:3.249.v2dc2ea_416e33
structs:324.va_f5d6774f3a_d
timestamper:1.21
token-macro:308.v4f2b_ed62b_b_16
translation:1.16
trilead-api:2.72.v2a_3236754f73
variant:59.vf075fe829ccb
versioncolumn:87.v8fe7c090a_d3b
warnings-ng:9.20.1
windows-slaves:1.8.1
workflow-aggregator:590.v6a_d052e5a_a_b_5
workflow-api:1200.v8005c684b_a_c6
workflow-basic-steps:994.vd57e3ca_46d24
workflow-cps:3536.vb_8a_6628079d5
workflow-durable-task-step:1217.v38306d8fa_b_5c
workflow-job:1254.v3f64639b_11dd
workflow-multibranch:716.vc692a_e52371b_
workflow-scm-step:400.v6b_89a_1317c9a_
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:839.v35e2736cfd5c

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

Controller: official docker lts image
Agent: ubuntu 20.04 amd64 vm

Reproduction steps

  1. run job with tgz compression
  2. run job with zstd compression

Expected Results

it should use existing tgz file for extract or should nod skip compression

Actual Results

it uses neither the existing file nor it creates a new cache file

[Cache for .yarn/cache] Skip cache creation as the cache is up-to-date

Anything else?

workaround: delete the hash file

java.nio.file.AccessDeniedException: /WEB during cache creation

Jenkins and plugins versions report

Environment
Jenkins: 2.346.4.1
OS: Linux - 3.10.0-1160.76.1.el7.x86_64
---
Office-365-Connector:4.17.0
ace-editor:1.1
active-directory:2.25.1
allure-jenkins-plugin:2.30.3
analysis-model-api:10.13.0
android-emulator:3.1.3
android-signing:2.2.5
ansicolor:1.0.2
ant:475.vf34069fef73c
antisamy-markup-formatter:2.7
apache-httpcomponents-client-4-api:4.5.13-1.0
appcenter:0.11.1
async-http-client:1.7.24.3
authentication-tokens:1.4
aws-credentials:191.vcb_f183ce58b_9
aws-java-sdk:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-cloudformation:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-codebuild:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-ec2:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-ecr:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-ecs:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-elasticbeanstalk:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-iam:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-logs:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-minimal:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-sns:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-sqs:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-ssm:1.12.246-349.v96b_b_f7eb_a_c3c
badge:1.9.1
basic-branch-build-strategies:1.3.2
blueocean:1.25.5
blueocean-autofavorite:1.2.5
blueocean-bitbucket-pipeline:1.25.5
blueocean-commons:1.25.5
blueocean-config:1.25.5
blueocean-core-js:1.25.5
blueocean-dashboard:1.25.5
blueocean-display-url:2.4.1
blueocean-events:1.25.5
blueocean-git-pipeline:1.25.5
blueocean-github-pipeline:1.25.5
blueocean-i18n:1.25.5
blueocean-jira:1.25.5
blueocean-jwt:1.25.5
blueocean-personalization:1.25.5
blueocean-pipeline-api-impl:1.25.5
blueocean-pipeline-editor:1.25.5
blueocean-pipeline-scm-api:1.25.5
blueocean-rest:1.25.5
blueocean-rest-impl:1.25.5
blueocean-web:1.25.5
bootstrap4-api:4.6.0-5
bootstrap5-api:5.1.3-7
bouncycastle-api:2.26
branch-api:2.1046.v0ca_37783ecc5
build-monitor-plugin:1.13+build.202205140447
build-time-blame:64.vd8f4018a2bbe
build-timeout:1.21
build-view-column:0.3
buildtriggerbadge:251.vdf6ef853f3f5
caffeine-api:2.9.3-65.v6a_47d0f4d1fe
checks-api:1.7.4
cloudbees-aborted-builds:1.19
cloudbees-administrative-monitors:1.0.4
cloudbees-analytics:1.42
cloudbees-assurance:2.276.0.23
cloudbees-aws-cli:1.5.20
cloudbees-bitbucket-branch-source:773.v4b_9b_005b_562b_
cloudbees-blueocean-default-theme:0.8
cloudbees-console-log-masker:1.0.5
cloudbees-consolidated-build-view:1.6.1
cloudbees-even-scheduler:3.13
cloudbees-folder:6.729.v2b_9d1a_74d673
cloudbees-folders-plus:3.28
cloudbees-groovy-view:1.14
cloudbees-ha:4.39
cloudbees-jenkins-advisor:3.3.2
cloudbees-jsync-archiver:5.23
cloudbees-label-throttling-plugin:3.9
cloudbees-license:9.68
cloudbees-monitoring:2.14
cloudbees-nodes-plus:1.23
cloudbees-pipeline-policies:1.7
cloudbees-platform-common:1.17
cloudbees-plugin-usage:2.15
cloudbees-quiet-start:1.7
cloudbees-request-filter:1.7
cloudbees-ssh-slaves:2.18
cloudbees-support:3.29
cloudbees-template:4.56
cloudbees-uc-data-api:4.50
cloudbees-unified-ui:1.21
cloudbees-view-creation-filter:1.9
cloudbees-workflow-template:3.18
cloudbees-workflow-ui:2.8
cobertura:1.17
cocoapods-integration:0.2.0
code-coverage-api:3.0.5
command-launcher:84.v4a_97f2027398
commons-lang3-api:3.12.0-36.vd97de6465d5b_
commons-text-api:1.10.0-27.vb_fa_3896786a_7
conditional-buildstep:1.4.2
config-file-provider:3.10.0
configurationslicing:430.v966357576543
credentials:1129.vef26f5df883c
credentials-binding:523.vd859a_4b_122e6
cucumber-reports:5.7.3
dark-theme:262.v0202a_4c8fb_6a
data-tables-api:1.12.1-2
declarative-pipeline-migration-assistant:1.5.2
declarative-pipeline-migration-assistant-api:1.5.2
delivery-pipeline-plugin:1.4.2
display-url-api:2.3.6
docker-commons:1.19
docker-java-api:3.2.13-37.vf3411c9828b9
docker-plugin:1.2.10
docker-slaves:1.0.7
docker-workflow:1.29
durable-task:496.va67c6f9eefa7
echarts-api:5.3.3-1
email-ext:2.89
embeddable-build-status:237.v37e2c03964c9
envinject:2.881.v37c62073ff97
envinject-api:1.199.v3ce31253ed13
external-monitor-job:192.ve979ca_8b_3ccd
favorite:2.4.1
font-awesome-api:6.1.1-1
forensics-api:1.15.1
git:4.11.5
git-changelog:3.25
git-client:3.11.1
git-parameter:0.9.18
git-server:1.11
git-tag-message:1.7.1
github:1.34.5
github-api:1.303-400.v35c2d8258028
github-branch-source:1656.v77eddb_b_e95df
github-organization-folder:1.6
golang:1.4
google-oauth-plugin:1.0.6
google-play-android-publisher:4.2
gradle:1.39.4
greenballs:1.15.1
groovy-postbuild:2.5
h2-api:1.4.199
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953
hashicorp-vault-pipeline:1.4
hashicorp-vault-plugin:336.v182c0fbaaeb7
hidden-parameter:0.0.5
htmlpublisher:1.30
http_request:1.16
ignore-committer-strategy:1.0.4
infradna-backup:3.38.52
ionicons-api:31.v4757b_6987003
jackson2-api:2.13.3-285.vc03c0256d517
jacoco:3.3.2
javadoc:217.v905b_86277a_2a_
javax-activation-api:1.2.0-4
javax-mail-api:1.6.2-6
jaxb:2.3.6-1
jdk-tool:1.5
jenkins-design-language:1.25.5
jira:3.7.1
jira-steps:2.0.141.vd0c6e6dc83f0
jjwt-api:0.11.5-77.v646c772fddb_0
jobConfigHistory:1176.v1b_4290db_41a_5
jobcacher:291.v1b_2284da_5dd7
jquery:1.12.4-1
jquery-detached:1.2.1
jquery3-api:3.6.0-4
jsch:0.1.55.2
junit:1119.1121.vc43d0fc45561
junit-attachments:101.v82f494a_00e9e
kpp-management-plugin:1.0.0
ldap:2.10
lockable-resources:2.18
mailer:414.vcc4c33714601
mapdb-api:1.0.9.0
mask-passwords:3.3
material-theme:0.5.2-rc100.6121925fe229
matrix-auth:3.1.2
matrix-project:772.v494f19991984
maven-plugin:3.19
mercurial:2.16.2
metrics:4.1.6.2
momentjs:1.1.1
monitoring:1.91.0
msbuild:1.30
nectar-license:8.41
nectar-rbac:5.75
next-build-number:1.8
nexus-jenkins-plugin:3.16.459.vcdf273b_29f8c
node-iterator-api:1.5.1
nodejs:1.5.1
nodelabelparameter:1.11.0
oauth-credentials:0.5
okhttp-api:4.9.2-20211102
operations-center-agent:2.346.0.2
operations-center-analytics-config:2.222.0.1
operations-center-analytics-reporter:2.222.0.1
operations-center-client:2.346.0.2
operations-center-cloud:2.346.0.2
operations-center-context:2.346.0.8
pam-auth:1.8
parameterized-trigger:2.45
percentage-du-node-column:0.1.0
pipeline-aggregator-view:1.11
pipeline-aws:1.43
pipeline-build-step:2.18
pipeline-github-lib:38.v445716ea_edda_
pipeline-graph-analysis:195.v5812d95a_a_2f9
pipeline-groovy-lib:593.va_a_fc25d520e9
pipeline-input-step:449.v77f0e8b_845c4
pipeline-maven:1161.v89a_7dcec5d31
pipeline-milestone-step:101.vd572fef9d926
pipeline-model-api:2.2114.v2654ca_721309
pipeline-model-definition:2.2114.v2654ca_721309
pipeline-model-extensions:2.2114.v2654ca_721309
pipeline-multibranch-defaults:2.1
pipeline-npm:0.9.2
pipeline-rest-api:2.24
pipeline-stage-step:293.v200037eefcd5
pipeline-stage-tags-metadata:2.2114.v2654ca_721309
pipeline-stage-view:2.24
pipeline-timeline:1.0.3
pipeline-utility-steps:2.14.0
plain-credentials:1.8
plugin-usage-plugin:3.0
plugin-util-api:2.17.0
popper-api:1.16.1-3
popper2-api:2.11.5-2
port-allocator:1.8
prism-api:1.28.0-2
pubsub-light:1.16
rebuild:1.34
release:2.15
requests:2.2.19
resource-disposer:0.20
run-condition:1.5
sauce-ondemand:1.208
scm-api:608.vfa_f971c5a_a_e9
script-security:1175.v4b_d517d6db_f0
scriptler:3.5
snakeyaml-api:1.30.2-76.vc104f7ce9870
sonar:2.14
splunk-devops:1.10.0
splunk-devops-extend:1.10.0
sse-gateway:1.25
ssh-agent:295.v9ca_a_1c7cc3a_a_
ssh-credentials:291.v8211e4f8efb_c
ssh-slaves:1.821.vd834f8a_c390e
sshd:3.237.v883d165a_c1d3
structs:318.va_f3ccb_729b_71
support-core:1201.v8d1f54a_6ec7c
terraform:1.0.10
text-file-operations:1.3.2
tfs:5.157.1
theme-manager:1.5
throttle-concurrents:2.10
timestamper:1.18
token-macro:293.v283932a_0a_b_49
trilead-api:1.67.vc3938a_35172f
unique-id:2.2.1
user-activity-monitoring:1.7
variant:1.4
versioncolumn:2.2
warnings-ng:9.14.0
wikitext:3.15
windows-slaves:1.8.1
workflow-aggregator:590.v6a_d052e5a_a_b_5
workflow-api:1188.v0016b_4f29881
workflow-basic-steps:969.vc4ec3e4854b_f
workflow-cps:2746.v0da_83a_332669
workflow-cps-checkpoint:2.13
workflow-cps-global-lib:588.v576c103a_ff86
workflow-durable-task-step:1190.vc93d7d457042
workflow-job:1207.ve6191ff089f8
workflow-multibranch:716.vc692a_e52371b_
workflow-scm-step:400.v6b_89a_1317c9a_
workflow-step-api:625.vd896b_f445a_f8
workflow-support:827.v7ef666c4d65c
ws-cleanup:0.43
xray-connector:2.6.1

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

Linux - 3.10.0-1160.76.1.el7.x86_64

Reproduction steps

cache(caches: [
          [$class: 'ArbitraryFileCache', cacheValidityDecidingFile: '.eslintrc.json', compressionMethod: 'ZIP', path: '.eslintcache']
        ], defaultBranch: 'master', maxCacheSize: 1024) {
  parallel(jobs)
}

Expected Results

Cache should be created without any issue.

Actual Results

Cache creation fails with following exception. It seems that the target path isn't created correctly.

java.nio.file.AccessDeniedException: /WEB
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
	at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:389)
	at java.base/java.nio.file.Files.createDirectory(Files.java:690)
	at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:797)
	at java.base/java.nio.file.Files.createDirectories(Files.java:783)
	at hudson.FilePath.mkdirs(FilePath.java:3624)
	at hudson.FilePath.write(FilePath.java:2404)
	at hudson.FilePath.copyTo(FilePath.java:2544)
Caused: java.io.IOException: Failed to copy /var/lib/jenkins/workspace/WEB_app_cache@tmp/9c4c6ec98eba7fa2ab612ab41419577e8231223752170595945.zip to WEB/app/cache/cache/93be97b4bf82e96f925f1fe0e6cac797.zip
	at hudson.FilePath.copyTo(FilePath.java:2548)
	at hudson.FilePath.copyFrom(FilePath.java:1128)
	at jenkins.plugins.itemstorage.local.LocalObjectPath.copyFrom(LocalObjectPath.java:75)
	at jenkins.plugins.jobcacher.arbitrary.AbstractCompressingArbitraryFileCacheStrategy.cache(AbstractCompressingArbitraryFileCacheStrategy.java:20)
	at jenkins.plugins.jobcacher.ArbitraryFileCache$SaverImpl.save(ArbitraryFileCache.java:289)
	at jenkins.plugins.jobcacher.CacheManager.save(CacheManager.java:99)
	at jenkins.plugins.jobcacher.pipeline.CacheStep$ExecutionCallback.complete(CacheStep.java:160)
	at jenkins.plugins.jobcacher.pipeline.CacheStep$ExecutionCallback.onSuccess(CacheStep.java:141)
	at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:376)
	at com.cloudbees.groovy.cps.Outcome.resumeFrom(Outcome.java:73)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:166)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:187)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:420)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:95)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Anything else?

No response

Support Multiple use in pipeline

What feature do you want to see added?

Overwrite cache multiple calls on one pipeline.
I wish I could cache with jobnNme + customName as an additional feature.

ex) cache(maxCacheSize: 1000, defaultBranch: 'develop', caches: [[$class: 'ArbitraryFileCache', path: cacheValidityDecidingFile: 'build.gradle', compressionMethod: 'TARGZ',excludes: '**/*.lock'], customName: auth-server]) {

Upstream changes

No response

Multiple S3 repos always trigger "Connection pool shut down"

Jenkins and plugins versions report

Environment
Paste the output here

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

Using the S3 storage with multiple caches is not working. I am not sure where this one is coming from though. I am using the >version 2.204.2 of jenkins and your last commit of this fork.

Reproduction steps

Don't know

Expected Results

works

Actual Results

13:06:04  java.lang.IllegalStateException: Connection pool shut down
13:06:04  	at org.apache.http.util.Asserts.check(Asserts.java:34)
13:06:04  	at org.apache.http.pool.AbstractConnPool.lease(AbstractConnPool.java:196)
13:06:04  	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.requestConnection(PoolingHttpClientConnectionManager.java:268)
13:06:04  	at sun.reflect.GeneratedMethodAccessor303.invoke(Unknown Source)
13:06:04  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:06:04  	at java.lang.reflect.Method.invoke(Method.java:498)
13:06:04  	at com.amazonaws.http.conn.ClientConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:76)
13:06:04  	at com.amazonaws.http.conn.$Proxy100.requestConnection(Unknown Source)
13:06:04  	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:176)
13:06:04  	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
13:06:04  	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
13:06:04  	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
13:06:04  	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
13:06:04  	at com.amazonaws.http.apache.client.impl.SdkHttpClient.execute(SdkHttpClient.java:72)
13:06:04  	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1311)
13:06:04  	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1127)
13:06:04  	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:784)
13:06:04  	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:752)
13:06:04  	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:726)
13:06:04  	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:686)
13:06:04  	at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:668)
13:06:04  	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:532)
13:06:04  	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:512)
13:06:04  	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5052)
13:06:04  	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4998)
13:06:04  	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4992)
13:06:04  	at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:895)
13:06:04  	at jenkins.plugins.itemstorage.s3.S3Profile.exists(S3Profile.java:83)
13:06:04  	at jenkins.plugins.itemstorage.s3.S3ObjectPath.exists(S3ObjectPath.java:75)
13:06:04  	at jenkins.plugins.jobcacher.Cache.cachePath(Cache.java:85)
13:06:04  	at jenkins.plugins.jobcacher.ArbitraryFileCache.cache(ArbitraryFileCache.java:109)
13:06:04  	at jenkins.plugins.jobcacher.CacheManager.cache(CacheManager.java:69)
13:06:04  	at jenkins.plugins.jobcacher.pipeline.CacheStep$ExecutionImpl.start(CacheStep.java:100)
13:06:04  	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:286)
13:06:04  	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:179)
13:06:04  	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
13:06:04  	at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
13:06:04  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:06:04  	at java.lang.reflect.Method.invoke(Method.java:498)
13:06:04  	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
13:06:04  	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
13:06:04  	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
13:06:04  	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
13:06:04  	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
13:06:04  	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
13:06:04  	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
13:06:04  	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:160)
13:06:04  	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
13:06:04  	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157)
13:06:04  	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:158)
13:06:04  	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:162)
13:06:04  	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:132)
13:06:04  	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:132)
13:06:04  	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
13:06:04  	at WorkflowScript.run(WorkflowScript:42)
13:06:04  	at ___cps.transform___(Native Method)
13:06:04  	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
13:06:04  	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
13:06:04  	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83)
13:06:04  	at sun.reflect.GeneratedMethodAccessor230.invoke(Unknown Source)
13:06:04  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:06:04  	at java.lang.reflect.Method.invoke(Method.java:498)
13:06:04  	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
13:06:04  	at com.cloudbees.groovy.cps.impl.ClosureBlock.eval(ClosureBlock.java:46)
13:06:04  	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
13:06:04  	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
13:06:04  	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
13:06:04  	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
13:06:04  	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
13:06:04  	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
13:06:04  	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
13:06:04  	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
13:06:04  	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
13:06:04  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:405)
13:06:04  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
13:06:04  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:317)
13:06:04  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:281)
13:06:04  	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
13:06:04  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
13:06:04  	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
13:06:04  	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
13:06:04  	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
13:06:04  	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
13:06:04  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
13:06:04  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
13:06:04  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
13:06:04  	at java.lang.Thread.run(Thread.java:748)
13:06:04  Finished: FAILURE

Anything else?

No response

NullPointerException

Jenkins and plugins versions report

Environment
Jenkins: 2.346.2
OS: Linux - 5.13.0-1023-azure
---
Office-365-Connector:4.17.0
ace-editor:1.1
additional-identities-plugin:1.1
analysis-model-api:10.13.0
ansicolor:1.0.1
antisamy-markup-formatter:2.7
apache-httpcomponents-client-4-api:4.5.13-1.0
authentication-tokens:1.4
authorize-project:1.4.0
aws-credentials:191.vcb_f183ce58b_9
aws-java-sdk:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-cloudformation:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-codebuild:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-ec2:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-ecr:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-ecs:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-elasticbeanstalk:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-iam:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-logs:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-minimal:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-sns:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-sqs:1.12.246-349.v96b_b_f7eb_a_c3c
aws-java-sdk-ssm:1.12.246-349.v96b_b_f7eb_a_c3c
basic-branch-build-strategies:1.3.2
blueocean:1.25.5
blueocean-autofavorite:1.2.5
blueocean-bitbucket-pipeline:1.25.5
blueocean-commons:1.25.5
blueocean-config:1.25.5
blueocean-core-js:1.25.5
blueocean-dashboard:1.25.5
blueocean-display-url:2.4.1
blueocean-events:1.25.5
blueocean-git-pipeline:1.25.5
blueocean-github-pipeline:1.25.5
blueocean-i18n:1.25.5
blueocean-jwt:1.25.5
blueocean-personalization:1.25.5
blueocean-pipeline-api-impl:1.25.5
blueocean-pipeline-editor:1.25.5
blueocean-pipeline-scm-api:1.25.5
blueocean-rest:1.25.5
blueocean-rest-impl:1.25.5
blueocean-web:1.25.5
bootstrap4-api:4.6.0-5
bootstrap5-api:5.1.3-7
bouncycastle-api:2.26
branch-api:2.1046.v0ca_37783ecc5
build-token-root:151.va_e52fe3215fc
caffeine-api:2.9.3-65.v6a_47d0f4d1fe
checks-api:1.7.4
cloudbees-bitbucket-branch-source:773.v4b_9b_005b_562b_
cloudbees-folder:6.729.v2b_9d1a_74d673
code-coverage-api:3.0.4
command-launcher:84.v4a_97f2027398
config-file-provider:3.11
credentials:1139.veb_9579fca_33b_
credentials-binding:523.vd859a_4b_122e6
data-tables-api:1.12.1-2
display-url-api:2.3.6
docker-commons:1.19
docker-java-api:3.2.13-37.vf3411c9828b9
docker-plugin:1.2.9
docker-workflow:1.29
durable-task:496.va67c6f9eefa7
echarts-api:5.3.3-1
email-ext:2.90
embeddable-build-status:237.v37e2c03964c9
external-monitor-job:191.v363d0d1efdf8
favorite:2.4.1
font-awesome-api:6.1.1-1
forensics-api:1.15.1
git:4.11.3
git-client:3.11.0
git-forensics:1.9.0
git-parameter:0.9.17
gitea:1.4.3
github:1.34.4
github-api:1.303-400.v35c2d8258028
github-branch-source:1677.v731f745ea_0cf
google-oauth-plugin:1.0.6
gravatar:2.2
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953
htmlpublisher:1.30
jackson2-api:2.13.3-285.vc03c0256d517
jakarta-activation-api:2.0.0-3
jakarta-mail-api:2.0.0-6
javax-activation-api:1.2.0-4
javax-mail-api:1.6.2-7
jaxb:2.3.6-1
jdk-tool:1.5
jenkins-design-language:1.25.5
jjwt-api:0.11.5-77.v646c772fddb_0
jobcacher:264.vb_f4770b_79801
jquery:1.12.4-1
jquery3-api:3.6.0-4
jsch:0.1.55.2
junit:1119.1121.vc43d0fc45561
kubernetes:3670.v6ca_059233222
kubernetes-client-api:5.12.2-193.v26a_6078f65a_9
kubernetes-credentials:0.9.0
ldap:2.10
lockable-resources:2.15
mailer:435.v79ef3972b_5c7
matrix-auth:3.1.5
matrix-project:772.v494f19991984
metrics:4.1.6.2
mina-sshd-api-common:2.8.0-30.vf9df64641cb_d
mina-sshd-api-core:2.8.0-30.vf9df64641cb_d
momentjs:1.1.1
mstest:1.0.0
nunit:0.27
oauth-credentials:0.5
okhttp-api:4.9.3-105.vb96869f8ac3a
pam-auth:1.8
pipeline-build-step:2.18
pipeline-graph-analysis:195.v5812d95a_a_2f9
pipeline-groovy-lib:593.va_a_fc25d520e9
pipeline-input-step:449.v77f0e8b_845c4
pipeline-milestone-step:101.vd572fef9d926
pipeline-model-api:2.2114.v2654ca_721309
pipeline-model-definition:2.2114.v2654ca_721309
pipeline-model-extensions:2.2114.v2654ca_721309
pipeline-multibranch-defaults:2.1
pipeline-rest-api:2.24
pipeline-stage-step:293.v200037eefcd5
pipeline-stage-tags-metadata:2.2114.v2654ca_721309
pipeline-stage-view:2.24
pipeline-utility-steps:2.13.0
plain-credentials:1.8
plugin-util-api:2.17.0
popper-api:1.16.1-3
popper2-api:2.11.5-2
prism-api:1.28.0-2
pubsub-light:1.16
saml:2.298.vc7a_2b_3958628
scm-api:608.vfa_f971c5a_a_e9
scoring-load-balancer:1.0.1
script-security:1175.v4b_d517d6db_f0
sidebar-link:2.2.0
simple-theme-plugin:103.va_161d09c38c7
snakeyaml-api:1.30.2-76.vc104f7ce9870
sse-gateway:1.25
ssh-agent:295.v9ca_a_1c7cc3a_a_
ssh-credentials:291.v8211e4f8efb_c
ssh-slaves:1.834.v622da_57f702c
sshd:3.242.va_db_9da_b_26a_c3
structs:318.va_f3ccb_729b_71
timestamper:1.18
token-macro:293.v283932a_0a_b_49
translation:1.16
trilead-api:1.67.vc3938a_35172f
variant:1.4
versioncolumn:2.2
warnings-ng:9.14.0
windows-slaves:1.8.1
workflow-aggregator:590.v6a_d052e5a_a_b_5
workflow-api:1188.v0016b_4f29881
workflow-basic-steps:980.v82219a_ed188e
workflow-cps:2746.v0da_83a_332669
workflow-durable-task-step:1190.vc93d7d457042
workflow-job:1207.ve6191ff089f8
workflow-multibranch:716.vc692a_e52371b_
workflow-scm-step:400.v6b_89a_1317c9a_
workflow-step-api:625.vd896b_f445a_f8
workflow-support:833.va_1c71061486b_

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

Both are on linux.
Official jenkins image for controller and a custom ubuntu based vm as agent with docker and an container based on ubuntu too.

Reproduction steps

stage('frontend') {
  agent {
    docker {
      label 'docker && linux'
      image 'ghcr.visualon.de/visualon/builder:2.4.25@sha256:2d9c2200b8663090f380ab32a5ec3765b56e37894af9489022e70fc313d062e2'
    }
  }

  options {
    cache(caches: [[$class: 'ArbitraryFileCache', cacheValidityDecidingFile: 'yarn.lock', compressionMethod: 'TARGZ', excludes: '', includes: '**/*', path: '.yarn/cache']], defaultBranch: 'main', maxCacheSize: 512)
  }

  steps {
    sh 'yarn install'
  }
}

added that to my job (using yarn v3) and it simply fails

Expected Results

it should ignore the missing folder and cache the files after all steps are done

Actual Results

11:19:12  java.lang.NullPointerException
11:19:12  	at jenkins.plugins.jobcacher.ArbitraryFileCache.resolvePath(ArbitraryFileCache.java:163)
11:19:12  	at jenkins.plugins.jobcacher.ArbitraryFileCache.cache(ArbitraryFileCache.java:146)
11:19:12  	at jenkins.plugins.jobcacher.CacheManager.cache(CacheManager.java:64)
11:19:12  	at jenkins.plugins.jobcacher.pipeline.CacheStep$ExecutionImpl.start(CacheStep.java:113)
11:19:12  	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:322)
11:19:12  	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:196)
11:19:12  	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:124)
11:19:12  	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:47)
11:19:12  	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
11:19:12  	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)

Anything else?

No response

Cannot restoring cache when set cacheValidityDecidingFile

Jenkins and plugins versions report

Environment
Paste the output here

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

Kubernetes Node 16 Agent

Reproduction steps

Screenshot 2022-12-26 at 12 04 52

Expected Results

Cache should be restore without any issue.

Actual Results

Screenshot 2022-12-26 at 11 58 35

Anything else?

It work when i remove: cacheValidityDecidingFile: 'package-lock.json'
Screenshot 2022-12-26 at 12 02 37
Screenshot 2022-12-26 at 12 02 42

No response

Is this plug-in good for concurrent build

Describe your use-case which is not covered by existing documentation.

docker swarm plug-in have same function,but concurrent build Support is not friendly
The project write back cache has been built, which will affect subsequent construction

Machine translation may be inaccurate -- I am not very good at English

Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

No response

s3 upload not working on windows nodes

Jenkins and plugins versions report

Environment
Jenkins: 2.426.1
OS: Linux - 4.14.304-226.531.amzn2.x86_64
Java: 11.0.21 - Amazon.com Inc. (OpenJDK 64-Bit Server VM)
---
amazon-ecr:1.114.vfd22430621f5
analysis-model-api:11.13.0
ant:497.v94e7d9fffa_b_9
antisamy-markup-formatter:162.v0e6ec0fcfcf6
apache-httpcomponents-client-4-api:4.5.14-208.v438351942757
authentication-tokens:1.53.v1c90fd9191a_b_
aws-credentials:218.v1b_e9466ec5da_
aws-java-sdk:1.12.586-413.v6a_6c3a_420126
aws-java-sdk-cloudformation:1.12.586-413.v6a_6c3a_420126
aws-java-sdk-codebuild:1.12.586-413.v6a_6c3a_420126
aws-java-sdk-ec2:1.12.586-413.v6a_6c3a_420126
aws-java-sdk-ecr:1.12.586-413.v6a_6c3a_420126
aws-java-sdk-ecs:1.12.586-413.v6a_6c3a_420126
aws-java-sdk-efs:1.12.586-413.v6a_6c3a_420126
aws-java-sdk-elasticbeanstalk:1.12.586-413.v6a_6c3a_420126
aws-java-sdk-iam:1.12.586-413.v6a_6c3a_420126
aws-java-sdk-kinesis:1.12.586-413.v6a_6c3a_420126
aws-java-sdk-logs:1.12.586-413.v6a_6c3a_420126
aws-java-sdk-minimal:1.12.586-413.v6a_6c3a_420126
aws-java-sdk-secretsmanager:1.12.586-413.v6a_6c3a_420126
aws-java-sdk-sns:1.12.586-413.v6a_6c3a_420126
aws-java-sdk-sqs:1.12.586-413.v6a_6c3a_420126
aws-java-sdk-ssm:1.12.586-413.v6a_6c3a_420126
basic-branch-build-strategies:81.v05e333931c7d
blueocean:1.27.9
blueocean-autofavorite:1.2.5
blueocean-bitbucket-pipeline:1.27.9
blueocean-commons:1.27.9
blueocean-config:1.27.9
blueocean-core-js:1.27.9
blueocean-dashboard:1.27.9
blueocean-display-url:2.4.2
blueocean-events:1.27.9
blueocean-git-pipeline:1.27.9
blueocean-github-pipeline:1.27.9
blueocean-i18n:1.27.9
blueocean-jira:1.27.9
blueocean-jwt:1.27.9
blueocean-personalization:1.27.9
blueocean-pipeline-api-impl:1.27.9
blueocean-pipeline-editor:1.27.9
blueocean-pipeline-scm-api:1.27.9
blueocean-rest:1.27.9
blueocean-rest-impl:1.27.9
blueocean-web:1.27.9
bootstrap5-api:5.3.2-2
bouncycastle-api:2.29
branch-api:2.1135.v8de8e7899051
build-failure-analyzer:2.4.2
build-history-manager:1.7.1
build-timestamp:1.0.3
build-user-vars-plugin:1.9
caffeine-api:3.1.8-133.v17b_1ff2e0599
checks-api:2.0.2
cloudbees-bitbucket-branch-source:856.v04c46c86f911
cloudbees-folder:6.858.v898218f3609d
cloudbees-jenkins-advisor:358.v58972d19b_1f0
code-coverage-api:4.99.0
command-launcher:107.v773860566e2e
commons-httpclient3-api:3.1-3
commons-lang3-api:3.13.0-62.v7d18e55f51e2
commons-text-api:1.11.0-94.v3e1f4a_926e49
conditional-buildstep:1.4.3
coverage:1.6.0
credentials:1309.v8835d63eb_d8a_
credentials-binding:642.v737c34dea_6c2
crowd2:4.2.0
data-tables-api:1.13.8-1
display-url-api:2.200.vb_9327d658781
docker-commons:439.va_3cb_0a_6a_fb_29
docker-workflow:572.v950f58993843
dtkit-api:3.0.2
durable-task:523.va_a_22cf15d5e0
ec2:1648.vf3d852e00486
echarts-api:5.4.3-1
external-monitor-job:215.v2e88e894db_f8
favorite:2.4.3
font-awesome-api:6.5.1-1
forensics-api:2.3.0
git:5.2.1
git-client:4.6.0
git-forensics:2.0.0
git-server:99.va_0826a_b_cdfa_d
github:1.37.3.1
github-api:1.318-461.v7a_c09c9fa_d63
github-branch-source:1752.vc201a_0235d80
groovy:457.v99900cb_85593
handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953
htmlpublisher:1.32
http_request:1.18
influxdb:3.5
instance-identity:185.v303dc7c645f9
ionicons-api:56.v1b_1c8c49374e
jackson2-api:2.15.3-372.v309620682326
jacoco:3.3.5
jakarta-activation-api:2.0.1-3
jakarta-mail-api:2.0.1-3
javadoc:243.vb_b_503b_b_45537
javax-activation-api:1.2.0-6
javax-mail-api:1.6.2-9
jaxb:2.3.9-1
jdk-tool:73.vddf737284550
jenkins-design-language:1.27.9
jersey2-api:2.41-133.va_03323b_a_1396
jira:3.12
jjwt-api:0.11.5-77.v646c772fddb_0
jnr-posix-api:3.1.18-1
job-dsl:1.87
jobcacher:409.vc3fde9f9b_f30
jquery3-api:3.7.1-1
jsch:0.2.8-65.v052c39de79b_2
junit:1240.vf9529b_881428
kubernetes-cli:1.12.1
kubernetes-client-api:6.8.1-224.vd388fca_4db_3b_
kubernetes-credentials:0.11
ldap:711.vb_d1a_491714dc
locale:314.v22ce953dfe9e
lockable-resources:1215.v895f61d7f794
mailer:463.vedf8358e006b_
matrix-auth:3.2.1
matrix-project:818.v7eb_e657db_924
maven-plugin:3.23
mercurial:1260.vdfb_723cdcc81
metrics:4.2.18-442.v02e107157925
mina-sshd-api-common:2.11.0-86.v836f585d47fa_
mina-sshd-api-core:2.11.0-86.v836f585d47fa_
monitoring:1.95.0
mstest:1.0.5
nexus-artifact-uploader:2.14
nexus-jenkins-plugin:3.16.510.v4d23e22cf563
node-iterator-api:55.v3b_77d4032326
okhttp-api:4.11.0-157.v6852a_a_fa_ec11
pam-auth:1.10
parameterized-scheduler:255.v73827fcdf618
performance:951.v5600a_c6422ed
periodicbackup:2.0
pipeline-aws:1.43
pipeline-build-step:516.v8ee60a_81c5b_9
pipeline-github-lib:42.v0739460cda_c4
pipeline-graph-analysis:202.va_d268e64deb_3
pipeline-groovy-lib:689.veec561a_dee13
pipeline-input-step:477.v339683a_8d55e
pipeline-milestone-step:111.v449306f708b_7
pipeline-model-api:2.2151.ve32c9d209a_3f
pipeline-model-definition:2.2151.ve32c9d209a_3f
pipeline-model-extensions:2.2151.ve32c9d209a_3f
pipeline-rest-api:2.34
pipeline-stage-step:305.ve96d0205c1c6
pipeline-stage-tags-metadata:2.2151.ve32c9d209a_3f
pipeline-stage-view:2.34
pipeline-utility-steps:2.16.0
plain-credentials:143.v1b_df8b_d3b_e48
plugin-usage-plugin:4.2
plugin-util-api:3.6.0
prism-api:1.29.0-9
pubsub-light:1.18
resource-disposer:0.23
role-strategy:689.v731678c3e0eb_
run-condition:1.7
scm-api:683.vb_16722fb_b_80b_
script-security:1294.v99333c047434
slack:684.v833089650554
snakeyaml-api:2.2-111.vc6598e30cc65
sonar:2.16.1
sse-gateway:1.26
ssh-agent:346.vda_a_c4f2c8e50
ssh-credentials:308.ve4497b_ccd8f4
ssh-slaves:2.916.vd17b_43357ce4
sshd:3.312.v1c601b_c83b_0e
strict-crumb-issuer:2.1.1
structs:325.vcb_307d2a_2782
support-core:1366.v9d076592655d
timestamper:1.26
token-macro:384.vf35b_f26814ec
trilead-api:2.84.v72119de229b_7
variant:60.v7290fc0eb_b_cd
warnings-ng:10.5.2
windows-slaves:1.8.1
workflow-aggregator:596.v8c21c963d92d
workflow-api:1283.v99c10937efcb_
workflow-basic-steps:1042.ve7b_140c4a_e0c
workflow-cps:3812.vc3031a_b_a_c955
workflow-cps-global-lib:609.vd95673f149b_b
workflow-durable-task-step:1289.v4d3e7b_01546b_
workflow-job:1360.vc6700e3136f5
workflow-multibranch:756.v891d88f2cd46
workflow-scm-step:415.v434365564324
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:865.v43e78cc44e0d
ws-cleanup:0.45
xunit:3.1.3

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

Controller is Linux.
Worker is Windows Server 2022.

Reproduction steps

cache(maxCacheSize: 512, caches: [
    [$class                   : 'ArbitraryFileCache',
     path                     : 'Global',
     compressionMethod        : 'TARGZ',
    ]
],
) {
  sh(script: 'ls -la . || true',
      label: 'test2',
  )
}

Expected Results

Cache (few KB) gets uploaded to AWS S3.

Actual Results

Timeout is triggered after approx. 5min.

17:42:10  [Cache for Global with id 4cc6684df7b4a92b1dec6fce3264fac8] Searching cache in job specific caches...
17:42:10  [Cache for Global with id 4cc6684df7b4a92b1dec6fce3264fac8] Searching cache in default caches...
17:42:10  [Cache for Global with id 4cc6684df7b4a92b1dec6fce3264fac8] Skip restoring cache as no up-to-date cache exists
...
17:48:16  drwxr-xr-x 1 Administrator 197121     0 Dec  4 17:46 Global
17:48:16  -rw-r--r-- 1 Administrator 197121  1033 Dec  4 17:46 Jenkinsfile
...
17:48:32  [Cache for Global with id 4cc6684df7b4a92b1dec6fce3264fac8] Creating cache...
17:53:18  [Cache for Global with id 4cc6684df7b4a92b1dec6fce3264fac8] Failed to create cache
17:53:18  java.lang.InterruptedException
17:53:18  	at java.base/java.lang.Object.wait(Native Method)
17:53:18  	at hudson.remoting.Request.call(Request.java:177)
17:53:18  	at hudson.remoting.Channel.call(Channel.java:1002)
17:53:18  	at hudson.FilePath.act(FilePath.java:1192)
17:53:18  	at hudson.FilePath.act(FilePath.java:1181)
17:53:18  	at jenkins.plugins.itemstorage.s3.S3Profile.upload(S3Profile.java:69)
17:53:18  	at jenkins.plugins.itemstorage.s3.S3ObjectPath.copyFrom(S3ObjectPath.java:75)
17:53:18  	at jenkins.plugins.jobcacher.arbitrary.AbstractCompressingArbitraryFileCacheStrategy.cache(AbstractCompressingArbitraryFileCacheStrategy.java:20)
17:53:18  	at jenkins.plugins.jobcacher.ArbitraryFileCache$SaverImpl.save(ArbitraryFileCache.java:383)
17:53:18  	at jenkins.plugins.jobcacher.CacheManager.save(CacheManager.java:96)
17:53:18  	at jenkins.plugins.jobcacher.pipeline.CacheStepExecution$ExecutionCallback.complete(CacheStepExecution.java:101)
17:53:18  	at jenkins.plugins.jobcacher.pipeline.CacheStepExecution$ExecutionCallback.onSuccess(CacheStepExecution.java:78)
17:53:18  	at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:375)
17:53:18  	at com.cloudbees.groovy.cps.impl.LocalVariableBlock$LocalVariable.get(LocalVariableBlock.java:39)
17:53:18  	at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
17:53:18  	at com.cloudbees.groovy.cps.impl.LocalVariableBlock.evalLValue(LocalVariableBlock.java:28)
17:53:18  	at com.cloudbees.groovy.cps.LValueBlock$BlockImpl.eval(LValueBlock.java:55)
17:53:18  	at com.cloudbees.groovy.cps.LValueBlock.eval(LValueBlock.java:16)
17:53:18  	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
17:53:18  	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:152)
17:53:18  	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:146)
17:53:18  	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
17:53:18  	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
17:53:18  	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:146)
17:53:18  	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
17:53:18  	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
17:53:18  	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:187)
17:53:18  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:423)
17:53:18  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:331)
17:53:18  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:295)
17:53:18  	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:97)
17:53:18  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
17:53:18  	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
17:53:18  	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
17:53:18  	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
17:53:18  	at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)
17:53:18  	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
17:53:18  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
17:53:18  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
17:53:18  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
17:53:18  	at java.base/java.lang.Thread.run(Thread.java:829)
...



Anything else?

Cache upload is working on linux nodes without problems

Are you interested in contributing a fix?

No response

Ability to create a cache for a different job

What feature do you want to see added?

We have a use case where we build 15 modules on react, the steps and codebase are the same, only the name of the module changes, we run all 15 in parallel using the build jobs declarative step.

What I'd like to request is the ability to run a "cache generator" pipeline which will use the steps like yarn install to create the cache and then save it for use by another job.

Upstream changes

No response

Missing documentation on any dependent plugins

Describe your use-case which is not covered by existing documentation.

I was alerted by another engineer that there were issues they were encountering that ended up being traced back to this plugin.

Seems like JobCacher requires the installation of some dependent plugins, but I can't see this anywhere in the docs, be great if we added some information on any dependent plugins that need installing as pre-requisites to using this. Currently not using S3 or Amazon credentials FWIW.

Processing DSL script jobs/addDependabotAndWorkflows.groovy
FATAL: com/cloudbees/jenkins/plugins/awscredentials/AmazonWebServicesCredentials
java.lang.ClassNotFoundException: com.cloudbees.jenkins.plugins.awscredentials.AmazonWebServicesCredentials
	at hudson.ClassicPluginStrategy$DependencyClassLoader.findClass(ClassicPluginStrategy.java:668)

An alternative solution could be only importing this plugin if using Amazon storage? (I'm not a plugin author and am using Jenkins in a work context so not sure if this is possible.)

Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

No response

Faster compression methods

What feature do you want to see added?

I would like to use the cache with faster compression methods and sometimes without compression - to optimize for speed.

For example, we would like to use this cache-plugin to cache the ".m2/repository" directory, which mostly contains already compressed files.

Upstream changes

No response

Support S3 multipart upload API operation

What feature do you want to see added?

We got an error when uploading large cache using S3, this is because of the limit using single PUT request of 5 GB. It would be good to use multipart upload.

com.amazonaws.services.s3.model.AmazonS3Exception: Your proposed upload exceeds the maximum allowed size Service: Amazon S3; Status Code: 400; Error Code: EntityTooLarge;

Upstream changes

No response

No jenkins.plugins.itemstorage.ItemStorage implementation found for nonAWSS3

Jenkins and plugins versions report

Environment
Plugin version 399.v12d4fa_dd3db_d
Jenkins version 2.401.3

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

Jenkins running in Kubernetes via https://charts.jenkins.io/jenkins, chart version 4.3.23

Reproduction steps

  1. Install plugin
  2. Go to /manage/configure โ†’ Storage implementation โ†’ Jenkins controller is only available option in dropdown list
  3. Add configuration:
                unclassified:
                  ...
                  globalItemStorage:
                    storage:
                      nonAWSS3:
                        bucketName: jenkins-job-cacher
                        credentialsId: job-cacher-hmac-key
                        endpoint: https://storage.googleapis.com
                        parallelDownloads: false
                        pathStyleAccess: false
  1. Check Jenkins logs, notice No jenkins.plugins.itemstorage.ItemStorage implementation found for nonAWSS3

Expected Results

S3 and nonAWSS3 are configurable storage implementations for plugin

Actual Results

  • Jenkins controller is only available option in dropdown list for Storage implementation
  • No jenkins.plugins.itemstorage.ItemStorage implementation found for nonAWSS3

Anything else?

No response

Continue even if cache can not be restored

What feature do you want to see added?

If there is a failure when recovering the cache (let's say cache was corrupt), the builds will always fail. The only solution is to manually delete the cache at the controller (we are not using s3).

It would be nice if the plugin just stated a warning, and continued without that cache.

Build output:

[Pipeline] cache
[2022-10-26T18:35:15.059Z] [Cache for /var/jenkins_home/.m2/repository] Found cache in default caches
[2022-10-26T18:35:15.059Z] [Cache for /var/jenkins_home/.m2/repository] Restoring cache...
java.io.IOException: invalid stored block lengths
	at com.jcraft.jzlib.InflaterInputStream.read(InflaterInputStream.java:112)
	at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:738)
	at java.base/java.io.InputStream.read(InputStream.java:205)
	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1309)
	at org.apache.commons.io.IOUtils.copy(IOUtils.java:978)
	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1282)
	at org.apache.commons.io.IOUtils.copy(IOUtils.java:953)
	at hudson.util.IOUtils.copy(IOUtils.java:52)
	at hudson.FilePath.readFromTar(FilePath.java:2972)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from XXXX/XXX:XXX
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
		at hudson.remoting.Channel.call(Channel.java:1000)
		at hudson.FilePath.act(FilePath.java:1186)
		at hudson.FilePath.act(FilePath.java:1175)
		at hudson.FilePath.untar(FilePath.java:623)
		at jenkins.plugins.jobcacher.arbitrary.TarGzArbitraryFileCacheStrategy.uncompress(TarGzArbitraryFileCacheStrategy.java:24)
		at jenkins.plugins.jobcacher.arbitrary.AbstractCompressingArbitraryFileCacheStrategy.restore(AbstractCompressingArbitraryFileCacheStrategy.java:30)
		at jenkins.plugins.jobcacher.ArbitraryFileCache.cache(ArbitraryFileCache.java:155)
		at jenkins.plugins.jobcacher.CacheManager.cache(CacheManager.java:64)
		at jenkins.plugins.jobcacher.pipeline.CacheStep$ExecutionImpl.start(CacheStep.java:113)
		at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:322)
		at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:196)
		at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:124)
		at jdk.internal.reflect.GeneratedMethodAccessor3892.invoke(Unknown Source)
		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.base/java.lang.reflect.Method.invoke(Method.java:566)
		at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
		at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
		at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225)
		at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
		at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:41)
		at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
		at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
		at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163)
		at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
		at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:158)
		at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161)
		at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165)
		at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
		at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
		at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
		at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
		at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83)
		at jdk.internal.reflect.GeneratedMethodAccessor421.invoke(Unknown Source)
		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.base/java.lang.reflect.Method.invoke(Method.java:566)
		at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
		at com.cloudbees.groovy.cps.impl.ClosureBlock.eval(ClosureBlock.java:46)
		at com.cloudbees.groovy.cps.Next.step(Next.java:83)
		at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
		at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
		at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
		at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
		at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
		at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
		at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
		at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:187)
		at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:420)
		at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:95)
		at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330)
		at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294)
		at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
		at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:30)
		at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:70)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
Caused: java.io.IOException: Failed to extract aa627a97bc051a86b871ccceaeec6ed011717227952234370185.tgz
	at hudson.FilePath.readFromTar(FilePath.java:2982)
	at hudson.FilePath$UntarLocal.invoke(FilePath.java:658)
	at hudson.FilePath$UntarLocal.invoke(FilePath.java:647)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:376)
	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:121)
	at java.base/java.lang.Thread.run(Thread.java:829)

Upstream changes

No response

java.lang.InterruptedException while using jobcacher plugin

Jenkins and plugins versions report

Environment
Paste the output here

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

linux - docker

Reproduction steps

Hi Team,
we are using this cache plugin but getting the below error. please advise here

java.lang.InterruptedException
at java.base/java.lang.Object.wait(Native Method)
at hudson.remoting.Request.call(Request.java:177)
at hudson.remoting.Channel.call(Channel.java:1000)
at hudson.FilePath.act(FilePath.java:1164)
at hudson.FilePath.act(FilePath.java:1153)
at jenkins.plugins.jobcacher.arbitrary.TarGzArbitraryFileCacheStrategy.compress(TarGzArbitraryFileCacheStrategy.java:29)
at jenkins.plugins.jobcacher.arbitrary.AbstractCompressingArbitraryFileCacheStrategy.cache(AbstractCompressingArbitraryFileCacheStrategy.java:19)
at jenkins.plugins.jobcacher.ArbitraryFileCache$SaverImpl.save(ArbitraryFileCache.java:272)
at jenkins.plugins.jobcacher.CacheManager.save(CacheManager.java:99)
at jenkins.plugins.jobcacher.pipeline.CacheStep$ExecutionCallback.complete(CacheStep.java:167)

Expected Results

Working as expected

Actual Results

Working as expected

Anything else?

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.