From 775a61271b7bf80587d7134cb2416a48083b6ca2 Mon Sep 17 00:00:00 2001 From: Sebastian Zivota Date: Wed, 26 Apr 2023 17:40:16 +0200 Subject: [PATCH] feat: Print bundle id after artifact bundle creation --- src/utils/file_upload.rs | 6 ++++++ .../debug_files-bundle-jvm-input-dir-empty.trycmd | 1 + .../debug_files-bundle-jvm-output-is-file.trycmd | 1 + .../debug_files-bundle-jvm-output-not-found.trycmd | 1 + .../_cases/debug_files/debug_files-bundle-jvm.trycmd | 1 + .../_cases/sourcemaps/sourcemaps-upload-modern.trycmd | 1 + .../_cases/sourcemaps/sourcemaps-upload-no-dedupe.trycmd | 1 + .../sourcemaps-upload-skip-already-uploaded.trycmd | 1 + .../sourcemaps/sourcemaps-upload-some-debugids.trycmd | 1 + .../sourcemaps-upload-successfully-upload-file.trycmd | 1 + 10 files changed, 15 insertions(+) diff --git a/src/utils/file_upload.rs b/src/utils/file_upload.rs index bea124c9ba..baa0cc04c1 100644 --- a/src/utils/file_upload.rs +++ b/src/utils/file_upload.rs @@ -465,6 +465,12 @@ fn build_artifact_bundle( } ); + println!( + "{} Bundle ID: {}", + style(">").dim(), + style(debug_id).yellow(), + ); + Ok(archive) } diff --git a/tests/integration/_cases/debug_files/debug_files-bundle-jvm-input-dir-empty.trycmd b/tests/integration/_cases/debug_files/debug_files-bundle-jvm-input-dir-empty.trycmd index eac95571b4..b7cb28d0d2 100644 --- a/tests/integration/_cases/debug_files/debug_files-bundle-jvm-input-dir-empty.trycmd +++ b/tests/integration/_cases/debug_files/debug_files-bundle-jvm-input-dir-empty.trycmd @@ -3,6 +3,7 @@ $ sentry-cli debug-files bundle-jvm --output . --debug-id 48dee70b-4f3f-4a49-922 ? success > Found 0 files > Bundled 0 files for upload +> Bundle ID: [..]-[..]-[..]-[..]-[..] Created ./48dee70b-4f3f-4a49-9223-de441738f7cd.zip ``` diff --git a/tests/integration/_cases/debug_files/debug_files-bundle-jvm-output-is-file.trycmd b/tests/integration/_cases/debug_files/debug_files-bundle-jvm-output-is-file.trycmd index aa3c0ebb6a..7489dffb0f 100644 --- a/tests/integration/_cases/debug_files/debug_files-bundle-jvm-output-is-file.trycmd +++ b/tests/integration/_cases/debug_files/debug_files-bundle-jvm-output-is-file.trycmd @@ -3,6 +3,7 @@ $ sentry-cli debug-files bundle-jvm --output ./file.txt --debug-id D384DC3B-AB2F ? failed > Found 2 files > Bundled 2 files for upload +> Bundle ID: [..]-[..]-[..]-[..]-[..] error: Unable to write source bundle caused by: [..] diff --git a/tests/integration/_cases/debug_files/debug_files-bundle-jvm-output-not-found.trycmd b/tests/integration/_cases/debug_files/debug_files-bundle-jvm-output-not-found.trycmd index a9f3c8ab86..b3a1682585 100644 --- a/tests/integration/_cases/debug_files/debug_files-bundle-jvm-output-not-found.trycmd +++ b/tests/integration/_cases/debug_files/debug_files-bundle-jvm-output-not-found.trycmd @@ -3,6 +3,7 @@ $ sentry-cli debug-files bundle-jvm --output i-do-not-exist --debug-id 0B693ABA- ? success > Found 2 files > Bundled 2 files for upload +> Bundle ID: [..]-[..]-[..]-[..]-[..] Created i-do-not-exist/0b693aba-531c-4eb6-99e4-b7320c3c85da.zip ``` diff --git a/tests/integration/_cases/debug_files/debug_files-bundle-jvm.trycmd b/tests/integration/_cases/debug_files/debug_files-bundle-jvm.trycmd index 7dc48fce3b..a3f6be3437 100644 --- a/tests/integration/_cases/debug_files/debug_files-bundle-jvm.trycmd +++ b/tests/integration/_cases/debug_files/debug_files-bundle-jvm.trycmd @@ -3,6 +3,7 @@ $ sentry-cli debug-files bundle-jvm --output . --debug-id a4368a48-0880-40d7-9a2 ? success > Found 2 files > Bundled 2 files for upload +> Bundle ID: [..]-[..]-[..]-[..]-[..] Created ./a4368a48-0880-40d7-9a26-c9ef5a84d156.zip ``` diff --git a/tests/integration/_cases/sourcemaps/sourcemaps-upload-modern.trycmd b/tests/integration/_cases/sourcemaps/sourcemaps-upload-modern.trycmd index 495110cb39..b80d7005ac 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-upload-modern.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-upload-modern.trycmd @@ -7,6 +7,7 @@ $ sentry-cli sourcemaps upload tests/integration/_fixtures/bundle.min.js.map tes > Rewriting sources > Adding source map references > Bundled 2 files for upload +> Bundle ID: [..]-[..]-[..]-[..]-[..] > Uploaded files to Sentry > File upload complete (processing pending on server) > Organization: wat-org diff --git a/tests/integration/_cases/sourcemaps/sourcemaps-upload-no-dedupe.trycmd b/tests/integration/_cases/sourcemaps/sourcemaps-upload-no-dedupe.trycmd index 94539238de..f09495543d 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-upload-no-dedupe.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-upload-no-dedupe.trycmd @@ -7,6 +7,7 @@ $ sentry-cli sourcemaps upload tests/integration/_fixtures/bundle.min.js.map tes > Rewriting sources > Adding source map references > Bundled 2 files for upload +> Bundle ID: [..]-[..]-[..]-[..]-[..] > Uploaded files to Sentry > File upload complete (processing pending on server) > Organization: wat-org diff --git a/tests/integration/_cases/sourcemaps/sourcemaps-upload-skip-already-uploaded.trycmd b/tests/integration/_cases/sourcemaps/sourcemaps-upload-skip-already-uploaded.trycmd index 369298a9f7..33255cfa95 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-upload-skip-already-uploaded.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-upload-skip-already-uploaded.trycmd @@ -7,6 +7,7 @@ $ sentry-cli sourcemaps upload tests/integration/_fixtures/bundle.min.js.map tes > Rewriting sources > Adding source map references > Bundled 1 file for upload +> Bundle ID: [..]-[..]-[..]-[..]-[..] > Uploaded files to Sentry > File upload complete (processing pending on server) > Organization: wat-org diff --git a/tests/integration/_cases/sourcemaps/sourcemaps-upload-some-debugids.trycmd b/tests/integration/_cases/sourcemaps/sourcemaps-upload-some-debugids.trycmd index f7d55d5ae4..02c8bc1c07 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-upload-some-debugids.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-upload-some-debugids.trycmd @@ -14,6 +14,7 @@ $ sentry-cli sourcemaps upload tests/integration/_fixtures/upload_some_debugids WARN [..]-[..]-[..] [..]:[..]:[..].[..] +[..]:[..] - ~/static/chunks/575-bb7d7e0e6de8d623.js WARN [..]-[..]-[..] [..]:[..]:[..].[..] +[..]:[..] - ~/static/chunks/pages/asdf-05b39167abbe433b.js > Bundled 20 files for upload +> Bundle ID: [..]-[..]-[..]-[..]-[..] > Uploaded files to Sentry > File upload complete (processing pending on server) > Organization: wat-org diff --git a/tests/integration/_cases/sourcemaps/sourcemaps-upload-successfully-upload-file.trycmd b/tests/integration/_cases/sourcemaps/sourcemaps-upload-successfully-upload-file.trycmd index fe57cf6eb5..57874a1231 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-upload-successfully-upload-file.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-upload-successfully-upload-file.trycmd @@ -6,6 +6,7 @@ $ sentry-cli sourcemaps upload tests/integration/_fixtures/bundle.min.js.map --r > Rewriting sources > Adding source map references > Bundled 1 file for upload +> Bundle ID: [..]-[..]-[..]-[..]-[..] > Uploaded files to Sentry > File upload complete (processing pending on server) > Organization: wat-org