dagster-k8s 0.25.4__py3-none-any.whl → 0.25.5__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.

Potentially problematic release.


This version of dagster-k8s might be problematic. Click here for more details.

dagster_k8s/launcher.py CHANGED
@@ -313,6 +313,11 @@ class K8sRunLauncher(RunLauncher, ConfigurableClass):
313
313
 
314
314
  self._launch_k8s_job_with_args(job_name, args, run)
315
315
 
316
+ def _get_resume_attempt_number(self, run: DagsterRun) -> Optional[int]:
317
+ if not self.supports_run_worker_crash_recovery:
318
+ return None
319
+ return self._instance.count_resume_run_attempts(run.run_id)
320
+
316
321
  def terminate(self, run_id):
317
322
  check.str_param(run_id, "run_id")
318
323
  run = self._instance.get_run_by_id(run_id)
@@ -325,7 +330,7 @@ class K8sRunLauncher(RunLauncher, ConfigurableClass):
325
330
  container_context = self.get_container_context_for_run(run)
326
331
 
327
332
  job_name = get_job_name_from_run_id(
328
- run_id, resume_attempt_number=self._instance.count_resume_run_attempts(run.run_id)
333
+ run_id, resume_attempt_number=self._get_resume_attempt_number(run)
329
334
  )
330
335
 
331
336
  try:
@@ -367,12 +372,10 @@ class K8sRunLauncher(RunLauncher, ConfigurableClass):
367
372
  self, run: DagsterRun, include_container_logs: Optional[bool] = True
368
373
  ) -> Optional[str]:
369
374
  container_context = self.get_container_context_for_run(run)
370
- if self.supports_run_worker_crash_recovery:
371
- resume_attempt_number = self._instance.count_resume_run_attempts(run.run_id)
372
- else:
373
- resume_attempt_number = None
374
375
 
375
- job_name = get_job_name_from_run_id(run.run_id, resume_attempt_number=resume_attempt_number)
376
+ job_name = get_job_name_from_run_id(
377
+ run.run_id, resume_attempt_number=self._get_resume_attempt_number(run)
378
+ )
376
379
  namespace = container_context.namespace
377
380
  pod_names = self._api_client.get_pod_names_in_job(job_name, namespace=namespace)
378
381
  full_msg = ""
@@ -411,12 +414,9 @@ class K8sRunLauncher(RunLauncher, ConfigurableClass):
411
414
  def check_run_worker_health(self, run: DagsterRun):
412
415
  container_context = self.get_container_context_for_run(run)
413
416
 
414
- if self.supports_run_worker_crash_recovery:
415
- resume_attempt_number = self._instance.count_resume_run_attempts(run.run_id)
416
- else:
417
- resume_attempt_number = None
418
-
419
- job_name = get_job_name_from_run_id(run.run_id, resume_attempt_number=resume_attempt_number)
417
+ job_name = get_job_name_from_run_id(
418
+ run.run_id, resume_attempt_number=self._get_resume_attempt_number(run)
419
+ )
420
420
  try:
