Skip to content

Re-pushing a dataset never reuses its Investigation: the index rows carry no project relationship #260

Description

@sorenwacker

Context: sync_dataset_to_seek reuses an Investigation a previous push created by looking it up by title within the project (find_investigation_id_by_title). The lookup reads GET /investigations, whose index rows carry only id, attributes.title and links - no relationships block - so _relates_to_project(row, project_id) is always false and the lookup never matches. Verified on the local instance: every re-push of the same dataset created a new Investigation (four copies of 'metaseed live-test' per test run before teardown, six 'CropXR phenotyping example' trees over six probe runs).

Goal: pushing the same dataset twice reuses what the first push created, as the docstring and the docs already promise.

Scope: resolve project membership from the item (GET /investigations/{id}) for title matches only, or filter server-side; cover with a unit test whose fake index omits relationships; extend the live round-trip test to push twice and assert reused is non-empty and no second Investigation exists.

Acceptance criteria: a second push of the live test dataset reports reused Investigation/Study/Assays/Samples and creates nothing new.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions