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

Set ExpRun's filePathRoot to be the container's file root #724

Merged
merged 5 commits into from
May 23, 2023

Conversation

vagisha
Copy link
Collaborator

@vagisha vagisha commented May 22, 2023

Rationale

Skyline documents are typically uploaded and imported from the container's file root when the import is driven by Skyline. However, it is possible to manually upload and import documents from a subfolder of the container's file root. When these runs are exported as part of folder export, the exported directory path does not include the subfolder. For example, for a run imported from @files/SkylineFiles the contents of the export folder look like this:

Run202
  |-- skyline_docr.sky.zip
  |-- skyline_doc

This does not include the SkylineFiles subfolder, and makes it difficult to adjust the dataFileUrls on ExpData in the folder import part of the Panorama Public pipeline. Setting ExpRun's filePathRoot to always be the container's file root will ensure that the exported run files are at the same relative path as they are in the source container:

Run202
  |-- SkylineFiles
        |-- skyline_doc.sky.zip
        |-- skyline_doc

Related Pull Requests

@vagisha vagisha merged commit ceaaf25 into release23.3-SNAPSHOT May 23, 2023
@vagisha vagisha deleted the 23.3_fb_copy_vs_mv_pano_files branch May 23, 2023 16:12
vagisha added a commit to LabKey/MacCossLabModules that referenced this pull request May 25, 2023
…fileUrls. This should not be required anymore due to LabKey/targetedms#724.

Set filePathRoot on the copied expRun to be the target container's file root.
Log error if the data file path is unexpected, i.e. it does not contain "Run<runid>"
labkey-jeckels added a commit to LabKey/MacCossLabModules that referenced this pull request Jul 1, 2023
* - PanoramaPublicFileImporter logs to the job log, and throws an exception if any of the datafileurls could not be fixed.
- PanoramaPublicSymlinkManager.moveAndSymLinkDirectory takes a Logger parameter so the log output can go to the job log
- Added a PanoramaPublicMetadataImporter. I moved some of the code out of CopyExperimentFinalTask into this class. This creates a row in the panoramapublic.experimentannotations table.  It runs before PanoramaPublicFileImporter so that if there is an error, e.g. datafileurls cannot be fixed, the container can be deleted to move files back to the source container.
- Updated test - import a document into a subfolder of the container file root.

* - Fire symlink update events only when file / container being moved / renamed / deleted is in the Panorama Public project. We don't expect folders in other projects to contain symlink targets.
- When handling folder rename (ContainerListener.propertyChange), pass the full paths of the old and renamed containers instead of just the folder names. Otherwise, it can lead to updating all symlinks that have the old folder name in the path.
- When deleting a folder, use ExperimentAnnotationsManager.getExperimentIncludesContainer(c) to lookup the experiment. This method will return the experiment that contains runs from the folder even if it is a subfolder of the folder where the experiment was created.
- When an experiment folder in Panorama Public is deleted, move the files back to next highest experiment version if one exists. Otherwise, move the files back to the source folder.

* Rework datafile alignment

* Scope datafile url to correct container

* Removed PanoramaPublicFileWriter.

* Limit the number of containers to look at when updating symlinks. This should only include the source container in the submitter's project as well as any containers with older versions of the data on Panorama Public.

* Remove code to lookup runs in the source container when aligning datafileUrls. This should not be required anymore due to LabKey/targetedms#724.
Set filePathRoot on the copied expRun to be the target container's file root.
Log error if the data file path is unexpected, i.e. it does not contain "Run<runid>"

Co-authored-by: vagisha <vagisha@gmail.com>
Co-authored-by: Josh Eckels <jeckels@labkey.com>
Co-authored-by: labkey-sweta <swetaj@labkey.com>
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