From c39f79942061d31d0b138c4a85d044ec634707aa Mon Sep 17 00:00:00 2001 From: Peter Onyisi Date: Sun, 9 Nov 2025 11:05:25 -0600 Subject: [PATCH 1/4] Enable davs requests --- did_finder_rucio/src/rucio_did_finder/rucio_adapter.py | 2 +- .../src/transformer_sidecar/transformer.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/did_finder_rucio/src/rucio_did_finder/rucio_adapter.py b/did_finder_rucio/src/rucio_did_finder/rucio_adapter.py index d93a69318..cd100f8d6 100644 --- a/did_finder_rucio/src/rucio_did_finder/rucio_adapter.py +++ b/did_finder_rucio/src/rucio_did_finder/rucio_adapter.py @@ -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", diff --git a/transformer_sidecar/src/transformer_sidecar/transformer.py b/transformer_sidecar/src/transformer_sidecar/transformer.py index 12ce63882..6ef1067c8 100644 --- a/transformer_sidecar/src/transformer_sidecar/transformer.py +++ b/transformer_sidecar/src/transformer_sidecar/transformer.py @@ -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 @@ -134,6 +135,9 @@ def transform_file( # Prioritize the replicas _file_paths = prioritize_replicas(paths) + # Change davs to https + _file_paths = change_davs_to_https(paths) + # adding cache prefix _file_paths = prepend_xcache(_file_paths) @@ -516,6 +520,10 @@ def prioritize_replicas(replicas: list[str]) -> list[str]: return root_replicas + http_replicas +def change_davs_to_https(replicas: list[str]) -> list[str]: + return [re.sub("^davs", "https", _) for _ in replicas] + + def get_process_info(): """ Get process information (just cpu, sys, iowait times right now) and From c53dfe03ce268a9c1327c110fc0c9473c74bbc30 Mon Sep 17 00:00:00 2001 From: Peter Onyisi Date: Thu, 13 Nov 2025 10:20:01 -0600 Subject: [PATCH 2/4] Update transformer_sidecar/src/transformer_sidecar/transformer.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- transformer_sidecar/src/transformer_sidecar/transformer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transformer_sidecar/src/transformer_sidecar/transformer.py b/transformer_sidecar/src/transformer_sidecar/transformer.py index 6ef1067c8..3fe9ccbac 100644 --- a/transformer_sidecar/src/transformer_sidecar/transformer.py +++ b/transformer_sidecar/src/transformer_sidecar/transformer.py @@ -136,7 +136,7 @@ def transform_file( _file_paths = prioritize_replicas(paths) # Change davs to https - _file_paths = change_davs_to_https(paths) + _file_paths = change_davs_to_https(_file_paths) # adding cache prefix _file_paths = prepend_xcache(_file_paths) From 70b7c470817e849c0db745f76a9b86f009747985 Mon Sep 17 00:00:00 2001 From: Peter Onyisi Date: Fri, 14 Nov 2025 13:34:08 -0600 Subject: [PATCH 3/4] Update transformer_sidecar/src/transformer_sidecar/transformer.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../src/transformer_sidecar/transformer.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/transformer_sidecar/src/transformer_sidecar/transformer.py b/transformer_sidecar/src/transformer_sidecar/transformer.py index 3fe9ccbac..b388188cc 100644 --- a/transformer_sidecar/src/transformer_sidecar/transformer.py +++ b/transformer_sidecar/src/transformer_sidecar/transformer.py @@ -521,6 +521,15 @@ def prioritize_replicas(replicas: list[str]) -> list[str]: 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] From 015d731037f3b4dff5b3cba709d1df09ebda689b Mon Sep 17 00:00:00 2001 From: Peter Onyisi Date: Fri, 14 Nov 2025 13:37:15 -0600 Subject: [PATCH 4/4] Treat davs like https for priority --- .../src/transformer_sidecar/transformer.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/transformer_sidecar/src/transformer_sidecar/transformer.py b/transformer_sidecar/src/transformer_sidecar/transformer.py index b388188cc..cf1a36a68 100644 --- a/transformer_sidecar/src/transformer_sidecar/transformer.py +++ b/transformer_sidecar/src/transformer_sidecar/transformer.py @@ -132,11 +132,11 @@ def transform_file( if convert_root_to_parquet: result_format = "root" - # Prioritize the replicas - _file_paths = prioritize_replicas(paths) - # Change davs to https - _file_paths = change_davs_to_https(_file_paths) + _file_paths = change_davs_to_https(paths) + + # Prioritize the replicas + _file_paths = prioritize_replicas(_file_paths) # adding cache prefix _file_paths = prepend_xcache(_file_paths) @@ -522,13 +522,15 @@ def prioritize_replicas(replicas: list[str]) -> list[str]: 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. + 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. + 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]