circleci-cli icon indicating copy to clipboard operation
circleci-cli copied to clipboard

Put os.Stdin size to NewReaderSize instead NewReader

Open IgorHalfeld opened this issue 4 years ago • 13 comments

solves #439

In Golang NewReader, the default is 4069 for the Buffer size. What I did was use NewReaderSize to put the Buffer size as the size of os.Stdin. So it doesn't give that error of:

Error: failed to read input: bufio.Scanner: token too long

I changed ioutil.ReadAll (default size is 512) to .io.ReadFull too

IgorHalfeld avatar Jul 09 '20 22:07 IgorHalfeld

Codecov Report

Merging #441 into master will increase coverage by 0.27%. The diff coverage is 70.37%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #441      +/-   ##
==========================================
+ Coverage   30.89%   31.16%   +0.27%     
==========================================
  Files          26       26              
  Lines        3208     3215       +7     
==========================================
+ Hits          991     1002      +11     
+ Misses       2122     2117       -5     
- Partials       95       96       +1     
Impacted Files Coverage Δ
cmd/context.go 30.05% <70.37%> (+5.05%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d6e83e7...de18f39. Read the comment docs.

codecov[bot] avatar Jul 09 '20 22:07 codecov[bot]

Hi @IgorHalfeld - thanks for the PR 🙏 we appreciate it.

Can you explain what the issue is here please? The issue that you have linked refers to a problem splitting test results, and this patch changes the function that reads contexts. Did you link to the wrong issue?

marcomorain avatar Jul 10 '20 11:07 marcomorain

@marcomorain I updated the PR description

IgorHalfeld avatar Jul 10 '20 18:07 IgorHalfeld

I fixed code coverage 🚀

IMHO I think you shouldn't use Ginkgo for testing, the Go standard test tool with Testify is the best choice for a number of factors, one of which is performance.

I used Ginkgo for 1 year and a half at work, and when we got to a large codebase we started having problems with test execution time.

IgorHalfeld avatar Jul 10 '20 19:07 IgorHalfeld

any plans to get this in?

it is breaking a lot of our circleci tests jobs

sibelius avatar Jul 14 '20 20:07 sibelius

any progress on this?

sibelius avatar Aug 24 '20 15:08 sibelius

Hope a merge soon. We have a lot of tests, fails a lot because of this

Streeterxs avatar Oct 19 '20 13:10 Streeterxs

Can we have this one merged?

jgcmarins avatar May 21 '21 22:05 jgcmarins

I'll get someone to review this today 👍

marcomorain avatar May 24 '21 09:05 marcomorain

what about today?

sibelius avatar Jul 08 '21 20:07 sibelius

Merge conflicts need to be resolved. Context create was recently updated to accept OrgId

corinnesollows avatar Jun 14 '22 12:06 corinnesollows

it seems we are hitting the same issue, and we have only? 653 tests to run, see here. Are there any plans to fix this? Or may be a workaround?

wind57 avatar Jul 27 '22 20:07 wind57

@wind57 @IgorHalfeld This PR is conflicting with master. The quickest solution is for a fresh PR to be made by an external contributor and we can look into it from there. The longer solution is that we do have a ticket made for our team to fix this issue and when we have capacity we will look into it then. Thank you!

corinnesollows avatar Aug 24 '22 19:08 corinnesollows