superset-showtime 0.4.2__py3-none-any.whl → 0.4.8__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 +1 -1
- showtime/core/pull_request.py +34 -7
- showtime/core/show.py +10 -7
- showtime/data/ecs-task-definition.json +0 -4
- {superset_showtime-0.4.2.dist-info → superset_showtime-0.4.8.dist-info}/METADATA +1 -1
- {superset_showtime-0.4.2.dist-info → superset_showtime-0.4.8.dist-info}/RECORD +8 -8
- {superset_showtime-0.4.2.dist-info → superset_showtime-0.4.8.dist-info}/WHEEL +0 -0
- {superset_showtime-0.4.2.dist-info → superset_showtime-0.4.8.dist-info}/entry_points.txt +0 -0
showtime/__init__.py
CHANGED
showtime/core/pull_request.py
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
Handles atomic transactions, trigger processing, and environment orchestration.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
+
import os
|
|
7
8
|
from dataclasses import dataclass
|
|
8
9
|
from datetime import datetime
|
|
9
10
|
from typing import Any, List, Optional
|
|
@@ -244,6 +245,9 @@ class PullRequest:
|
|
|
244
245
|
show.status = "running"
|
|
245
246
|
print(f"✅ Deployment completed - environment running at {show.ip}:8080")
|
|
246
247
|
self._update_show_labels(show, dry_run_github)
|
|
248
|
+
|
|
249
|
+
# Show AWS console URLs for monitoring
|
|
250
|
+
self._show_service_urls(show)
|
|
247
251
|
|
|
248
252
|
self._post_success_comment(show, dry_run_github)
|
|
249
253
|
return SyncResult(success=True, action_taken="create_environment", show=show)
|
|
@@ -273,6 +277,9 @@ class PullRequest:
|
|
|
273
277
|
new_show.status = "running"
|
|
274
278
|
print(f"✅ Rolling update completed - new environment at {new_show.ip}:8080")
|
|
275
279
|
self._update_show_labels(new_show, dry_run_github)
|
|
280
|
+
|
|
281
|
+
# Show AWS console URLs for monitoring
|
|
282
|
+
self._show_service_urls(new_show)
|
|
276
283
|
|
|
277
284
|
self._post_rolling_success_comment(old_show, new_show, dry_run_github)
|
|
278
285
|
return SyncResult(success=True, action_taken=action_needed, show=new_show)
|
|
@@ -424,7 +431,7 @@ class PullRequest:
|
|
|
424
431
|
status="building",
|
|
425
432
|
created_at=datetime.utcnow().strftime("%Y-%m-%dT%H-%M"),
|
|
426
433
|
ttl="24h",
|
|
427
|
-
requested_by="
|
|
434
|
+
requested_by=os.getenv("GITHUB_ACTOR", "unknown"),
|
|
428
435
|
)
|
|
429
436
|
|
|
430
437
|
def _post_building_comment(self, show: Show, dry_run: bool = False) -> None:
|
|
@@ -507,6 +514,9 @@ class PullRequest:
|
|
|
507
514
|
if dry_run:
|
|
508
515
|
return
|
|
509
516
|
|
|
517
|
+
# Refresh labels to get current state (atomic claim may have changed them)
|
|
518
|
+
self.refresh_labels()
|
|
519
|
+
|
|
510
520
|
# First, remove any existing status labels for this SHA to ensure clean transitions
|
|
511
521
|
sha_status_labels = [
|
|
512
522
|
label for label in self.labels
|
|
@@ -515,22 +525,39 @@ class PullRequest:
|
|
|
515
525
|
for old_status_label in sha_status_labels:
|
|
516
526
|
get_github().remove_label(self.pr_number, old_status_label)
|
|
517
527
|
|
|
518
|
-
# Now do normal differential updates
|
|
519
|
-
|
|
528
|
+
# Now do normal differential updates - only for this SHA
|
|
529
|
+
current_sha_labels = {
|
|
530
|
+
label for label in self.labels
|
|
531
|
+
if label.startswith("🎪") and (
|
|
532
|
+
label.startswith(f"🎪 {show.sha} ") or # SHA-first format: 🎪 abc123f 📅 ...
|
|
533
|
+
label.startswith(f"🎪 🎯 {show.sha}") or # Pointer format: 🎪 🎯 abc123f
|
|
534
|
+
label.startswith(f"🎪 🏗️ {show.sha}") # Building pointer: 🎪 🏗️ abc123f
|
|
535
|
+
)
|
|
536
|
+
}
|
|
520
537
|
desired_labels = set(show.to_circus_labels())
|
|
521
538
|
|
|
522
539
|
# Remove the status labels we already cleaned up from the differential
|
|
523
|
-
|
|
540
|
+
current_sha_labels = current_sha_labels - set(sha_status_labels)
|
|
524
541
|
|
|
525
542
|
# Only add labels that don't exist
|
|
526
|
-
labels_to_add = desired_labels -
|
|
543
|
+
labels_to_add = desired_labels - current_sha_labels
|
|
527
544
|
for label in labels_to_add:
|
|
528
545
|
get_github().add_label(self.pr_number, label)
|
|
529
546
|
|
|
530
547
|
# Only remove labels that shouldn't exist (excluding status labels already handled)
|
|
531
|
-
labels_to_remove =
|
|
548
|
+
labels_to_remove = current_sha_labels - desired_labels
|
|
532
549
|
for label in labels_to_remove:
|
|
533
550
|
get_github().remove_label(self.pr_number, label)
|
|
534
551
|
|
|
535
|
-
#
|
|
552
|
+
# Final refresh to update cache with all changes
|
|
536
553
|
self.refresh_labels()
|
|
554
|
+
|
|
555
|
+
def _show_service_urls(self, show: Show) -> None:
|
|
556
|
+
"""Show AWS console URLs for monitoring deployment"""
|
|
557
|
+
from .github_messages import get_aws_console_urls
|
|
558
|
+
|
|
559
|
+
urls = get_aws_console_urls(show.ecs_service_name)
|
|
560
|
+
print(f"\n🎪 Monitor deployment progress:")
|
|
561
|
+
print(f"📝 Logs: {urls['logs']}")
|
|
562
|
+
print(f"📊 Service: {urls['service']}")
|
|
563
|
+
print("")
|
showtime/core/show.py
CHANGED
|
@@ -166,10 +166,10 @@ class Show:
|
|
|
166
166
|
# Detect if running in CI environment
|
|
167
167
|
is_ci = bool(os.getenv("GITHUB_ACTIONS") or os.getenv("CI"))
|
|
168
168
|
|
|
169
|
-
#
|
|
169
|
+
# Build command without final path
|
|
170
170
|
cmd = [
|
|
171
171
|
"docker",
|
|
172
|
-
"buildx",
|
|
172
|
+
"buildx",
|
|
173
173
|
"build",
|
|
174
174
|
"--push",
|
|
175
175
|
"--platform",
|
|
@@ -182,7 +182,6 @@ class Show:
|
|
|
182
182
|
"LOAD_EXAMPLES_DUCKDB=true",
|
|
183
183
|
"-t",
|
|
184
184
|
tag,
|
|
185
|
-
".",
|
|
186
185
|
]
|
|
187
186
|
|
|
188
187
|
# Add caching based on environment
|
|
@@ -190,16 +189,16 @@ class Show:
|
|
|
190
189
|
# Full registry caching in CI (Docker driver supports it)
|
|
191
190
|
cmd.extend([
|
|
192
191
|
"--cache-from",
|
|
193
|
-
"type=registry,ref=apache/superset-cache:
|
|
192
|
+
"type=registry,ref=apache/superset-cache:showtime",
|
|
194
193
|
"--cache-to",
|
|
195
|
-
"type=registry,mode=max,ref=apache/superset-cache:
|
|
194
|
+
"type=registry,mode=max,ref=apache/superset-cache:showtime",
|
|
196
195
|
])
|
|
197
196
|
print("🐳 CI environment: Using full registry caching")
|
|
198
197
|
else:
|
|
199
198
|
# Local build: cache-from only (no cache export)
|
|
200
199
|
cmd.extend([
|
|
201
200
|
"--cache-from",
|
|
202
|
-
"type=registry,ref=apache/superset-cache:
|
|
201
|
+
"type=registry,ref=apache/superset-cache:showtime",
|
|
203
202
|
])
|
|
204
203
|
print("🐳 Local environment: Using cache-from only (no export)")
|
|
205
204
|
|
|
@@ -209,12 +208,16 @@ class Show:
|
|
|
209
208
|
force_load = os.getenv("DOCKER_LOAD", "false").lower() == "true"
|
|
210
209
|
|
|
211
210
|
if native_x86 or force_load:
|
|
212
|
-
cmd.
|
|
211
|
+
cmd.append("--load")
|
|
213
212
|
print("🐳 Will load image to local Docker daemon (native x86_64 platform)")
|
|
214
213
|
else:
|
|
215
214
|
print("🐳 Cross-platform build - pushing to registry only (no local load)")
|
|
216
215
|
|
|
216
|
+
# Add build context path last
|
|
217
|
+
cmd.append(".")
|
|
218
|
+
|
|
217
219
|
print(f"🐳 Building Docker image: {tag}")
|
|
220
|
+
print(f"🐳 Command: {' '.join(cmd)}")
|
|
218
221
|
|
|
219
222
|
# Stream output in real-time
|
|
220
223
|
process = subprocess.Popen(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: superset-showtime
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.8
|
|
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=
|
|
1
|
+
showtime/__init__.py,sha256=fYCOH7lhPuP2SN1kHK5U4MGhM6I1uFSOs31oG5B8L40,448
|
|
2
2
|
showtime/__main__.py,sha256=EVaDaTX69yIhCzChg99vqvFSCN4ELstEt7Mpb9FMZX8,109
|
|
3
3
|
showtime/cli.py,sha256=faFM6pe3gz49_1KrzUeri7dQffqz4WP92JmGxPaIOC0,25249
|
|
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=
|
|
11
|
-
showtime/core/show.py,sha256
|
|
12
|
-
showtime/data/ecs-task-definition.json,sha256=
|
|
13
|
-
superset_showtime-0.4.
|
|
14
|
-
superset_showtime-0.4.
|
|
15
|
-
superset_showtime-0.4.
|
|
16
|
-
superset_showtime-0.4.
|
|
10
|
+
showtime/core/pull_request.py,sha256=GE88HO6KnqgnOgNdVOlFsn--T7oR1Tl6wYhah0luJbQ,21665
|
|
11
|
+
showtime/core/show.py,sha256=-nMRShKWTjXGVuxuxrc0WK6l8ON-8iYm5QA8uvGoMOk,9806
|
|
12
|
+
showtime/data/ecs-task-definition.json,sha256=2acmqoF-3CxaBJP_VDkMMpG_U2RI4VPk1JvFOprMFyc,2098
|
|
13
|
+
superset_showtime-0.4.8.dist-info/METADATA,sha256=zYs12JPPFHfLVNmC39bzABgmt_BW3mu2XZ79ZzJ32Yc,12052
|
|
14
|
+
superset_showtime-0.4.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
15
|
+
superset_showtime-0.4.8.dist-info/entry_points.txt,sha256=rDW7oZ57mqyBUS4N_3_R7bZNGVHB-104jwmY-hHC_ck,85
|
|
16
|
+
superset_showtime-0.4.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|