I have added both the possibilities in implementation of External Workspace 
Manager.
1. Invoking run deletion assuming that discarding of workspaces is already 
implemented.
2. And if it is not implemented, then I have given a way for discarding 
workspaces.
I hope this is fine.
I have updated my Proposal 
<https://docs.google.com/document/d/1iUSc8_zY6ZVMXbF-FUHowDHkxw4KMZ1tQxu3blhCTFo/edit?usp=sharing>
.

Further reviews and comments regarding implementation would be appreciated.

Thank you.

On Friday, 5 April 2019 12:16:43 UTC+5:30, Oleg Nenashev wrote:
>
> I agree with Jesse here. As we discussed at the meetings, Advanced Build 
> Discarder plugin should be just invoking run deletion which will trigger 
> RunListeners then. EXWS plugin can be releasing workspaces upon receiving a 
> notification from RunListener, but there should be an implementation in the 
> EXWS plugin for it (now it relies on Workspace Cleanup plugin). Section 3 
> in your current proposal actually describes it in such way.
>
> There may be a use-case for deeper integration between Advanced Build 
> discarder and EXWS if you want to do it.
>
> So I was just confused that, would this be the same case. But yes, this 
>> should work for discarding builds from Multi-Branch plugin.
>>
>
> When we were discussing Multi-branch support, the whole discussion was 
> about advanced Build Discard strategies fine tuned for the Multi-Branch 
> use-cases. For example, defining different retention strategies for 
> branches, PRs and release tags. As a user, I may want to keep the release 
> tag builds forever while I unlikely want it for merged pull requests. AFAIK 
> the standard deletion API should be working for Multi-Branch well, so I do 
> not think there is any specifics for the deletion logic.
>  
>
> On Friday, April 5, 2019 at 7:27:26 AM UTC+2, Nisarg Shah wrote:
>>
>> Ya, deleting a build would trigger listener and for that 
>> RunListener.onDeleted() can be used.
>>
>> But for deleting builds from external workspace manager, few builds will 
>> be picked according to the filters. And that builds will be deleted by 
>> calling delete() method, if I am not wrong.
>>
>>
>> On Friday, 5 April 2019 10:44:43 UTC+5:30, Jesse Glick wrote:
>>>
>>> On Thu, Apr 4, 2019 at 2:51 PM Nisarg Shah <nissh...@gmail.com> wrote: 
>>> > discarding of workspaces when builds are discarded is responsibility 
>>> of 'external-workspace-manager'. 
>>>
>>> Yes, I would think so. 
>>>
>>> > And advanced Build Discarder should be notified to do the additional 
>>> cleanup ? 
>>>
>>> Not quite sure what that means. The build discarder just needs to pick 
>>> some builds to delete, and delete them. Deleting a build triggers some 
>>> listeners. 
>>>
>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/efa33032-f174-466f-8eaa-316ffe358cb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to