As far as I can tell: I've declared the @union typ...
# plugins
g
As far as I can tell: I've declared the @union type, I've got handlers for both variants of the request, and I've got my
UnionRule
declarations in place. What did I miss?
It's known by the UnionMembership as well
Copy code
23:49:30.57 [INFO] stdout: "FrozenOrderedSet([<class 'pants_backend_k8s.util.kubeconfig.FileKubeconfigRequest'>, <class 'pants_backend_k8s.util.kubeconfig.HostKubeconfigRequest'>])"
Interestingly, if I hardcode the other variant it still fails, and if I hardcode both with isinstance it also fails. 🤯
c
if you hardcode the callsite to
Get(KubeconfigResponse, OtherKubeconfigRequest)
and it fails, it sounds like it's a problem with that rule. a couple low-confidence suggestions from silly things I've done today: • are you gathering the rule that provides that • are you registering that in the register.py • is the arg for that rule typed with the subclass and not the Union parent
g
Thanks! Yeah, much dumber issue. I was doing a
Get
for targets, but accidentally used
Get(Targets, Dependencies
instead of
Get(Targets, DependenciesRequest
... 😞 Fun thing is, that was in other rule of the union, not the one in the error message.