mysterious-whale-21778
06/28/2023, 4:09 PMtask_mock
can do for local python tasks? While I can get local patching working sometimes, it runs into issues e.g. with explicit task dependencies set like t1() >> t2()
where the return value (mocked as a python type) is missing some flyte node plumbing under the hood.thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
mysterious-whale-21778
06/28/2023, 7:37 PMmysterious-whale-21778
06/28/2023, 7:37 PMmysterious-whale-21778
06/28/2023, 7:38 PMmysterious-whale-21778
06/28/2023, 7:41 PMmysterious-whale-21778
06/28/2023, 7:42 PM__rshift__
logic, it seemingly works ok (though the patches are pretty sensitive to imports in the test...) but the above fails with an assertion errormysterious-whale-21778
06/28/2023, 7:42 PMNone
lacks the ref
attribute needed to actually build the DAGmysterious-whale-21778
06/28/2023, 7:58 PMit should work, and even if there are cases where they don’t we need to improve our error messaging to explain why.I suspect the issue is actually in our guidance for how to mock these, tbh
mysterious-whale-21778
06/30/2023, 2:53 PMhandle
function is built in our internal libraries - it looks like the RemoteEntity
returned by fetch_task
should work with flytekit.testing.patch
right?thankful-minister-83577
thankful-minister-83577
mysterious-whale-21778
06/30/2023, 4:03 PMthankful-minister-83577
mysterious-whale-21778
06/30/2023, 4:10 PMthankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
test_mocking_remote
testmysterious-whale-21778
07/06/2023, 3:54 PMmysterious-whale-21778
07/06/2023, 3:55 PMmysterious-whale-21778
07/06/2023, 7:16 PMfetch_remote
within our internals but that required defining a mock task with matching kwargs for each remote task, which is a little gnarlymysterious-whale-21778
07/06/2023, 7:16 PMtask_mock
the RemoteEntity it grabs like you've got in yoursmysterious-whale-21778
07/06/2023, 7:28 PMthankful-minister-83577
thankful-minister-83577
mysterious-whale-21778
07/06/2023, 8:07 PMthat feeds the interface and the interface needs to be correctly defined.yeah, unless we can get at mocking the internal RemoteEntity reckon we're stuck with it