Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1. A, C, & E: ClearImageErrors, ImageError for Unknown Serials #103

Merged
merged 28 commits into from
Jul 28, 2023

Conversation

ingalls
Copy link
Contributor

@ingalls ingalls commented Jul 21, 2023

Background

  • I have gone through and ESified the main API. I have hit a couple dependency issues with serverless as modules are increasingly going ES-Only. Unfortunately Serverless does support ES Modules directly and can cause issues at load as it directly injects handling code into the main runtime at build. This is not possible to work around at this time as the injected code is CommonJS.
  • Switching to image based lambdas also allows us to choose a run-time of choice as AWS has been increasing the time it takes to roll out a new Package Runtime (ie: Node@20). Their documentation pushes folks to use a Dockerized approach for this problem.
  • Finally, this unifies style between Exif-API, ANIML-Ingest, and now ANIML-API and future proofs the installation of dependencies as they go ES-Only.
Icon Note
🟡 Implemented - Not tested
🟢 Tested

1.A Context 🟢

Add an API Endpoint to allow a user to clear Image Errors by a given Batch ID. I've confirmed this functionality works by manually creating an ImageError entry and calling the API per the below example.

Example

{
    query: `
        mutation ClearImageErrors($input: ClearImageErrorsInput!){
            clearImageErrors(input: $input) {
                message
            }
        }
    `,
    variables: {
        input: {
            batch: '123'
        }
    }
}

This PR should be merged after the following:
Ref: #102

1.C Context 🟢

Reject all images w/ unknown SNs in the image-ingest lambda, and write those errors to the ImageError collection.

1.E Redrive Functionality 🟢

Example

Allow user's to perform a redrive, moving SQS Messages from the Dead Letter Queue (DLQ) back into the processing queue.

{
  query: `
      mutation RedriveBatch($input: RedriveBatchInput!){
          redriveBatch(input: $input) {
              message
          }
      }
  `,
  variables: {
      input: {
          batch: 'batch-1d8cb6ca-06a9-4f43-8d6e-4c4324c182ed'
      }
  }

@ingalls ingalls changed the base branch from main to batches-of-batches-override July 21, 2023 16:05
@ingalls ingalls changed the title Bobo clear ClearImageErrors API (1.C) Jul 21, 2023
@ingalls ingalls self-assigned this Jul 21, 2023
@ingalls ingalls changed the title ClearImageErrors API (1.C) 1.C: ClearImageErrors API Jul 21, 2023
@ingalls ingalls changed the title 1.C: ClearImageErrors API 1. A & C: ClearImageErrors, ImageError for Unknown Serials Jul 21, 2023
@ingalls ingalls added the enhancement New feature or request label Jul 24, 2023
@ingalls ingalls changed the title 1. A & C: ClearImageErrors, ImageError for Unknown Serials 1. A, C, & E: ClearImageErrors, ImageError for Unknown Serials Jul 25, 2023
Base automatically changed from batches-of-batches-override to main July 25, 2023 21:38
@nathanielrindlaub nathanielrindlaub merged commit d426c76 into main Jul 28, 2023
3 checks passed
@ingalls ingalls deleted the bobo-clear branch July 28, 2023 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants