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

Outline delete route for H2.0 flask app #4644

Closed
6 tasks
robert-bryson opened this issue Mar 4, 2024 · 7 comments
Closed
6 tasks

Outline delete route for H2.0 flask app #4644

robert-bryson opened this issue Mar 4, 2024 · 7 comments
Assignees
Labels
H2.0/Harvest-Runner Harvest Source Processing for Harvesting 2.0

Comments

@robert-bryson
Copy link
Contributor

robert-bryson commented Mar 4, 2024

User Story

In order to remove harvest sources to our Harvest DB, datagovteam wants to create a new Flask app to handle basic delete of Harvest Source configs.

Links:

Acceptance Criteria

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

  • GIVEN a definition of what delete means in this context
    THEN I can proceed with the creation of the routes below

  • GIVEN I call the route {url}/harvests/delete with a corresponding ID
    THEN the above is implemented

Background

Continuing the work in #4634, what deleting a record needs to be defined. We have a number of possible options available: true delete from the db, a deleted column/flag, moved to an archive table, etc. This ticket is intended to think more deeply about what option best suits our use case, get buy in from the team, and finally implement the solution.

Security Considerations (required)

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

Sketch

  • Explore options for delete
  • Implement proof of concept
  • Get team buy-in
  • Implement refined solution
@jbrown-xentity
Copy link
Contributor

Should "deleting" automatically run a clear? Should a "clear" route exist to clear a harvest source? What would a clear do? What would either a delete or clear do to the harvest jobs, records, and errors?

@rshewitt
Copy link
Contributor

rshewitt commented Mar 5, 2024

  • how frequently are harvest sources "deleted" currently or historically? of those, how many are backtracked?
  • have we ever been expected to remove a harvest source but retain the existing records?
  • what's the oldest information a user has come back to us about concerning a harvesting issue?

@gujral-rei gujral-rei moved this to 📟 Sprint Backlog [7] in data.gov team board Mar 7, 2024
@rshewitt rshewitt self-assigned this Mar 14, 2024
@rshewitt rshewitt moved this from 📟 Sprint Backlog [7] to 🏗 In Progress [8] in data.gov team board Mar 14, 2024
@rshewitt
Copy link
Contributor

we want to hard delete the records with a cascade to start. we would also want to make sure solr is updated to reflect the deletions.

@rshewitt
Copy link
Contributor

@Jin-Sun-tts is working on this in #4654

@rshewitt rshewitt assigned Jin-Sun-tts and unassigned rshewitt Mar 27, 2024
@btylerburton btylerburton added H2.0/Harvest-Runner Harvest Source Processing for Harvesting 2.0 and removed H2.0/Orchestrator labels Mar 28, 2024
@Jin-Sun-tts
Copy link
Contributor

define the relationship with cascade="all, delete-orphan" will delete records cascaded.
Implemented this delete route here: #4654

@github-project-automation github-project-automation bot moved this from 🏗 In Progress [8] to ✔ Done in data.gov team board Apr 1, 2024
@Jin-Sun-tts
Copy link
Contributor

need to add ckan api call to delete all children datasets

@Jin-Sun-tts Jin-Sun-tts moved this from ✔ Done to 📟 Sprint Backlog [7] in data.gov team board Apr 3, 2024
@Jin-Sun-tts
Copy link
Contributor

open a new ticket to Implement dataset deletion on organization/harvest-source removal #4691.

@Jin-Sun-tts Jin-Sun-tts moved this from 📟 Sprint Backlog [7] to ✔ Done in data.gov team board Apr 9, 2024
@hkdctol hkdctol moved this from ✔ Done to 🗄 Closed in data.gov team board Apr 10, 2024
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
Archived in project
Development

No branches or pull requests

5 participants