-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
-
710.v4b_94b_077a_808
Environments:
- Jenkins Version: 2.346.3
- Plugin Version: 612.v84da_9c54906d
Steps:
- Turn on cache for 'Global Pipeline Libraries' in 'Configure System' and specify a refresh interval greater than 0.
- Cache expiration detected, the plugin deletes the existing cache folder and creates a new empty cache folder with the name generated from some hash function.
- The plugin fails to fetch library from GitHub repository (e.g. the GitHub server is under maintenance).
- All subsequent pipelines trying to load the library from the cache folder fail with following errors.
Loading library some_library_name@some_tag_version Library some_library_name@some_tag_version is cached. Copying from home. ERROR: Library shared-lib expected to contain at least one of src or vars directories org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed
By navigating to '$JENKINS_HOME/global-libraries-cache', the cache folder is there but the contents are corrupted.
Only after next expiration, the plugin will attempt another try to refresh the cache. The situation is even worse when the refresh interval is relatively long.
The root cause is that the plugin determines the existence of a library cache by checking the existence of the cache folder and uses the modification time of the cache folder to determine if the cache has expired, regardless of the content of the folder.
The improvement I'd suggest is that removing the newly created cache folder if the plugin fails to fetch libraries, to let the next pipeline have the chance to re-create the cache, rather than to wait for next cache expiration.
- duplicates
-
JENKINS-72287 Shared Global Libraries Cache Issues
-
- Closed
-
- is duplicated by
-
JENKINS-72996 Shared Library cache is broken when build is aborted during scm retrieve
-
- Closed
-
- is related to
-
JENKINS-73769 Handle empty global libraries and change libraryPath
-
- Resolved
-
[JENKINS-69573] Cache of Global Pipeline Libraries May Fail to Be Created Until Next Expiration
Issue Type | Original: New Feature [ 2 ] | New: Bug [ 1 ] |
Summary | Original: Cache of Global Pipeline Libraries May Fail to Be Created Until Expiration | New: Cache of Global Pipeline Libraries May Fail to Be Created Until Next Expiration |
Description |
Original:
Steps:
# Turn on cache for 'Global Pipeline Libraries' in 'Configure System' and specify a refresh interval greater than 0. # Cache expiration detected and the plugin deletes the existing cache folder and creates a new empty cache folder with the name generated from some hash function. # Jenkins fails to fetch library from GitHub repository (e.g. the GitHub server is under maintenance). # All subsequents pipelines trying to load the library from the cache folder fails with following errors. {code:java} Loading library some_library_name@some_tag_version Library some_library_name@some_tag_version is cached. Copying from home. ERROR: Library shared-lib expected to contain at least one of src or vars directories org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed {code} # By navigating to '$JENKINS_HOME/global-libraries-cache', the cache folder is there but it's empty. Only after next expiration, the plugin will attempt another try to refresh the cache. The situation is even worse when the refresh interval is relatively long. The root cause is that the plugin use the modification time of the cache folder to determine if the cache has expired, regardless of the content of the folder. The improvement I'd suggest is that removing the newly created cache folder if the plugin fails to fetch libraries. |
New:
Steps:
# Turn on cache for 'Global Pipeline Libraries' in 'Configure System' and specify a refresh interval greater than 0. # Cache expiration detected, the plugin deletes the existing cache folder and creates a new empty cache folder with the name generated from some hash function. # Jenkins fails to fetch library from GitHub repository (e.g. the GitHub server is under maintenance). # All subsequents pipelines trying to load the library from the cache folder fails with following errors. {code:java} Loading library some_library_name@some_tag_version Library some_library_name@some_tag_version is cached. Copying from home. ERROR: Library shared-lib expected to contain at least one of src or vars directories org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed {code} # By navigating to '$JENKINS_HOME/global-libraries-cache', the cache folder is there but it's empty. Only after next expiration, the plugin will attempt another try to refresh the cache. The situation is even worse when the refresh interval is relatively long. The root cause is that the plugin use the modification time of the cache folder to determine if the cache has expired, regardless of the content of the folder. The improvement I'd suggest is that removing the newly created cache folder if the plugin fails to fetch libraries. |
Description |
Original:
Steps:
# Turn on cache for 'Global Pipeline Libraries' in 'Configure System' and specify a refresh interval greater than 0. # Cache expiration detected, the plugin deletes the existing cache folder and creates a new empty cache folder with the name generated from some hash function. # Jenkins fails to fetch library from GitHub repository (e.g. the GitHub server is under maintenance). # All subsequents pipelines trying to load the library from the cache folder fails with following errors. {code:java} Loading library some_library_name@some_tag_version Library some_library_name@some_tag_version is cached. Copying from home. ERROR: Library shared-lib expected to contain at least one of src or vars directories org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed {code} # By navigating to '$JENKINS_HOME/global-libraries-cache', the cache folder is there but it's empty. Only after next expiration, the plugin will attempt another try to refresh the cache. The situation is even worse when the refresh interval is relatively long. The root cause is that the plugin use the modification time of the cache folder to determine if the cache has expired, regardless of the content of the folder. The improvement I'd suggest is that removing the newly created cache folder if the plugin fails to fetch libraries. |
New:
Steps:
# Turn on cache for 'Global Pipeline Libraries' in 'Configure System' and specify a refresh interval greater than 0. # Cache expiration detected, the plugin deletes the existing cache folder and creates a new empty cache folder with the name generated from some hash function. # Jenkins fails to fetch library from GitHub repository (e.g. the GitHub server is under maintenance). # All subsequent pipelines trying to load the library from the cache folder fails with following errors. {code:java} Loading library some_library_name@some_tag_version Library some_library_name@some_tag_version is cached. Copying from home. ERROR: Library shared-lib expected to contain at least one of src or vars directories org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed {code} # By navigating to '$JENKINS_HOME/global-libraries-cache', the cache folder is there but it's empty. Only after next expiration, the plugin will attempt another try to refresh the cache. The situation is even worse when the refresh interval is relatively long. The root cause is that the plugin use the modification time of the cache folder to determine if the cache has expired, regardless of the content of the folder. The improvement I'd suggest is that removing the newly created cache folder if the plugin fails to fetch libraries. |
Description |
Original:
Steps:
# Turn on cache for 'Global Pipeline Libraries' in 'Configure System' and specify a refresh interval greater than 0. # Cache expiration detected, the plugin deletes the existing cache folder and creates a new empty cache folder with the name generated from some hash function. # Jenkins fails to fetch library from GitHub repository (e.g. the GitHub server is under maintenance). # All subsequent pipelines trying to load the library from the cache folder fails with following errors. {code:java} Loading library some_library_name@some_tag_version Library some_library_name@some_tag_version is cached. Copying from home. ERROR: Library shared-lib expected to contain at least one of src or vars directories org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed {code} # By navigating to '$JENKINS_HOME/global-libraries-cache', the cache folder is there but it's empty. Only after next expiration, the plugin will attempt another try to refresh the cache. The situation is even worse when the refresh interval is relatively long. The root cause is that the plugin use the modification time of the cache folder to determine if the cache has expired, regardless of the content of the folder. The improvement I'd suggest is that removing the newly created cache folder if the plugin fails to fetch libraries. |
New:
Steps:
# Turn on cache for 'Global Pipeline Libraries' in 'Configure System' and specify a refresh interval greater than 0. # Cache expiration detected, the plugin deletes the existing cache folder and creates a new empty cache folder with the name generated from some hash function. # Jenkins fails to fetch library from GitHub repository (e.g. the GitHub server is under maintenance). # All subsequent pipelines trying to load the library from the cache folder fails with following errors. {code:java} Loading library some_library_name@some_tag_version Library some_library_name@some_tag_version is cached. Copying from home. ERROR: Library shared-lib expected to contain at least one of src or vars directories org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed {code} # By navigating to '$JENKINS_HOME/global-libraries-cache', the cache folder is there but it's empty. Only after next expiration, the plugin will attempt another try to refresh the cache. The situation is even worse when the refresh interval is relatively long. The root cause is that the plugin use the modification time of the cache folder to determine if the cache has expired, regardless of the content of the folder. The improvement I'd suggest is that removing the newly created cache folder if the plugin fails to fetch libraries, to let the next pipeline have the chance to re-create the cache, rather than to wait for next expiration. |
Description |
Original:
Steps:
# Turn on cache for 'Global Pipeline Libraries' in 'Configure System' and specify a refresh interval greater than 0. # Cache expiration detected, the plugin deletes the existing cache folder and creates a new empty cache folder with the name generated from some hash function. # Jenkins fails to fetch library from GitHub repository (e.g. the GitHub server is under maintenance). # All subsequent pipelines trying to load the library from the cache folder fails with following errors. {code:java} Loading library some_library_name@some_tag_version Library some_library_name@some_tag_version is cached. Copying from home. ERROR: Library shared-lib expected to contain at least one of src or vars directories org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed {code} # By navigating to '$JENKINS_HOME/global-libraries-cache', the cache folder is there but it's empty. Only after next expiration, the plugin will attempt another try to refresh the cache. The situation is even worse when the refresh interval is relatively long. The root cause is that the plugin use the modification time of the cache folder to determine if the cache has expired, regardless of the content of the folder. The improvement I'd suggest is that removing the newly created cache folder if the plugin fails to fetch libraries, to let the next pipeline have the chance to re-create the cache, rather than to wait for next expiration. |
New:
Steps:
# Turn on cache for 'Global Pipeline Libraries' in 'Configure System' and specify a refresh interval greater than 0. # Cache expiration detected, the plugin deletes the existing cache folder and creates a new empty cache folder with the name generated from some hash function. # Jenkins fails to fetch library from GitHub repository (e.g. the GitHub server is under maintenance). # All subsequent pipelines trying to load the library from the cache folder fails with following errors. {code:java} Loading library some_library_name@some_tag_version Library some_library_name@some_tag_version is cached. Copying from home. ERROR: Library shared-lib expected to contain at least one of src or vars directories org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed {code} # By navigating to '$JENKINS_HOME/global-libraries-cache', the cache folder is there but it's empty. Only after next expiration, the plugin will attempt another try to refresh the cache. The situation is even worse when the refresh interval is relatively long. The root cause is that the plugin use the modification time of the cache folder to determine if the cache has expired, regardless of the content of the folder. The improvement I'd suggest is that removing the newly created cache folder if the plugin fails to fetch libraries, to let the next pipeline have the chance to re-create the cache, rather than to wait for next cache expiration. |
Description |
Original:
Steps:
# Turn on cache for 'Global Pipeline Libraries' in 'Configure System' and specify a refresh interval greater than 0. # Cache expiration detected, the plugin deletes the existing cache folder and creates a new empty cache folder with the name generated from some hash function. # Jenkins fails to fetch library from GitHub repository (e.g. the GitHub server is under maintenance). # All subsequent pipelines trying to load the library from the cache folder fails with following errors. {code:java} Loading library some_library_name@some_tag_version Library some_library_name@some_tag_version is cached. Copying from home. ERROR: Library shared-lib expected to contain at least one of src or vars directories org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed {code} # By navigating to '$JENKINS_HOME/global-libraries-cache', the cache folder is there but it's empty. Only after next expiration, the plugin will attempt another try to refresh the cache. The situation is even worse when the refresh interval is relatively long. The root cause is that the plugin use the modification time of the cache folder to determine if the cache has expired, regardless of the content of the folder. The improvement I'd suggest is that removing the newly created cache folder if the plugin fails to fetch libraries, to let the next pipeline have the chance to re-create the cache, rather than to wait for next cache expiration. |
New:
Steps:
# Turn on cache for 'Global Pipeline Libraries' in 'Configure System' and specify a refresh interval greater than 0. # Cache expiration detected, the plugin deletes the existing cache folder and creates a new empty cache folder with the name generated from some hash function. # The plugin fails to fetch library from GitHub repository (e.g. the GitHub server is under maintenance). # All subsequent pipelines trying to load the library from the cache folder fails with following errors. {code:java} Loading library some_library_name@some_tag_version Library some_library_name@some_tag_version is cached. Copying from home. ERROR: Library shared-lib expected to contain at least one of src or vars directories org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed {code} # By navigating to '$JENKINS_HOME/global-libraries-cache', the cache folder is there but it's empty. Only after next expiration, the plugin will attempt another try to refresh the cache. The situation is even worse when the refresh interval is relatively long. The root cause is that the plugin use the modification time of the cache folder to determine if the cache has expired, regardless of the content of the folder. The improvement I'd suggest is that removing the newly created cache folder if the plugin fails to fetch libraries, to let the next pipeline have the chance to re-create the cache, rather than to wait for next cache expiration. |
Description |
Original:
Steps:
# Turn on cache for 'Global Pipeline Libraries' in 'Configure System' and specify a refresh interval greater than 0. # Cache expiration detected, the plugin deletes the existing cache folder and creates a new empty cache folder with the name generated from some hash function. # The plugin fails to fetch library from GitHub repository (e.g. the GitHub server is under maintenance). # All subsequent pipelines trying to load the library from the cache folder fails with following errors. {code:java} Loading library some_library_name@some_tag_version Library some_library_name@some_tag_version is cached. Copying from home. ERROR: Library shared-lib expected to contain at least one of src or vars directories org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed {code} # By navigating to '$JENKINS_HOME/global-libraries-cache', the cache folder is there but it's empty. Only after next expiration, the plugin will attempt another try to refresh the cache. The situation is even worse when the refresh interval is relatively long. The root cause is that the plugin use the modification time of the cache folder to determine if the cache has expired, regardless of the content of the folder. The improvement I'd suggest is that removing the newly created cache folder if the plugin fails to fetch libraries, to let the next pipeline have the chance to re-create the cache, rather than to wait for next cache expiration. |
New:
Steps:
# Turn on cache for 'Global Pipeline Libraries' in 'Configure System' and specify a refresh interval greater than 0. # Cache expiration detected, the plugin deletes the existing cache folder and creates a new empty cache folder with the name generated from some hash function. # The plugin fails to fetch library from GitHub repository (e.g. the GitHub server is under maintenance). # All subsequent pipelines trying to load the library from the cache folder fail with following errors. {code:java} Loading library some_library_name@some_tag_version Library some_library_name@some_tag_version is cached. Copying from home. ERROR: Library shared-lib expected to contain at least one of src or vars directories org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed {code} # By navigating to '$JENKINS_HOME/global-libraries-cache', the cache folder is there but it's empty. Only after next expiration, the plugin will attempt another try to refresh the cache. The situation is even worse when the refresh interval is relatively long. The root cause is that the plugin use the modification time of the cache folder to determine if the cache has expired, regardless of the content of the folder. The improvement I'd suggest is that removing the newly created cache folder if the plugin fails to fetch libraries, to let the next pipeline have the chance to re-create the cache, rather than to wait for next cache expiration. |
Description |
Original:
Steps:
# Turn on cache for 'Global Pipeline Libraries' in 'Configure System' and specify a refresh interval greater than 0. # Cache expiration detected, the plugin deletes the existing cache folder and creates a new empty cache folder with the name generated from some hash function. # The plugin fails to fetch library from GitHub repository (e.g. the GitHub server is under maintenance). # All subsequent pipelines trying to load the library from the cache folder fail with following errors. {code:java} Loading library some_library_name@some_tag_version Library some_library_name@some_tag_version is cached. Copying from home. ERROR: Library shared-lib expected to contain at least one of src or vars directories org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed {code} # By navigating to '$JENKINS_HOME/global-libraries-cache', the cache folder is there but it's empty. Only after next expiration, the plugin will attempt another try to refresh the cache. The situation is even worse when the refresh interval is relatively long. The root cause is that the plugin use the modification time of the cache folder to determine if the cache has expired, regardless of the content of the folder. The improvement I'd suggest is that removing the newly created cache folder if the plugin fails to fetch libraries, to let the next pipeline have the chance to re-create the cache, rather than to wait for next cache expiration. |
New:
Steps:
# Turn on cache for 'Global Pipeline Libraries' in 'Configure System' and specify a refresh interval greater than 0. # Cache expiration detected, the plugin deletes the existing cache folder and creates a new empty cache folder with the name generated from some hash function. # The plugin fails to fetch library from GitHub repository (e.g. the GitHub server is under maintenance). # All subsequent pipelines trying to load the library from the cache folder fail with following errors. {code:java} Loading library some_library_name@some_tag_version Library some_library_name@some_tag_version is cached. Copying from home. ERROR: Library shared-lib expected to contain at least one of src or vars directories org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed {code} # By navigating to '$JENKINS_HOME/global-libraries-cache', the cache folder is there but it's empty. Only after next expiration, the plugin will attempt another try to refresh the cache. The situation is even worse when the refresh interval is relatively long. The root cause is that the plugin determines the existence of a library cache by checking the existence of the cache folder and use the modification time of the cache folder to determine if the cache has expired, regardless of the content of the folder. The improvement I'd suggest is that removing the newly created cache folder if the plugin fails to fetch libraries, to let the next pipeline have the chance to re-create the cache, rather than to wait for next cache expiration. |