Git Product home page Git Product logo

Comments (4)

werkt avatar werkt commented on June 25, 2024

So the value to be compared against the limit is "the sum of all file sizes for the tree of inputs to an action"?

from bazel-buildfarm.

shirchen avatar shirchen commented on June 25, 2024

I was thinking that we would limit just on the digest's size with values read from configuration.

--- a/src/main/java/build/buildfarm/cas/cfc/CASFileCache.java
+++ b/src/main/java/build/buildfarm/cas/cfc/CASFileCache.java
@@ -790,7 +790,11 @@ public abstract class CASFileCache implements ContentAddressableStorage {
     if (digest.getSizeBytes() == 0) {
       return new CompleteWrite(0);
     }
-    if (digest.getSizeBytes() > maxEntrySizeInBytes) {
+    Set<String> allowedActions = Sets.newConcurrentHashSet();
+    allowedActions.add("JoinLayers");
+    allowedActions.add("PackageTar");
+
+    if (digest.getSizeBytes() > maxEntrySizeInBytes && !allowedActions.contains(requestMetadata.getActionMnemonic())) {
       throw new EntryLimitException(digest.getSizeBytes(), maxEntrySizeInBytes);
     }
     try {

from bazel-buildfarm.

werkt avatar werkt commented on June 25, 2024

"the digest" as a subject for comparison does not narrow the scope of the filter - we already limit by size generally, and ensure that no blobs can exist in a worker's cas above that limit.

Your suggested change limits by hard coded action mnemonics. What does that have anything to do with 'size'?

from bazel-buildfarm.

shirchen avatar shirchen commented on June 25, 2024

Your suggested change limits by hard coded action mnemonics. What does that have anything to do with 'size'?

Good question. From my prototype snippet above, I'm proposing allowing some actions to go above the hardcoded size based on configured list of mnemonics.

from bazel-buildfarm.

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.