-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Begin migration to explicitly scoped environments #17155
Conversation
a69bc66
to
c725edc
Compare
Only the top two commits are relevant: the rest are #17179. |
|
||
Then, the `EnvironmentName` should be used at `Get` callsites which require an environment: | ||
```python | ||
Get(TestResult, {field_set: TestFieldSet, environment_name: EnvironmentName}) |
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.
Where do the values for field_set
and environment_name
come from here?
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.
(in the cases that I've seen these, field_set
and environment_name
come from a non-obvious preceding Get
; it looks similar in this case too)
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.
They come from the Get
that is shown a few lines up.
I expect that one of our migration PRs should update this doc to reference itself as a complete example of migrating a goal.
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 seems fine
…equest an environment. [ci skip-rust] [ci skip-build-wheels]
[ci skip-rust] [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]
c725edc
to
7e66fc7
Compare
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.
Lg, thanks
As described in #17129: we would like
@goal_rule
s to eventually make their own decisions about which environments to use, generally by consuming targets to do so, but possibly also by pinning themselves to other environments via configuration.This change builds on #17179, and introduces a migration from
Goal.environment_migrated = {False => True}
. All graph-introspection goals consume only the APIs which are pinned to the local environment by #17179, and so are trivially migrated here. Other goals trigger a deprecation warning like the following:Before calling #17129 done, we will migrate all internal goals to
Goal.environment_migrated=True
.[ci skip-rust]
[ci skip-build-wheels]