From 92f57616abfe055c78386d402ee2aca02e647473 Mon Sep 17 00:00:00 2001 From: Cory Nathe Date: Wed, 9 Sep 2026 06:58:12 -0500 Subject: [PATCH] SignalDataImportTask fix to support WebDAV URL that has a context path (#1065) ## Rationale Found by SignalDataFileWatcherTest on TeamCity running with contextPath = /labkey. The change makes the WebDAV lookup of the just-copied data file work when the server runs at a non-root context path. WebdavService.lookup() expects resolver paths without a contextPath. Swapping to lookupHref() applies the context-path substring (WebdavService.java:128-136) so resource resolves, the ExpData gets created, and the row's DataFile value is rewritten to the local copy. ## Related Pull Requests - https://github.com/LabKey/commonAssays/pull/1061 ## Changes - use WebdavService lookupHref instead of lookup in order to strip the contextPath prefix --- .../org/labkey/signaldata/pipeline/SignalDataImportTask.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/signalData/src/org/labkey/signaldata/pipeline/SignalDataImportTask.java b/signalData/src/org/labkey/signaldata/pipeline/SignalDataImportTask.java index 1845008e6..81a7f65aa 100644 --- a/signalData/src/org/labkey/signaldata/pipeline/SignalDataImportTask.java +++ b/signalData/src/org/labkey/signaldata/pipeline/SignalDataImportTask.java @@ -215,7 +215,8 @@ public RecordedActionSet run() URI uri = FileContentService.get().getWebDavUrl(destFile, container, FileContentService.PathType.full); if (uri != null) { - WebdavResource resource = WebdavService.get().lookup(uri.getPath()); + // use lookupHref() as the WebDAV URL carries the context path + WebdavResource resource = WebdavService.get().lookupHref(uri.toString()); if (resource != null) { ExpData data = FileContentService.get().getDataObject(resource, container); @@ -239,7 +240,7 @@ public RecordedActionSet run() row.replace(INPUT_DATA_FILE, dataFileUrl.replace("file:", "")); } else - log.warn("Unable to locate the webdav resource at {}", uri.getPath()); + log.warn("Unable to locate the webdav resource at {}", uri); } else log.warn("Unable to resolve a webdav URL for {}", destFile.getName());