Temporarily comment out file size check (#2040)

pull/3519/head
Darko Draskovic 2024-05-15 16:26:10 +00:00 committed by Harness
parent ea49937a1e
commit 8049651963
3 changed files with 14 additions and 7 deletions

View File

@ -93,13 +93,18 @@ func (c *Controller) PreReceive(
return hook.Output{}, fmt.Errorf("failed to extend pre-receive hook: %w", err)
}
err = c.checkFileSizeLimit(ctx, rgit, repo, in, &output)
if output.Error != nil {
return output, nil
}
if err != nil {
return hook.Output{}, err
}
// File size check currently checks all the blobs in alternate as well in the original repo dirs.
// We want to check file size only in alternate dirs.
// Temporarily comment out file size check until the solution is found.
// TODO: find the way to check the blob size only in alternate dirs.
// err = c.checkFileSizeLimit(ctx, rgit, repo, in, &output)
// if output.Error != nil {
// return output, nil
// }
// if err != nil {
// return hook.Output{}, err
// }
return output, nil
}

View File

@ -26,6 +26,7 @@ import (
"github.com/gotidy/ptr"
)
// nolint:unused
func (c *Controller) checkFileSizeLimit(
ctx context.Context,
rgit RestrictedGIT,

View File

@ -104,6 +104,7 @@ func FMTDuration(d time.Duration) string {
return d.String()
}
// nolint:unused
func printOversizeFiles(
output *hook.Output,
oversizeFiles []git.FileInfo,