wonderful-iron-54019
01/29/2020, 1:43 PMFAILURE: Owners for Resources(BuildFileAddress(src/adobe_mta/BUILD, config)) are ambiguous. Found DatabricksJob(BuildFileAddress(src/adobe_mta/BUILD, job)) and 1 others: [PythonLibrary(BuildFileAddress(src/adobe_mta/BUILD, lib))]
Any advice?wonderful-iron-54019
01/29/2020, 2:08 PMDatabricksJob extends PythonLibrary when it isn't really a lib. This was a design decision we made to force the building of the library that the job depends on before deploying it.
We weren't really thrilled with that solution but it seemed to work for the time being. How would we configure a Target to build/publish its dependent libs when being triggered?red-balloon-89377
01/29/2020, 2:31 PM:raises: `AmbiguousOwnerError` if there is more than one viable exported owner target for a
given transitive dependency.
Now, this would indicate that both :lib and :job are exported. I don’t see the code that makes python_library exported by default, but let’s assume it is for now.
The code that raises that exception (https://github.com/blorente/pants/blob/998e4edbe31c64aeacac5142ad90433fce9a748b/src/python/pants/backend/python/tasks/setup_py.py#L187) iterates not only over the dependency chain, but also over the siblings to calculate potential owners (this function call https://github.com/blorente/pants/blob/master/src/python/pants/backend/python/tasks/setup_py.py#L243, which calls this method: https://github.com/blorente/pants/blob/998e4edbe31c64aeacac5142ad90433fce9a748b/src/python/pants/backend/python/tasks/setup_py.py#L73)wonderful-iron-54019
01/29/2020, 2:32 PMwonderful-iron-54019
01/29/2020, 2:32 PMred-balloon-89377
01/29/2020, 2:33 PMred-balloon-89377
01/29/2020, 2:33 PMwonderful-iron-54019
01/29/2020, 2:34 PMwonderful-iron-54019
01/29/2020, 2:34 PMred-balloon-89377
01/29/2020, 2:34 PMwonderful-iron-54019
01/29/2020, 2:46 PMself.context.targets() when self._recursive was setwonderful-iron-54019
01/29/2020, 2:47 PMred-balloon-89377
01/29/2020, 2:50 PMwonderful-iron-54019
01/29/2020, 2:50 PMwonderful-iron-54019
01/29/2020, 3:20 PMred-balloon-89377
01/29/2020, 3:24 PMfancy-motherboard-24956
01/29/2020, 4:28 PMwonderful-iron-54019
01/29/2020, 4:36 PMwonderful-iron-54019
01/29/2020, 4:36 PMhappy-kitchen-89482
02/20/2020, 10:30 PM:lib and :job are both candidates to be the owner of :config, but AFAIK an owner has to be exported (that is, has to have a provides= clause), and neither of those do in your example. Did you elide those out of the example? I assume you were running ./pants setup-py [target] ?wonderful-iron-54019
02/20/2020, 11:09 PM:job gets a summy setup-py as its not really a python library. The PR i have outstanding allows us to stop subclassing the job as a library and still trigger dependent libs' build and publish steps