Coder Social home page Coder Social logo

tweag / stackage-head Goto Github PK

View Code? Open in Web Editor NEW
9.0 67.0 0.0 674 KB

Stackage builds based on GHC HEAD

Home Page: http://stackage-head.s3-website-us-east-1.amazonaws.com/

License: Other

Haskell 97.69% Shell 1.37% Dockerfile 0.94%
stackage ghc regression-testing

stackage-head's Introduction

Stackage builds based on GHC HEAD

CircleCI

This project is an effort to build Stackage with arbitrary GHC development versions and, in particular, with the development HEAD. This allows us to detect regressions during GHC development much faster.

How it works

The process is currently run on Circle CI 4 times a day and can be described as the following progression of steps:

  1. Start with the docker container that is used to build Stackage Nightly, snoyberg/stackage:nightly.

  2. To avoid re-compiling GHC every time we use build artifacts and some associated metadata provided by ghc-artifact-collector.

  3. Download Stackage curator that is used to execute build plans.

  4. Reuse a plan from the stackage-nightly repository. These plans are known to build fine, so they are OK for us in most cases, and even if a couple of packages cannot be built it's not a big deal and can be detected as usual (see below).

  5. Update, if necessary, the downloaded plan setting source URLs in case we need to use not-yet-released versions of some packages.

  6. Execute the chosen build plan and save the build log.

  7. Parse the build log and turn it into a build report, store it for future runs.

  8. Compare two most recent build reports and detect regressions. Fail if there are suspicious changes (which are necessarily due to some changes in GHC, because we build always with the same build plan, only changing GHC commits).

  9. GHC team is notified if the build fails.

Updating the snapshot

The Stackage snapshot used for the builds is updated manually. The reason is that we don't want extra noise and volatility associated with changing snapshots.

Updating the snapshot is usually as simple as editing .circleci/config.yml and changing the line

  BUILD_PLAN: nightly-2018-10-23

to something else.

Occasinally, our docker image also needs to be rebuilt on top of the latest snoyberg/stackage:nightly image—for instance, if a newly added package needs an extra system dependency. The corresponding Dockerfile is at .circleci/images/primary/Dockerfile. The image then needs to be uploaded to Docker Hub and the following line updated in .circleci/config.yml:

  docker:
    - image: rctwg/stackage-head:0.3.2

You can see when snoyberg/stackage:nightly was last updated here.

Blog posts and talks

License

Copyright © 2018 Tweag I/O

Distributed under BSD 3 clause license.

stackage-head's People

Contributors

mchakravarty avatar mrkkrp avatar unkindpartition avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stackage-head's Issues

Adjust CI workflows to have different jobs for triggered and scheduled builds

We currently use the same setup for triggered and scheduled builds and it's not right. When we trigger a build it should run relatively quickly (10 minutes maybe) and indicate state of a branch (green/red). The scheduled runs should on the other hand actually perform build of a build plan and upload static website with results.

Dashboard: split up the Build column

Currently the build column contains the ghc commit hash and the stackage snapshot, but that is not obvious from looking at it. That column should be split into two columns for the commit and snapshot to make it clearer.

Not sure where to put the link to the build info — a separate column?

If a package is unreachable, the reason should be given

If you are interested in a particular package and it is unreachable, currently the dashboard just says "The build is unreachable.". It would be more informative if the reason was given, e.g. unreachable because of the dependency X.

Save CSV files with build results as build artifacts for debugging

Sometimes we need to debug Stackage HEAD. To do this currently I need to re-run a build with SSH and then go and copy some files via scp to re-create a situation locally to debug it.

This

  1. takes relatively long time
  2. requires too much manual intervention to obtain the files of interest.

We can solve this by storing CSV files with Stackage HEAD build results as build artifacts on CircleCI.

Document the steps to update the snapshot

Currently the stackage snapshot needs to be updated manually. We need to automate, simplify, and document this process as much as possible so that we can track the recent nighly snapshots and benefit from the updated/fixed packages.

Also consider always running with the most recent nightly snapshot instead of updating it manually.

Incorrect detection of status changes for failing packages

