[JENKINS-75679] FilePathPickle deprecated#351
Merged
jglick merged 5 commits intojenkinsci:masterfrom May 30, 2025
Merged
Conversation
jglick
commented
May 29, 2025
| }); | ||
| @SuppressWarnings("deprecation") | ||
| var verboten = FilePathPickle.class.getName(); | ||
| assertThat(StringEscapeUtils.escapeJava(Files.readString(rr.getHome().toPath().resolve("jobs/p/builds/1/program.dat"), StandardCharsets.ISO_8859_1)), not(containsString(verboten))); |
jglick
commented
May 29, 2025
| } | ||
| } | ||
|
|
||
| private static final class SSHAgentContainer extends GenericContainer<SSHAgentContainer> { |
Member
Author
There was a problem hiding this comment.
A handy utility (superseding the agent support in docker-fixtures) that we might want to publish somewhere. Maybe in JTH though that would then need an optional dep on testcontainers which may be undesirable.
Member
There was a problem hiding this comment.
Could go in its own repo, something akin to a Jenkins version of https://github.com/dasniko/testcontainers-keycloak
Member
Author
There was a problem hiding this comment.
I am currently prototyping something.
amuniz
approved these changes
May 30, 2025
jglick
commented
May 30, 2025
Comment on lines
+266
to
+269
| var creds = new BasicSSHUserPrivateKey(CredentialsScope.GLOBAL, null, "jenkins", new BasicSSHUserPrivateKey.DirectEntryPrivateKeySource(priv), null, null); | ||
| CredentialsProvider.lookupStores(Jenkins.get()).iterator().next().addCredentials(Domain.global(), creds); | ||
| var port = getMappedPort(22); | ||
| Jenkins.get().addNode(new DumbSlave(name, "/home/jenkins/agent", new SSHLauncher(getHost(), port, creds.getId()))); |
Member
Author
There was a problem hiding this comment.
(For use with RealJenkinsRule, would need a bit of refactoring to bind name, host, port, and priv in a record.)
This was referenced Jul 14, 2025
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.
https://issues.jenkins.io/browse/JENKINS-75679
Fixing this for new code in conjunction with
docker-commonsis straightforward (KeyMaterial.closeneeds to take a contextualVirtualChannelto reconstruct paths on the agent), butAbstractEndpointStepExecution2.Expander/.Callbackfrom builds running across the upgrade.KeyMaterial/KeyMaterialFactoryoutside a Pipeline context, so the API cannot be changed incompatibly: