Skip to content

Conversation

@labkey-susanh
Copy link
Contributor

@labkey-susanh labkey-susanh commented Jan 28, 2026

Rationale

While investigating approach for allowing deletion of files associated with samples that have become obsolete (Issue 695), it was discovered that when samples are moved from one container to another, the container field in exp.data was not getting updated. For 25.11, we provided a controller action for repairing the container fields in order to allow the obsolete files to be deleted. This controller action would need to be manually hit to do the repair. This PR adds an upgrade script so data will get repaired for everyone.

Related Pull Requests

Changes

  • Add Java upgrade script for repairing sample files
  • Remove ExperimentController.RepairExpDataFilesAction
  • Limit FileContentService.fixContainerForExpDataFiles to only sampletype files (since there can be legitimate duplicate references for assay data files)

Tasks 📍

@labkey-susanh labkey-susanh requested a review from cnathe January 28, 2026 17:22
GROUP BY DataFileUrl) c
WHERE c.count > 1))""");
WHERE c.count > 1))
AND datafileurl LIKE '%/sampletype/%'""");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated to this line, but the logging for this upgrade script seems excessive. I am getting the "Ensuring file data in container /Assay Security Test" INFO log for every container in my server, twice! Seems like we could take that log info statement out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right. I noticed that too and thought it of questionable utility.

@labkey-susanh labkey-susanh merged commit 75a9861 into develop Jan 29, 2026
8 checks passed
@labkey-susanh labkey-susanh deleted the fb_fixFileContainersUpgrade branch January 29, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants