pyntcli 0.1.109__py3-none-any.whl → 0.1.110__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.
pyntcli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.109"
1
+ __version__ = "0.1.110"
pyntcli/commands/util.py CHANGED
@@ -10,7 +10,7 @@ import pyntcli.store.store as store
10
10
 
11
11
  from pyntcli.commands.static_file_extensions import STATIC_FILE_EXTENSIONS
12
12
  from pyntcli.pynt_docker import pynt_container
13
- from pyntcli.ui import report
13
+ from pyntcli.ui import report, ui_thread
14
14
  from pyntcli.transport import pynt_requests
15
15
 
16
16
  logger = log.get_logger()
@@ -37,6 +37,7 @@ GOT_INITIAL_HEALTHCHECK_MESSAGE = "Got initial pynt server health check"
37
37
 
38
38
 
39
39
  def wait_for_healthcheck(address):
40
+ ui_thread.print_verbose("Waiting for healthcheck...")
40
41
  start = time.time()
41
42
  while start + HEALTHCHECK_TIMEOUT > time.time():
42
43
  try:
@@ -49,6 +50,7 @@ def wait_for_healthcheck(address):
49
50
  time.sleep(HEALTHCHECK_INTERVAL)
50
51
 
51
52
  logger.debug("Health check timed out!")
53
+ ui_thread.print_verbose(f"Request to {address}/healthcheck timed out")
52
54
  raise TimeoutError()
53
55
 
54
56
 
@@ -240,7 +240,10 @@ class PyntContainerNative:
240
240
  docker_command += args
241
241
 
242
242
  command = self.adapt_run_command(docker_command)
243
-
243
+
244
+ ui_thread.print_verbose(f"Running command (contains sensitive user secrets, do not paste outside this machine!):\n"
245
+ f"#########################\n {' '.join(command)}\n#########################\n")
246
+
244
247
  PyntContainerRegistry.instance().register_container(self)
245
248
  process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
246
249
  stdout, stderr = process.communicate()
@@ -251,6 +254,7 @@ class PyntContainerNative:
251
254
  container_id = stdout.strip()
252
255
 
253
256
  if process.returncode and process.returncode != 0:
257
+ ui_thread.print_verbose(f"Unable to perform docker run command, return code: {process.returncode}")
254
258
  raise DockerNativeUnavailableException(f"Unable to perform docker run command, return code: {process.returncode}")
255
259
 
256
260
  # Start log streaming in a separate thread
@@ -304,12 +308,14 @@ class PyntContainerNative:
304
308
  ui_thread.print(ui_thread.PrinterText("Pulling latest docker image", ui_thread.PrinterText.INFO))
305
309
  pull_command = ['docker', 'pull', self.config.image.name]
306
310
  get_image_command = ['docker', 'images', '-q', f'{self.config.image.name}']
