Skip to content
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

Fix `create_subprocess_encoding_environment` rule. #7789

Merged

Conversation

Projects
None yet
2 participants
@jsirois
Copy link
Member

commented May 22, 2019

This was not converting option values to the right type for python2.7
which led to the following in nightly CRON:

field 'lang' was invalid: value 'en_US.UTF-8' (with type 'newstr') must satisfy this type constraint: Exactly(unicode or NoneType).
field 'lc_all' was invalid: value 'en_US.UTF-8' (with type 'newstr') must satisfy this type constraint: Exactly(unicode or NoneType).)
            Traceback (most recent call last):
              File "/home/travis/.pex/code/4e00e9f8a6de2adf6740aaa38ad0c944fd32aa86/pants/engine/native.py", line 276, in call
                val = func(*args)
              File "/home/travis/.pex/code/4e00e9f8a6de2adf6740aaa38ad0c944fd32aa86/pants/backend/python/subsystems/subprocess_environment.py", line 49, in create_subprocess_encoding_environment
                lc_all=subprocess_environment.get_options().lc_all,
              File "/home/travis/.pex/code/4e00e9f8a6de2adf6740aaa38ad0c944fd32aa86/pants/util/objects.py", line 128, in __new__
                '\n'.join(type_failure_msgs)))
            TypedDatatypeInstanceConstructionError: type check error in class SubprocessEncodingEnvironment: 2 errors type checking constructor arguments:
            field 'lang' was invalid: value 'en_US.UTF-8' (with type 'newstr') must satisfy this type constraint: Exactly(unicode or NoneType).
            field 'lc_all' was invalid: value 'en_US.UTF-8' (with type 'newstr') must satisfy this type constraint: Exactly(unicode or NoneType).

@jsirois jsirois requested a review from Eric-Arellano May 22, 2019

@Eric-Arellano
Copy link
Contributor

left a comment

Thank you. I have a patch for this in #7724 but have kept running into issues landing it, so feel free to land this first.

@jsirois

This comment has been minimized.

Copy link
Member Author

commented May 22, 2019

You're welcome. Will do. I like to treat CRON reds like master reds and stop-the-world and get green.

Fix `create_subprocess_encoding_environment` rule.
This was not converting option values to the right type for python2.7
which led to the following in nightly CRON:
```
field 'lang' was invalid: value 'en_US.UTF-8' (with type 'newstr') must satisfy this type constraint: Exactly(unicode or NoneType).
field 'lc_all' was invalid: value 'en_US.UTF-8' (with type 'newstr') must satisfy this type constraint: Exactly(unicode or NoneType).)
            Traceback (most recent call last):
              File "/home/travis/.pex/code/4e00e9f8a6de2adf6740aaa38ad0c944fd32aa86/pants/engine/native.py", line 276, in call
                val = func(*args)
              File "/home/travis/.pex/code/4e00e9f8a6de2adf6740aaa38ad0c944fd32aa86/pants/backend/python/subsystems/subprocess_environment.py", line 49, in create_subprocess_encoding_environment
                lc_all=subprocess_environment.get_options().lc_all,
              File "/home/travis/.pex/code/4e00e9f8a6de2adf6740aaa38ad0c944fd32aa86/pants/util/objects.py", line 128, in __new__
                '\n'.join(type_failure_msgs)))
            TypedDatatypeInstanceConstructionError: type check error in class SubprocessEncodingEnvironment: 2 errors type checking constructor arguments:
            field 'lang' was invalid: value 'en_US.UTF-8' (with type 'newstr') must satisfy this type constraint: Exactly(unicode or NoneType).
            field 'lc_all' was invalid: value 'en_US.UTF-8' (with type 'newstr') must satisfy this type constraint: Exactly(unicode or NoneType).
```

@jsirois jsirois force-pushed the jsirois:subprocess_environment/fix_for_2.7 branch from c90257a to 91e07c3 May 22, 2019

@jsirois jsirois merged commit e664d72 into pantsbuild:master May 22, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jsirois jsirois deleted the jsirois:subprocess_environment/fix_for_2.7 branch May 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.