JENKINS-75644 Cache project resolution after UUID fallback#962
Open
tzachs wants to merge 1 commit into
Open
Conversation
fccae97 to
5167218
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Cache project resolution after UUID fallback to avoid repeated scans when rendering Uno-Choice parameters.
When an
AbstractScriptableParametercannot determine its owning job from the current request or from a known project name/full name, it falls back to resolving the job by the parameter UUID. This change caches the resolved project name and full name after that fallback succeeds, so subsequent evaluations can use direct lookup instead of scanning Jenkins items again.A focused test was added in
TestProjectResolutionCaching.java. It verifies that the parameter starts withprojectNameandprojectFullNameunset, that callinggetChoices()forces project resolution through the UUID path, and that the newprojectNameCacheandprojectFullNameCachefields are populated afterward.Testing done
TestProjectResolutionCaching.javafor the new caching behavior after UUID-based project resolution.rememberProject(...)path inAbstractScriptableParameter.java.mvn: command not found).Submitter checklist