Skip to content

Cellpack Server Checks Firebase for Recipe #441

@ascibisz

Description

@ascibisz

Use Case

When a recipe is sent to the cellPACK server in the body of the packing request, we want to add a firebase lookup step.

Probably branch off of feature/server-passed-recipe-json

Proposed Solution

This will look something like:

  1. When a user passes a recipe to the server in the body of the request, calculate that recipe's dedup_hash. We will use this dedup_hash as the ID in the job_status collection instead of generating a UUID.
  2. Check if this exact recipe already has an existing result in firebase by querying the job_status collection for that dedup_hash. If so, retrieve that recipe's result file and return that to client
  3. If the recipe doesn't exist in firebase yet, use the dedup_hash as the "job id" for this run (instead of generating a UUID), return it to the client, and run packing. Use this dedup_hash as the ID for the results posted to the job_status collection on firebase.

We should now no longer have any concept of "job ID", we are instead using the dedup_hash in place of this. We should update the variable names to all say dedup_hash instead of job ID to avoid confusion. However, we still need to return "jobId" as a field in the response to the POST request to stay backwards compatible, we will work towards removing this once we're fully deployed.

The dedup_hash should also replace job ID in the path to the S3 outputs.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions