internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: rucio/rucio

Issue:
get rid of 1.27 compatibility code in transfers
When we released 1.28, the multihop behavior was changed. To allow correct handling of transfers already existing in the database, the following code was used : 
https://github.com/rucio/rucio/blob/a130e53779d4e3508663fa1036485f7b620611c4/lib/rucio/core/request.py#L963

Remove it


Discussion:

Resolving patch:
diff --git a/lib/rucio/core/request.py b/lib/rucio/core/request.py
--- a/lib/rucio/core/request.py
+++ b/lib/rucio/core/request.py
@@ -960,11 +960,6 @@ def is_intermediate_hop(request):
     """
     Check if the request is an intermediate hop in a multi-hop transfer.
     """
-    if (request['attributes'] or {}).get('next_hop_request_id'):
-        # This is only needed during the migration. When pre- 1.28 requests still exist
-        # in the database and we have to handle them correctly.
-        # TODO: remove this if
-        return True
     if (request['attributes'] or {}).get('is_intermediate_hop'):
         return True
     return False


Test patch:
Repository: rucio/rucio

Issue:
Make Virtual Placement return only complete dataset replicas
### Description

https://github.com/rucio/rucio/blob/a86e74e9a3ee45bf8ffd2c040dd1e2eb4e28ea17/lib/rucio/core/replica.py#L3542-L3551

This checks that the dataset exists on a disk RSE which has a `root://` protocol for reading. It should also check that the dataset is fully replicated.

Reported by R. Walker. 

### Motivation

_No response_

### Change

_No response_


Discussion:
@ivukotic are you available to implement this change?
I could do it if I would know how to ask if the replica is complete... can you please let me know?
Should be an easy change in principle. In the loop above, `list_dataset_replicas` should give you all the necessary information already, including a `state` entry (`AVAILABLE`/`UNAVAILABLE`)
ah OK. I will try to do it today.
solved by: https://github.com/rucio/rucio/pull/6162

Resolving patch:
diff --git a/lib/rucio/core/replica.py b/lib/rucio/core/replica.py
--- a/lib/rucio/core/replica.py
+++ b/lib/rucio/core/replica.py
@@ -3540,6 +3540,8 @@ def list_dataset_replicas_vp(scope, name, deep=False, *, session: "Session", log
         # and can be accessed from WAN
         accessible_replica_exists = False
         for reply in list_dataset_replicas(scope=scope, name=name, deep=deep, session=session):
+            if reply['state'] != ReplicaState.AVAILABLE:
+                continue
             rse_info = rsemgr.get_rse_info(rse=reply['rse'], vo=scope.vo, session=session)
             if rse_info['rse_type'] == 'TAPE':
                 continue


Test patch:
Repository: rucio/rucio

Issue:
The Reaper may work on the wrong set of RSEs
### Description

Under some rather particular circumstances, it is possible for a Reaper instance to work an a different set of RSEs than the one specified through the command line arguments.

### Steps to reproduce

 1. Have an environment were multiple Reaper instances share the same Memcached instance.
 2. Start a new Reaper instance that works on a different set of RSEs that the already existing one.

### Rucio Version

_No response_

### Additional Information

The issue come from the following part of the code and the fact that, in pods, the Reaper process is using PID 1.

https://github.com/rucio/rucio/blob/ea4d2c7e2702b85a86a8668b2d852971f42fceb4/lib/rucio/daemons/reaper/reaper.py#L98-L102


Discussion:
Do you think it would be enough to have a `cache_key` based on the hostname + pid ?
Just so that it isn’t forgotten: we discussed in person and we agreed that the key should probably come from some combination of the command-line arguments that affect the RSE selection (e.g. concatenate, then hash).

Resolving patch:
diff --git a/lib/rucio/daemons/reaper/reaper.py b/lib/rucio/daemons/reaper/reaper.py
--- a/lib/rucio/daemons/reaper/reaper.py
+++ b/lib/rucio/daemons/reaper/reaper.py
@@ -19,7 +19,6 @@
 
 import functools
 import logging
-import os
 import random
 import threading
 import time
@@ -94,8 +93,7 @@ def get_rses_to_process(rses, include_rses, exclude_rses, vos):
             vos = [v['vo'] for v in list_vos()]
         logging.log(logging.INFO, 'Reaper: This instance will work on VO%s: %s' % ('s' if len(vos) > 1 else '', ', '.join([v for v in vos])))
 
-    pid = os.getpid()
-    cache_key = 'rses_to_process_%s' % pid
+    cache_key = 'rses_to_process_1%s2%s3%s' % (str(rses), str(include_rses), str(exclude_rses))
     if multi_vo:
         cache_key += '@%s' % '-'.join(vo for vo in vos)
 


Test patch:
Repository: rucio/rucio

Issue:
Attaching a collection to a container does not trigger the re-evaluation of its rules
### Description

This appears to be a regression from #4611. It seems to have been partially fixed in #5676 but only for the implementation without temporary tables.

One thing that needs to be investigated is why the related test is successful.

On the operations side, it might be necessary to manually trigger the re-evaluation of all rules on containers.

### Steps to reproduce

1. Attach a dataset to a container that has a rule in `OK` state.
2. Watch the rule remain unaffected.

### Rucio Version

_No response_

### Additional Information

_No response_


Discussion:
Needs to be backported to 1.29

Resolving patch:
diff --git a/lib/rucio/core/did.py b/lib/rucio/core/did.py
--- a/lib/rucio/core/did.py
+++ b/lib/rucio/core/did.py
@@ -324,6 +324,8 @@ def _attach_dids_to_dids(
                 models.DataIdentifier, "INDEX(DIDS DIDS_PK)", 'oracle'
             )
             parent_did = session.execute(stmt).scalar_one()
+            update_parent = False
+
             if not first_iteration:
                 session.query(children_temp_table).delete()
             session.bulk_insert_mappings(children_temp_table, [{'scope': s, 'name': n} for s, n in children])
@@ -351,6 +353,7 @@ def _attach_dids_to_dids(
                                               ignore_duplicate=ignore_duplicate,
                                               rse_id=attachment.get('rse_id'),
                                               session=session)
+                update_parent = len(cont) > 0
 
             elif parent_did.did_type == DIDType.CONTAINER:
                 __add_collections_to_container(parent_did=parent_did,
@@ -358,8 +361,9 @@ def _attach_dids_to_dids(
                                                collections=children,
                                                account=account,
                                                session=session)
+                update_parent = True
 
-            if cont:
+            if update_parent:
                 # cont contains the parent of the files and is only filled if the files does not exist yet
                 parent_dids.append({'scope': parent_did.scope,
                                     'name': parent_did.name,


Test patch:
diff --git a/lib/rucio/tests/test_judge_evaluator.py b/lib/rucio/tests/test_judge_evaluator.py
--- a/lib/rucio/tests/test_judge_evaluator.py
+++ b/lib/rucio/tests/test_judge_evaluator.py
@@ -128,6 +128,10 @@ def test_judge_add_dataset_to_container(self):
         attach_dids(scope, dataset, files, self.jdoe)
 
         parent_container = 'dataset_' + str(uuid())
+
+        # Fake judge to clean out queue
+        re_evaluator(once=True, did_limit=None)
+
         add_did(scope, parent_container, DIDType.CONTAINER, self.jdoe)
         # Add a first rule to the DS
         add_rule(dids=[{'scope': scope, 'name': parent_container}], account=self.jdoe, copies=2, rse_expression=self.T1, grouping='DATASET', weight=None, lifetime=None, locked=False, subscription_id=None)
Repository: rucio/rucio

Issue:
remove REPLICAS_TOMBSTONE_IDX and REPLICAS_RSE_ID_IDX indexes
REPLICAS_RSE_ID_TOMBSTONE_IDX substituted both of them in a previous release. 


Discussion:

Resolving patch:
diff --git a/lib/rucio/alembicrevision.py b/lib/rucio/alembicrevision.py
--- a/lib/rucio/alembicrevision.py
+++ b/lib/rucio/alembicrevision.py
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ALEMBIC_REVISION = '295289b5a800'  # the current alembic head revision
+ALEMBIC_REVISION = '27e3a68927fb'  # the current alembic head revision
diff --git a/lib/rucio/db/sqla/migrate_repo/versions/27e3a68927fb_remove_replicas_tombstone_and_replicas_.py b/lib/rucio/db/sqla/migrate_repo/versions/27e3a68927fb_remove_replicas_tombstone_and_replicas_.py
new file mode 100644
--- /dev/null
+++ b/lib/rucio/db/sqla/migrate_repo/versions/27e3a68927fb_remove_replicas_tombstone_and_replicas_.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+# Copyright European Organization for Nuclear Research (CERN) since 2012
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+''' remove replicas_tombstone and replicas_rse_id indexes '''
+
+from alembic.op import create_index, drop_index
+
+# Alembic revision identifiers
+revision = '27e3a68927fb'
+down_revision = '295289b5a800'
+
+
+def upgrade():
+    '''
+    Upgrade the database to this revision
+    '''
+
+    drop_index('REPLICAS_TOMBSTONE_IDX', 'replicas')
+    drop_index('REPLICAS_RSE_ID_IDX', 'replicas')
+
+
+def downgrade():
+    '''
+    Downgrade the database to the previous revision
+    '''
+    create_index('REPLICAS_RSE_ID_IDX', 'replicas', ['rse_id'])
+    create_index('REPLICAS_TOMBSTONE_IDX', 'replicas', ['tombstone'])
diff --git a/lib/rucio/db/sqla/models.py b/lib/rucio/db/sqla/models.py
--- a/lib/rucio/db/sqla/models.py
+++ b/lib/rucio/db/sqla/models.py
@@ -952,10 +952,8 @@ class RSEFileAssociation(BASE, ModelBase):
                    CheckConstraint('STATE IS NOT NULL', name='REPLICAS_STATE_NN'),
                    CheckConstraint('bytes IS NOT NULL', name='REPLICAS_SIZE_NN'),
                    CheckConstraint('lock_cnt IS NOT NULL', name='REPLICAS_LOCK_CNT_NN'),
-                   Index('REPLICAS_TOMBSTONE_IDX', 'tombstone'),
                    Index('REPLICAS_PATH_IDX', 'path', mysql_length=get_schema_value('NAME_LENGTH')),
                    Index('REPLICAS_STATE_IDX', 'state'),
-                   Index('REPLICAS_RSE_ID_IDX', 'rse_id'),
                    Index('REPLICAS_RSE_ID_TOMBSTONE_IDX', 'rse_id', 'tombstone'))
 
 


Test patch:
Repository: rucio/rucio

Issue:
x509 authentication fails for baseclient.py
### Description

Since https://github.com/rucio/containers/pull/218 , the apache config for the rucio server forces clients to explicitly provide Client Certificates when trying to reach the `/auth/x509` endpoint.
While this enables browser-based clients to request a client certificate from the user, the mechanism does not work for CLI clients as they are missing handling of TLS 1.3 Post Handshake Authentication workflow https://github.com/curl/curl/issues/3026 

 



### Steps to reproduce

1. Use x509 in the rucio.cfg client configuration, provide a valid cert and key
2. run any rucio command

### Rucio Version

32.0.0

### Additional Information

_No response_


Discussion:

Resolving patch:
diff --git a/lib/rucio/web/rest/flaskapi/v1/auth.py b/lib/rucio/web/rest/flaskapi/v1/auth.py
--- a/lib/rucio/web/rest/flaskapi/v1/auth.py
+++ b/lib/rucio/web/rest/flaskapi/v1/auth.py
@@ -1611,6 +1611,7 @@ def blueprint():
     bp.add_url_rule('/gss', view_func=gss_view, methods=['get', 'options'])
     x509_view = x509.as_view('x509')
     bp.add_url_rule('/x509', view_func=x509_view, methods=['get', 'options'])
+    bp.add_url_rule('/x509/webui', view_func=x509_view, methods=['get', 'options'])
     bp.add_url_rule('/x509_proxy', view_func=x509_view, methods=['get', 'options'])
     ssh_view = SSH.as_view('ssh')
     bp.add_url_rule('/ssh', view_func=ssh_view, methods=['get', 'options'])


Test patch:
Repository: rucio/rucio

Issue:
drop support for the 1.29 distances table format
The code was intended to allow both 1.29 and 1.30 servers to run in parallel on the same database.

https://github.com/rucio/rucio/blob/4380d0247965f5db7ac05c25c48891dc0a840937/lib/rucio/db/sqla/models.py#L1411


Discussion:

Resolving patch:
diff --git a/lib/rucio/db/sqla/models.py b/lib/rucio/db/sqla/models.py
--- a/lib/rucio/db/sqla/models.py
+++ b/lib/rucio/db/sqla/models.py
@@ -17,7 +17,7 @@
 from datetime import datetime, timedelta
 from typing import Any, Optional, Union
 
-from sqlalchemy import BigInteger, Boolean, DateTime, Enum, Float, Integer, SmallInteger, String, Text, event, UniqueConstraint, inspect
+from sqlalchemy import BigInteger, Boolean, DateTime, Enum, Float, Integer, SmallInteger, String, Text, event, UniqueConstraint
 from sqlalchemy.engine import Engine
 from sqlalchemy.ext.compiler import compiles
 from sqlalchemy.ext.declarative import declared_attr
@@ -34,7 +34,7 @@
                                      RuleState, ReplicaState, RequestState, RequestType, RSEType,
                                      ScopeStatus, SubscriptionState, RuleNotification, LifetimeExceptionsState,
                                      BadPFNStatus, TransferLimitDirection)
-from rucio.db.sqla.session import BASE, get_engine
+from rucio.db.sqla.session import BASE
 from rucio.db.sqla.types import GUID, BooleanString, JSON
 from rucio.db.sqla.types import InternalAccountString
 from rucio.db.sqla.types import InternalScopeString
@@ -1408,24 +1408,12 @@ class SourceHistory(BASE, ModelBase):
                    )
 
 
-# Compatibility code to permit 1.30 to run with a distances table from the 1.29 database schema
-# TODO: remove this code in rucio 1.31
-_distance_column_name = 'distance'
-_engine = get_engine()
-if _engine.dialect.name in ['oracle', 'mysql', 'postgresql']:
-    _insp = inspect(_engine)
-    if _engine.dialect.name in ['oracle', 'postgresql'] or BASE.metadata.schema in _insp.get_schema_names():
-        if 'distances' in _insp.get_table_names(schema=BASE.metadata.schema):
-            if any(c['name'] == 'ranking' for c in _insp.get_columns(table_name='distances', schema=BASE.metadata.schema)):
-                _distance_column_name = 'ranking'
-
-
 class Distance(BASE, ModelBase):
     """Represents distance between rses"""
     __tablename__ = 'distances'
     src_rse_id: Mapped[uuid.UUID] = mapped_column(GUID())
     dest_rse_id: Mapped[uuid.UUID] = mapped_column(GUID())
-    distance: Mapped[Optional[int]] = mapped_column(Integer(), name=_distance_column_name)
+    distance: Mapped[Optional[int]] = mapped_column(Integer())
     _table_args = (PrimaryKeyConstraint('src_rse_id', 'dest_rse_id', name='DISTANCES_PK'),
                    ForeignKeyConstraint(['src_rse_id'], ['rses.id'], name='DISTANCES_SRC_RSES_FK'),
                    ForeignKeyConstraint(['dest_rse_id'], ['rses.id'], name='DISTANCES_DEST_RSES_FK'),


Test patch:
Repository: rucio/rucio

Issue:
List DID Rules will give 200 even if DID does not exist
### Description

Rucio will return a `200 OK` when querying DID Rules even when the scopename is invalid.

### Steps to reproduce

1. `GET /dids/<scope>/<name>/rules`
2. get a `200 OK` even if the scopename is not valid

### Rucio Version

32.3.0

### Additional Information

Discovered while developing the WebUI
List DID Rules will give 200 even if DID does not exist
### Description

Rucio will return a `200 OK` when querying DID Rules even when the scopename is invalid.

### Steps to reproduce

1. `GET /dids/<scope>/<name>/rules`
2. get a `200 OK` even if the scopename is not valid

### Rucio Version

32.3.0

### Additional Information

Discovered while developing the WebUI


Discussion:

Resolving patch:
diff --git a/lib/rucio/web/rest/flaskapi/v1/dids.py b/lib/rucio/web/rest/flaskapi/v1/dids.py
--- a/lib/rucio/web/rest/flaskapi/v1/dids.py
+++ b/lib/rucio/web/rest/flaskapi/v1/dids.py
@@ -1526,6 +1526,7 @@ def get(self, scope_name):
             scope, name = parse_scope_name(scope_name, request.environ.get('vo'))
 
             def generate(vo):
+                get_did(scope=scope, name=name, vo=vo)
                 for rule in list_replication_rules({'scope': scope, 'name': name}, vo=vo):
                     yield dumps(rule, cls=APIEncoder) + '\n'
 
@@ -1534,6 +1535,8 @@ def generate(vo):
             return generate_http_error_flask(400, error)
         except RuleNotFound as error:
             return generate_http_error_flask(404, error)
+        except DataIdentifierNotFound as error:
+            return generate_http_error_flask(404, error)
 
 
 class BulkMeta(ErrorHandlingMethodView):


Test patch:
Repository: rucio/rucio

Issue:
allow exposing /ping on a separate rest endpoint
This is to allow health checks in kubernetes to be done on a different port. Otherwise things don't play nicely with the proxy protocol


Discussion:

Resolving patch:
diff --git a/lib/rucio/web/rest/flaskapi/v1/ping.py b/lib/rucio/web/rest/flaskapi/v1/ping.py
--- a/lib/rucio/web/rest/flaskapi/v1/ping.py
+++ b/lib/rucio/web/rest/flaskapi/v1/ping.py
@@ -69,8 +69,8 @@ def get(self):
         return response
 
 
-def blueprint(with_doc=False):
-    bp = Blueprint('ping', __name__, url_prefix='/ping')
+def blueprint(standalone=False, with_doc=False):
+    bp = Blueprint('ping', __name__, url_prefix='/' if standalone else '/ping')
 
     ping_view = Ping.as_view('ping')
     if not with_doc:
diff --git a/lib/rucio/web/rest/ping.py b/lib/rucio/web/rest/ping.py
new file mode 100644
--- /dev/null
+++ b/lib/rucio/web/rest/ping.py
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+# Copyright European Organization for Nuclear Research (CERN) since 2012
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from flask import Flask
+
+from rucio.common.logging import setup_logging
+from rucio.web.rest.flaskapi.v1.ping import blueprint as metrics_blueprint
+
+# Allow to run the /ping endpoint as a separate application on a separate PORT
+
+setup_logging()
+application = Flask(__name__)
+application.register_blueprint(metrics_blueprint(standalone=True))
+
+if __name__ == '__main__':
+    application.run()


Test patch:
Repository: rucio/rucio

Issue:
Panda jobs fail for QoS RSE when RSE type is DISK 
### Description

Motivation: For Panda to support QoS in Rucio, RSE Type must be of type `DISK` and send proper overwrite value of `False` to FTS.
Modification: always return `overwrite` of `False` when the RSE attribute `staging_required` is `True`.


### Steps to reproduce

Create rules in panda to write files to a QoS RSE (as defined by RSE attributes of `staging_required`=`True` and some integer value for `maximum_pin_lifetime`).

### Rucio Version

32.1.0

### Additional Information

_No response_


Discussion:

Resolving patch:
diff --git a/lib/rucio/core/rse.py b/lib/rucio/core/rse.py
--- a/lib/rucio/core/rse.py
+++ b/lib/rucio/core/rse.py
@@ -121,7 +121,7 @@ def __eq__(self, other):
         return self.id == other.id
 
     def is_tape(self):
-        if self.info['rse_type'] == RSEType.TAPE or self.info['rse_type'] == 'TAPE':
+        if self.info['rse_type'] == RSEType.TAPE or self.info['rse_type'] == 'TAPE' or self.attributes.get('staging_required', False):
             return True
         return False
 


Test patch:
Repository: rucio/rucio

Issue:
Unused subscription name in `subscriptions/<account>/<name>/Rules/States` endpoint
### Description

The endpoint requires specifying a subscription name

https://github.com/rucio/rucio/blob/fc3973a83b9d658fba5ef9f645f5816a594d4586/lib/rucio/web/rest/flaskapi/v1/subscriptions.py#L626-L627

However, it returns rule states for all subscriptions for the provided account

https://github.com/rucio/rucio/blob/fc3973a83b9d658fba5ef9f645f5816a594d4586/lib/rucio/web/rest/flaskapi/v1/subscriptions.py#L532-L534

So technically, a request to `https://rucio-server.com/subscriptions/jdoe/HOLWAMJFDRSI/Rules/States` is a valid request

### Steps to reproduce

Make a request to 
`https://rucio-server.com/subscriptions/validAccount/invalidSubscription/Rules/Satetes`

### Rucio Version

32.x

### Additional Information

Depending on how this feature is fixed, we might have to make changes in the new webui. We also need to make sure that the change is backward compatible with older clients.


Discussion:
@cserf do you remember the reasoning here, or was this just a mistake? 
That's a mistake.
Am I missing something or is this fix simply a matter of parsing the name to the api thusly:

```diff        
def generate(vo):
-    for row in list_subscription_rule_states(account=account, vo=vo):
+    for row in list_subscription_rule_states(name=name, account=account, vo=vo):
        yield dumps(row, cls=APIEncoder) + '\n'
 ```
 
 If so, I can do this right away

Resolving patch:
diff --git a/lib/rucio/web/rest/flaskapi/v1/subscriptions.py b/lib/rucio/web/rest/flaskapi/v1/subscriptions.py
--- a/lib/rucio/web/rest/flaskapi/v1/subscriptions.py
+++ b/lib/rucio/web/rest/flaskapi/v1/subscriptions.py
@@ -530,7 +530,7 @@ def get(self, account, name=None):
             description: Not acceptable
         """
         def generate(vo):
-            for row in list_subscription_rule_states(account=account, vo=vo):
+            for row in list_subscription_rule_states(name=name, account=account, vo=vo):
                 yield dumps(row, cls=APIEncoder) + '\n'
 
         return try_stream(generate(vo=request.environ.get('vo')))


Test patch:
Repository: rucio/rucio

Issue:
Hermes daemon error in if/else block for elastic refers to influx
### Description

In the If/ else block for elastic the last error catch for elastic refers to influx
https://github.com/rucio/rucio/blob/436ecc9005934e1e4332cd2718d160bdbf5105d2/lib/rucio/daemons/hermes/hermes.py#L628C43-L628C49

### Steps to reproduce

https://github.com/rucio/rucio/blob/436ecc9005934e1e4332cd2718d160bdbf5105d2/lib/rucio/daemons/hermes/hermes.py#L628C43-L628C49

### Rucio Version

main

### Additional Information

_No response_


Discussion:

Resolving patch:
diff --git a/lib/rucio/daemons/hermes/hermes.py b/lib/rucio/daemons/hermes/hermes.py
--- a/lib/rucio/daemons/hermes/hermes.py
+++ b/lib/rucio/daemons/hermes/hermes.py
@@ -625,7 +625,7 @@ def run_once(heartbeat_handler: "HeartbeatHandler", bulk: int, **_kwargs) -> boo
                     logger(
                         logging.ERROR,
                         "Failure to submit %s messages to elastic. Returned status: %s",
-                        len(message_dict["influx"]),
+                        len(message_dict["elastic"]),
                         state,
                     )
             except Exception as error:


Test patch:
Repository: rucio/rucio

Issue:
gfal RSE protocol ignores the verify_checksum attribute
The protocol raises an exception even if the attribute is set to false:

https://github.com/rucio/rucio/blob/436ecc9005934e1e4332cd2718d160bdbf5105d2/lib/rucio/rse/protocols/gfal.py#L413


Discussion:

Resolving patch:
diff --git a/lib/rucio/rse/protocols/gfal.py b/lib/rucio/rse/protocols/gfal.py
--- a/lib/rucio/rse/protocols/gfal.py
+++ b/lib/rucio/rse/protocols/gfal.py
@@ -394,6 +394,9 @@ def stat(self, path):
 
         ret['filesize'] = stats[7]
 
+        if not self.rse.get('verify_checksum', True):
+            return ret
+
         message = "\n"
         try:
             ret[PREFERRED_CHECKSUM] = ctx.checksum(path, str(PREFERRED_CHECKSUM.upper()))


Test patch: