-
-
Notifications
You must be signed in to change notification settings - Fork 107
JENKINS-59110: enable logging globally for pipeline jobs #93
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
Conversation
To be able to log globally for pipeline a TaskListenerDecorator must be implemented. Portentially the decorator will be transferred to the agent jvm so everything must be Serializable (this is not tested).
name of stage and/or name of agent are included in the output if the logstash step is inside a stage and/or agent
src/test/java/jenkins/plugins/logstash/persistence/AbstractLogstashIndexerDaoTest.java
Outdated
Show resolved
Hide resolved
| public abstract class AbstractLogstashIndexerDao implements LogstashIndexerDao { | ||
| public abstract class AbstractLogstashIndexerDao implements LogstashIndexerDao, Serializable { | ||
|
|
||
| private static final long serialVersionUID = 1L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same thing about serials
| */ | ||
| public class BuildData { | ||
| public class BuildData implements Serializable { | ||
| private static final long serialVersionUID = 1L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same thing about serials
| public class LogstashWriter { | ||
| public class LogstashWriter implements Serializable { | ||
|
|
||
| private static final long serialVersionUID = 1L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same thing about serials
| private final static Logger LOGGER = Logger.getLogger(MethodHandles.lookup().lookupClass().getCanonicalName()); | ||
| public static class TestData { | ||
| public static class TestData implements Serializable { | ||
| private static final long serialVersionUID = 1L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same thing about serials
| public class ElasticSearchDao extends AbstractLogstashIndexerDao { | ||
|
|
||
| private final HttpClientBuilder clientBuilder; | ||
| private static final long serialVersionUID = 1L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same thing about serials
src/main/java/jenkins/plugins/logstash/persistence/ElasticSearchDao.java
Show resolved
Hide resolved
remove field and suppress the warning the class definition is transferred along side the object thus the servialversionuid should be the same in any case
|
@mwinter69 big thanks for another great contribution :) |
|
Hi @jakub-bochenski, The pipeline is KO, could you take a look, please ? Thx, |
|
sorry, nothing I can do here, this is Jenkins infrastructure that is not maintaned by me |
|
Hi @jakub-bochenski, Thank you for your answer. Sorry if I insist a little bit, I can't wait to test and deploy this new great feature 😉 I'm not an expert, but if you push anything on the master branch that should restart the pipeline and the release process. What do you think about that? |
|
Merged, Thanks for bumping it as I missed that PR |
|
@jakub-bochenski When will you release this PR? I am waiting. |
|
You can always find the unreleased build in the incremental update center, e.g. current one is https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/logstash/2.4.0-rc195.4527bc400e15/ |
|
@jakub-bochenski Yeah, I know that user can use unofficial release, but I just wonder when you release new version. |
|
Incremental releases are not "unofficial", they are incremental Logstash plugin 2.4.0 has been released |
|
@jakub-bochenski Not sure this is worth logging as a Bug yet, so thought to ask here. Our Jenkins masters and plugins are latest but our jnlp slave image is old so it may be on our side, working through upgrades there now. Anyway, since we picked up 2.4.0 last week we've had some odd symptoms such as console logs for stages looping indefinitely in the master, and then spotted this stack in the slave image logs; If we turn off "Enable Globally" all is well again (except no logstash output of course :D ) |
|
@admoriarty please file this as a separate issue On the problem itself I don't think that JNLP version is relevant. |
|
Will do, have verified since that it wasn't some issue with outdated
slave/agent images
…On Thu, Aug 6, 2020, 16:13 jakub-bochenski ***@***.***> wrote:
@admoriarty <https://github.com/admoriarty> please file this as a
separate issue
If it's causing problems for you it's an issue alright. Filling it
separately should increase visibility in case other people have the same
problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#93 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCR4OOK2R4GFDMXLTEKZUTR7K27DANCNFSM4MHCHZFA>
.
|
|
Eventually raised https://issues.jenkins-ci.org/browse/JENKINS-63472 @jakub-bochenski , felt "critical" made sense since we've basically had to disable the plugin as a result to continue building. |
To be able to log globally for pipeline a TaskListenerDecorator must be
implemented.
Potentially the decorator will be transferred to the agent jvm so
everything must be Serializable (this is not tested).
This also includes getting information about stage/agent if the logstash step is inside a stage/node