421
421
  status = self._api_client.get_job_status(
422
422
  namespace=container_context.namespace,
dagster_k8s/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.25.4"
1
+ __version__ = "0.25.5"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dagster-k8s
3
- Version: 0.25.4
3
+ Version: 0.25.5
4
4
  Summary: A Dagster integration for k8s
5
5
  Home-page: https://github.com/dagster-io/dagster/tree/master/python_modules/libraries/dagster-k8s
6
6
  Author: Dagster Labs
@@ -14,7 +14,7 @@ Classifier: License :: OSI Approved :: Apache Software License
14
14
  Classifier: Operating System :: OS Independent
15
15
  Requires-Python: >=3.9,<3.13
16
16
  License-File: LICENSE
17
- Requires-Dist: dagster ==1.9.4
17
+ Requires-Dist: dagster ==1.9.5
18
18
  Requires-Dist: kubernetes <32
19
19
  Requires-Dist: google-auth !=2.23.1
20
20
 
@@ -4,17 +4,17 @@ dagster_k8s/container_context.py,sha256=47gts4BKPrlL624rT8MMKOn8kQtY3_f2FI2nmgsD
4
4
  dagster_k8s/executor.py,sha256=Py2t7VVHdL542fL5YIQLEPmFWD6f21oG0N-AUTrXfbw,14680
5
5
  dagster_k8s/job.py,sha256=-GzUcz80cwF9NwDAv3QdE6GezSSpUzF0kLRkj1oTO34,43046
6
6
  dagster_k8s/kubernetes_version.py,sha256=jIBF12yvVweYUCmhC5AJ2Lb1JPcHxJfohJ1_hHfzS4o,38
7
- dagster_k8s/launcher.py,sha256=Mfs4lD8pSjqC0S39d0csPJk6g-ieVuiyv680nWtSezw,16621
7
+ dagster_k8s/launcher.py,sha256=Ld94KR6AoNy-Qdu7lFQM_UYPd2V_Lrmcr9rZAjRudnI,16511
8
8
  dagster_k8s/models.py,sha256=OPksL8WjsdqJtGcw4WLkvsnrm1WA6vCUjqHL9dA2oYQ,6270
9
9
  dagster_k8s/pipes.py,sha256=kRHLYJfZi23GJe1_TW3Z3FglEpMrMLT43UV7YpTmKr8,30439
10
10
  dagster_k8s/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
11
11
  dagster_k8s/test.py,sha256=cNtcbzxytiZtd01wY5ip7KPi01y0BUQuQhohoIfAFUM,684
12
12
  dagster_k8s/utils.py,sha256=c1bHqh5f1p5RZ0JCT6WEbPPjDvbgUp3pl4nYZRaaI4s,786
13
- dagster_k8s/version.py,sha256=ecF8WlGgNuYRj3QRbMJQBVjdpKbSFwlW9naM4NJEUOE,23
13
+ dagster_k8s/version.py,sha256=9zCh_8lz8S_e8JlXmwkSbkp_uQhvRgQSEOH1abFGMw8,23
14
14
  dagster_k8s/ops/__init__.py,sha256=ur-9GrE_DRfnsFCpYan03qOY9cWbjagC8KHZFZuiCmc,113
15
15
  dagster_k8s/ops/k8s_job_op.py,sha256=uLpQE3ZJbXDiGyyRZydyp-oDQn5XvQuhRcUwd2qiJho,21124
16
- dagster_k8s-0.25.4.dist-info/LICENSE,sha256=TMatHW4_G9ldRdodEAp-l2Xa2WvsdeOh60E3v1R2jis,11349
17
- dagster_k8s-0.25.4.dist-info/METADATA,sha256=XhHZkZ9QMTAMyFPXSf2lGwR3KS6li9B1KLjLWv_AfGA,732
18
- dagster_k8s-0.25.4.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
19
- dagster_k8s-0.25.4.dist-info/top_level.txt,sha256=wFPjskoWPlk2hOLugYCaoZhSiZdUcbCA1QZe9I4dals,12
20
- dagster_k8s-0.25.4.dist-info/RECORD,,
16
+ dagster_k8s-0.25.5.dist-info/LICENSE,sha256=TMatHW4_G9ldRdodEAp-l2Xa2WvsdeOh60E3v1R2jis,11349
17
+ dagster_k8s-0.25.5.dist-info/METADATA,sha256=QtoJfKSEkMlqOmiXumJfMFEqf3D-WaFDsq35DCLD0J4,732
18
+ dagster_k8s-0.25.5.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
19
+ dagster_k8s-0.25.5.dist-info/top_level.txt,sha256=wFPjskoWPlk2hOLugYCaoZhSiZdUcbCA1QZe9I4dals,12
20
+ dagster_k8s-0.25.5.dist-info/RECORD,,