<#5466 [BUG] Tasks from subworkflow calling refere...
# flyte-github
c
#5466 [BUG] Tasks from subworkflow calling reference launch plan read cache from different projects Issue created by ysysys3074 ### Describe the bug In sub-workflow calling a reference launch plan, the tasks will read cache from a different project. 1. the project for current subworkflow(calling a reference launch plan) is yushang-test5 [Screenshot 2024-06-11 at 12 02 39 AM](https://private-user-images.githubusercontent.com/138256885/338473246-02d6656f-b06a-4585-95be-d640ffe483ba.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDgyMTg1MjYsIm5iZiI6MTc0ODIxODIyNiwicGF0aCI6Ii8xMzgyNTY4ODUvMzM4NDczMjQ2LTAyZDY2NTZmLWIwNmEtNDU4NS05NWJlLWQ2NDBmZmU0ODNiYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwNTI2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDUyNlQwMDEwMjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02YzJhYmE1MDQ1NTkyM2YyYmE5ZDViNDdiZTczMmM0NWE2MmQwNmMwMGRlNTUyNWQ4MjA4ZmY4NmZjYjcxOTRhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.tt1TaRFajnrpSYtMz0Vyl7uORtAg7EbV4Yywx1UottQ) 1. but the task from the reference launch plan read from cache, but the source execution of this cache is running on yushang-test4 project. [Screenshot 2024-06-11 at 12 03 21 AM](https://private-user-images.githubusercontent.com/138256885/338473282-b32b2f88-a176-49a7-aef6-a9739463e4c3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDgyMTg1MjYsIm5iZiI6MTc0ODIxODIyNiwicGF0aCI6Ii8xMzgyNTY4ODUvMzM4NDczMjgyLWIzMmIyZjg4LWExNzYtNDlhNy1hZWY2LWE5NzM5NDYzZTRjMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwNTI2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDUyNlQwMDEwMjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lMmQwMjNmYzlmZDFiNDhlNzcxNTk5MzVkZDliZTFmZWJkOTY3MDY1ZmRmOGZlZWQ3YmZjYWI0Yzg1MjU0OTliJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.vBKxN_s0clXvIsAUVwSxMIccGzGcLV1GCgdzXjtFNiM) I did some investigation and found the cache key for the execution is actually attached to reference launch plan's identifier - lp's project/version/domain/name, so all the subworkflow calling the same launch plan will have same cache key. ### Expected behavior Cache should only work in the same project, different projects should not share the cache results which means we should not use lp's identifier as cache key but fetch identifier from current task, otherwise if our own tasks might read results from other people's execution. But i'm more curious what is the rationale of current design, to understand if this design is making sense. ### Additional context to reproduce No response ### Screenshots No response ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte