<#3191 [flyteagent] FileSensor Timeout (Remote Exe...
# flyte-github
c
#3191 [flyteagent] FileSensor Timeout (Remote Execution Only) Enhancement Pull request opened by Future-Outlier ## Tracking issue flyteorg/flyte#5035 ## Why are the changes needed? Previously, setting both
timeout
and
metadata
parameters simultaneously in a sensor would raise an error, regardless of whether
metadata
already contained a timeout. This change allows both parameters to be used together as long as there's no conflict (i.e.,
metadata.timeout
is None). ## What changes were proposed in this pull request? • Enhanced the timeout handling logic in
BaseSensor
to allow setting both
timeout
and
metadata
parameters when
metadata.timeout
is None • Updated error message to be more specific about the conflict condition • Added comprehensive test cases covering all timeout and metadata combinations ## How was this patch tested? 1. unit test 2. single binary ### Setup process ### Screenshots [image](https://private-user-images.githubusercontent.com/76461262/422649566-1aa31add-0303-4bc9-90a8-952da6f5e7b5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDIyNDYzMjQsIm5iZiI6MTc0MjI0NjAyNCwicGF0aCI6Ii83NjQ2MTI2Mi80MjI2NDk1NjYtMWFhMzFhZGQtMDMwMy00YmM5LTkwYTgtOTUyZGE2ZjVlN2I1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAzMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMzE3VDIxMTM0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU4ZTNmM2VlMTZiYzQ1NWYxOGY0YWIyM2U2NGNmMGE0OTg5OWNjYzc1ZjQ2NzNlMGQxNTIyMzBmNjEyZjNjMjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.pl1inXwncHAwZiBZXMKkrlKb2VF3yjSNm3T17s7mKiI) ## Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. ## Related PRs ## Docs link flyteorg/flytekit