Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When describing classes in a Pipeline Shared Library that have "data" they must be serializable #495

Merged

Conversation

rtyler
Copy link
Member

@rtyler rtyler commented Dec 8, 2016

@@ -229,7 +229,7 @@ constructor, or just one method:
[source,groovy]
----
package org.foo
class Utilities {
class Utilities implements Serializable {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@bitwiseman bitwiseman Dec 8, 2016

Choose a reason for hiding this comment

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

Hm, maybe not. The other is static so it doesn't need to be serializable.
On the other hand, the distinction seems like something that would be easy to mess up or forget if one goes from only having a static method to having some data. It is worth highlighting with a warning block.

Copy link
Member Author

Choose a reason for hiding this comment

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

I will try to add some verbiage around it, but I'm loathe to litter these documents with so many admonitions for every possible way to fuck up Groovy 🙁 :

@bitwiseman
Copy link
Contributor

… they must be Serializable

Fixes JENKINS-38868
@rtyler rtyler force-pushed the pipeline-shared-libraries-serializable branch from 8c360dc to 7d67519 Compare December 9, 2016 00:25
@bitwiseman
Copy link
Contributor

🐝 Looks good to me.

@rtyler rtyler closed this Dec 9, 2016
@rtyler rtyler reopened this Dec 9, 2016
@rtyler
Copy link
Member Author

rtyler commented Dec 9, 2016

Build failing right now because of

Could not resolve all dependencies for configuration ':nodeDist'.
110 	> Could not download node-linux-x64.tar.gz (org.nodejs:node:4.2.3)
111 	   > Could not get resource 'https://nodejs.org/dist/v4.2.3/node-v4.2.3-linux-x64.tar.gz'.
112 	      > Premature end of Content-Length delimited message body (expected: 11683079; received: 5078794

Cute

@rtyler rtyler merged commit 5fbea09 into jenkins-infra:master Dec 9, 2016
@rtyler rtyler deleted the pipeline-shared-libraries-serializable branch December 9, 2016 16:15
@jglick
Copy link
Contributor

jglick commented Dec 16, 2016

Argh, we are writing more content that duplicates content defined somewhere else without deleting the original? Overlaps jenkinsci/workflow-cps-global-lib-plugin#23. This is unmanageable. We need to have a policy for keeping a single version of the truth.

@rtyler
Copy link
Member Author

rtyler commented Dec 16, 2016

@jglick If you would like me to submit pull requests to various repositories when content is reworked for jenkins.io, I can do that. The documents aren't identical however, I removed and rewrote some content to try to make it more clear to readers as they progress through the chapter.

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.

None yet

3 participants