From d3401b650b2b3f1c2b4008dfd934d00bf3590b78 Mon Sep 17 00:00:00 2001 From: Sourya Vatsyayan Date: Thu, 27 Oct 2022 17:56:04 +0530 Subject: [PATCH] chore: remove the artifact upload limit from CLI side (#187) This limit is enforced on the server side. Signed-off-by: Sourya Vatsyayan Signed-off-by: Sourya Vatsyayan --- command/report/constants.go | 3 +-- command/report/report.go | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/command/report/constants.go b/command/report/constants.go index 946d000c..a6caf7a4 100644 --- a/command/report/constants.go +++ b/command/report/constants.go @@ -29,6 +29,5 @@ Notes: Documentation: https://deepsource.io/docs/cli#report ` - reportGraphqlQuery = "mutation($input: CreateArtifactInput!) {\r\n createArtifact(input: $input) {\r\n ok\r\n error\r\n }\r\n}" - maxArtifactUploadSize = 20000000 + reportGraphqlQuery = "mutation($input: CreateArtifactInput!) {\r\n createArtifact(input: $input) {\r\n ok\r\n error\r\n }\r\n}" ) diff --git a/command/report/report.go b/command/report/report.go index 8195011a..48db3354 100644 --- a/command/report/report.go +++ b/command/report/report.go @@ -173,18 +173,13 @@ func (opts *ReportOptions) Run() int { if reportCommandValueFile != "" { // Check file size - fileStat, err := os.Stat(reportCommandValueFile) + _, err := os.Stat(reportCommandValueFile) if err != nil { fmt.Println("DeepSource error | Error | Unable to read specified value file: " + reportCommandValueFile) sentry.CaptureException(err) return 1 } - if fileStat.Size() > maxArtifactUploadSize { - fmt.Println("DeepSource | Error | Value file too large. Should be less than 20 Megabytes") - return 1 - } - valueBytes, err := ioutil.ReadFile(reportCommandValueFile) if err != nil { fmt.Println("DeepSource error| Error | Unable to read specified value file: ", reportCommandValueFile)