I'm working on debugging an issue that seems simil...
# general
b
I'm working on debugging an issue that seems similar to the nested hash bug with
__defaults__
. defaults functionality does not seem to work with
docker_image.cache_from
. https://github.com/pantsbuild/pants/pull/18787 https://github.com/pantsbuild/pants/issues/18784 I'm attempting to set the default value of
cache_from
for all
docker_image
targets. But it constantly fails with
InvalidFieldTypeException
due to being converted to a tuple of FrozenDict when it's expecting a list. I suspect this failure is due to something that field does under the hood. It seems to take either a list of dicts or just a dict. It probably converts the dict to a list of dicts, but something about that breaks with
__deafult__
. I apologize for not posting the exact errors or commands. I don't have slack on the machine where I'm doing the exploring. I'm also still testing so I could be doing something wrong.
It does look like it's the type checking. If I put in a tuple for that value, I get the same error. So
_defaults__
making it a tuple instead of list seems to be the problem. If
docker_images.cache_from
was allowed to have a tuple, that should fix it.
s
It's hard to say without a reproducible example
b
I'll try to get one created soon. I'm bouncing around my pants exploration so much right now.