"fast_finish" doesnt seem to finish when required builds are done

Hi there,

I’m trying to build my release in Travis, but i don’t want to wait for the release to finish for the PR’s to go green.

Therefore i specify my build matrix like this.
However when the “Test” stage finishes the build is still running.
Allow failures seems to work since if the release stage fails the build still passes.

Does anyone have any suggestions?
I’ve attached my .travis.yml.

.travis.yml
matrix:
  allow_failures:
      - python: 3.7
  fast_finish: true
  include:
    - stage: "Test"
      language: scala
      dist: trusty
      scala:
          - 2.12.7
      jdk:
        - oraclejdk8
      cache:
        directories:
          - $HOME/.ivy2/cache
          - $HOME/.sbt/boot/
      before_cache:
        # Tricks to avoid unnecessary cache updates
        - find $HOME/.ivy2 -name "ivydata-*.properties" -delete
        - find $HOME/.sbt -name "*.lock" -delete

    - stage: "Release"
      language: python # our release script runs in docker, but we need python for setting up
      python: 3.7
      dist: bionic
      services:
        - docker
      before_install:
        - git clone --depth 1 https://secretdeployrepo ../deploy
      install:
        - eval "someinitscript"
      script:
        - deploy release audio-api        

As per https://docs.travis-ci.com/user/customizing-the-build/#fast-finishing , fast_finish: makes the build status turn green earlier. It doesn’t affect what jobs do and don’t run.

Sorry, that was what i meant. I don’t want the stage to stop or not run.
I just want the status to become green (But it doesn’t).

I’m seeing this same issue - our build is not marked as complete until all jobs and stages are finished. This is an example of the basic travis config we’ve been testing with.

language: node_js

env:
  global:
    - FAILS=ALLOWED

install: true

matrix:
  fast_finish: true
  allow_failures:
    - env: FAILS=ALLOWED
  include:
    - stage: one
      name: stage one
      env: FAILS=FALSE
      script: travis_terminate 0
    - stage: two
      name: stage two
      script: travis_terminate 1
      env: FAILS=ALLOWED
    - stage: three
      name: stage three
      install: npm i
      script: travis_terminate 0
      env: FAILS=ALLOWED

All three jobs run, and travis does not change status (in travis nor on github) until “stage three” is totally complete.

Figured out a solution to our problem at least.

I don’t know why, but fast_finish is only working with jobs and not stages (I didn’t really know the difference before a colleague pointed it out).
Since our build can run in parallel i just removed the stage part from our travis.yml and fast_finish works as expected.

I’m not sure what you can to do if you need stages to run jobs sequentially though.

Imprint