pybiolib 1.1.1626__py3-none-any.whl → 1.1.1629__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import json
2
+ import subprocess
2
3
  import tempfile
3
4
  import time
4
5
  import tarfile
@@ -490,6 +491,34 @@ class DockerExecutor:
490
491
  self._send_system_exception,
491
492
  ) from exception
492
493
 
494
+ def _get_container_upper_dir_path(self) -> Optional[str]:
495
+ data = self._container.attrs['GraphDriver']['Data']
496
+ upper_dir: Optional[str] = data['UpperDir'] if data else None
497
+
498
+ if not upper_dir and utils.IS_RUNNING_IN_CLOUD:
499
+ # Get upperdir from containerd ctr CLI
500
+ result = subprocess.run(
501
+ args=[
502
+ 'ctr',
503
+ '--namespace', 'moby',
504
+ 'snapshots',
505
+ '--snapshotter', 'nydus',
506
+ 'mounts',
507
+ '/some_arbitrary_path',
508
+ str(self._container.id),
509
+ ],
510
+ check=False,
511
+ capture_output=True,
512
+ )
513
+ if result.returncode == 0:
514
+ match = re.search(r'upperdir=([^,]+)', result.stdout.decode('utf-8'))
515
+ upper_dir = match.group(1) if match else None
516
+
517
+ if upper_dir and os.path.exists(upper_dir):
518
+ return upper_dir
519
+
520
+ return None
521
+
493
522
  def _get_changed_files_in_docker_container(self, pre_start_diff: List[Dict]) -> List[FileInContainer]:
494
523
  from_mappings = [mapping['from_path'] for mapping in self._options['module']['output_files_mappings']]
495
524
  pre_start_diff_paths = [obj['Path'] for obj in pre_start_diff]
@@ -516,11 +545,10 @@ class DockerExecutor:
516
545
  return True
517
546
  return False
518
547
 
519
- data = self._container.attrs['GraphDriver']['Data']
520
- overlay_upper_dir_path = data['UpperDir'] if data and os.path.exists(data['UpperDir']) else None
548
+ overlay_upper_dir_path = self._get_container_upper_dir_path()
521
549
  if not overlay_upper_dir_path:
522
550
  logger_no_user_data.debug(
523
- 'Docker Overlay2 UpperDir not available. Falling back to container.get_archive() for file extraction'
551
+ 'Docker UpperDir not available. Falling back to container.get_archive() for file extraction'
524
552
  )
525
553
 
526
554
  logger.debug(f'overlay_upper_dir_path={overlay_upper_dir_path}')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pybiolib
3
- Version: 1.1.1626
3
+ Version: 1.1.1629
4
4
  Summary: BioLib Python Client
5
5
  Home-page: https://github.com/biolib
6
6
  License: MIT
@@ -54,7 +54,7 @@ biolib/compute_node/job_worker/cache_state.py,sha256=N2AxvvgfizKx9P_ysM0GDCmueMU
54
54
  biolib/compute_node/job_worker/cache_types.py,sha256=ajpLy8i09QeQS9dEqTn3T6NVNMY_YsHQkSD5nvIHccQ,818
55
55
  biolib/compute_node/job_worker/docker_image_cache.py,sha256=ansHIkJIq_EMW1nZNlW-RRLVVeKWTbzNICYaOHpKiRE,7460
56
56
  biolib/compute_node/job_worker/executors/__init__.py,sha256=bW6t1qi3PZTlHM4quaTLa8EI4ALTCk83cqcVJfJfJfE,145
57
- biolib/compute_node/job_worker/executors/docker_executor.py,sha256=XMtU9wSM83c5tqQrITj5-MT_Gr58_d7zCW0BRizoVME,25403
57
+ biolib/compute_node/job_worker/executors/docker_executor.py,sha256=74wUy5piILgCY-eFu2LuEOWDqmuYkaijy-ZW83S6WKw,26335
58
58
  biolib/compute_node/job_worker/executors/docker_types.py,sha256=VhsU1DKtJjx_BbCkVmiPZPH4ROiL1ygW1Y_s1Kbpa2o,216
59
59
  biolib/compute_node/job_worker/executors/tars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
60
  biolib/compute_node/job_worker/executors/types.py,sha256=yP5gG39hr-DLnw9bOE--VHi-1arDbIYiGuV1rlTbbHI,1466
@@ -101,8 +101,8 @@ biolib/utils/cache_state.py,sha256=BFrZlV4XZIueIFzAFiPidX4hmwADKY5Y5ZuqlerF5l0,3
101
101
  biolib/utils/multipart_uploader.py,sha256=PEorMsTNg5f72e3Y-KA3LrI-F6EAnsD9vENV-5EuiX0,9896
102
102
  biolib/utils/seq_util.py,sha256=hudZ7o1LI7xdpjb1OFKPBZvGVxjiqKez8zMwjtWT0TY,3269
103
103
  biolib/utils/zip/remote_zip.py,sha256=NCdUnVbGCv7SfXCI-yVU-is_OnyWmLAnVpIdSvo-W4k,23500
104
- pybiolib-1.1.1626.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
105
- pybiolib-1.1.1626.dist-info/METADATA,sha256=XhdXYsvqSHrrj59CBCNtJO3bTUAIAUJ72NfI7HqICW0,1543
106
- pybiolib-1.1.1626.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
107
- pybiolib-1.1.1626.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
108
- pybiolib-1.1.1626.dist-info/RECORD,,
104
+ pybiolib-1.1.1629.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
105
+ pybiolib-1.1.1629.dist-info/METADATA,sha256=grvWM24XHQjGcGXpjHv79ba0vY8PzvyTce4CUjkQ3wk,1543
106
+ pybiolib-1.1.1629.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
107
+ pybiolib-1.1.1629.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
108
+ pybiolib-1.1.1629.dist-info/RECORD,,