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 CKAN Delete #4746

Closed
6 tasks
btylerburton opened this issue May 13, 2024 · 1 comment · Fixed by GSA/datagov-harvesting-logic#76
Closed
6 tasks

Update DB After CKAN Delete #4746

btylerburton opened this issue May 13, 2024 · 1 comment · Fixed by GSA/datagov-harvesting-logic#76
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 CKAN delete operation.

Acceptance Criteria

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

  • GIVEN a record is marked to be deleted from CKAN Solr
    AND that operation is successful
    THEN we should log that success
    AND we should add mark that dataset as "state: success" in the harvest_records db.

  • GIVEN a record is marked to be deleted from CKAN Solr
    AND that operation is unsuccessful
    THEN we should log that failure
    AND we should create a new error in the harvest_error table
    AND we should mark that dataset "state: 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
  • Log the result of the delete operation
  • Create an error if necessary at runtime
  • Push the dataset into a failed_delete list if it fails to delete
@btylerburton btylerburton added the H2.0/Harvest-Runner Harvest Source Processing for Harvesting 2.0 label May 13, 2024
@btylerburton
Copy link
Contributor Author

TBD format of error object

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.

1 participant