cuddly-jelly-27016
03/19/2025, 4:37 PMfrom flytekit import task
from click.testing import CliRunner
import os
from flytekit.clis.sdk_in_container import pyflyte
@task()
def example_task(flag: bool) -> bool:
return flag
if __name__ == "__main__":
runner = CliRunner()
path = os.path.realpath(__file__)
result = runner.invoke(pyflyte.main, ["run", "remote-task", "example.example_task", "--no-flag"])
print("Remote Execution: ", result.output)
[image](https://private-user-images.githubusercontent.com/139771199/424582498-f186a4c0-0330-4527-8a11-28ca5c150a89.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDI2MzEwMzEsIm5iZiI6MTc0MjYzMDczMSwicGF0aCI6Ii8xMzk3NzExOTkvNDI0NTgyNDk4LWYxODZhNGMwLTAzMzAtNDUyNy04YTExLTI4Y2E1YzE1MGE4OS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMzIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDMyMlQwODA1MzFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jYTM3NzJmOTY0YjkwMzczMzAxMTk2NThiNmQ0NTBkM2IxZjg2ZjMzNDBmM2U2ZTY2ZTM0ODJiYzA4ZTI4M2VjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.11O1I5g-xFXIue1jTJeNy0DvzvvyGVCGVYpcI40rvr8)
### Setup process
### Screenshots
## 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
### Summary by Bito
This PR fixes a bug in remote-task execution by correcting a faulty boolean assignment in flytekit/remote/remote.py and enhances test coverage for boolean parameter handling. It adds imports and test cases that verify both provided and omitted boolean flags, ensuring proper processing of boolean parameters without type conversion errors.
Unit tests added: True
Estimated effort to review (1-5, lower is better): 1
flyteorg/flytekit