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

pantsbuild / pants / 7848
0%
main: 93%

Build:
Build:
LAST BUILD BRANCH: go-cross-module-replace-inference
DEFAULT BRANCH: main
Ran 10 Nov 2015 01:09AM UTC
Jobs 8
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
7848

push

travis-ci

kwlzn
Improve exception handling for bad option values, such as when PANTS_CONFIG_OVERRIDE="pants.ini" exists in the environment.

- Catch all exception types during option value eval() to ensure ParseError is reliably raised.
- Add option name context to the error message and mention environment variables to give users an actionable hint as to whats gone wrong.
- Test coverage.

Fixes #2500

Testing Done:
https://travis-ci.org/pantsbuild/pants/builds/89592425

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

before
------

    [illuminati pants-release (master)]$ PANTS_DEV=1 PANTS_CONFIG_OVERRIDE="blah.ini" ./pants
    Exception caught: (<type 'exceptions.NameError'>)
    ...
    Exception message: name 'blah' is not defined

    [illuminati pants-release (master)]$ PANTS_DEV=1 PANTS_CONFIG_OVERRIDE="True" ./pants
    Exception caught: (<class 'pants.option.errors.ParseError'>)
    ...
    Exception message: The value is not of the expected type(s): list, tuple:
    Given the following raw value that evaluated to type bool:
    1: True

    [illuminati pants-release (master)]$ PANTS_DEV=1 PANTS_CONFIG_OVERRIDE="1" ./pants
    Exception caught: (<class 'pants.option.errors.ParseError'>)
    ...
    Exception message: The value is not of the expected type(s): list, tuple:
    Given the following raw value that evaluated to type int:
    1: 1

after
-----

    [illuminati pants (kwlzn/config_override_eval)]$ PANTS_DEV=1 PANTS_CONFIG_OVERRIDE="blah.ini" ./pants
    Exception caught: (<class 'pants.option.errors.ParseError'>)
    ...
    Exception message: Error computing value for --config-override (may also be from PANTS_* environment variables):
    ParseError: The value cannot be evaluated as a literal expression: name 'blah' is not defined
    Given raw value:
    1: blah.ini

    [illuminati pants (kwlzn/config_override_eval)]$ PANTS_DEV=1 PANTS_CONFIG_OVERRIDE="True" ./pants
    Exception caught: (<class 'pants.option.errors.ParseError'>)
    ...
    Exception message: Error computing value for --config-override (may also be from PANTS_* environment variables):
    ParseError: The value is not of the expected type(s): list, tuple:
    Given the following raw value that evaluated to type bool:
    1: True

    [illuminati pants (kwlzn/config_override_eval)]$ PANTS_DEV=1 PANTS_CONFIG_OVERRIDE="1" ./pants
    Exception caught: (<class 'pants.option.errors.ParseError'>)
    ...
    Exception message: Error computing value for --config-override (may also be from PANTS_* environment variables):
    ParseError: The value is not of the expected type(s): list, tuple:
    Given the following raw value that evaluated to type int:
    1: 1

Bugs closed: 2500, 2510

Reviewed at https://rbcommons.com/s/twitter/r/3087/
Jobs
ID Job ID Ran Files Coverage
1 7848.1 (CI_FLAGS="-cjlpn 'Various pants self checks'") 10 Nov 2015 01:09AM UTC 0
Travis Job 7848.1
4 7848.4 (CI_FLAGS="-fkmsrcjlp 'Python contrib tests'") 10 Nov 2015 01:18AM UTC 0
Travis Job 7848.4
5 7848.5 (CI_FLAGS="-fkmsrjlpn -i 0/6 'Python integration tests for pants - shard 1'") 10 Nov 2015 01:14AM UTC 0
Travis Job 7848.5
6 7848.6 (CI_FLAGS="-fkmsrjlpn -i 1/6 'Python integration tests for pants - shard 2'") 10 Nov 2015 01:17AM UTC 0
Travis Job 7848.6
7 7848.7 (CI_FLAGS="-fkmsrjlpn -i 2/6 'Python integration tests for pants - shard 3'") 10 Nov 2015 01:21AM UTC 0
Travis Job 7848.7
8 7848.8 (CI_FLAGS="-fkmsrjlpn -i 3/6 'Python integration tests for pants - shard 4'") 10 Nov 2015 01:22AM UTC 0
Travis Job 7848.8
9 7848.9 (CI_FLAGS="-fkmsrjlpn -i 4/6 'Python integration tests for pants - shard 5'") 10 Nov 2015 01:20AM UTC 0
Travis Job 7848.9
10 7848.10 (CI_FLAGS="-fkmsrjlpn -i 5/6 'Python integration tests for pants - shard 6'") 10 Nov 2015 01:26AM UTC 0
Travis Job 7848.10
Source Files on build 7848
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #7848
  • 14a37f5a on github
  • Prev Build on master (#7846)
  • Next Build on master (#7850)
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