Skip to content

Commit

Permalink
allow input path override (#1536)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1536

## What is this stack

- Bolt has been used in canary for weeks now and we haven't seen reports of any issues
- It's time to productionize
- Early in the stack, I rework some logic to raise the quality bar a bit. At the end of the stack, I delete the legacy runner.

## What

- When resuming a run, update the input path on the instance

## Why

- This makes it so that advertisers who fail during input data validation can update their input file and continue the run (instead of having to wait for the instance to expire)

Reviewed By: joe1234wu

Differential Revision: D39229715

fbshipit-source-id: b1997f4d92d7ed6108e618d297abe738d9a312fe
  • Loading branch information
jrodal98 authored and facebook-github-bot committed Sep 6, 2022
1 parent c90cbbb commit 919f4e6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fbpcs/bolt/oss_bolt_pcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,10 @@ async def validate_results(
async def cancel_current_stage(self, instance_id: str) -> None:
loop = asyncio.get_running_loop()
await loop.run_in_executor(None, self.pcs.cancel_current_stage, instance_id)

async def get_or_create_instance(
self, instance_args: BoltPCSCreateInstanceArgs
) -> str:
instance_id = await super().get_or_create_instance(instance_args)
self.pcs.update_input_path(instance_id, instance_args.input_path)
return instance_id

0 comments on commit 919f4e6

Please sign in to comment.