You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It has been observed that the library makes more repository queries than necessary, which is redundant unless the libraries are stored in different remote repositories. However, each repository only needs to be queried once, and its content should be cached and associated with the execution to avoid impacting future or concurrent runs. This will shorten the initialization time for pipelines using the library
How Has This Been Tested
Tests are conducted on different types of pipelines, including multibranch and simple pipelines, to analyze the previous behavior. The results show a significant reduction in pipeline initialization time
Java 21
Jenkins 2.462.2
This behavior only affects how remote repositories are queried when the libraries come from a source control management (SCM) system.
Types of Changes
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Added Unit Testing
Docs change / refactoring / dependency upgrade
Breaking change (fix or feature that would cause existing functionality to change)
Checklist
I have added the appropriate label for this PR
If necessary, I have updated the documentation accordingly.
I tested it with [2.492.1] and Java 21 but getting this exception when JTE library are loading:
[JTE] Pipeline Configuration Modifications
[JTE] Loading scm: git https://github.com/xyx/test-project.git from cache
java.io.IOException: Closed
at PluginClassLoader for github-branch-source//org.jenkinsci.plugins.github_branch_source.GitHubSCMFile.checkOpen(GitHubSCMFile.java:83)
at PluginClassLoader for github-branch-source//org.jenkinsci.plugins.github_branch_source.GitHubSCMFile.metadata(GitHubSCMFile.java:108)
at PluginClassLoader for github-branch-source//org.jenkinsci.plugins.github_branch_source.GitHubSCMFile.type(GitHubSCMFile.java:166)
at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.getType(SCMFile.java:265)
at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.exists(SCMFile.java:224)
at jenkins.scm.api.SCMFile$exists.call(Unknown Source)
at PluginClassLoader for templating-engine//org.boozallen.plugins.jte.util.FileSystemWrapper.getFileContents(FileSystemWrapper.groovy:41)
at org.boozallen.plugins.jte.util.FileSystemWrapper$getFileContents$0.call(Unknown Source)
at PluginClassLoader for templating-engine//org.boozallen.plugins.jte.job.MultibranchTemplateFlowDefinition.getTemplate(MultibranchTemplateFlowDefinition.groovy:90)
at org.boozallen.plugins.jte.job.MultibranchTemplateFlowDefinition$getTemplate$0.call(Unknown Source)
at PluginClassLoader for templating-engine//org.boozallen.plugins.jte.init.PipelineTemplateResolver.resolve(PipelineTemplateResolver.groovy:45)
at org.boozallen.plugins.jte.init.PipelineTemplateResolver$resolve.call(Unknown Source)
at PluginClassLoader for templating-engine//org.boozallen.plugins.jte.job.TemplateFlowDefinition.create(TemplateFlowDefinition.groovy:80)
at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:446)
[withMaven] downstreamPipelineTriggerRunListener - Failure to introspect build steps: java.io.IOException: xyz/test-project/discover #67 did not yet start
[withMaven] downstreamPipelineTriggerRunListener - Failure to introspect build steps: java.io.IOException: xyz/test-project/discover #67 did not yet start
Finished: FAILURE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Details
Description
It has been observed that the library makes more repository queries than necessary, which is redundant unless the libraries are stored in different remote repositories. However, each repository only needs to be queried once, and its content should be cached and associated with the execution to avoid impacting future or concurrent runs. This will shorten the initialization time for pipelines using the library
How Has This Been Tested
Tests are conducted on different types of pipelines, including multibranch and simple pipelines, to analyze the previous behavior. The results show a significant reduction in pipeline initialization time
This behavior only affects how remote repositories are queried when the libraries come from a source control management (SCM) system.
Types of Changes
Checklist