• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 8752
0%
main: 93%

Build:
Build:
LAST BUILD BRANCH: pants_lock
DEFAULT BRANCH: main
Ran 26 Jan 2016 02:37AM UTC
Jobs 7
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
8752

push

travis-ci

kwlzn
Improve deprecated option handling to allow options hinting beyond deprecation version.

Currently the deprecated_version of deprecated options are sanity checked against the current pants version. This check disallows deprecated options from existing beyond their expiration release, which limits the ability of `pants` to provide useful options alternative hinting outside of non-fatal warnings. Our experience at Twitter has been that users readily ignore these warnings and furthermore they are easily lost in a barrage of other output and hidden away in CI logs, etc. Users are later surprised when these deprecated options are excised and thus actually begin failing with no hinting.

This RB paves the way for new handling of deprecated options that facilitates display of hint information at the time of execution failure.

The proposed options deprecation lifecycle is thus:

    1) Options are marked deprecated at release X. From here on, pants throws deprecation warnings to users until release X ships.
    2) Once pants hits release X, the deprecated options begin breaking by throwing exceptions that include deprecation hints. Code that depends on these options can then go away.
    3) At some point well into the future (ideally spanning multiple OSS releases to allow for disparate release cycles from OSS vs private), the deprecated options and hints themselves can then be removed.

This RB also temporarily restores the deprecated `--test-junit-suppress-output` option with the new behavior as a first stake towards improved options deprecation handling (and to avoid UX issues in our current internal release).

--------------------------------------------------------------------------------

- Relax check for expired versions in deprecated options.
- Implement version checking for deprecated options at usage time with a conditional error or warning.
- Relax wording ("will be removed" et al) to generalize deprecation notice tense in help and warnings.
- Restore `--test-junit-suppress-output` with a deprecation_version of 0.0.64.
- Test coverage.

Testing Done:
CI is green @ https://travis-ci.org/pantsbuild/pants/builds/104225026

-------------------------------------------------------------------------

```
[illuminati pants (kwlzn/options_lifecycle)]$ ./pants test.junit --suppress-output
INFO] Detected git repository at /Users/kwilson/dev/pants on branch kwlzn/options_lifecycle

18:17:38 00:00 [main]
               (To run a reporting server: ./pants server)
18:17:38 00:00   [setup]
18:17:38 00:00     [parse]
18:17:39 00:01   [complete]
               FAILURE
Exception caught: (<class 'pants.option.errors.DeprecatedOptionError'>)

Exception message: Option 'suppress_output' in scope 'test.junit' is deprecated and removed in version 0.0.64. Use --output-mode instead.

```

-------------------------------------------------------------------------

```
[illuminati pants (kwlzn/options_lifecycle)]$ ptcm
INFO] Detected git repository at /Users/kwilson/dev/pants on branch kwlzn/options_lifecycle

18:14:42 00:00 [main]
               (To run a reporting server: ./pants server)
18:14:42 00:00   [setup]
18:14:42 00:00     [parse]INFO] Operating on changed 6 target(s):
        * src/python/pants/backend/jvm/tasks:junit_run
        * src/python/pants/base:deprecated
        * src/python/pants/help
        * src/python/pants/option
        * tests/python/pants_test/base:deprecated
        * tests/python/pants_test/option:testing

               Executing tasks in goals: bootstrap -> imports -> unpack-jars -> deferred-sources -> gen -> jvm-platform-validate -> resolve -> resources -> compile -> test -> test-changed
...
18:14:43 00:01     [pytest]
18:14:43 00:01       [run]
                     ============== test session starts ===============
                     platform darwin -- Python 2.7.10 -- py-1.4.30 -- pytest-2.6.4
                     plugins: timeout
                     collected 83 items

                     tests/python/pants_test/option/test_arg_splitter.py .........
                     tests/python/pants_test/option/test_options.py ....................................
                     tests/python/pants_test/option/test_option_value_container.py .......
                     tests/python/pants_test/option/test_options_bootstrapper.py .......
                     tests/python/pants_test/option/test_custom_types.py ..
                     tests/python/pants_test/option/test_config.py ...
                     tests/python/pants_test/option/test_options_fingerprinter.py .....
                     tests/python/pants_test/option/test_optionable.py .
                     tests/python/pants_test/base/test_deprecated.py .............

                     =========== 83 passed in 3.10 seconds ============
                     Name                                         Stmts   Miss Branch BrMiss  Cover
                     ------------------------------------------------------------------------------
                     No data to report.

18:14:48 00:06     [junit]
18:14:48 00:06     [go]
18:14:48 00:06     [node]
18:14:48 00:06   [test-changed]
18:14:48 00:06     [test-changed]
18:14:48 00:06   [complete]
               SUCCESS
```

Bugs closed: 2832

Reviewed at https://rbcommons.com/s/twitter/r/3369/
Jobs
ID Job ID Ran Files Coverage
1 8752.1 (CI_FLAGS="-cjlpn 'Various pants self checks'") 26 Jan 2016 02:37AM UTC 0
Travis Job 8752.1
4 8752.4 (CI_FLAGS="-fkmsrcjlp 'Python contrib tests'") 26 Jan 2016 02:56AM UTC 0
Travis Job 8752.4
5 8752.5 (CI_FLAGS="-fkmsrjlpn -i 0/6 'Python integration tests for pants - shard 1'") 26 Jan 2016 02:46AM UTC 0
Travis Job 8752.5
6 8752.6 (CI_FLAGS="-fkmsrjlpn -i 1/6 'Python integration tests for pants - shard 2'") 26 Jan 2016 02:48AM UTC 0
Travis Job 8752.6
7 8752.7 (CI_FLAGS="-fkmsrjlpn -i 2/6 'Python integration tests for pants - shard 3'") 26 Jan 2016 02:51AM UTC 0
Travis Job 8752.7
8 8752.8 (CI_FLAGS="-fkmsrjlpn -i 3/6 'Python integration tests for pants - shard 4'") 26 Jan 2016 02:52AM UTC 0
Travis Job 8752.8
10 8752.10 (CI_FLAGS="-fkmsrjlpn -i 5/6 'Python integration tests for pants - shard 6'") 26 Jan 2016 02:58AM UTC 0
Travis Job 8752.10
Source Files on build 8752
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #8752
  • 055a36d3 on github
  • Prev Build on master (#8742)
  • Next Build on master (#8753)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc