superset-showtime 0.5.3__py3-none-any.whl → 0.5.6__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 superset-showtime might be problematic. Click here for more details.

showtime/__init__.py CHANGED
@@ -4,7 +4,7 @@
4
4
  Circus tent emoji state tracking for Apache Superset ephemeral environments.
5
5
  """
6
6
 
7
- __version__ = "0.5.3"
7
+ __version__ = "0.5.6"
8
8
  __author__ = "Maxime Beauchemin"
9
9
  __email__ = "maximebeauchemin@gmail.com"
10
10
 
@@ -395,6 +395,9 @@ class PullRequest:
395
395
 
396
396
  def _determine_action(self, target_sha: str) -> str:
397
397
  """Determine what sync action is needed based on target SHA state"""
398
+ # CRITICAL: Get fresh labels before any decisions
399
+ self.refresh_labels()
400
+
398
401
  target_sha_short = target_sha[:7] # Ensure we're working with short SHA
399
402
 
400
403
  # Get the specific show for the target SHA
@@ -435,20 +438,20 @@ class PullRequest:
435
438
 
436
439
  def _atomic_claim(self, target_sha: str, action: str, dry_run: bool = False) -> bool:
437
440
  """Atomically claim this PR for the current job based on target SHA state"""
441
+ # CRITICAL: Get fresh labels before any decisions
442
+ self.refresh_labels()
443
+
438
444
  target_sha_short = target_sha[:7]
439
445
  target_show = self.get_show_by_sha(target_sha_short)
440
446
 
441
- # 1. Validate current state allows this action for target SHA
447
+ # 1. Validate current state allows this action for target SHA
442
448
  if action in ["create_environment", "rolling_update", "auto_sync"]:
443
449
  if target_show and target_show.status in [
444
450
  "building",
445
451
  "built",
446
- "deploying",
452
+ "deploying",
447
453
  ]:
448
- return False # Target SHA already in progress
449
-
450
- # Allow actions on failed, running, or non-existent target SHAs
451
- return True
454
+ return False # Target SHA already in progress - ONLY conflict case returns
452
455
 
453
456
  if dry_run:
454
457
  print(f"🎪 [DRY-RUN] Would atomically claim PR for {action}")
@@ -645,6 +648,7 @@ class PullRequest:
645
648
  Returns:
646
649
  Number of environments stopped
647
650
  """
651
+ # Note: Labels should be fresh from recent _update_show_labels() call
648
652
  stopped_count = 0
649
653
 
650
654
  for show in self.shows:
@@ -653,11 +657,16 @@ class PullRequest:
653
657
  try:
654
658
  show.stop(dry_run_github=dry_run_github, dry_run_aws=dry_run_aws)
655
659
 
656
- # Remove labels for this old environment
660
+ # Remove ONLY existing labels for this old environment (not theoretical ones)
657
661
  if not dry_run_github:
658
- old_labels = show.to_circus_labels()
659
- print(f"🏷️ Removing labels for {show.sha}: {len(old_labels)} labels")
660
- for label in old_labels:
662
+ existing_labels = [
663
+ label for label in self.labels
664
+ if label.startswith(f"🎪 {show.sha} ") or
665
+ label == f"🎪 🎯 {show.sha}" or
666
+ label == f"🎪 🏗️ {show.sha}"
667
+ ]
668
+ print(f"🏷️ Removing existing labels for {show.sha}: {existing_labels}")
669
+ for label in existing_labels:
661
670
  try:
662
671
  get_github().remove_label(self.pr_number, label)
663
672
  except Exception as e:
@@ -67,5 +67,5 @@
67
67
  "FARGATE"
68
68
  ],
69
69
  "cpu": "512",
70
- "memory": "1024"
70
+ "memory": "2048"
71
71
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: superset-showtime
3
- Version: 0.5.3
3
+ Version: 0.5.6
4
4
  Summary: 🎪 Apache Superset ephemeral environment management with circus tent emoji state tracking
5
5
  Project-URL: Homepage, https://github.com/apache/superset-showtime
6
6
  Project-URL: Documentation, https://superset-showtime.readthedocs.io/
@@ -1,4 +1,4 @@
1
- showtime/__init__.py,sha256=HKR0Quvgeabq-6nUgJV_sgWCHcm5jzwuQR_uOoXJ9VQ,448
1
+ showtime/__init__.py,sha256=-Ztgg8h_575Pgg976_q2WLHdhCe_pDlZfkn4C2DCjws,448
2
2
  showtime/__main__.py,sha256=EVaDaTX69yIhCzChg99vqvFSCN4ELstEt7Mpb9FMZX8,109
3
3
  showtime/cli.py,sha256=cQB5kH-XWFX3MhsxRaChVdjVe_I_7kBVyFY4fQrHPWA,30542
4
4
  showtime/core/__init__.py,sha256=54hbdFNGrzuNMBdraezfjT8Zi6g221pKlJ9mREnKwCw,34
@@ -7,10 +7,10 @@ showtime/core/emojis.py,sha256=MHEDuPIdfNiop4zbNLuviz3eY05QiftYSHHCVbkfKhw,2129
7
7
  showtime/core/github.py,sha256=uETvKDO2Yhpqg3fxLtrKaCuZR3b-1LVmgnf5aLcqrAQ,9988
8
8
  showtime/core/github_messages.py,sha256=MfgwCukrEsWWesMsuL8saciDgP4nS-gijzu8DXr-Alg,7450
9
9
  showtime/core/label_colors.py,sha256=efhbFnz_3nqEnEqmgyF6_hZbxtCu_fmb68BIIUpSsnk,3895
10
- showtime/core/pull_request.py,sha256=X0LU717-Bzs5TSmD36DMaNQ9KfpwXMJ74OWr2aBj7X0,27000
10
+ showtime/core/pull_request.py,sha256=V1TF_KYYqigQHWndRL72CRfVcpOSo_IOh_JHu7HJzVE,27512
11
11
  showtime/core/show.py,sha256=FpxDm52LASCJvf8UF998AtNiVzfdYIwNEsPAsOAAwL0,9701
12
- showtime/data/ecs-task-definition.json,sha256=2acmqoF-3CxaBJP_VDkMMpG_U2RI4VPk1JvFOprMFyc,2098
13
- superset_showtime-0.5.3.dist-info/METADATA,sha256=nP5JM98Vi0uUgEYBn2lVxsXRVvb4_CuK9U-WgbiBlZE,12052
14
- superset_showtime-0.5.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
- superset_showtime-0.5.3.dist-info/entry_points.txt,sha256=rDW7oZ57mqyBUS4N_3_R7bZNGVHB-104jwmY-hHC_ck,85
16
- superset_showtime-0.5.3.dist-info/RECORD,,
12
+ showtime/data/ecs-task-definition.json,sha256=P7NQljXZTOPW1fWdehGrwJGAh5vdFK9-LzGT59q1PU0,2098
13
+ superset_showtime-0.5.6.dist-info/METADATA,sha256=1zFfoAQUM_UnA9u_C6gK64zeXfPU4TXQnACMVh7lZxQ,12052
14
+ superset_showtime-0.5.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
+ superset_showtime-0.5.6.dist-info/entry_points.txt,sha256=rDW7oZ57mqyBUS4N_3_R7bZNGVHB-104jwmY-hHC_ck,85
16
+ superset_showtime-0.5.6.dist-info/RECORD,,