-
Notifications
You must be signed in to change notification settings - Fork 61
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 new API to store input parameter info separately from the execution #3
base: master
Are you sure you want to change the base?
Conversation
…e the lost executions.
…e-inputinfo-separately-from-execution
Still have failures in |
this.message = st.getMessage(); | ||
this.id = st.getId(); | ||
this.parameters = st.getParameters(); | ||
this.ok = st.getId(); |
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 what is the purpose of this class? AFAICT we could just save InputStep
as is (which is what InputStepExecution
does).
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 Is InputStep safe to use as an API response object on its own? Safe to serialize/deserialize without carrying along context, etc? I didn't see anything explicitly preventing this, but wasn't sure about the implication of passing around & persisting naked steps.
The idea looks sound, but this PR is incomplete in that it does not show the new API actually being used from the stock UI code. (Obviously a downstream PR showing it being used in stage view would help verify the design as well.) |
Also I would expect to be able to make |
See JENKINS-37998. |
Very basic version of what I describe in #2 (comment) -- doesn't bother to move some logic to the InputAction that could be.
Attaches information about input prompts on a run to the InputAction (persistently) and provide new APIs to access it. Since most of the external calls to the InputAction are looking to see what input is needed in order to display UI notifications, these APIs should handle this without the risk of deadlock/long wait fetching executions. Should be faster too.
Since older builds won't have the field, we handle null and generate generate the data from the executions when we read or modify them.
CC @jglick to see what you think. I'm probably missing some things here but I want to see if the idea is sound before investing more time to polish it up & test. Should be compatible with #2 as well (just needs that merged in).
There's some sort of small FindBugs complaint about inconsistent synchronization behavior of the run there (shrug), but that's not such a big deal at the moment.