Skip to content

set harvest record "success" status on successful dataset change #5935

Closed
GSA/datagov-harvester
#732

Description

@rshewitt

User Story

In order to provide better meaning to what a "successful" harvest record is, datagov wants to set that status after the dataset change.

Acceptance Criteria

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

  • GIVEN we write harvest records as successful before applying the change to the dataset table
    WHEN the dataset change/write happens
    THEN the harvest record status is "success" \

Background

Security Considerations (required)

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

Sketch

[Notes or a checklist reflecting our understanding of the selected approach]

Activity

  1. deleted a comment from vipinkataria2209 on Jun 24, 2026
  2. SueValente commented on Jun 24, 2026

    @SueValente
    Contributor

    Make this more useful status. Add E num for synched with dataset or something.

  3. added
    bugSoftware defect or bug
    O&MOperations and maintenance tasks for the Data.gov platform
    on Jun 24, 2026
  4. moved this from O&M Backlog to 📥 Queue in data.gov team boardon Jun 24, 2026
  5. added this to the 2026 08 milestone on Jun 24, 2026
  6. removed
    O&MOperations and maintenance tasks for the Data.gov platform
    on Jun 25, 2026
  7. self-assigned this
    on Jun 30, 2026
  8. moved this from 📥 Queue (ready but not in sprint) to 🏗 In Progress in data.gov team boardon Jun 30, 2026
  9. moved this from 🏗 In Progress to 👀 Needs Review in data.gov team boardon Jun 30, 2026
  10. moved this from 👀 Needs Review to 🏗 In Progress in data.gov team boardon Jun 30, 2026
  11. rshewitt commented on Jun 30, 2026

    @rshewitt
    ContributorAuthor

    @jaredb96 here's the things we need to do with this ticket

    • add a new status enum value "dataset_pending" which requires a db migration
    • replace this status with "dataset_pending"
    • then set status = "success" only if the upsert or delete in the dataset table were successful so...
    dataset = self.harvest_source.db_interface.upsert_dataset(
        update_payload
    )
    if dataset:
        self.status = "success"
    
    #############################################
    
    deleted = self.harvest_source.db_interface.delete_dataset_by_slug(
        self.dataset_slug
    )
    if deleted:
        self.status = "success"
        self._delete_dataset_from_opensearch(dataset)

    and then you can just have the record update itself right before the return statement at the end of the function

    self.update_self_in_db()
    
    return True
  12. moved this from 🏗 In Progress to 👀 Needs Review in data.gov team boardon Jul 1, 2026
  13. moved this from 👀 Needs Review to ✔ Done in data.gov team boardon Jul 2, 2026
  14. moved this from ✔ Done to 🗄 Closed in data.gov team boardon Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSoftware defect or bug

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions