Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion did_finder_rucio/src/rucio_did_finder/rucio_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def list_files_for_did(self, did):
try:
reps = self.replica_client.list_replicas(
[{"scope": ds[0], "name": ds[1]}],
schemes=["root", "http", "https"],
schemes=["davs", "root", "http", "https"],
metalink=True,
sort="geoip",
rse_expression="istape=False\\type=SPECIAL",
Expand Down
21 changes: 20 additions & 1 deletion transformer_sidecar/src/transformer_sidecar/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import sys
import time
import timeit
import re
from argparse import Namespace
from hashlib import sha1, sha256
from pathlib import Path
Expand Down Expand Up @@ -131,8 +132,11 @@ def transform_file(
if convert_root_to_parquet:
result_format = "root"

# Change davs to https
_file_paths = change_davs_to_https(paths)

# Prioritize the replicas
_file_paths = prioritize_replicas(paths)
_file_paths = prioritize_replicas(_file_paths)

# adding cache prefix
_file_paths = prepend_xcache(_file_paths)
Expand Down Expand Up @@ -516,6 +520,21 @@ def prioritize_replicas(replicas: list[str]) -> list[str]:
return root_replicas + http_replicas


def change_davs_to_https(replicas: list[str]) -> list[str]:
"""
Converts all replica URLs in the provided list that start with "davs" to use
"https" instead.

Args:
replicas (list[str]): A list of replica URLs or paths.

Returns:
list[str]: A list of replica URLs with "davs" replaced by "https" at the
start of each string.
"""
return [re.sub("^davs", "https", _) for _ in replicas]


def get_process_info():
"""
Get process information (just cpu, sys, iowait times right now) and
Expand Down