311
+ ui_thread.print_verbose(f"Docker pull command:\n{' '.join(pull_command)}")
307
312
  pull_process = subprocess.Popen(pull_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
308
313
  _, pull_stderr = pull_process.communicate()
309
314
  get_process = subprocess.Popen(get_image_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
310
315
  get_stdout, _ = get_process.communicate()
311
316
  local_image_id = get_stdout.decode('utf-8')
312
317
  if self.config.image.is_self_managed and local_image_id:
318
+ ui_thread.print_verbose(f"Using local image {local_image_id}")
313
319
  return local_image_id.strip()
314
320
  elif local_image_id == "":
315
321
  ui_thread.print(ui_thread.PrinterText(f"Error: the image {self.config.image.name} not found",
@@ -321,6 +327,9 @@ class PyntContainerNative:
321
327
 
322
328
  if pull_process.returncode != 0:
323
329
  raise ImageUnavailableException("Failed to pull image")
330
+
331
+ ui_thread.print_verbose("Image pulled successfully")
332
+
324
333
  except Exception as e:
325
334
  raise ImageUnavailableException(f"An error occurred: {str(e)}")
326
335
 
@@ -343,9 +352,13 @@ class PyntContainerNative:
343
352
  def pre_run_validation(self, port):
344
353
  self.kill_other_instances()
345
354
 
355
+ ui_thread.print_verbose("Checking if port is in use")
346
356
  if container_utils.is_port_in_use(int(port)):
357
+ ui_thread.print_verbose(f"Port {port} is in use")
347
358
  raise PortInUseException(port)
348
359
 
360
+ ui_thread.print_verbose("Port is not in use")
361
+
349
362
 
350
363
  class PyntContainerRegistry:
351
364
  _instance = None
@@ -361,8 +374,10 @@ class PyntContainerRegistry:
361
374
  return PyntContainerRegistry._instance
362
375
 
363
376
  def register_container(self, c: PyntContainerNative):
377
+ ui_thread.print_verbose("Registering container")
364
378
  self.containers.append(c)
365
379
 
366
380
  def stop_all_containers(self):
381
+ ui_thread.print_verbose("Stopping all containers")
367
382
  for c in self.containers:
368
383
  c.stop()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyntcli
3
- Version: 0.1.109
3
+ Version: 0.1.110
4
4
  Summary: Command line utility to handle all of Pynt's different integrations
5
5
  Author-email: Pynt-io <support@pynt.io>
6
6
  Project-URL: Homepage, https://pynt.io
@@ -1,7 +1,7 @@
1
1
  ignoreTests/conftest.py,sha256=gToq5K74GtgeGQXjFvXSzMaE6axBYxAzcFG5XJPOXjI,427
2
2
  ignoreTests/auth/login.py,sha256=KFlzWhXBAuwdi7GXf16gCB3ya94LQG2wjcSChE149rQ,3798
3
3
  ignoreTests/store/cred_store.py,sha256=_7-917EtNC9eKEumO2_lt-7KuDmCwOZFaowCm7DbA_A,254
4
- pyntcli/__init__.py,sha256=Cd4SdQA_B1lvL3flAA4RSH333OefFegLyvOlQ3QX7IA,24
4
+ pyntcli/__init__.py,sha256=IdGt47yTByl81nIAWmL37jegJ46MzryO0ztrSBIalyA,24
5
5
  pyntcli/main.py,sha256=RD0W2_0ogYBCXubo-YewxHYkiIXxNv6NkZOh3n1VujE,5964
6
6
  pyntcli/analytics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  pyntcli/analytics/send.py,sha256=0hJ0WJNFHLqyohtRr_xOg5WEXzxHrUOlcePPg-k65Hk,3846
@@ -20,12 +20,12 @@ pyntcli/commands/root.py,sha256=UtGky7LfbfQ6mELHoNJcdHznFrUVBlhXI47_8QdApfc,4068
20
20
  pyntcli/commands/static_file_extensions.py,sha256=PZJb02BI-64tbU-j3rdCNsXzTh7gkIDGxGKbKNw3h5k,1995
21
21
  pyntcli/commands/sub_command.py,sha256=GF3-rE_qk2L4jGPFqHLm9SdGINmu3EakhjJTFyWjRms,374
22
22
  pyntcli/commands/template.py,sha256=KocIH1T7occrrjaWJQaKKGgGWrU1bieTKEJbhFw3KLI,7976
23
- pyntcli/commands/util.py,sha256=FGtuXLxMAL0b9sbsrJaQR_-5sEu-PwZOJonMwuCjO2U,4450
23
+ pyntcli/commands/util.py,sha256=ev06aUlJ9tCSw1eAGVIsGlVVY4u0H6AJG9b5MB_bAzs,4594
24
24
  pyntcli/log/__init__.py,sha256=cOGwOYzMoshEbZiiasBGkj6wF0SBu3Jdpl-AuakDesw,19
25
25
  pyntcli/log/log.py,sha256=YXCvcCzuhQ5QUT2L02uQEdN_lTCzLEuet4OnLuEnjlM,112
26
26
  pyntcli/pynt_docker/__init__.py,sha256=PQIOVxc7XXtMLfEX7ojgwf_Z3mmTllO3ZvzUZTPOxQY,30
27
27
  pyntcli/pynt_docker/container_utils.py,sha256=_Onn7loInzyJAG2-Uk6CGpsuRyelmUFHOvtJj4Uzi9A,175
28
- pyntcli/pynt_docker/pynt_container.py,sha256=42Qgwcd5EgtF0RKa2e9O2AjGSngAz9rZveCMOHGZaS8,13233
28
+ pyntcli/pynt_docker/pynt_container.py,sha256=c86YmbPMzj-LIkwRikNs3vXLL4uV0qrxIqVrcQ8Ayd4,14103
29
29
  pyntcli/store/__init__.py,sha256=1fP8cEAQCF_myja3gnhHH9FEqtBiOJ-2aBmUXSKBdFA,41
30
30
  pyntcli/store/json_connector.py,sha256=UGs3uORw3iyn0YJ8kzab-veEZToA6d-ByXYuqEleWsA,560
31
31
  pyntcli/store/store.py,sha256=Kl_HT9FJFdKlAH7SwAt3g4-bW-r-1ve_u13OPggQai0,2529
@@ -40,8 +40,8 @@ pyntcli/ui/report.py,sha256=W-icPSZrGLOubXgam0LpOvHLl_aZg9Zx9qIkL8Ym5PE,1930
40
40
  pyntcli/ui/ui_thread.py,sha256=XUBgLpYQjVhrilU-ofw7VSXgTiwneSdTxm61EvC3x4Q,5091
41
41
  tests/test_utils.py,sha256=t5fTQUk1U_Js6iMxcGYGqt4C-crzOJ0CqCKtLkRtUi0,2050
42
42
  tests/commands/test_pynt_cmd.py,sha256=BjGFCFACcSziLrNA6_27t6TjSmvdu54wx9njwLpRSJY,8379
43
- pyntcli-0.1.109.dist-info/METADATA,sha256=fHnwDHSJvgjpR3B2PBXIdU9t3WVMl6bLFbD2p1mz9PU,428
44
- pyntcli-0.1.109.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
45
- pyntcli-0.1.109.dist-info/entry_points.txt,sha256=kcGmqAxXDttNk2EPRcqunc_LTVp61gzakz0v-GEE2SY,43
46
- pyntcli-0.1.109.dist-info/top_level.txt,sha256=64XSgBzSpgwjYjEKHZE7q3JH2a816zEeyZBXfJi3AKI,42
47
- pyntcli-0.1.109.dist-info/RECORD,,
43
+ pyntcli-0.1.110.dist-info/METADATA,sha256=rIqnBOeMS4-WHejM5GIJkVjygadDPYKPJBzhDsLhqXk,428
44
+ pyntcli-0.1.110.dist-info/WHEEL,sha256=a7TGlA-5DaHMRrarXjVbQagU3Man_dCnGIWMJr5kRWo,91
45
+ pyntcli-0.1.110.dist-info/entry_points.txt,sha256=kcGmqAxXDttNk2EPRcqunc_LTVp61gzakz0v-GEE2SY,43
46
+ pyntcli-0.1.110.dist-info/top_level.txt,sha256=64XSgBzSpgwjYjEKHZE7q3JH2a816zEeyZBXfJi3AKI,42
47
+ pyntcli-0.1.110.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: setuptools (75.4.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5