-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
Make more option values environment-sensitive #16984
Make more option values environment-sensitive #16984
Conversation
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
Is this PR as cut-and-dry as it seems? In the subsystem definition files, no changes beyond moves? Also this is probably an internal only change. It doesn't impact existing users in any way. Only gives them a new feature, which we aren't yet publicizing |
@Eric-Arellano It is absolutely as cut-and-dry as it seems. Options just need to be moved into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful <3 None of my comments are blocking, they're more notes for future follow ups we need to do
@@ -13,21 +13,22 @@ class PythonNativeCodeSubsystem(Subsystem): | |||
options_scope = "python-native-code" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For posterity: this subsystem has several problems, including #14612
I don't think it blocks this PR, given that environment targets are still experimental. But we should probably fix that ticket before 2.15
|
||
# The certs file will typically not be in the repo, so we can't digest it via a PathGlobs. | ||
# Instead we manually create a FileContent for it. | ||
ca_certs_content = Path(ca_certs_path).read_bytes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not safe, but can be fixed in a follow up #16987
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's also fundamentally not correct :)
Happy to leave it as and fix in follow-up
@@ -20,25 +20,26 @@ class SubprocessEnvironment(Subsystem): | |||
options_scope = "subprocess-environment" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For posterity, this is a really bad subsystem name. I think we only use it in Python.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, we could probably use the deprecation mechanism here if we have a better name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This migrates most of the options identified in the design document for environment configuration to the new
Subsystem.EnvironmentAware
mechanism.This includes:
Please let me know if more options in your subsystem should have support for per-environment option settings
Unaddressed from the design doc:
Currently
[golang]
is missing, because there's a few fields beyond those in the design doc that may need to be migrated, and I am awaiting confirmation. If those questions are resolved before this is ready for merge, I'll add them.There's also some discussion needed about field values on targets, which are currently not part of the environment configuration system, it is not clear that we need to support these.