AUI Processors Runbook

Overview

This is the runbook for OSP Picks to Kafka which covers below components. 1. OSP Events Handler Service 2. Storepick Streams to S3 lambda

This documents (and references) the component documentation. Below are a set of scenarios that may happen in production along with diagnosis and resolution information.

References

Document

Ref

Jira Story (OSP Picks to Availability)

Technical Elaboration - PickTask: SPDP-4695.

Bitbucket (OSP file processor lambda)

https://bitbucket.org/morrisonsplc/aui-osp-productavailability-processor/src/master/

Runtime Issues List

Issue

Component

Description

Issue 1

Lambda event

Error - Invalid file type upload

Issue 2

MIN_validator

PayloadValidationException - when validation fails for one of the fields in the request json

Issue 3

ApplicationConfiguration

ApplicationConfigurationException - application configuration missing

Issue 4

ApplicationDependencies

Exception - Exception while loading configs

Issue 5

Storepick_stream_to_s3 Lambda

botocore.exceptions.ClientError - ClientError - Unexpected client error. Please check config and bucket exists

Issue 6

Storepick_stream_to_s3 Lambda

botocore.exceptions.ClientError - ClientError - Please check config and bucket exists

Issue 7

Storepick_stream_to_s3 Lambda

ValueError - Ve - please check file has a source key Please add file having proper source key

Issue 8

Storepick_stream_to_s3 Lambda

ValueError - Ve - please check and verify that file having correct columns please upload with correct file format

Runtime Issues

Issue 1

Scenario

When unsupported Media Type is set / used in the request json. Unsupported Media Type. Request data unreadable, content type was not set as application/json error code - 415.

Error

Error

Symptoms

ospeventhandler will respond with response code 415 .

Corrective Action

call ospeventhandler with correct request json

Issue 2

Scenario

when validation fails for one of the fields in the request json.

Error

PayloadValidationException raised when validation fails for one of the fields in the request json

Symptoms

ospeventhandler will respond with response code 400 and log it to dynamodb.

Corrective Action

call ospeventhandler with correct request json

Issue 3

Scenario

This happens when application configuration file is missing in the config service or when config service is not reachable.

Error

ApplicationConfigurationException raised when application configuration is missing in config service

Symptoms

ospeventhandler will respond with response code 5XX.

Corrective Action

make sure file storepick-real-time-event-handler.json is available in the config service and SSM is configured correctly.

Issue 4

Scenario

This happens when there is an error while loading all the dependencies needed for the application to run.

Error

Exception raised when loading dependencies

Symptoms

ospeventhandler will respond with response code 5XX.

Corrective Action

PICK_TASK_SNS_NAME fields are present in the config file.

Issue 5

Scenario

This happens when there is an error while writing records into S3.

Error

Exception raised when there is an error while writing records into S3

Symptoms

ClientError - Unexpected client error. Please check config and bucket exists.

Corrective Action

Check config file for S3 configuration. Correct the configuration and reload Lambda function.

Issue 6

Scenario

This happens when there is an error while writing records into AUI topics.

Error

Exception raised when there is an error while writing records into AUI topics.

Symptoms

OSP_PRODUCT_IMPORT_PROCESSOR_PRODUCER_ERROR - Probably due to bad config.

Corrective Action

Check config file for Product Import file processor configuration. Correct the configuration and reload Lambda function.

Issue 7

Scenario

This happens when you add file without a source key in S3 bucket

Error

Exception raised when read object from s3 method cant able to fined file name

Symptoms

ValeError ve: please add file with the source key

Corrective Action

PLease add valid file with correct source keys

Issue 8

This Happens when invalid file is added, like the file containing less columns then required

Error

Exception raised if the file is invalid contain less column then required

Symptoms

ValeError ve: Please check and verify the column of the file

Corrective Action

please check and verify the file before upload