stable

Clone or download

Read-only

feat: Limit handling of closing references to 50 at once

part of request #27896 Smart commit is not smart enough How to test: Push more than 50 references either on one commit or spread on multiple commits. You can copy/paste the same reference. When you push, only the first 50 will be considered (and maybe close artifacts), the rest will be skipped. You should see a message in codendi_syslog like the following: [info] Found more than 50 references, the rest will be skipped. Notes: This is done to limit a potential denial of service. People can push up to 100 branches, which can each contain N commits and each commit may have M references. 100×N×M potential references means it's not that hard to make a single push that will try to close all of the artifacts of the platform at once. That will consume a lot of CPU and memory, so we try to limit that by choosing an arbitrary number of 50, which we know Tuleap can handle. It's in the same range as REST API limits for example. Change-Id: I9051abce574c6484b4b8908dc80261e8c7ecf02d

Modified Files

Name
M plugins/tracker/include/Tracker/Artifact/Closure/ArtifactClosingReferencesHandler.php +23 −2 Go to diff View file
M plugins/tracker/tests/unit/Artifact/Closure/ArtifactClosingReferencesHandlerTest.php +59 −17 Go to diff View file