superset-showtime 0.2.1__tar.gz → 0.2.3__tar.gz

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.

Files changed (30) hide show
  1. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/PKG-INFO +1 -1
  2. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/showtime/__init__.py +1 -1
  3. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/showtime/cli.py +21 -18
  4. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/showtime/core/aws.py +5 -5
  5. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/showtime/core/circus.py +5 -0
  6. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/.claude/settings.local.json +0 -0
  7. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/.gitignore +0 -0
  8. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/.pre-commit-config.yaml +0 -0
  9. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/CLAUDE.md +0 -0
  10. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/Makefile +0 -0
  11. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/README.md +0 -0
  12. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/dev-setup.sh +0 -0
  13. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/pypi-push.sh +0 -0
  14. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/pyproject.toml +0 -0
  15. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/requirements-dev.txt +0 -0
  16. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/requirements.txt +0 -0
  17. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/showtime/__main__.py +0 -0
  18. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/showtime/commands/__init__.py +0 -0
  19. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/showtime/commands/start.py +0 -0
  20. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/showtime/core/__init__.py +0 -0
  21. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/showtime/core/emojis.py +0 -0
  22. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/showtime/core/github.py +0 -0
  23. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/showtime/core/label_colors.py +0 -0
  24. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/showtime/data/ecs-task-definition.json +0 -0
  25. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/tests/__init__.py +0 -0
  26. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/tests/unit/__init__.py +0 -0
  27. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/tests/unit/test_circus.py +0 -0
  28. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/uv.lock +0 -0
  29. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/workflows-reference/showtime-cleanup.yml +0 -0
  30. {superset_showtime-0.2.1 → superset_showtime-0.2.3}/workflows-reference/showtime-trigger.yml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: superset-showtime
3
- Version: 0.2.1
3
+ Version: 0.2.3
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/
@@ -4,7 +4,7 @@
4
4
  Circus tent emoji state tracking for Apache Superset ephemeral environments.
