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

Export "newerBuild" so that BO REST can use it #7

Closed
wants to merge 2 commits into from

Conversation

i386
Copy link

@i386 i386 commented Jan 8, 2017

@amuniz very quick one to make the CancelledCause serialize better via Blue Ocean REST API.

Related to https://issues.jenkins-ci.org/browse/JENKINS-40871

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.

Would rather export the build number as an int.

(In the original PR to create the step, IIRC I did suggest replacing newerBuild with a number. For whatever reason that did not happen, and it is tricky to replace the serialized field now, but I did not care so much because it was private anyway. This is becoming part of an API.)

Alternately, simply add @Exported to getNewerBuild. You can then pick out ?tree=…[newerBuild[number]] or whatever.

@i386
Copy link
Author

i386 commented Feb 1, 2017

@jglick serialising the run would be bad for Blue Ocean as that object could be rather large and isn't in the format our client would understand, so I've opted to go with the int option as you have suggested.

I've also taken the liberty to clear up some messiness where the CancelledCause is constructed on cancel in the MilestoneStepExecution. This should mean that there is a better contract for receiving a valid Run via getNewerBuild. In most cases we can return a valid Run etc

@jglick
Copy link
Member

jglick commented Mar 9, 2017

serialising the run would be bad for Blue Ocean as that object could be rather large

That is why you select only the desired fields, using for example tree.

@adelcast
Copy link
Contributor

@jglick any status update on this PR? After Jenkins World, I added some notes on the original PR that prompted this change: https://issues.jenkins-ci.org/browse/JENKINS-40871. Seems like once this gets in, we can start working on the UI side. I am not a front-end dev, but can certainly take a stab at it, as I think it would be super cool to have this "collapse" pipeline view on BO. If there is anything else I can help with to get this going, please let me know.

@jglick
Copy link
Member

jglick commented Dec 6, 2017

any status update on this PR?

Ask the submitter. My last recommendation was to instead add @Exported to getNewerBuild.

@adelcast
Copy link
Contributor

adelcast commented Dec 6, 2017

ah, you are right, I though the ball was on your court but is not. @i386 were you planning on following up on this PR? let me know if I can help from my end

@i386
Copy link
Author

i386 commented Dec 7, 2017

I am not working on this one anymore @adelcast - if you want to take over from here you can file a new PR :)

@i386 i386 closed this Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants