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

Update DB After Validate #4747

Closed
3 of 5 tasks
btylerburton opened this issue May 13, 2024 · 2 comments · Fixed by GSA/datagov-harvesting-logic#75
Closed
3 of 5 tasks

Update DB After Validate #4747

btylerburton opened this issue May 13, 2024 · 2 comments · Fixed by GSA/datagov-harvesting-logic#75
Assignees
Labels
H2.0/Harvest-Runner Harvest Source Processing for Harvesting 2.0

Comments

@btylerburton
Copy link
Contributor

btylerburton commented May 13, 2024

User Story

In order to keep an accurate count of the state of our datasets, datagovteam wants to update the Harvesting database with the results of the Validate operation.

Acceptance Criteria

[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]

  • GIVEN a record needs to validated to conform to DCAT-US spec
    AND that operation is successful
    THEN that dataset should be passed along to the sync operation

  • GIVEN a record needs to validated
    AND that operation is unsuccessful
    THEN we should log that failure
    AND we should create a new error in the harvest_error table
    AND that dataset should be added to a list to be marked as "status: error" in the harvest_records db

Background

[Any helpful contextual notes or links to artifacts/evidence, if needed]

Security Considerations (required)

[Any security concerns that might be implicated in the change. "None" is OK, just be explicit here!]

Sketch

  • Loop over records to be deleted
  • Create an error if necessary at runtime
  • Log the result of the validate operation
@btylerburton btylerburton added the H2.0/Harvest-Runner Harvest Source Processing for Harvesting 2.0 label May 13, 2024
@rshewitt rshewitt self-assigned this May 20, 2024
@rshewitt
Copy link
Contributor

we have a FK reference on a nullable field in harvest errors. the FK reference field ( harvest_record.id) is a primary key which can't be null.

@rshewitt rshewitt removed their assignment May 20, 2024
@btylerburton btylerburton self-assigned this May 21, 2024
@btylerburton
Copy link
Contributor Author

Blocked pending conversation about db config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
H2.0/Harvest-Runner Harvest Source Processing for Harvesting 2.0
Projects
Status: 🗄 Closed
Development

Successfully merging a pull request may close this issue.

2 participants