Currently failing packages are detected as changed if the number of packages they are blocking changes between two versions of a package (older/newer). This is because we just use a derived Eq instance to compare for change. Even though such changes are considered "innocent" by the system and don't trigger alerts, obviously it is not quite correct.

We also need proper testing of this portion of code. Since it showed up in actual app, this proves that it's a part of the application that should be better tested.

cuda fails intermittently

The cuda package occasionally fails, and when it does, there are no errors in the output.

> /tmp/stackage-build2454$ stack unpack cuda-0.10.0.0@sha256:28b310fe829371a51e48ba4eba26a27b864146d46c96147d824ff3ed2251e71c
Unpacked cuda-0.10.0.0 to /tmp/stackage-build2454/cuda-0.10.0.0/
> /tmp/stackage-build2454/cuda-0.10.0.0$ ghc -clear-package-db -global-package-db -package-db=/home/circleci/project/builds/nightly/pkgdb -hide-all-packages -package=Cabal -package=base -package=directory -package=filepath Setup
[1 of 1] Compiling Main             ( Setup.hs, Setup.o )
Linking Setup ...
> /tmp/stackage-build2454/cuda-0.10.0.0$ ./Setup configure --package-db=clear --package-db=global --package-db=/home/circleci/project/builds/nightly/pkgdb --libdir=/home/circleci/project/builds/nightly/lib --bindir=/home/circleci/project/builds/nightly/bin --datadir=/home/circleci/project/builds/nightly/share --libexecdir=/home/circleci/project/builds/nightly/libexec --sysconfdir=/home/circleci/project/builds/nightly/etc --docdir=/home/circleci/project/builds/nightly/doc/cuda-0.10.0.0 --htmldir=/home/circleci/project/builds/nightly/doc/cuda-0.10.0.0 --haddockdir=/home/circleci/project/builds/nightly/doc/cuda-0.10.0.0
Configuring cuda-0.10.0.0...
Found CUDA toolkit at: /usr/local/cuda-8.0
Storing parameters to cuda.buildinfo.generated
Using build information from 'cuda.buildinfo.generated'.
Provide a 'cuda.buildinfo' file to override this behaviour.
> /tmp/stackage-build2454/cuda-0.10.0.0$ ghc -clear-package-db -global-package-db -package-db=/home/circleci/project/builds/nightly/pkgdb -hide-all-packages -package=Cabal -package=base -package=directory -package=filepath Setup
> /tmp/stackage-build2454/cuda-0.10.0.0$ ./Setup build
Using build information from 'cuda.buildinfo.generated'.
Provide a 'cuda.buildinfo' file to override this behaviour.
Preprocessing library for cuda-0.10.0.0..

Do not execute build plan when the commit is already in history

Oftentimes we run a build for a commit that is already in history. This happens when between two Stackage HEAD builds no new commits appeared in GHC master. Obviously this sort of double-checking cannot provide us with any useful information (it may although give a different result if we have some packages with flaky test suites, but it's not valuable info anyway).

We should first check history file and skip execution of build plan for commits that are already in history .

Add a build epoch

At the moment stackage-head assumes that our builds are completely determined by the combination of the stackage snapshot and the ghc commit hash, and will ignore the duplicate combinations.

This assumption is sometimes violated: for instance, when using custom package versions (#27) or fixing bugs/changing the algorithm in stackage-head itself.

I propose to add the epoch number — an integer that will be increased every time there's a change not captured by the snapshot or ghc version to let stackage-head know that this is not a duplicate. This is somewhat analogous to the epoch used in debian and rpm packages.

Add integration tests

These should check that various commands of stackage-head program work as intended.

Refresh Docker image and use fixed stackage-curator

We need to refresh the docker image and in particular use current version of stackage-curator with my fix applied. We currently pull stackage-curator in binary from from some FP Complete-owned bucket I guess. Instead we should build it from source ourselves to be sure which version of the program we'll be using.

Some core packages are failing

At the moment some core packages are failing, including:

  • stm (blocking 84)
  • primitive (blocking 60)
  • memory (blocking 10)

They may be masking some other failures.

We need to investigate why they are failing, whether they are fixed in a newer snapshot or in their git repos. Then make them succeed by either updating the snapshot or using a custom source url.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.