One of the things I'm working on is trying to convert some of the plugins 
to work with workflow.  Workflow is different to other Job types in a 
number of ways.  Jobs can be paused, failed, restarted in the middle, can 
have multiple SCMs and the whole concept of the build's workspace is 
different (because the build can die and be restarted in the middle etc). 
 For that reason, the workflow APIs are built around the more abstract 
concepts of Run and Job (Vs AbstractBuild and AbstractProject).  Of course 
Jesse Glick or KK would be able to explain this better!!

The problem I see is that lots of Jenkins "stuff" (plugins, helper libs 
etc) assume AbstractBuild and AbstractProject, which turns into a bit of a 
PITA when trying to convert plugins to be workflow friendly.  So my 
question is ... what is the conceptual "line" between AbstractBuild and Run 
(and between AbstractProject and Job)?  When someone needs to add something 
new to these core APIs, what are the things that make you decide to put it 
in one or the other (AbstractBuild or Run or AbstractProject or Job), or is 
it more of a lucky dip?

For anyone that's curious about the sorts of refactorings I had to do to 
get something working, I locally refactor some code from AbstractBuild to 
Run and from AbstractProject to Job.  It quickly became a bit of a hornets 
nest, but as an experiment, I kept going with the refactoring until I got 
something to work 
<https://github.com/tfennelly/jenkins/commits/more-run-job-generalizations>. 
 These refactorings are totally bogus and I'm sure will break stuff all 
over the place, but I still think it's kinda interesting.  There's probably 
a better way.

I have a funny feeling that, even if I get an answer to this question, I 
might not understand it fully :)  I'm on vacation today for a week anyway, 
so will have loads of time to think about this ;)

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to