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

support non critical triggered schedulers #2299

Closed

Conversation

Riziero
Copy link

@Riziero Riziero commented Jul 1, 2016

This is not done yet. Some tests are failing. Just wanted to know if my approach is acceptable.

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @tardyp, @warner and @djmitche to be potential reviewers

1 similar comment
@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @tardyp, @warner and @djmitche to be potential reviewers

@tardyp
Copy link
Member

tardyp commented Jul 1, 2016

Can you explain the details of you needs, and your design?

@tardyp
Copy link
Member

tardyp commented Jul 1, 2016

I think the best is to start with the documentation. This helps to design a proper api change that is clear and usable by everybody.

For what I undestand your usecase looks interresting to have

@Riziero
Copy link
Author

Riziero commented Jul 1, 2016

@tardyp

Right now when you have a trigger step kicking a number od schedullers, any fail of the schedulers will cause the Trigger step to be marked as failed. In my use case, while I still want to wait for all the kicked schedulers to finish, I want to be able to mark a scheduler as "non critical". When such a scheduler fails, the kicking trigget step will still be green.

With my code you can still do

factory.addStep(steps.Trigger(schedulerNames=['triggerable_2_fail', 'triggerable_1_green'], waitForFinish=False))

but you can also do:

factory.addStep(steps.Trigger(schedulerNames=[('triggerable_1_green', True), ('triggerable_2_fail', False)], waitForFinish=True))

which reads: if triggerable_2_fail fails the trigger step is "still green"

@tardyp
Copy link
Member

tardyp commented Jul 1, 2016

Here what worries me the most is that your new api is not compatible with the old API.
This is very important for us that our API moves always in a backward compatible way.

Also, for me implicit meaning for a tuple looks not very easy to understand. You change the meaning of schedulerNames to be no more a list of scheduler names, and be a list of schedulername + whether to take the result in account for the global result.

I think I would prefer to have an additional unimportantSchedulerNames argument that worstStatus will take in account

@Riziero
Copy link
Author

Riziero commented Jul 1, 2016

Cool, that was my concern too. I'll fix it up and upload again! Thanks

@codecov-io
Copy link

codecov-io commented Jul 1, 2016

Current coverage is 85.83%

Merging #2299 into master will not change coverage

@@             master      #2299   diff @@
==========================================
  Files           293        293          
  Lines         30528      30528          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          26205      26205          
  Misses         4323       4323          
  Partials          0          0          

Sunburst

Powered by Codecov. Last updated by e925c49...459b656

@tardyp
Copy link
Member

tardyp commented Jul 1, 2016

You can reset your branch to buildbot/master no need to revert the last commit.

@Riziero
Copy link
Author

Riziero commented Jul 1, 2016

would it be fine to change the return value of getSchedulersAndProperties()?

it's now returning a list. I would have it return the same list plus "unimportantSchedulerNames". This way users can also choose unimportantSchedulerNames in a dynamic trigger

@tardyp
Copy link
Member

tardyp commented Jul 1, 2016

I think it would make sense, but we need to make it backward compatible

@tardyp
Copy link
Member

tardyp commented Jul 7, 2016

I'm closing since it does not have code anymore. Please reopen when you find the time to implement the agreed solution

@tardyp tardyp closed this Jul 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants