Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Add an intermediate 'warning' state #2

@RoryO

Description

@RoryO

As of right now we either have a total success or failure state. Sometimes we are processing a batch of records where, for example, some may not pass validations for unrelated reasons. We don't want to signify that the entire run was a failure, but instead collect warnings that will displayed and cataloged as success messages.

To support this, we need:

  • Schema change to add a warnings column in the schlepper_tasks table
  • Check the schema definition on process run to determine if there are schema changes that need to be applied
  • Generate a @warnings array ivar in a new schlepper task script
  • Document @warnings usage in the generated class and in the usage README
  • Check for run.respond_to?(:warnings) && run.warnings.present after the run completes
  • If there are warnings for the run
    • Pretty print the warnings to the console
    • Dump the warnings into the success row for the run

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