Skip to content

Conversation

@vagisha
Copy link
Contributor

@vagisha vagisha commented Feb 5, 2025

Rationale

When a Skyline document is moved to another folder, FilePathRoot on the moved ExpRun continues to point to the source container.

  • FilePathRoot gets set incorrectly in XarReader:
    vals.setFilePathRoot(FileUtil.getAbsolutePath(_xarSource.getRootPath()))
  • getRootPath() method in MoveRunsXarSource returns the root path in the source container.

Related Pull Requests

Copy link
Contributor

@labkey-jeckels labkey-jeckels left a 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();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
: 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()));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// 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())
Copy link
Contributor

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?

Suggested change
? FileUtil.stringToPath(getXarContext().getContainer(), pipelineJob.getPipeRoot().getRootFileLike().toNioPathForRead().toString())
? pipelineJob.getPipeRoot().getRootFileLike().toNioPathForRead()

Copy link
Contributor Author

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.

@vagisha vagisha marked this pull request as ready for review February 9, 2025 21:07
@labkey-jeckels
Copy link
Contributor

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

@labkey-jeckels labkey-jeckels merged commit 9c2ce69 into LabKey:release24.11-SNAPSHOT Feb 18, 2025
11 checks passed
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.

2 participants