CI: Auto-cancel redundant builds
State: closed

This removes the `workflows` section from the `cirleci` config, which broke auto-cancellation.

Also testing whether azure auto-cancels builds.

cc @gfyoung 

Labels:
name: CI
description: Continuous Integration
name: Clean

Comments:
I've had 3 commits

1. the initial commit when opening the PR
2. a second commit `cancel?` after the CIs received their web hook notification
3. a third commit `cancel 2?` after the Cis received their second web hook notification
In theory, https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=2495&view=logs should not be built, since there are later commits on the same branch.
Heh, this was testing azure, but I notice circleci isn't cancelling either.

https://discuss.circleci.com/t/auto-cancel-redundant-builds-not-working-for-workflow/13852/33 says that workflows don't support it yet, but we don't need workflows anymore, since we only have a single build. Will make this into a real PR now :)
OK, all of these should be auto-canceled 

- https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=2498&view=logs
- https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=2499&view=logs
- https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=2497&view=logs
- https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=2496&view=logs
- https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=2495&view=logs

If iI notice https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=2495&view=logs starting though, I'll cancel then all.
<img width="777" alt="screen shot 2018-11-05 at 2 23 11 pm" src="https://user-images.githubusercontent.com/9273653/48030581-60823700-e106-11e8-8cf6-db520215c5fe.png">

I see five (not cancelled) builds...
I'm hoping they're canceled when the build (attempts to) start?
> I'm hoping they're canceled when the build (attempts to) start?

Maybe?  Even so, I prefer Travis' behavior of auto-detecting and cancelling before they even get a chance to start, but perhaps I'm a bit spoiled by Travis :)
https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=2495&view=logs ran, even though we'd like it to have been auto-canceled (I manually canceled the last two).

@chrispatterson do you know if azure pipelines supports auto-cancelling builds when a branch has new commits? Something similar to what's described in https://blog.travis-ci.com/2017-03-22-introducing-auto-cancellation. If not, is there a place I should go to voice support for that feature?
@vtbassmatt do you know if there's a way to auto-cancel queued (or maybe running) builds when new commits are pushed to a PR branch?
That should be the current behavior. (In fact, we've been asked for an explicit flag to override that behavior, which we're in the process of building.) @DavidStaheli any thoughts on why Pandas PR pipelines aren't auto-canceling?
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23523?src=pr&el=h1) Report
> Merging [#23523](https://codecov.io/gh/pandas-dev/pandas/pull/23523?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/d6820ac01c49d4b81ffe7292064eb3a37533efa4?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/23523/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/23523?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #23523   +/-   ##
=======================================
  Coverage   92.26%   92.26%           
=======================================
  Files         161      161           
  Lines       51212    51212           
=======================================
  Hits        47252    47252           
  Misses       3960     3960
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.65% <ø> (ø)` | :arrow_up: |
| #single | `42.28% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23523?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23523?src=pr&el=footer). Last update [d6820ac...870de2b](https://codecov.io/gh/pandas-dev/pandas/pull/23523?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@TomAugspurger, this is a bug specific to using the Azure Pipelines GitHub App.  I'm so sorry for the time it cost you!  We should have a fix deployed to production tomorrow (Thursday) or Friday.
@TomAugspurger lgtm. Pls merge if this will fix the issue.
This will hopefully fix circle. Azure should be fixed with no config changeable. 
@DavidStaheli just in case you're not aware, auto-cancel is still not working
Thanks @datapythonista.  It looks like deployment was delayed at the end of last week and is proceeding again.  Fingers crossed, the fix will be in production by Tuesday afternoon (eastern time) at the latest.
I guessed it was just delayed, but wanted to let you know just in case you thought it was fix. Thanks for the update @DavidStaheli 
@DavidStaheli I'd say that auto-cancel is still not working, is that expected?