Skip to content

fix: syft-bg services run only the job they should - #9612

Open
koenvanderveen wants to merge 1 commit into
devfrom
koen/run-single-job-in-services
Open

koenvanderveen wants to merge 1 commit into
devfrom
koen/run-single-job-in-services

Conversation

@koenvanderveen

Copy link
Copy Markdown
Collaborator

Two syft-bg services shared a job's output before the data owner could check it (Asana).

Changes

  • SyftJobRunner.run_job(job_name, ds_email, ...) runs one approved job; raises if it isn't approved. process_approved_jobs loops over the same code.
  • SyftRDSClient.run_job(job, ..., sync=False) checks the submitter's version first (raises on a mismatch) and syncs only with sync=True.
  • Approve service runs only api calls (approval_method == "api") and syncs once after. Jobs approved by hand wait for the data owner. A version mismatch skips that call, not the rest.
  • Email service: an "approve" reply runs and shares only the job replied to.

Not in this PR

Whether an email approval should hold the output for review instead of sharing it (the ticket's open question).

Test plan

  • New: single-job run, version error on run_job, approve service skipping hand-approved jobs, email service calling run_job.
  • New flow test over both services: hand-approved job stays approved, email-replied job runs and its output reaches the DS. Fails on the old code.
  • just test-unit-fast (751 passed), syft-rds / syft-job / syft-bg suites (501 passed), pre-commit clean.

The approve service runs only api calls; jobs approved by hand wait for the data owner. An email approval runs and shares only the job replied to. Adds run_job to SyftJobRunner and SyftRDSClient to run a single approved job.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant