-
Notifications
You must be signed in to change notification settings - Fork 204
Add env setting to fleet config for on-prem fleets #1505
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
Add env setting to fleet config for on-prem fleets #1505
Conversation
| pass | ||
|
|
||
|
|
||
| class ApplyEnvVarsConfiguratorMixin(BaseApplyConfigurator): |
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.
Any reason to inherit Mixin from BaseApplyConfigurator? I'd expect Mixin to not inherit from the base class.
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 type annotations only, no reason from the runtime point of view. I have no strong opinion on this, though.
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.
I see. I'd not depend on super to register mixin args but provide a method like register_env_args() similar to apply_env_vars() and call it from the child explicitly. It's easier to reason about and doesn't require to inherit the mixin.
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.
Agree, I'll update the PR.
| _CM = TypeVar("_CM", bound=CoreModel) | ||
|
|
||
|
|
||
| def is_core_model_instance(instance: Any, class_: Type[_CM]) -> TypeGuard[_CM]: |
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.
Didn't know about TypeGuard. That's cool, thanks!
use explicit helper classmethod register_env_args() instead
94a1d77 to
4d2a82b
Compare
See: #1466