<#7590 UploadInputs should respect run base dir> P...
# flyte-github
a
#7590 UploadInputs should respect run base dir Pull request opened by katrogan Why are the changes needed? Actually respect run_base_dir when it's set in the SDK What changes were proposed in this pull request? Proto changes to capture the run_base_dir and execution time changes to respect it when offloading inputs. This includes updating both UploadInputs and CreateRun How was this patch tested? I ran this workflow with 1 root action (a0) + 5 child actions. Every action has an inputs.pb and an outputs.pb, and those objects are what land in the bucket.
Copy code
@env.task
async def square(x: int) -> int:
    return x * x


@env.task
async def sum_of_squares(n: int = 5) -> int:
    """Parent action (a0). Fans out to `square` so child actions also write under the base."""
    import asyncio

    with flyte.group("squares"):
        results = await asyncio.gather(*(square(i) for i in range(n)))
    total = sum(results)
    print(f"sum of squares 0..{n - 1} = {total}")
    return total
Verified that run_base_dir was respected for child runs too for the following scenarios | Case | flyte2 OSS devbox (RustFS) | | ------------------------------ | ------------------------------------- | | 1 — control (default) | ✅ s3://flyte-data/… | | 2 — custom prefix, same bucket | ✅ s3://flyte-data/eng26673-test/… | | 3 — different bucket | ✅ s3://flyte-data-alt/eng26673-test/… | Labels Please add one or more of the following labels to categorize your PR: • added: For new features. • changed: For changes in existing functionality. • deprecated: For soon-to-be-removed features. • removed: For features being removed. • fixed: For any bug fixed. • security: In case of vulnerabilities This is important to improve the readability of release notes. 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 Stack If you do use
git town
to manage PR Stacks, the stack relevant to this PR will show below. Otherwise, you can ignore this section. Docs link flyteorg/flyte