What to do of CI builds on obsolete changesets?
If a build is for a changeset that's already obsolete by the time the build starts (more likely to happen if CI is really busy), it will fail with something like
Checking out Hg node 31732d6a012e9d25fbc8e7faa6f8dad040ecd513 as topic/default/refactor-contentdiv... (skip)
abort: unknown revision '31732d6a012e9d25fbc8e7faa6f8dad040ecd513'!
The obsolete changeset is in that situation not available at all in the clone of the runner (not even with --hidden
). What the runner could do, is query obsmarkers, since they are always fully exchange.
But then, what to do with the information: not fail? Return a special payload that'd be equivalent to a cancel?
Alternatively, the Rails app could check upon pushes if some changesets have been obsoleted and if there are pending builds for them, but that's not something we can do very easily at this time. It would be heavier on the Rails app, yet probably better for the whole resources consumption.