-
Notifications
You must be signed in to change notification settings - Fork 722
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
Build Stages and allow_failures do not work well together #7789
Comments
@backspace what about highlighting the exact jobs, which jobs exactly are allowed to fail? |
@BanzaiMan the issue here is that we move allowed failures to the very end of the matrix during matrix expansion ... i.e. before we then assign stages. I believe the easiest way to resolve this current issue would be to revert https://github.com/travis-ci/travis-gatekeeper/commit/0530ae96c9117c5cab9cb0f70a7aa4bb229d060e ... which probably was based on a user request. The workaround there could be for them to sort allowed failure jobs to the end of the matrix in their .travis.yml file. In order to keep the existing behaviour AND have it work well with stages we'd have to do some refactoring. This part of the code base is ... rather interesting and could use some love. I'm not 100% sure about the priorities. |
This should be fixed. The .travis.yml for the following matrix lists the This change is now in production. |
Brilliant! |
As an initial step in continuous integration testing for Vincent's cross-platform work. Once we get this passing on OS X we can remove the allow_failures entry. The best docs I could find for using allow_failures with build stages was [1], so that's the pattern I'm following. [1]: travis-ci/travis-ci#7789 (comment) Signed-off-by: W. Trevor King <[email protected]>
As an initial step in continuous integration testing for Vincent's cross-platform work. Once we get this passing on OS X we can remove the allow_failures entry. The best docs I could find for using allow_failures with build stages was [1], so that's the pattern I'm following. Travis' OS X docs are in [2]. [1]: travis-ci/travis-ci#7789 (comment) [2]: https://docs.travis-ci.com/user/reference/osx Signed-off-by: W. Trevor King <[email protected]>
As an initial step in continuous integration testing for Vincent's cross-platform work. Once we get this passing on OS X we can remove the allow_failures entry. The best docs I could find for using allow_failures with build stages was [1], so that's the pattern I'm following. Travis' OS X docs are in [2]. The TRAVIS_OS_NAME approach is recommended in [3]. We're not going to actually use any of the storage drivers yet, so we don't need to install btrfs, etc. And the OS X workers already come with automake [4]. We'll see how things work with the other requirements missing [1]: travis-ci/travis-ci#7789 (comment) [2]: https://docs.travis-ci.com/user/reference/osx [3]: https://docs.travis-ci.com/user/installing-dependencies/#Installing-Dependencies-on-Multiple-Operating-Systems [4]: https://docs.travis-ci.com/user/reference/osx#Compilers-and-Build-toolchain Signed-off-by: W. Trevor King <[email protected]>
As an initial step in continuous integration testing for Vincent's cross-platform work. Once we get this passing on OS X we can remove the allow_failures entry. The best docs I could find for using allow_failures with build stages was [1], so that's the pattern I'm following. Travis' OS X docs are in [2]. The TRAVIS_OS_NAME approach is recommended in [3]. We're not going to actually use any of the storage drivers yet, so we don't need to install btrfs, etc. And the OS X workers already come with automake [4]. We'll see how things work with the other requirements missing [1]: travis-ci/travis-ci#7789 (comment) [2]: https://docs.travis-ci.com/user/reference/osx [3]: https://docs.travis-ci.com/user/installing-dependencies/#Installing-Dependencies-on-Multiple-Operating-Systems [4]: https://docs.travis-ci.com/user/reference/osx#Compilers-and-Build-toolchain Signed-off-by: W. Trevor King <[email protected]>
I think it would be good to have some indicator before that stage finished already about which jobs are allowed to fail - got me confused, since I've thought allow_failures was not honored anymore at all. |
I second @blueyed's comment -- it took me an hour to find out that |
@blueyed @krlmlr I believe that it's better to post such suggestions on https://travis-ci.community/c/product to give it more visibility. @svenfuchs is probably going to miss any messages in the closed issue. |
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. - Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.2 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests. While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which wil have to be re-run anyway. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. - Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.2 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests. While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which wil have to be re-run anyway. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. - Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.2 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests. While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which wil have to be re-run anyway. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. - Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.2 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests. While this does mean that the unit tests will run with a slight delay (the `Sniff` and `Rulesets` stages have to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which will have to be re-run anyway. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. - Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.2 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests. While this does mean that the unit tests will run with a slight delay (the `Sniff` and `Rulesets` stages have to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which will have to be re-run anyway. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. - Only run the (heavy) code coverage builds when we already know that the unit tests for most build pass. While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which will have to be re-run anyway. * The output of the Travis jobs will be a lot easier to decipher as it only shows the output related to that particular stage. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677 In addition to this, this PR: * Removes `sudo: false` as it is no longer supported. This switches the build form container-based builds to VM based. See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration * Groups the two separate `cache` directives together. * Simplifies the setting of the `env` variable for the PHPUnit version for those PHP versions which cannot use the Travis image default PHPUnit version. * Removes the global `COVERALLS_VERSION` `env` variable which is no longer needed. * Updates the PHPCS versions in the "mix it up" builds. * Removes `composer self-update` which is no longer needed. Travis does this by default. * Adds `--no-update` to the additional Composer requires so we only invoke `composer install` once, instead of potentially four times. * Attempts to make the script more readable by using multi-line conditions whenever the line would become quite long.
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. - Only run the (heavy) code coverage builds when we already know that the unit tests for most builds pass. While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which will have to be re-run anyway. * The output of the Travis jobs will be a lot easier to decipher as it only shows the output related to that particular stage. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677 In addition to this, this PR: * Removes `sudo: false` as it is no longer supported. This switches the build form container-based builds to VM based. See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration * Groups the two separate `cache` directives together. * Simplifies the setting of the `env` variable for the PHPUnit version for those PHP versions which cannot use the Travis image default PHPUnit version. * Removes the global `COVERALLS_VERSION` `env` variable which is no longer needed. * Updates the PHPCS versions in the "mix it up" builds. * Removes `composer self-update` which is no longer needed. Travis does this by default. * Adds `--no-update` to the additional Composer requires so we only invoke `composer install` once, instead of potentially four times. * Updates the PHP `lint` command to have simpler output (no more the long list of files). * Attempts to make the script more readable by using multi-line conditions whenever the line would become quite long.
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. - Only run the (heavy) code coverage builds when we already know that the unit tests for most builds pass. While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which will have to be re-run anyway. * The output of the Travis jobs will be a lot easier to decipher as it only shows the output related to that particular stage. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677 In addition to this, this PR: * Removes `sudo: false` as it is no longer supported. This switches the build form container-based builds to VM based. See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration * Groups the two separate `cache` directives together. * Simplifies the setting of the `env` variable for the PHPUnit version for those PHP versions which cannot use the Travis image default PHPUnit version. * Removes the global `COVERALLS_VERSION` `env` variable which is no longer needed. * Updates the PHPCS versions in the "mix it up" builds. * Removes `composer self-update` which is no longer needed. Travis does this by default. * Adds `--no-update` to the additional Composer requires so we only invoke `composer install` once, instead of potentially four times. * Updates the PHP `lint` command to have simpler output (no more the long list of files). * Attempts to make the script more readable by using multi-line conditions whenever the line would become quite long.
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. - Only run the (heavy) code coverage builds when we already know that the unit tests for most builds pass. While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which will have to be re-run anyway. * The output of the Travis jobs will be a lot easier to decipher as it only shows the output related to that particular stage. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677 In addition to this, this PR makes the following changes to the Travis script: * Removes `sudo: false` as it is no longer supported. This switches the build form container-based builds to VM based. See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration * Groups the two separate `cache` directives together. * Simplifies the setting of the `env` variable for the PHPUnit version for those PHP versions which cannot use the Travis image default PHPUnit version. * Removes the global `COVERALLS_VERSION` `env` variable which is no longer needed. * Updates the PHPCS versions in the "mix it up" builds. * Removes `composer self-update` which is no longer needed. Travis does this by default. * Adds `--no-update` to the additional Composer requires so we only invoke `composer install` once, instead of potentially four times. * Updates the PHP `lint` command to have simpler output (no more the long list of files). * Attempts to make the script more readable by using multi-line conditions whenever the line would become quite long. It also removes the `phpunit-travis.xml` file and moves the additional config into the normal `phpunit.xml.dist` file. To run PHPUnit without code coverage, either run it on a PHP version without Xdebug enabled or run it with the `--no-coverage` command-line flag. This flag has also been added to the relevant commands in the Travis build script.
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. - Only run the (heavy) code coverage builds when we already know that the unit tests for most builds pass. While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which will have to be re-run anyway. * The output of the Travis jobs will be a lot easier to decipher as it only shows the output related to that particular stage. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677 In addition to this, this PR makes the following changes to the Travis script: * Removes `sudo: false` as it is no longer supported. This switches the build form container-based builds to VM based. See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration * Groups the two separate `cache` directives together. * Simplifies the setting of the `env` variable for the PHPUnit version for those PHP versions which cannot use the Travis image default PHPUnit version. * Removes the global `COVERALLS_VERSION` `env` variable which is no longer needed. * Updates the PHPCS versions in the "mix it up" builds. * Removes `composer self-update` which is no longer needed. Travis does this by default. * Adds `--no-update` to the additional Composer requires so we only invoke `composer install` once, instead of potentially four times. * Updates the PHP `lint` command to have simpler output (no more the long list of files). * Attempts to make the script more readable by using multi-line conditions whenever the line would become quite long. It also removes the `phpunit-travis.xml` file and moves the additional config into the normal `phpunit.xml.dist` file. To run PHPUnit without code coverage, either run it on a PHP version without Xdebug enabled or run it with the `--no-coverage` command-line flag. This flag has also been added to the relevant commands in the Travis build script.
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which will have to be re-run anyway. * The output of the Travis jobs will be a lot easier to decipher as it only shows the output related to that particular stage. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which will have to be re-run anyway. * The output of the Travis jobs will be a lot easier to decipher as it only shows the output related to that particular stage. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. - Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.1 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests. - Add a separate "quicktest" stage for non-PR/merge builds. The "quicktest" stage will only run a CS check, ruleset check, linting and the unit tests against low/high PHP/PHPCS/WPCS combinations. This should catch most issues. The more comprehensive complete build against a larger combination of PHP/PHPCS/WPCS combination will now only be run on PRs and merges to `develop`/`master`. While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which will have to be re-run anyway. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. - Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.1 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests. - Add a separate "quicktest" stage for non-PR/merge builds. The "quicktest" stage will only run a CS check, ruleset check, linting and the unit tests against low/high PHP/PHPCS/WPCS combinations. This should catch most issues. The more comprehensive complete build against a larger combination of PHP/PHPCS/WPCS combination will now only be run on PRs and merges to `develop`/`master`. While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which will have to be re-run anyway. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. - Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.1 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests. - Add a separate "quicktest" stage for non-PR/merge builds. The "quicktest" stage will only run a CS check, ruleset check, linting and the unit tests against low/high PHP/PHPCS/WPCS combinations. This should catch most issues. The more comprehensive complete build against a larger combination of PHP/PHPCS/WPCS combination will now only be run on PRs and merges to `develop`/`master`. While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which will have to be re-run anyway. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. - Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.1 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests. - Add a separate "quicktest" stage for non-PR/merge builds. The "quicktest" stage will only run a CS check, ruleset check, linting and the unit tests against low/high PHP/PHPCS/WPCS combinations. This should catch most issues. The more comprehensive complete build against a larger combination of PHP/PHPCS/WPCS combination will now only be run on PRs and merges to `develop`/`master`. While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which will have to be re-run anyway. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677
Travis now offers stages. Using stages we can: - Run the code style related checks before running any unit tests and stop the build early if any are detected. - Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.1 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests. - Add a separate "quicktest" stage for non-PR/merge builds. The "quicktest" stage will only run a CS check, ruleset check, linting and the unit tests against low/high PHP/PHPCS/WPCS combinations. This should catch most issues. The more comprehensive complete build against a larger combination of PHP/PHPCS/WPCS combination will now only be run on PRs and merges to `develop`/`master`. While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we: * Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found. * We won't be wasting Travis's resources on builds which will have to be re-run anyway. Ref: https://docs.travis-ci.com/user/build-stages/ Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected. For more discussion about this: * travis-ci/travis-ci#7789 * https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217 * https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090 * travis-ci/travis-ci#9677
Problem
When Build Stages is defined, as well as
allow_failures
, queuing order is incorrect.configuration
Expected result
The default "Test" stage contains 3 jobs, 7.0, 7.1, and hhvm, and they are queued first. In this particular case, the hhvm job fails with
false
but is allowed to fail, so upon completion of the "Test" stage, the execution moves on to the "next stage". This, too, will pass, and the build is marked a success.Actual result
https://travis-ci.org/BanzaiMan/travis_production_test/builds/234179350
The "Test" stage contains 2 jobs ("7.0", and "7.1"), which are queued first. They pass, and the execution moves on to the "next stage". The "5.6" job passes, and the "hhvm" job fails; the latter is allowed to fail, though, so the build is marked a pass.
Preliminary discussion
It appears that the logic to queue allowed-to-fail jobs is taking precedence over the stage queuing logic.
In addition, the allowed-to-fail jobs have lost their visual representation to explicitly mark the job allowed to fail. (This is a separate table in the normal build configuration, but such separation in the Build Stage display might be confusing and undesirable.
The text was updated successfully, but these errors were encountered: