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

Decide semantics of predicate precomputations. #35168

Closed
jayunit100 opened this issue Oct 20, 2016 · 5 comments
Closed

Decide semantics of predicate precomputations. #35168

jayunit100 opened this issue Oct 20, 2016 · 5 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling.

Comments

@jayunit100
Copy link
Member

jayunit100 commented Oct 20, 2016

Problem

Some predicates may need precomputations or "preconditions" to be met before they can run.

  • As of now, those preconditions may or may not be gauranteed to exist in the predicateMetadata struct.
  • Some of those predicates may be able to bootstrap some of their own data (by redoing a query, if the predicate metadata is incomplete).

Solution

We should decide wether (1) predicates should try to create data which is precomputed and (2) if so, what the best way to do this is which is scalable and doesnt lead to duplication of error handling/querying.

Two possible solutions:

  • make any predicate's precompute function (as of now, really we only have one - but there may be others) stand alone - so that it can be called outside of the standard precomputation steps provided by the scheduler framework (this might help in corner cases - i.e. if a query fails randomly, the predicate has a retry built-in - but it will lead to duplication of logic).
  • Each predicates precompute function stays encapsulated, and predicates simply have preconditions of checking for missing data (this is simpler to maintain from the code perspective, but might be some corner cases where it hurts us). Once we decide, we would update the predicates_test functions where necessary to include test cases for when precomputation is enabled.

@wojtek-t Suggesting this as a follow on to #33763 .

@jayunit100
Copy link
Member Author

As of now, i think we leaned towards

  • putting the precomputations as attachments to the predicates,
  • re-running precomputations inside the predicate evaluation if there is missing info
  1. is that the standard for all predicates
  2. can that be abstracted into a predicate interface of some sort?

@wojtek-t
Copy link
Member

Re 1) - yes, I believe this is what we are doing for all predicates now.

@bgrant0607 bgrant0607 added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed component/scheduler labels Nov 15, 2016
@fejta-bot
Copy link

Issues go stale after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 18, 2017
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle rotten
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 17, 2018
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling.
Projects
None yet
Development

No branches or pull requests

6 participants