5
5
  """
6
6
 
7
- __version__ = "0.2.1"
7
+ __version__ = "0.2.3"
8
8
  __author__ = "Maxime Beauchemin"
9
9
  __email__ = "maximebeauchemin@gmail.com"
10
10
 
@@ -18,12 +18,9 @@ from .core.github import GitHubError, GitHubInterface
18
18
  DEFAULT_GITHUB_ACTOR = "unknown"
19
19
 
20
20
 
21
- def _get_service_urls(pr_number: int, sha: str = None):
21
+ def _get_service_urls(show):
22
22
  """Get AWS Console URLs for a service"""
23
- if sha:
24
- service_name = f"pr-{pr_number}-{sha}-service"
25
- else:
26
- service_name = f"pr-{pr_number}-service"
23
+ service_name = show.ecs_service_name
27
24
 
28
25
  return {
29
26
  "logs": f"https://us-west-2.console.aws.amazon.com/ecs/v2/clusters/superset-ci/services/{service_name}/logs?region=us-west-2",
@@ -31,9 +28,9 @@ def _get_service_urls(pr_number: int, sha: str = None):
31
28
  }
32
29
 
33
30
 
34
- def _show_service_urls(pr_number: int, context: str = "deployment", sha: str = None):
31
+ def _show_service_urls(show, context: str = "deployment"):
35
32
  """Show helpful AWS Console URLs for monitoring service"""
36
- urls = _get_service_urls(pr_number, sha)
33
+ urls = _get_service_urls(show)
37
34
  console.print(f"\n🎪 [bold blue]Monitor {context} progress:[/bold blue]")
38
35
  console.print(f" 📝 Live Logs: {urls['logs']}")
39
36
  console.print(f" 📊 ECS Service: {urls['service']}")
@@ -340,19 +337,19 @@ def stop(
340
337
  console.print("🎪 [bold blue]Starting AWS cleanup...[/bold blue]")
341
338
  aws = AWSInterface()
342
339
 
343
- # Show logs URL for monitoring cleanup
344
- _show_service_urls(pr_number, "cleanup")
345
-
346
340
  try:
347
341
  # Get current environment info
348
342
  pr = PullRequest.from_id(pr_number, github)
349
343
 
350
344
  if pr.current_show:
351
345
  show = pr.current_show
346
+
347
+ # Show logs URL for monitoring cleanup
348
+ _show_service_urls(show, "cleanup")
352
349
  console.print(f"🎪 Destroying environment: {show.aws_service_name}")
353
350
 
354
351
  # Step 1: Check if ECS service exists and is active
355
- service_name = f"pr-{pr_number}-service" # Match GHA service naming
352
+ service_name = show.ecs_service_name
356
353
  console.print(f"🎪 Checking ECS service: {service_name}")
357
354
 
358
355
  service_exists = aws._service_exists(service_name)
@@ -465,7 +462,7 @@ def list(
465
462
  superset_url = "-"
466
463
 
467
464
  # Get AWS service URLs - iTerm2 supports Rich clickable links
468
- aws_urls = _get_service_urls(show.pr_number, show.sha)
465
+ aws_urls = _get_service_urls(show)
469
466
  aws_logs_link = f"[link={aws_urls['logs']}]View[/link]"
470
467
 
471
468
  # Make PR number clickable
@@ -858,7 +855,13 @@ def cleanup(
858
855
  console.print(
859
856
  f"🎪 Deleting expired service {service_name} (PR #{pr_number}, {age_hours:.1f}h old)"
860
857
  )
861
- _show_service_urls(pr_number, "cleanup")
858
+ # Create minimal Show object for URL generation
859
+ from .core.circus import Show
860
+
861
+ temp_show = Show(
862
+ pr_number=pr_number, sha=service_name.split("-")[2], status="cleanup"
863
+ )
864
+ _show_service_urls(temp_show, "cleanup")
862
865
 
863
866
  # Delete ECS service
864
867
  if aws._delete_ecs_service(service_name):
@@ -1146,7 +1149,7 @@ def _handle_start_trigger(
1146
1149
  aws = AWSInterface()
1147
1150
 
1148
1151
  # Show logs URL immediately for monitoring
1149
- _show_service_urls(pr_number, "deployment", latest_sha[:7])
1152
+ _show_service_urls(show, "deployment")
1150
1153
 
1151
1154
  # Parse feature flags from PR description (replicate GHA feature flag logic)
1152
1155
  feature_flags = _extract_feature_flags_from_pr(pr_number, github)
@@ -1333,12 +1336,12 @@ def _handle_stop_trigger(
1333
1336
  console.print("🎪 [bold blue]Starting AWS cleanup...[/bold blue]")
1334
1337
  aws = AWSInterface()
1335
1338
 
1336
- # Show logs URL for monitoring cleanup
1337
- _show_service_urls(pr_number, "cleanup")
1338
-
1339
1339
  try:
1340
+ # Show logs URL for monitoring cleanup
1341
+ _show_service_urls(show, "cleanup")
1342
+
1340
1343
  # Step 1: Check if ECS service exists and is active (replicate GHA describe-services)
1341
- service_name = f"pr-{pr_number}-service" # Match GHA service naming
1344
+ service_name = show.ecs_service_name
1342
1345
  console.print(f"🎪 Checking ECS service: {service_name}")
1343
1346
 
1344
1347
  service_exists = aws._service_exists(service_name)
@@ -83,7 +83,7 @@ class AWSInterface:
83
83
  requested_by=github_user,
84
84
  )
85
85
 
86
- service_name = f"{show.aws_service_name}-service" # pr-{pr_number}-{sha}-service
86
+ service_name = show.ecs_service_name # pr-{pr_number}-{sha}-service
87
87
 
88
88
  try:
89
89
  # Handle force flag - delete existing service for this SHA first
@@ -109,12 +109,12 @@ class AWSInterface:
109
109
  docker_image = f"apache/superset:{image_tag_override}"
110
110
  print(f"✅ Using override image: {docker_image}")
111
111
  else:
112
- # Use supersetbot SHA-based format (what supersetbot creates)
113
- supersetbot_tag = f"{sha[:7]}-ci" # Matches supersetbot format: abc123f-ci
112
+ # Use supersetbot PR-SHA format (what supersetbot creates)
113
+ supersetbot_tag = show.aws_image_tag # pr-{pr_number}-{sha}-ci
114
114
  docker_image = f"apache/superset:{supersetbot_tag}"
115
- print(f"✅ Using DockerHub image: {docker_image} (supersetbot SHA format)")
115
+ print(f"✅ Using DockerHub image: {docker_image} (supersetbot PR-SHA format)")
116
116
  print(
117
- "💡 To test with different image: --image-tag latest or --image-tag abc123f-ci"
117
+ "💡 To test with different image: --image-tag latest or --image-tag pr-34639-9a82c20-ci"
118
118
  )
119
119
 
120
120
  # Note: No ECR image check needed - ECS will pull from DockerHub directly
@@ -34,6 +34,11 @@ class Show:
34
34
  """Deterministic ECR image tag: pr-{pr_number}-{sha}-ci"""
35
35
  return f"pr-{self.pr_number}-{self.sha}-ci"
36
36
 
37
+ @property
38
+ def ecs_service_name(self) -> str:
39
+ """Deterministic ECS service name with -service suffix: pr-{pr_number}-{sha}-service"""
40
+ return f"{self.aws_service_name}-service"
41
+
37
42
  @property
38
43
  def is_active(self) -> bool:
39
44
  """Check if this is the currently active show"""