Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [che-dev] Extend Builder section

Hi Vitaly,

 

Thanks very much for your reply,

I also think it’s a good direction , it does require some code changes in current che code,
I’m trying it and once I’ll see expected results I’ll send a pull request

 

Best Regards

Roy

 

 

From: che-dev-bounces@xxxxxxxxxxx [mailto:che-dev-bounces@xxxxxxxxxxx] On Behalf Of Vitalii Parfonov
Sent: Wednesday 11 May 2016 10:22
To: che developer discussions <che-dev@xxxxxxxxxxx>
Cc: Milstein, Tahel <tahel.milstein@xxxxxxx>; Lavie, Sarah <sarah.lavie@xxxxxxx>
Subject: Re: [che-dev] Extend Builder section

 

Hi, i am do not fully understand what i need to do but i think for selection right builder BuilderSelectionStrategy is that you need, and yes getEnvironment form BuilderDescriptor can help you with it. Maybe need to add getter for  BuilderDescriptor builderDescriptor to the Remote Builder class, this should help you in selection.


Vitaly Parfonov -- codenvy

 

On Tue, May 10, 2016 at 10:41 AM, Fishman, Roy <roy.fishman@xxxxxxx> wrote:

Hi All,

 

We want to extend the functionality of the Builder in Eclipse Che. and contribute it to the community.

This is needed for the cloud foundry environment, where there can be several builders across different spaces.

 

Currently Che allows registering builders by the access criteria

"builderServerAccessCriteria": {

    "project": "",

    "workspace": ""

 }

 

And by matching this criteria together with default builder on project type the match is done. This is not enough and hence the motivation for contribution.

 

We thought of two options to extend this behavior, we’ll appreciate your feedback and help, later we will provide a pull request according to the feedback and discussion.

 

Option1:

Add another criteria to builder registration which will be a list of name-value , that later this will be used in builder selection logic

 

On registration add another criteria – list of name-value attributes

This DTO will be extended with a list of attributes:

 https://github.com/codenvy/platform-api/blob/master/codenvy-api-builder/src/main/java/org/eclipse/che/api/builder/dto/BuilderServerRegistration.java

 

on build selection

https://github.com/codenvy/platform-api/blob/master/codenvy-api-builder/src/main/java/org/eclipse/che/api/builder/BuildQueue.java#L509

instead of using the current method of getBuilderList as is – we will enhance it (strategy)  so different implementation can be injected by Guice

to allow different selection methods.

the current implementation for the general use will remain as today (select by workspace/project),  but then we can add additional implementation that will deal with our specific use case and attributes we passed in the registration step.

 

Option 2:

Che already has a BuilderSelectionStrategy  class, that select a builder when it detects that there are more than one builder available

However the data in which the selection can be done seems limited to the data in the RemoteBuilder class

https://github.com/codenvy/che-core/blob/5c0c82c9defd2c08f52ee72126481f833c8718be/platform-api/che-core-api-builder/src/main/java/org/eclipse/che/api/builder/RemoteBuilder.java

so we probably need to extend the Remote Builder with a list of attributes

 

also the getEnvironment() method on the Builder class might help, so it will allow filter by Environment properties, but I didn’t exactly understand how it works, if anyone can elaborate on this it will be great

 

Appreciate any input and help

Regards

Roy

 

 

 


_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev

 


Back to the top