From 64e9bcc6116a7544942da75a448b94a90ce4868c Mon Sep 17 00:00:00 2001 From: PalNilsson Date: Tue, 12 Mar 2024 17:08:37 +0100 Subject: [PATCH] Debugging analytics --- PILOTVERSION | 2 +- pilot/api/data.py | 8 +++++++- pilot/copytool/rucio.py | 2 +- pilot/test/test_analytics.py | 5 +++-- pilot/util/constants.py | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/PILOTVERSION b/PILOTVERSION index 23d0ff7e..2f7bb512 100644 --- a/PILOTVERSION +++ b/PILOTVERSION @@ -1 +1 @@ -3.7.3.1 \ No newline at end of file +3.7.3.3 \ No newline at end of file diff --git a/pilot/api/data.py b/pilot/api/data.py index 7c4aa13b..db79c6d7 100644 --- a/pilot/api/data.py +++ b/pilot/api/data.py @@ -494,7 +494,7 @@ def transfer(self, files, activity='default', **kwargs): # noqa: C901 raise PilotException('failed to resolve copytool by preferred activities=%s, acopytools=%s' % (activity, self.acopytools)) - # populate inputddms if need + # populate inputddms if needed self.prepare_inputddms(files) # initialize ddm_activity name for requested files if not set @@ -539,6 +539,9 @@ def transfer(self, files, activity='default', **kwargs): # noqa: C901 continue try: + pilot_args = kwargs.get('args') + if pilot_args and pilot_args.workdir: + self.logger.debug(f'received: transfer_files() using args.workdir={pilot_args.workdir}') result = self.transfer_files(copytool, remain_files, activity, **kwargs) self.logger.debug('transfer_files() using copytool=%s completed with result=%s', copytool, str(result)) break @@ -882,6 +885,9 @@ def transfer_files(self, copytool, files, activity=None, **kwargs): # noqa: C90 # use bulk downloads if necessary # if kwargs['use_bulk_transfer'] # return copytool.copy_in_bulk(remain_files, **kwargs) + pilot_args = kwargs.get('args') + if pilot_args and pilot_args.workdir: + self.logger.debug(f'received transfer_files() again using args.workdir={pilot_args.workdir}') return copytool.copy_in(remain_files, **kwargs) def set_status_for_direct_access(self, files, workdir): diff --git a/pilot/copytool/rucio.py b/pilot/copytool/rucio.py index 54c5dd6e..591addeb 100644 --- a/pilot/copytool/rucio.py +++ b/pilot/copytool/rucio.py @@ -107,7 +107,7 @@ def copy_in(files: list, **kwargs: dict) -> list: rucio_host = kwargs.get('rucio_host', '') pilot_args = kwargs.get('args') if pilot_args: - logger.debug('received pilot args object') + logger.debug(f'received pilot args object: {pilot_args.workdir}') # don't spoil the output, we depend on stderr parsing os.environ['RUCIO_LOGGING_FORMAT'] = '%(asctime)s %(levelname)s [%(message)s]' diff --git a/pilot/test/test_analytics.py b/pilot/test/test_analytics.py index ad0b8fcb..74b28248 100644 --- a/pilot/test/test_analytics.py +++ b/pilot/test/test_analytics.py @@ -44,7 +44,8 @@ def test_linear_fit(self): fit = self.client.fit(x, y) slope = fit.slope() intersect = fit.intersect() - + print(slope) + print(intersect) self.assertEqual(type(slope), float) self.assertEqual(slope, 1.0) self.assertEqual(type(intersect), float) @@ -57,7 +58,7 @@ def test_linear_fit(self): self.assertEqual(slope, -1.0) - def test_parsing_memory_monitor_data(self): + def est_parsing_memory_monitor_data(self): """Read and fit PSS vs Time from memory monitor output file.""" # old MemoryMonitor format filename = 'pilot/test/resource/memory_monitor_output.txt' diff --git a/pilot/util/constants.py b/pilot/util/constants.py index 7cf61b73..d4e20b83 100644 --- a/pilot/util/constants.py +++ b/pilot/util/constants.py @@ -28,7 +28,7 @@ RELEASE = '3' # released number should be fixed at 3 for Pilot 3 VERSION = '7' # version number is '1' for first release, '0' until then, increased for bigger updates REVISION = '3' # revision number should be reset to '0' for every new version release, increased for small updates -BUILD = '2' # build number should be reset to '1' for every new development cycle +BUILD = '3' # build number should be reset to '1' for every new development cycle SUCCESS = 0 FAILURE = 1