Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI Refactor #4762

Closed
bkase opened this issue Apr 24, 2020 · 1 comment · Fixed by #4763
Closed

CI Refactor #4762

bkase opened this issue Apr 24, 2020 · 1 comment · Fixed by #4763
Labels
Epic Issues which contain other issues. RFC A label for RFCs (request for comments) Taskforce Iterate (C)

Comments

@bkase
Copy link
Member

bkase commented Apr 24, 2020

Friction:

  • CircleCI is expensive because it's hosted (P1)
  • Slow builds (P2)
    • Our configuration is not scheduled optimally — this leads to slower builds than are actually possible (P2.1)
      • Parallelism is not granular but rather just at the outskirts (P2.1.1)
      • Test execution doesn't share artifacts before fanning out (P2.1.2)
    • Instances are not as large as we'd want them to be (even at the "largest" size) (P2.2)
    • Test execution is not granular (P2.3)
  • Requires a manual template expansion step (test.py) (P3)
  • Iterating on builds is requires running things on our existing build infrastructure (P4)
  • Flaky tests don't have a good story ;; It isn't clear which tests are truly "flaky and we want to ignore the flake" and this failure is important to look at (P5)

Exit Criteria:

  • Framework in place enabling build pipelines to be written to solve the above friction points
  • Framework successfully used to build-artifacts-medium-curves + the new integration tests (everything else can stay as is for now)
@bkase bkase added Taskforce Iterate (C) Epic Issues which contain other issues. labels Apr 24, 2020
@bkase bkase linked a pull request Apr 24, 2020 that will close this issue
@bkase bkase added the RFC A label for RFCs (request for comments) label Apr 27, 2020
bkase added a commit that referenced this issue May 2, 2020
Initial scaffolding for BuildKite CI system

## Summary

For now, builds are generated manually, but it is very easy to trigger them automatically on PRs.

There is no infrastructure for running build agents yet -- so to iterate on builds you can run an agent locally. I have included an `agent.nix` with instructions on how to run the agent on your own computer.

Currently, the agents do not shell out to docker containers so make sure you have installed the environment necessary to run your pipeline before running your agent.

## It works

Included are two samples with separate "dirtyWhen" filters. When the branch includes changes from something in `src/lib` or a file containing `transition` in it the pipeline executes as follows:

<img width="529" alt="Screen Shot 2020-04-29 at 8 10 50 PM" src="https://user-images.githubusercontent.com/515445/80659197-405eda00-8a56-11ea-895d-66850b194ef1.png">

And if your branch does not include such changed files:

<img width="529" alt="Screen Shot 2020-04-29 at 8 11 41 PM" src="https://user-images.githubusercontent.com/515445/80659217-4b196f00-8a56-11ea-8887-c802cde7250b.png">

## Implementation

Pipelines are defined in Dhall. To support monorepo triaging, there is one top-level pipeline that dynamically pushes individual "Job"s to buildkite when a `dirtyWhen` trigger occurs.

BuildKite talks to `.buildkite/pipeline.dhall` which loads `./.buildkite/src/Monorepo.dhall`. Jobs are defined in `./.buildkite/src/jobs/` and two sample jobs are provided as a reference.
Inline comments in the Dhall code can provide more background.

Note that detecting dirty files is handled through the `scripts/generate_diff.sh` script.

Epic: #4762
@mergify mergify bot closed this as completed in #4763 May 2, 2020
@bkase bkase reopened this May 2, 2020
@robinbb
Copy link

robinbb commented Oct 12, 2022

@bkase Over the last many months, work on the CI may have made this issue redundant. Given that it mentions CircleCI, is this issue now deprecated? I grant that some of the problems identified above remain, however. Should this issue be closed? Or, should it pass on to the Mina Foundation engineering team, @bkase ? Or, something else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic Issues which contain other issues. RFC A label for RFCs (request for comments) Taskforce Iterate (C)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants