Giter VIP home page Giter VIP logo

Comments (8)

bergsieker avatar bergsieker commented on September 24, 2024

George, can you provide a driving use case for when this would be useful? What does it mean (to you) for an action to be "unsuitable"?

from remote-apis.

werkt avatar werkt commented on September 24, 2024

Currently, we reject actions that a) depend on oversized inputs and b) produce oversized outputs. We accomplish this for 'a' by passively ignoring (through findMissingBlobs manipulation) requests until we have a clear channel (the execute Operation response) to present a PRECONDITION_FAILURE or inspire a local fallback in bazel. For 'b' we supply this PRECONDITION_FAILURE as an action result for an oversized output.

Oversized in this case varies by heuristic, but can be thought of as a simple file size: say 1G.

There is future work to systematically apply policies to actions' behaviors, like never accessing above a percentage threshold of their inputs via the filesystem, producing orders of magnitude larger outputs than inputs, executing blacklisted programs, or other abusive behaviors involving resource acquisition - spending a threshold percentage of time blocked on IO, network, or just sleeping, etc.

from remote-apis.

ulfjack avatar ulfjack commented on September 24, 2024

I don't think it's safe to assume that there is an exact 1:1 correspondence between execute and findMissingBlobs calls. Bazel could generate one call to findMissingBlobs for a Bazel action, but make multiple execute calls for different subsets of inputs.

That said, some of the other policies sound intriguing.

from remote-apis.

werkt avatar werkt commented on September 24, 2024

I don't think it's safe to assume that there is an exact 1:1 correspondence between execute and findMissingBlobs calls. Bazel could generate one call to findMissingBlobs for a Bazel action, but make multiple execute calls for different subsets of inputs.

Precisely why I want a way to tell the client to go away directly. These are all hacks.

from remote-apis.

EricBurnett avatar EricBurnett commented on September 24, 2024

from remote-apis.

bergsieker avatar bergsieker commented on September 24, 2024

I think that PRECONDITION_FAILURE is the wrong thing to return in this case--it implies that there's something about the system that can be changed to make the action acceptable (in this case, we interpret it to mean that there were missing inputs, and that uploading more files would fix the issue). I think that INVALID_INPUT is probably more accurate--the action simply is not suitable for remote execution.

That still leaves us with the problem of separating this type of invalid input from other types. I'm not sure that Java supports adding details to a status object.

from remote-apis.

EricBurnett avatar EricBurnett commented on September 24, 2024

I'm fine with using INVALID_INPUT, sure. I don't think that changes anything materially (it's still a non-retriable error that the client can fall back or exit out as it sees fit).

from remote-apis.

sstriker avatar sstriker commented on September 24, 2024

@bergsieker, @EricBurnett, did you mean INVALID_ARGUMENT? If so, that seems fair to me. @werkt, assuming you are still interested in having this, care to raise a documentation PR? The error is already listed as one that can be returned, as such I think it is only a clarification.

from remote-apis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.