-
Notifications
You must be signed in to change notification settings - Fork 400
[JENKINS-28138] Migration to webhooks with ext point #57
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
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.
javadoc required
|
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
add javadocs add simple test for filtering by trigger
- default push event test - hook match predicate
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.
useless without description
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.
this should be 1.12.0 then
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.
better place TODO
|
👍 |
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.
<p/> ?
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.
think nobody will be read this in generated javadoc format. Only here in code. So don't like <p/>
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.
Seems this class can be removed in future, mark with no external usage annotation?
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.
Skip run if queue not empty to allow end previous run?
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.
think this logic should be investigated in separate pr
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.
Just one check
if (!queue.isEmpty()) { return; }
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.
so when first work finds non empty queue it just skip it. And no one will clean it ever :)
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.
probably i mistaken. i thought that it handle only full run of cleaning (not single).
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.
new line
|
In general the code looks good to me (special kudos for extra tests). If the plugin works well (a manual testing is required), I would vote for such implementation |
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.
Are you actually changing dependencies in this diff hunk? If so, which? Please avoid gratuitous reformatting of files—keep the diff as short as possible. Makes your PR easier to review, and avoids unnecessary merge conflicts, cherry-pick conflicts, git-blame noise, etc.
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.
Jessy, i'm "maintaining" last releases. I'm ok with this change. Also there is no any cherry-picks/merge conflicts/etc for this plugin.
git-blame and history will be more noisy when one small PR has 10 commits.
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.
@jglick, I know about small diffs, thx! But this change alreay discussed with @KostyaSha
|
@oleg-nenashev Manually tested over real GH Log: (when resave job with trigger) or then |
|
Does this PR require #60 to be merged or vice versa? |
|
@amuniz yes, this feature was splitted for two prs to simplify review. |
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.
rename to isApplicable()?
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.
this means that job alive in terms of github hook. So "applicable" word is not clarify meaning
Working to migrate to webhooks instead of services (JENKINS-28138)
The plan is
This can help to make process testable and simplify classes with other logic (Cleaner, Triggers)
Cleanerqueue interface instead of synchronized block. It can simplify add and fetch operations on how to add for cleaning new namesNew events will be merged with old ones from existent hooks
[ ] Extend extension point to contribute hook events to make possible parse events it interested in(will be done in separate PR)Next step is #60