Skip to content

Commit

Permalink
fix pandaDistributionEndpoint to support different protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyuyoung committed Aug 12, 2024
1 parent 0fbcb7a commit be34416
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/bps_panda_DF.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project: dev
campaign: quick
s3EndpointUrl: "https://storage.googleapis.com"
payloadFolder: payload
fileDistributionEndPoint: "file://${LSST_RUN_TEMP_SPACE}/{operator}/panda_cache_box/{payloadFolder}/{uniqProcName}/"
fileDistributionEndPoint: "${LSST_RUN_TEMP_SPACE}/panda_cache_box/{payloadFolder}/{uniqProcName}/"

# location of main butler repo at USDF
payload:
Expand Down
3 changes: 3 additions & 0 deletions python/lsst/ctrl/bps/panda/panda_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ def submit(self, workflow, **kwargs):
lsst_temp = "LSST_RUN_TEMP_SPACE"
if lsst_temp in file_distribution_uri and lsst_temp not in os.environ:
file_distribution_uri = self.config["fileDistributionEndPointDefault"]
protocol_pattern = re.compile(r"^[a-zA-Z][a-zA-Z\d+\-.]*://")

Check warning on line 98 in python/lsst/ctrl/bps/panda/panda_service.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/ctrl/bps/panda/panda_service.py#L98

Added line #L98 was not covered by tests
if not protocol_pattern.match(file_distribution_uri):
file_distribution_uri = "file://" + file_distribution_uri

Check warning on line 100 in python/lsst/ctrl/bps/panda/panda_service.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/ctrl/bps/panda/panda_service.py#L100

Added line #L100 was not covered by tests
copy_files_for_distribution(workflow.files_to_pre_stage, file_distribution_uri, max_copy_workers)

idds_client = get_idds_client(self.config)
Expand Down

0 comments on commit be34416

Please sign in to comment.