Sigh, UnionRule. Again. I've got a union request t...
# plugins
g
Sigh, UnionRule. Again. I've got a union request type decorated with
@union(in_scope_types=[EnvironmentName])
but I can't run Pants at all now due to rule graph errors:
Copy code
No installed rules return the type HostKubeconfigRequest, and it was not provided by potential callers of @rule(pants_backend_k8s.util.kubeconfig:166:get_kubeconfig_file(HostKubeconfigRequest) -> KubeconfigResponse, gets=[Get(ConfigurationFileResponse, [ConfigurationFileRequest])]).
Which is true, it's created implicitly in helper rule which converts target -> request via the union. This pattern is something I use in lots of places, but for some reason it fails here. If I hardcode the one call site where this request could show up to use this variant the graph works, so something is wrong with the union... I just don't know what. I.e,
Get(KubeconfigResponse, KubeconfigRequest, kubeconfig_request.request)
is broken, but
Get(KubeconfigResponse, HostKubeconfigRequest, kubeconfig_request.request)
is fine.