Describe the bug
When Pull Requests are created from forked repositories, in some cases the build_linux container is downgraded to a Medium resource class and the Test step ultimately fails. Failures log out of memory errors - affected build:
/usr/local/go/pkg/tool/linux_amd64/link: flushing /tmp/go-link-680255609/go.o: write /tmp/go-link-680255609/go.o: cannot allocate memory
The build_linux job requests an xlarge build container by default.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The build_linux job should pass on forked builds
Additional Context
xlarge resource class. Might be worth investigating further if it's possible, but could have cost of goods implications even if it is possible.A temporary way to unblock community contributions experiencing this issue is for a go-filecoin committer to fork and push a new branch from an affected PR.
Use the following steps:
git fetch origin pull/####/head:pr-####
git push origin pr-####
The git push will trigger the CircleCI build within the original forked PR.
@ognots you suggested some changes to Circle and parallelism that might help us here. Could you outline that? We agreed that we want contributors to have a first-class experience submitting PRs.
The design outline:
go test parallel setting to 2 (from 8) in order to run in a medium container class without running out of memorygo test test classification tags, break up build_linux in to smaller jobs that can be run in parallel in CircleCI workflowThe following is testing results from Implemented design:
Build time from a go-filecoin committer is on-par with existing builds (~7m30s).
https://circleci.com/workflow-run/19c2526e-8002-498e-b506-deafe0a51b99
Build from fork (15m) takes longer but now completes with medium container class and reduced circleci parellelism.
https://circleci.com/workflow-run/2bbac585-3a25-4729-8766-8006c381f2ee
All in all, this new design seems to address the problem with no loss of performance.
Tomorrow gong to investigate if any additional tweaking can speed up the builds for go-filecoin committers and do some final clean up.
Can go test parallelism be sourced from environment so that local
development can opt in to 8?
On Tue, 16 Apr 2019 at 13:43, Oggy Nots notifications@github.com wrote:
The design outline:
- reduce go test parallel setting to 2 (from 8) in order to run in a
medium container class without running out of memory- set CircleCI container parallelism to 4 (from 1)
- using new go test test classification tags, break up build_linux in
to smaller jobs that can be run in parallel in CircleCI workflowThe following is testing results from Implemented design:
Build time from a go-filecoin committer is on-par with existing builds
(~7m30s).
https://circleci.com/workflow-run/19c2526e-8002-498e-b506-deafe0a51b99Build from fork (15m) takes longer but now completes with medium container
class and reduced circleci parellelism.
https://circleci.com/workflow-run/2bbac585-3a25-4729-8766-8006c381f2eeAll in all, this new design seems to address the problem with no loss of
performance.Tomorrow gong to investigate if any additional tweaking can speed up the
builds for go-filecoin committers and do some final clean up.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/filecoin-project/go-filecoin/issues/2516#issuecomment-483499814,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAbLeqHui9yqdpu95Dk13tkwdeADSxf5ks5vhUb0gaJpZM4ci38h
.
I've made changes to build/main.go to allow overriding parallelism and support CI test splitting, while keeping default go test parallel setting at 8.
have had great results with today's testing incorporating these changes.
here's the final diff: https://github.com/filecoin-project/go-filecoin/compare/test/2/circle-parallelism.~~
I tested with different CircleCI resource classes and parallelism settings.
I accidentally introduced a bug during this test that renders results void, so removing.
New results upcoming
https://circleci.com/workflow-run/c789099c-6c0a-463f-9132-3f5dbeeb3253 throttles unit, integration and functional tests at medium resource class and passes (ran several times to verify). 8:56
https://circleci.com/workflow-run/988aa450-e3bb-445d-8199-6202c8b3c07b runs at optimal settings. 7:41
Most helpful comment
A temporary way to unblock community contributions experiencing this issue is for a go-filecoin committer to fork and push a new branch from an affected PR.
Use the following steps:
The
git pushwill trigger the CircleCI build within the original forked PR.