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

[JENKINS-55400] Provide an extension to notify input event #33

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

LinuxSuRen
Copy link
Member

No description provided.

@LinuxSuRen LinuxSuRen changed the title [JENKINS-55400] provide an extension to notify input event [JENKINS-55400] Provide an extension to notify input event Apr 4, 2019
@LinuxSuRen
Copy link
Member Author

LinuxSuRen commented Apr 8, 2019

ping @jenkinsci/code-reviewers

I'm looking for some reviewing. Thanks.

Copy link
Member

@daniel-beck daniel-beck left a comment

Choose a reason for hiding this comment

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

It's unclear what's special about input. Wouldn't think be useful for all types of pipeline steps?

@LinuxSuRen
Copy link
Member Author

input is an interactive step. If other system wants to integrate with Jenkins pipeline. It's hard to aware of this interactive step.

@LinuxSuRen
Copy link
Member Author

@daniel-beck I did some new changes. Notifying all status should be more helpful for who wants to integrate this to their system.

Open questions:
I want to give a simple implement for current extension. For example, a simple input request notificatioin base on HTTP protocol. I figure out two solutions:

  • create a new plugin for that
  • provide this as build-in

@LinuxSuRen
Copy link
Member Author

ping @dwnusbaum @daniel-beck

@LinuxSuRen
Copy link
Member Author

Anyone could help me to review this?

Copy link
Member

@dwnusbaum dwnusbaum left a comment

Choose a reason for hiding this comment

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

Added some minor comments. It would help to see some proposed uses of the new extension point to know what it should like.

@LinuxSuRen
Copy link
Member Author

@dwnusbaum Are there anything that I need to modify? It's been a long time.

@LinuxSuRen
Copy link
Member Author

Do I need to make any changes?

@runzexia
Copy link
Member

@dwnusbaum @daniel-beck
Can we land it?

@runzexia
Copy link
Member

Any progress?

Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

In principle sounds fine. Is there a downstream PR demonstrating this being used to implement something useful?

@jglick
Copy link
Member

jglick commented Jul 9, 2020

Note that you can get mostly the same effect using existing APIs such as GraphListener, so this is not exactly necessary—it would be a convenience.

@LinuxSuRen
Copy link
Member Author

I can send an email to someone if I can get the notification of input event. This is my main purpose here.

@dwnusbaum
Copy link
Member

The main thing I would like to see here before merging is some new tests, but ideally also a downstream PR of an example consumer.

@jglick
Copy link
Member

jglick commented Jul 9, 2020

Merge with master as in #44.

I can send an email to someone if I can get the notification of input event.

Likely possible without any new API. If GraphListener says there is an input step, it started (you can get the message via ArgumentsAction). When the step completes (i.e., there is a new head with the input StepNode as a parent), you can check InputSubmittedAction to see if and how it was approved; or, if cancelled, check ErrorAction for FlowInterruptedException with Rejection.

@LinuxSuRen
Copy link
Member Author

@jglick As you said that it's possible to do it by a bunch of code lines. But it's complicated especially for a person who still does not familiar with those API. I would suggest that giving a high-level extension point.

But still, I need to thanks you for providing the tech details of it.

LinuxSuRen added a commit to LinuxSuRen/ks-jenkins that referenced this pull request Nov 13, 2020
@LinuxSuRen
Copy link
Member Author

ping @jenkinsci/code-reviewers

@daniel-beck
Copy link
Member

Code reviewers will be unable to merge, so these pings don't accomplish what you want.

@mrginglymus mrginglymus mentioned this pull request Dec 23, 2020
2 tasks
LinuxSuRen and others added 3 commits April 9, 2021 04:46
delete the interface method of getName
change NotifyEvent to InputEvent
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.

5 participants