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

Refactor feedback into a computer-friendly structured report [Needs scoping] #263

Open
peterMuriuki opened this issue Aug 19, 2024 · 2 comments · May be fixed by #292
Open

Refactor feedback into a computer-friendly structured report [Needs scoping] #263

peterMuriuki opened this issue Aug 19, 2024 · 2 comments · May be fixed by #292
Assignees
Labels

Comments

@peterMuriuki
Copy link
Contributor

from web I would like to be able to read the importer's output easily parse it and tell:

  • how many records of the csv were processed successfully
  • actionable feedback for each csv record that failed, such that user understands how to fix the respective record in the template.

Related: #140

@Wambere
Copy link
Contributor

Wambere commented Aug 20, 2024

@peterMuriuki can you provide more information on this? Or maybe even examples of what the current output is vs what you want it to be?

@Wambere Wambere self-assigned this Aug 20, 2024
@peterMuriuki
Copy link
Contributor Author

  • Whats the assumed behavior on fail
    • Rejects all records, no record is posted?
    • safer to assume likelyhood of processed records.

Proposed report structure

{
  status: failed, completed
  totalRecs: number
  processedRecs: number
  failedRecs: number
  errorDetails:[
    {
      rowNumber: number
      error: string
      originalRow: string
    },
    {
      // execptions not linked to a record.
      error: string
    }
  ]
}

If job runs to completion:

  • if some records failed
    • set status to failed.
  • if no record failures or any other errors
    • set status to complete

How the report is extracted by web.

  1. Writes report to end of std after a run.
  • Web will deal with exceptions(scenarios that make the importer exit without a proper response)
  1. Agree on proper delimitation of said report.
  • Wrap report between 2 lines of 60 equal signs(=). ============================================================

Non Objectives:

  • reporting real time progress

@Wambere Wambere linked a pull request Sep 24, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants