Skip to content

[JENKINS-28689] Make compatible with Workflow plugin#4

Merged
stephenc merged 31 commits intojenkinsci:masterfrom
recena:JENKINS-28689
Aug 5, 2015
Merged

[JENKINS-28689] Make compatible with Workflow plugin#4
stephenc merged 31 commits intojenkinsci:masterfrom
recena:JENKINS-28689

Conversation

@recena
Copy link
Contributor

@recena recena commented Jul 16, 2015

Downstream of jenkinsci/pipeline-plugin#161

https://issues.jenkins-ci.org/browse/JENKINS-28689

  • Initial source code modifications
  • Implement a basic mocked SSH Server
  • Add a test to verify that SSH Agent is working how we expect
  • Add a test to verify that SSH Agent is working how we expect using a Workflow script
  • Implement SSHAgentStep, DescriptorImpl and SSHAgentExecution
  • Review the documentation
  • Add more tests
  • Snippet Generator must work

@recena recena changed the title [JENKINS-28689] Make compatible with Workflow plugin [WiP] [JENKINS-28689] Make compatible with Workflow plugin Jul 16, 2015
@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@recena recena closed this Jul 23, 2015
@recena recena reopened this Jul 23, 2015
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extending ExternalResource and using a @Rule would be better style.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Though beware that I recall some problem with RestartableJenkinsRule not handling @Before/@After. Not sure if that also applies to extra @Rules.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jglick I checked, does not work fine. I decided to remove it.

@stephenc
Copy link
Member

stephenc commented Aug 5, 2015

🐛 the serialVersionUID fields are incorrect. I have supplied the correct values for the three that I found:

com.cloudbees.jenkins.plugins.sshagent.mina.MinaRemoteAgentStarter:    private static final long serialVersionUID = -3757105406876098311L;
com.cloudbees.jenkins.plugins.sshagent.mina.MinaRemoteAgentFactory.TomcatNativeInstalled:    private static final long serialVersionUID = 3234893369850673438L;
com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentStarter:    private static final long serialVersionUID = 5020446864184061252L;

@recena
Copy link
Contributor Author

recena commented Aug 5, 2015

@stephenc The Serial Version UIDs has been reviewed. I have to investigate how the JVM works in theses cases.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐜 normally I would include a comment to explain that this was generated from the 1.7 version of the class and also include a @since 1.8 javadoc comment, e.g.

/**
 * Ensure consistent serialization. Value generated from the 1.7 release.
 * @since 1.8
 */

@stephenc
Copy link
Member

stephenc commented Aug 5, 2015

I've only 🐜s so here is my 🐝 (obviously I'd prefer if you fix the 🐜s but I am no longer blocking on the changes proposed)

@recena
Copy link
Contributor Author

recena commented Aug 5, 2015

@stephenc I don' like 🐜 in my PRs ;)

@stephenc
Copy link
Member

stephenc commented Aug 5, 2015

🐝

@jglick
Copy link
Member

jglick commented Aug 5, 2015

🐝 again. (One of the two comments about help.html was ignored, but it could also be done elsewhere, such as in the plugin wiki: documenting the main limitation of the current implementation, that restarting in the middle of the block works only insofar as sh steps use their private key soon after starting.)

@recena
Copy link
Contributor Author

recena commented Aug 5, 2015

@reviewbybees done

@ghost
Copy link

ghost commented Aug 5, 2015

This pull request has completed our internal processes and we now respectfully request the maintainers of this repository to consider our proposal contained within this pull request for merging.

@stephenc
Copy link
Member

stephenc commented Aug 5, 2015

As principal author of this plugin, and as the plugin was developed on CloudBees, Inc. time, I view this plugin's maintainers as including any CloudBees engineer. There seems to be some permissions problems on this repo at the present time, so I am merging this on behalf of @recena until he gets his permissions fixed.

stephenc added a commit that referenced this pull request Aug 5, 2015
[JENKINS-28689] Make compatible with Workflow plugin
@stephenc stephenc merged commit 5a72bf8 into jenkinsci:master Aug 5, 2015
@KostyaSha
Copy link
Member

👎 for 31 unsquashed commits

@recena
Copy link
Contributor Author

recena commented Aug 5, 2015

@KostyaSha Thanks for your feedback

@KostyaSha
Copy link
Member

@recena i'm not against content, i'm against 31 commits for one feature. This is unreal headache for history. And it not even a refactoring...

@stephenc
Copy link
Member

stephenc commented Aug 5, 2015

@KostyaSha as a maintainer, I prefer unsquashed commits in plugin repos that I am a maintainer of

@recena
Copy link
Contributor Author

recena commented Aug 5, 2015

@KostyaSha In this case I considered that the commits were important. They are telling the path until the final solution. Anyway, thanks so much for your advice.

@jglick
Copy link
Member

jglick commented Aug 5, 2015

Filed JENKINS-29810 for stronger restart behavior.

@recena recena mentioned this pull request Aug 6, 2015
KostyaSha referenced this pull request in tfennelly/jenkins Aug 25, 2015
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't <optional>true</optional> missing here?

This is gonna make compulsory the installation of that part of the workflow plugin when using ssh-agent, right? For me, it does not sound totally right. Or I'm missing something?

I read the feature that requested that PR as: "if workflow is present, then contribute a step to it [but if absent, then just stay still]"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@batmat Let me take a look.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@batmat they are adding hard dep to workflow-step-api in all plugins. Even credentials-binding. I got reply that they (CB) don't care :(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem @recena see also the question on dev list that triggered this discussion just in case https://groups.google.com/forum/#!topic/jenkinsci-dev/K7pf_W8NgqA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants