Skip to content

Conversation

@bbimber
Copy link
Collaborator

@bbimber bbimber commented Dec 14, 2025

This is related to: #7261.

More background is listed on that issue. In 25.11, additional checks were added to disallow relative filepaths. The problem is that the XAR/Experiment system creates relative filepaths on data import. PR #7261 addressed one problem. After fixing this, I hit the following. This error happens a few lines after the original error. The gist is that LabKey writes out a XAR file for the run, and this file still contains forced relative URLs, even if not under the container's file root.

My proposal here is to make the DataFileURL behavior consistent between ExperimentRun creation and XAR writing. The method "generatePathStringRelativeToRootIfUnderRoot" could certainly get a better name. I can add some code comments if you think this is a viable pathway.

The second path that might work is more involved. The ExpDatas being written to XML store their original non-relative DataFileURL. The XAR code could read that and preferentially swap in that original URI. This is less invasive, but also raises the question of what's the point of writing a relative URI to that XML if we're just going to reverse it.

Here is a stacktrace, from: https://prime-seq.ohsu.edu/Labs/Bimber/1976/pipeline-status-details.view?rowId=602940.

14 Dec 2025 07:58:31,535 ERROR: Path to parent not allowed: ../../../../1973/@files/sequenceOutputPipeline/SequenceOutput_2025-12-07_07-39-02/SingleCell.tca.ctd.PPG_Project2_Tissues_23230_T_NK.seurat.rds
java.nio.file.InvalidPathException: Path to parent not allowed: ../../../../1973/@files/sequenceOutputPipeline/SequenceOutput_2025-12-07_07-39-02/SingleCell.tca.ctd.PPG_Project2_Tissues_23230_T_NK.seurat.rds
	at org.labkey.api.exp.AbstractFileXarSource.canonicalizeDataFileURL(AbstractFileXarSource.java:126)
	at org.labkey.api.exp.XarSource.getCanonicalDataFileURL(XarSource.java:116)
	at org.labkey.experiment.xar.AutoFileLSIDReplacer.getReplacement(AutoFileLSIDReplacer.java:64)
	at org.labkey.api.exp.xar.Replacer$CompoundReplacer.getReplacement(Replacer.java:48)
	at org.labkey.api.exp.xar.LsidUtils.doReplacements(LsidUtils.java:154)
	at org.labkey.api.exp.xar.LsidUtils.resolveStringFromTemplate(LsidUtils.java:131)
	at org.labkey.api.exp.xar.LsidUtils.resolveLsidFromTemplate(LsidUtils.java:95)
	at org.labkey.api.exp.xar.LsidUtils.resolveLsidFromTemplate(LsidUtils.java:206)
	at org.labkey.experiment.XarReader.loadData(XarReader.java:1707)
	at org.labkey.experiment.XarReader.loadDoc(XarReader.java:418)
	at org.labkey.experiment.XarReader.parseAndLoad(XarReader.java:237)
	at org.labkey.experiment.api.ExperimentServiceImpl.importXar(ExperimentServiceImpl.java:2144)
	at org.labkey.experiment.api.ExperimentServiceImpl.importXar(ExperimentServiceImpl.java:2130)
	at org.labkey.experiment.pipeline.XarGeneratorTask.run(XarGeneratorTask.java:177)
	at org.labkey.api.pipeline.PipelineJob.runActiveTask(PipelineJob.java:831)
	at org.labkey.api.pipeline.PipelineJob.run(PipelineJob.java:1079)
	at org.labkey.pipeline.mule.PipelineJobRunner.run(PipelineJobRunner.java:40)
	at jdk.internal.reflect.GeneratedMethodAccessor634.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.mule.impl.model.resolvers.DynamicEntryPoint.invokeMethod(DynamicEntryPoint.java:312)
	at org.mule.impl.model.resolvers.DynamicEntryPoint.invoke(DynamicEntryPoint.java:259)
	at org.mule.impl.DefaultLifecycleAdapter.intercept(DefaultLifecycleAdapter.java:193)
	at org.mule.impl.InterceptorsInvoker.execute(InterceptorsInvoker.java:47)
	at org.mule.impl.model.DefaultMuleProxy.run(DefaultMuleProxy.java:470)
	at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExecution(ThreadPoolExecutor.java:1486)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:391)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:865)
	at org.mule.impl.work.ScheduleWorkExecutor.doExecute(ScheduleWorkExecutor.java:39)
	at org.mule.impl.work.MuleWorkManager.executeWork(MuleWorkManager.java:277)
	at org.mule.impl.work.MuleWorkManager.scheduleWork(MuleWorkManager.java:244)
	at org.mule.impl.model.seda.SedaComponent.run(SedaComponent.java:483)
	at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
	at java.base/java.lang.Thread.run(Thread.java:840)

@bbimber
Copy link
Collaborator Author

bbimber commented Dec 14, 2025

@bbimber
Copy link
Collaborator Author

bbimber commented Dec 14, 2025

Closing in favor of #7267

@bbimber bbimber closed this Dec 14, 2025
@bbimber bbimber deleted the 25.11_fb_expdata_lsid2 branch December 14, 2025 21:30
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.

1 participant