-
Notifications
You must be signed in to change notification settings - Fork 7
Set the FilePathRoot on moved run #6292
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 the FilePathRoot on moved run #6292
Conversation
labkey-jeckels
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a good change. I can't think of a good reason to keep the runs pointed the previous file path.
Please review these suggestions. If you agree, commit them and I can mirror the branch into our repo to get TeamCity to run tests.
| var pipelineJob = getXarContext().getJob(); | ||
| return pipelineJob != null | ||
| ? FileUtil.stringToPath(getXarContext().getContainer(), pipelineJob.getPipeRoot().getRootFileLike().toNioPathForRead().toString()) | ||
| : getRootPath(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| : getRootPath(); | |
| : super.getJobRootPath(); | |
| vals.setComments(trimString(a.getComments())); | ||
|
|
||
| vals.setFilePathRoot(FileUtil.getAbsolutePath(_xarSource.getRootPath())); // FileUtil.getAbsolutePath(runContext.getContainer(), _job.getPipeRoot().getRootNioPath())); | ||
| // vals.setFilePathRoot(FileUtil.getAbsolutePath(_xarSource.getRootPath())); // FileUtil.getAbsolutePath(runContext.getContainer(), _job.getPipeRoot().getRootNioPath())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // vals.setFilePathRoot(FileUtil.getAbsolutePath(_xarSource.getRootPath())); // FileUtil.getAbsolutePath(runContext.getContainer(), _job.getPipeRoot().getRootNioPath())); |
| { | ||
| var pipelineJob = getXarContext().getJob(); | ||
| return pipelineJob != null | ||
| ? FileUtil.stringToPath(getXarContext().getContainer(), pipelineJob.getPipeRoot().getRootFileLike().toNioPathForRead().toString()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to go through stringToPath?
| ? FileUtil.stringToPath(getXarContext().getContainer(), pipelineJob.getPipeRoot().getRootFileLike().toNioPathForRead().toString()) | |
| ? pipelineJob.getPipeRoot().getRootFileLike().toNioPathForRead() | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that was needed to handle cloud-scheme paths. But FileUtil.getAbsolutePath(_xarSource.getJobRootPath()) in XarReader should take care of that. I've committed the changes.
|
Branch copied to https://github.com/LabKey/platform/tree/24.11_fb_fix-filepathroot-on-move-run. This should get TeamCity builds and tests running |
9c2ce69
into
LabKey:release24.11-SNAPSHOT
Rationale
When a Skyline document is moved to another folder, FilePathRoot on the moved ExpRun continues to point to the source container.
XarReader:vals.setFilePathRoot(FileUtil.getAbsolutePath(_xarSource.getRootPath()))getRootPath()method inMoveRunsXarSourcereturns the root path in the source container.Related Pull Requests