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.
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
Add Logz.io support #74
base: master
Are you sure you want to change the base?
Add Logz.io support #74
Changes from all commits
d986d80
8a00ac8
de18b60
4ef9a2f
8c185d6
6c7d6a6
9b7621d
5075433
fa317c1
bf87eec
6d53f29
4d9134d
54cd262
7a9164d
959f715
03cb931
035fb68
53ffac5
84aed45
193f057
4dbe73e
89a41e9
25c63b4
bdab1a3
488037f
144e922
30ccd6b
bf200ca
f2dc75e
ad75e1e
6c27e9b
84d2051
bd0ba73
22d88bc
63647d6
6a70412
f57f163
bd062d0
594c37d
07fcdb4
e2fb882
74fa7f6
93732e3
203eca1
d31850b
b3ffe89
77577d9
e7b056e
1508b3f
3e37735
605a76c
f5e9581
1aec70e
84c3602
93a5cd2
b1dc099
261f22c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Please revert the complete file to its original state. You just changed indentation.
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.
I think we actually only need the finish() method, not process().
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.
@jakub-bochenski
Currently,
finish()
usesprocess()
. How would you like it to be instead?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.
AFAIR finish only uses process to call it with null arg. Anyhow check the comment above (#74 (comment)) it might make this point moot
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.
I don't think you need this implmentation, just the interface
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.
Even the interface is not needed. Actually the complete #71 should be taken out of here.
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.
We need a close hook for the build. It's not available on master, so I suggested to use the same approach as #71
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.
What helps an interface when there is no implementation?
The close is added to the LogstashWriter in order to properly terminate the LogstashPayloadProcessor.
#71 modifies the ConsoleLogFilter to add the PayloadProcessor to the LogstashWriter.
There is nothing comparable here.
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.
How do you suggest we should continue with this?
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.
Let me try to explain again.
This code needs to perform actions on build close as per #74 (comment)
AFAIK we have currently no way to notify an
IndexerDao
that a build has finished.#71 added a way to do it, so I suggested to reuse the same approach.
Maybe at this point the best way to proceed is to forget about #71 and just add a way to notify the
IndexerDao
.We can worry about the overlap with #71 when/if it's merged
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.
#71 added a feature to close the LogstashWriter, which is specific to a build but it is not interacting with the Dao as the scriptprocessor is only used in the writer.
The dao is a kind of a singleton in Jenkins. We only create a new Dao, when we have a configuration change and the new will only be used for new builds.
If I understand it right the shipper has to be used in the dao. So when the writer calls dao.push which does the actual writing to the indexer, how does the dao know which shipper to use? I don't see any nice solution here other than having a dao per build. But this would be a change in concept how this plugin is working. The writer would hold the reference to the dao and can be easily closed.
This is a bigger change in how the plugin works.
But even then one will need synchronization as in pipeline jobs you also have parallel execution within a single build and thus concurrent calls to the list.
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.
Sorry, I think I meant the LogstashWriter instead of IndexerDao
The idea is to create a new shipper instance per build to avoid concurrency issues. Not sure if that would work for parallel stages in pipeline though.
On a different note: I'm rather busy lately and don't want to block it. I would be happy to accept whatever solution you and @idohalevi can agree on
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.
@jakub-bochenski @mwinter69
How do you suggest to continue?