sentry-cli 3.5.0__tar.gz → 3.6.0__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.
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/Cargo.lock +10 -8
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/Cargo.toml +4 -3
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/PKG-INFO +1 -1
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/sentry_cli.egg-info/PKG-INFO +1 -1
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/mod.rs +108 -11
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/build/download.rs +2 -9
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/code_mappings/upload.rs +9 -5
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/snapshots/diff.rs +2 -11
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/snapshots/download.rs +33 -11
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/snapshots/mod.rs +1 -1
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/snapshots/upload.rs +5 -13
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/update.rs +1 -1
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/vcs.rs +10 -13
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/LICENSE +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/MANIFEST.in +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/README.md +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/apple-catalog-parsing/AGENTS.md +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/apple-catalog-parsing/CLAUDE.md +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/apple-catalog-parsing/Cargo.toml +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/apple-catalog-parsing/build.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/apple-catalog-parsing/native/swift/AssetCatalogParser/Package.swift +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/AssetCatalogParser/AssetCatalogReader.swift +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/ObjcSupport/include/safeValueForKey.h +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/ObjcSupport/safeValueForKey.m +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/apple-catalog-parsing/native/swift/AssetCatalogParser/Tests/AssetCatalogParserTests/AssetCatalogParserTests.swift +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/apple-catalog-parsing/native/swift/AssetCatalogParser/Tests/AssetCatalogParserTests/Resources/test.xcarchive/Info.plist +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/apple-catalog-parsing/native/swift/AssetCatalogParser/Tests/AssetCatalogParserTests/Resources/test.xcarchive/Products/Applications/DemoApp.app/Assets.car +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/apple-catalog-parsing/src/asset_catalog.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/apple-catalog-parsing/src/lib.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/build.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/pyproject.toml +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/sentry_cli.egg-info/SOURCES.txt +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/sentry_cli.egg-info/dependency_links.txt +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/sentry_cli.egg-info/top_level.txt +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/setup.cfg +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/setup.py +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/AGENTS.md +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/CLAUDE.md +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/connection_manager.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/data_types/chunking/artifact.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/data_types/chunking/build.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/data_types/chunking/compression.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/data_types/chunking/dif.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/data_types/chunking/file_state.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/data_types/chunking/hash_algorithm.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/data_types/chunking/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/data_types/chunking/upload/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/data_types/chunking/upload/options.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/data_types/code_mappings.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/data_types/deploy.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/data_types/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/data_types/snapshots.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/encoding.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/envelopes_api.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/errors/api_error.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/errors/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/errors/sentry_error.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/pagination.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/serialization.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/api/updating.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/bashsupport.sh +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/bash_hook.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/build/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/build/upload.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/code_mappings/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/dart_symbol_map/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/dart_symbol_map/upload.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/debug_files/bundle_jvm.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/debug_files/bundle_sources.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/debug_files/check.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/debug_files/find.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/debug_files/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/debug_files/print_sources.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/debug_files/upload.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/deploys/list.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/deploys/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/deploys/new.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/derive_parser.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/events/list.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/events/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/info.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/issues/list.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/issues/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/issues/mute.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/issues/resolve.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/issues/unresolve.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/login.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/logs/list.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/logs/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/monitors/list.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/monitors/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/monitors/run.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/organizations/list.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/organizations/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/proguard/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/proguard/upload.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/proguard/uuid.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/projects/list.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/projects/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/react_native/gradle.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/react_native/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/react_native/xcode.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/releases/archive.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/releases/delete.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/releases/finalize.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/releases/info.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/releases/list.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/releases/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/releases/new.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/releases/propose_version.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/releases/restore.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/releases/set_commits.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/repos/list.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/repos/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/send_envelope.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/send_event.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/send_metric/common_args.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/send_metric/increment.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/send_metric/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/send_metric/set.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/sourcemaps/inject.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/sourcemaps/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/sourcemaps/resolve.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/sourcemaps/upload.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/uninstall.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/update.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/upload_dif.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/upload_dsym.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/commands/upload_proguard.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/config.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/constants.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/main.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/android.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/args.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/auth_token/auth_token_impl.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/auth_token/error.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/auth_token/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/auth_token/org_auth_token.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/auth_token/redacting.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/auth_token/test.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/auth_token/user_auth_token.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/build/apple.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/build/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/build/normalize.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/build/validation.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/build_vcs.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/chunks/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/chunks/options.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/chunks/types.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/chunks/upload.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/ci.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/cordova.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/dif.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/dif_upload/error.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/dif_upload/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/event.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/file_search.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/file_upload.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/formatting.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/fs.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/http.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/logging.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/non_empty.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/odiff/binary.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/odiff/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/odiff/server.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/progress.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/proguard/mapping.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/proguard/mod.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/proguard/upload.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/releases.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/retry.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_default_twenty.snap +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_ignore_missing.snap +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_set_base.snap +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_set_previous_commit.snap +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/snapshots/sentry_cli__utils__vcs__tests__get_commits_from_git.snap +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/source_bundle.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/sourcemaps/inject.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/sourcemaps.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/system.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/ui.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/value_parsers.rs +0 -0
- {sentry_cli-3.5.0 → sentry_cli-3.6.0}/src/utils/xcode.rs +0 -0
|
@@ -1288,15 +1288,14 @@ dependencies = [
|
|
|
1288
1288
|
|
|
1289
1289
|
[[package]]
|
|
1290
1290
|
name = "git2"
|
|
1291
|
-
version = "0.
|
|
1291
|
+
version = "0.21.0"
|
|
1292
1292
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1293
|
-
checksum = "
|
|
1293
|
+
checksum = "ddddbf932745a6be37109b6112d3ee09696106f848449069d3a57bba937ab82e"
|
|
1294
1294
|
dependencies = [
|
|
1295
1295
|
"bitflags 2.11.1",
|
|
1296
1296
|
"libc",
|
|
1297
1297
|
"libgit2-sys",
|
|
1298
1298
|
"log",
|
|
1299
|
-
"url",
|
|
1300
1299
|
]
|
|
1301
1300
|
|
|
1302
1301
|
[[package]]
|
|
@@ -2503,9 +2502,9 @@ dependencies = [
|
|
|
2503
2502
|
|
|
2504
2503
|
[[package]]
|
|
2505
2504
|
name = "objectstore-client"
|
|
2506
|
-
version = "0.1.
|
|
2505
|
+
version = "0.1.12"
|
|
2507
2506
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2508
|
-
checksum = "
|
|
2507
|
+
checksum = "2713028097b2f0f00696d7d389a877f7370c02813548124c4422941f669732f3"
|
|
2509
2508
|
dependencies = [
|
|
2510
2509
|
"async-compression",
|
|
2511
2510
|
"bytes",
|
|
@@ -2522,16 +2521,18 @@ dependencies = [
|
|
|
2522
2521
|
"tokio",
|
|
2523
2522
|
"tokio-util",
|
|
2524
2523
|
"url",
|
|
2524
|
+
"zstd-safe",
|
|
2525
2525
|
]
|
|
2526
2526
|
|
|
2527
2527
|
[[package]]
|
|
2528
2528
|
name = "objectstore-types"
|
|
2529
|
-
version = "0.1.
|
|
2529
|
+
version = "0.1.12"
|
|
2530
2530
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2531
|
-
checksum = "
|
|
2531
|
+
checksum = "c83aedfcc050322caefbfdba0372518f316624995f04f97a1f00cafb08ce1d0c"
|
|
2532
2532
|
dependencies = [
|
|
2533
2533
|
"http",
|
|
2534
2534
|
"humantime",
|
|
2535
|
+
"humantime-serde",
|
|
2535
2536
|
"mediatype",
|
|
2536
2537
|
"serde",
|
|
2537
2538
|
"thiserror 2.0.18",
|
|
@@ -3628,7 +3629,7 @@ dependencies = [
|
|
|
3628
3629
|
|
|
3629
3630
|
[[package]]
|
|
3630
3631
|
name = "sentry-cli"
|
|
3631
|
-
version = "3.
|
|
3632
|
+
version = "3.6.0"
|
|
3632
3633
|
dependencies = [
|
|
3633
3634
|
"anyhow",
|
|
3634
3635
|
"anylog",
|
|
@@ -3700,6 +3701,7 @@ dependencies = [
|
|
|
3700
3701
|
"whoami",
|
|
3701
3702
|
"windows-sys 0.59.0",
|
|
3702
3703
|
"zip 2.4.2",
|
|
3704
|
+
"zstd",
|
|
3703
3705
|
]
|
|
3704
3706
|
|
|
3705
3707
|
[[package]]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
build = "build.rs"
|
|
3
3
|
name = "sentry-cli"
|
|
4
|
-
version = "3.
|
|
4
|
+
version = "3.6.0"
|
|
5
5
|
edition = "2021"
|
|
6
6
|
rust-version = "1.91"
|
|
7
7
|
|
|
@@ -32,7 +32,7 @@ flate2 = { version = "1.0.25", default-features = false, features = [
|
|
|
32
32
|
"rust_backend",
|
|
33
33
|
] }
|
|
34
34
|
futures-util = "0.3"
|
|
35
|
-
git2 = { version = "0.
|
|
35
|
+
git2 = { version = "0.21.0", default-features = false }
|
|
36
36
|
glob = "0.3.1"
|
|
37
37
|
http = "1.4.0"
|
|
38
38
|
if_chain = "1.0.2"
|
|
@@ -45,7 +45,7 @@ java-properties = "2.0.0"
|
|
|
45
45
|
lazy_static = "1.4.0"
|
|
46
46
|
libc = "0.2.139"
|
|
47
47
|
log = { version = "0.4.17", features = ["std"] }
|
|
48
|
-
objectstore-client = { version = "0.1.
|
|
48
|
+
objectstore-client = { version = "0.1.12" , default-features = false, features = ["native-tls"] }
|
|
49
49
|
open = "3.2.0"
|
|
50
50
|
parking_lot = "0.12.1"
|
|
51
51
|
percent-encoding = "2.2.0"
|
|
@@ -77,6 +77,7 @@ walkdir = "2.3.2"
|
|
|
77
77
|
which = "4.4.0"
|
|
78
78
|
whoami = "1.5.2"
|
|
79
79
|
zip = "2.4.2"
|
|
80
|
+
zstd = "0.13.3"
|
|
80
81
|
data-encoding = "2.3.3"
|
|
81
82
|
magic_string = "0.3.4"
|
|
82
83
|
chrono-tz = "0.8.4"
|
|
@@ -42,6 +42,7 @@ use symbolic::common::DebugId;
|
|
|
42
42
|
use symbolic::debuginfo::ObjectKind;
|
|
43
43
|
use url::Url;
|
|
44
44
|
use uuid::Uuid;
|
|
45
|
+
use zstd::Encoder as ZstdEncoder;
|
|
45
46
|
|
|
46
47
|
use crate::api::errors::{ProjectRenamedError, RetryError};
|
|
47
48
|
use crate::config::{Auth, Config};
|
|
@@ -1014,13 +1015,16 @@ impl AuthenticatedApi<'_> {
|
|
|
1014
1015
|
org: &str,
|
|
1015
1016
|
project: &str,
|
|
1016
1017
|
body: &S,
|
|
1017
|
-
) -> ApiResult<
|
|
1018
|
+
) -> ApiResult<CreateSnapshotResponse> {
|
|
1018
1019
|
let path = format!(
|
|
1019
1020
|
"/projects/{}/{}/preprodartifacts/snapshots/",
|
|
1020
1021
|
PathArg(org),
|
|
1021
1022
|
PathArg(project)
|
|
1022
1023
|
);
|
|
1023
|
-
self.
|
|
1024
|
+
self.request(Method::Post, &path)?
|
|
1025
|
+
.with_zstd_json_body(body)?
|
|
1026
|
+
.send()?
|
|
1027
|
+
.convert_rnf(ApiErrorKind::ProjectNotFound)
|
|
1024
1028
|
}
|
|
1025
1029
|
|
|
1026
1030
|
/// Fetches upload options for snapshots.
|
|
@@ -1034,7 +1038,7 @@ impl AuthenticatedApi<'_> {
|
|
|
1034
1038
|
PathArg(org),
|
|
1035
1039
|
PathArg(project)
|
|
1036
1040
|
);
|
|
1037
|
-
self.get(&path)?.
|
|
1041
|
+
self.get(&path)?.convert_rnf(ApiErrorKind::ProjectNotFound)
|
|
1038
1042
|
}
|
|
1039
1043
|
|
|
1040
1044
|
pub fn get_latest_base_snapshot(
|
|
@@ -1063,6 +1067,29 @@ impl AuthenticatedApi<'_> {
|
|
|
1063
1067
|
}
|
|
1064
1068
|
}
|
|
1065
1069
|
|
|
1070
|
+
pub fn get_snapshot_archive_status(
|
|
1071
|
+
&self,
|
|
1072
|
+
org: &str,
|
|
1073
|
+
snapshot_id: &str,
|
|
1074
|
+
) -> ApiResult<SnapshotArchiveStatus> {
|
|
1075
|
+
let path = format!(
|
|
1076
|
+
"/organizations/{}/preprodartifacts/snapshots/{}/archive/",
|
|
1077
|
+
PathArg(org),
|
|
1078
|
+
PathArg(snapshot_id),
|
|
1079
|
+
);
|
|
1080
|
+
self.get(&path)?.convert()
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
pub fn trigger_snapshot_archive_build(&self, org: &str, snapshot_id: &str) -> ApiResult<()> {
|
|
1084
|
+
let path = format!(
|
|
1085
|
+
"/organizations/{}/preprodartifacts/snapshots/{}/archive/",
|
|
1086
|
+
PathArg(org),
|
|
1087
|
+
PathArg(snapshot_id),
|
|
1088
|
+
);
|
|
1089
|
+
self.request(Method::Post, &path)?.send()?.into_result()?;
|
|
1090
|
+
Ok(())
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1066
1093
|
pub fn download_snapshot_zip(
|
|
1067
1094
|
&self,
|
|
1068
1095
|
org: &str,
|
|
@@ -1070,7 +1097,7 @@ impl AuthenticatedApi<'_> {
|
|
|
1070
1097
|
dst: &mut std::fs::File,
|
|
1071
1098
|
) -> ApiResult<ApiResponse> {
|
|
1072
1099
|
let path = format!(
|
|
1073
|
-
"/organizations/{}/preprodartifacts/snapshots/{}/download
|
|
1100
|
+
"/organizations/{}/preprodartifacts/snapshots/{}/archive/?download",
|
|
1074
1101
|
PathArg(org),
|
|
1075
1102
|
PathArg(snapshot_id),
|
|
1076
1103
|
);
|
|
@@ -1360,6 +1387,30 @@ impl ApiRequest {
|
|
|
1360
1387
|
Ok(self)
|
|
1361
1388
|
}
|
|
1362
1389
|
|
|
1390
|
+
pub fn with_zstd_json_body<S: Serialize>(mut self, body: &S) -> ApiResult<Self> {
|
|
1391
|
+
let mut encoder = ZstdEncoder::new(Vec::new(), 0)
|
|
1392
|
+
.map_err(|err| ApiError::with_source(ApiErrorKind::CompressionFailed, err))?;
|
|
1393
|
+
|
|
1394
|
+
serde_json::to_writer(&mut encoder, &body).map_err(|err| {
|
|
1395
|
+
let kind = if err.is_io() {
|
|
1396
|
+
ApiErrorKind::CompressionFailed
|
|
1397
|
+
} else {
|
|
1398
|
+
ApiErrorKind::CannotSerializeAsJson
|
|
1399
|
+
};
|
|
1400
|
+
ApiError::with_source(kind, err)
|
|
1401
|
+
})?;
|
|
1402
|
+
|
|
1403
|
+
let compressed = encoder
|
|
1404
|
+
.finish()
|
|
1405
|
+
.map_err(|err| ApiError::with_source(ApiErrorKind::CompressionFailed, err))?;
|
|
1406
|
+
|
|
1407
|
+
debug!("zstd json body: {} bytes compressed", compressed.len());
|
|
1408
|
+
self.body = Some(compressed);
|
|
1409
|
+
self.headers.append("Content-Type: application/json")?;
|
|
1410
|
+
self.headers.append("Content-Encoding: zstd")?;
|
|
1411
|
+
Ok(self)
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1363
1414
|
pub fn with_body(mut self, body: Vec<u8>) -> Self {
|
|
1364
1415
|
self.body = Some(body);
|
|
1365
1416
|
self
|
|
@@ -1578,20 +1629,15 @@ impl ApiResponse {
|
|
|
1578
1629
|
fn convert_rnf<T: DeserializeOwned>(self, res_err: ApiErrorKind) -> ApiResult<T> {
|
|
1579
1630
|
match self.status() {
|
|
1580
1631
|
301 | 302 if res_err == ApiErrorKind::ProjectNotFound => {
|
|
1581
|
-
#[derive(Deserialize, Debug)]
|
|
1582
|
-
struct ErrorDetail {
|
|
1583
|
-
slug: String,
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
1632
|
#[derive(Deserialize, Debug)]
|
|
1587
1633
|
struct ErrorInfo {
|
|
1588
|
-
|
|
1634
|
+
slug: String,
|
|
1589
1635
|
}
|
|
1590
1636
|
|
|
1591
1637
|
match self.convert::<ErrorInfo>() {
|
|
1592
1638
|
Ok(info) => Err(ApiError::with_source(
|
|
1593
1639
|
res_err,
|
|
1594
|
-
ProjectRenamedError(info.
|
|
1640
|
+
ProjectRenamedError(info.slug),
|
|
1595
1641
|
)),
|
|
1596
1642
|
Err(_) => Err(res_err.into()),
|
|
1597
1643
|
}
|
|
@@ -2100,6 +2146,11 @@ pub struct LatestBaseSnapshotResponse {
|
|
|
2100
2146
|
pub image_count: u64,
|
|
2101
2147
|
}
|
|
2102
2148
|
|
|
2149
|
+
#[derive(Deserialize)]
|
|
2150
|
+
pub struct SnapshotArchiveStatus {
|
|
2151
|
+
pub ready: bool,
|
|
2152
|
+
}
|
|
2153
|
+
|
|
2103
2154
|
/// Upload options returned by the snapshots upload-options endpoint.
|
|
2104
2155
|
#[derive(Debug, Deserialize)]
|
|
2105
2156
|
#[serde(rename_all = "camelCase")]
|
|
@@ -2116,3 +2167,49 @@ pub struct ObjectstoreUploadOptions {
|
|
|
2116
2167
|
pub auth_token: Option<SecretString>,
|
|
2117
2168
|
pub expiration_policy: String,
|
|
2118
2169
|
}
|
|
2170
|
+
|
|
2171
|
+
#[cfg(test)]
|
|
2172
|
+
mod tests {
|
|
2173
|
+
use std::error::Error as _;
|
|
2174
|
+
|
|
2175
|
+
use super::*;
|
|
2176
|
+
|
|
2177
|
+
fn project_renamed_response() -> ApiResponse {
|
|
2178
|
+
ApiResponse {
|
|
2179
|
+
status: 302,
|
|
2180
|
+
headers: vec!["content-type: application/json".to_owned()],
|
|
2181
|
+
body: Some(
|
|
2182
|
+
br#"{"slug":"new-project-slug","detail":{"extra":{"url":"/api/0/projects/wat-org/new-project-slug/preprodartifacts/snapshots/upload-options/","slug":"new-project-slug"}}}"#
|
|
2183
|
+
.to_vec(),
|
|
2184
|
+
),
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
#[test]
|
|
2189
|
+
fn convert_rnf_reports_project_rename() {
|
|
2190
|
+
let err = project_renamed_response()
|
|
2191
|
+
.convert_rnf::<SnapshotsUploadOptions>(ApiErrorKind::ProjectNotFound)
|
|
2192
|
+
.expect_err("expected a project-renamed error");
|
|
2193
|
+
|
|
2194
|
+
let source = err.source().map(|s| s.to_string()).unwrap_or_default();
|
|
2195
|
+
|
|
2196
|
+
assert!(
|
|
2197
|
+
source.contains("project was renamed to 'new-project-slug'"),
|
|
2198
|
+
"expected rename message in error source, got: {err:?} / source: {source}"
|
|
2199
|
+
);
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
#[test]
|
|
2203
|
+
fn convert_rnf_reports_project_rename_for_create_response() {
|
|
2204
|
+
let err = project_renamed_response()
|
|
2205
|
+
.convert_rnf::<CreateSnapshotResponse>(ApiErrorKind::ProjectNotFound)
|
|
2206
|
+
.expect_err("expected a project-renamed error");
|
|
2207
|
+
|
|
2208
|
+
let source = err.source().map(|s| s.to_string()).unwrap_or_default();
|
|
2209
|
+
|
|
2210
|
+
assert!(
|
|
2211
|
+
source.contains("project was renamed to 'new-project-slug'"),
|
|
2212
|
+
"expected rename message in error source, got: {err:?} / source: {source}"
|
|
2213
|
+
);
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
@@ -10,16 +10,10 @@ use crate::config::Config;
|
|
|
10
10
|
use crate::utils::args::ArgExt as _;
|
|
11
11
|
use crate::utils::fs::TempFile;
|
|
12
12
|
|
|
13
|
-
const EXPERIMENTAL_WARNING: &str =
|
|
14
|
-
"[EXPERIMENTAL] The \"build download\" command is experimental. \
|
|
15
|
-
The command is subject to breaking changes, including removal, in any Sentry CLI release.";
|
|
16
|
-
|
|
17
13
|
pub fn make_command(command: Command) -> Command {
|
|
18
14
|
command
|
|
19
|
-
.about("
|
|
20
|
-
.long_about(
|
|
21
|
-
"Download a build artifact.\n\n{EXPERIMENTAL_WARNING}"
|
|
22
|
-
))
|
|
15
|
+
.about("Download a build artifact.")
|
|
16
|
+
.long_about("Download a build artifact.")
|
|
23
17
|
.org_arg()
|
|
24
18
|
.arg(
|
|
25
19
|
Arg::new("build_id")
|
|
@@ -53,7 +47,6 @@ fn extension_from_url(url: &str) -> Result<&str> {
|
|
|
53
47
|
}
|
|
54
48
|
|
|
55
49
|
pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
56
|
-
eprintln!("{EXPERIMENTAL_WARNING}");
|
|
57
50
|
let config = Config::current();
|
|
58
51
|
let org = config.get_org(matches)?;
|
|
59
52
|
let build_id = matches
|
|
@@ -170,11 +170,15 @@ fn resolve_git_remote(repo: &git2::Repository) -> Option<String> {
|
|
|
170
170
|
/// Finds the remote whose URL matches the given repository name (e.g. "owner/repo").
|
|
171
171
|
fn find_remote_for_repo(repo: &git2::Repository, repo_name: &str) -> Option<String> {
|
|
172
172
|
let remotes = repo.remotes().ok()?;
|
|
173
|
-
let found = remotes
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
let found = remotes
|
|
174
|
+
.iter()
|
|
175
|
+
.filter_map(Result::ok)
|
|
176
|
+
.flatten()
|
|
177
|
+
.find(|name| {
|
|
178
|
+
vcs::git_repo_remote_url(repo, name)
|
|
179
|
+
.map(|url| vcs::get_repo_from_remote_preserve_case(&url) == repo_name)
|
|
180
|
+
.unwrap_or(false)
|
|
181
|
+
})?;
|
|
178
182
|
debug!("Found remote '{found}' matching repo '{repo_name}'");
|
|
179
183
|
Some(found.to_owned())
|
|
180
184
|
}
|
|
@@ -11,10 +11,6 @@ use crate::utils::fs::{path_as_url, IMAGE_EXTENSIONS};
|
|
|
11
11
|
use crate::utils::odiff::binary::ensure_binary;
|
|
12
12
|
use crate::utils::odiff::server::{OdiffOptions, OdiffResponse, OdiffServer};
|
|
13
13
|
|
|
14
|
-
const EXPERIMENTAL_WARNING: &str =
|
|
15
|
-
"[EXPERIMENTAL] The \"snapshots diff\" command is experimental. \
|
|
16
|
-
The command is subject to breaking changes, including removal, in any Sentry CLI release.";
|
|
17
|
-
|
|
18
14
|
#[derive(Serialize)]
|
|
19
15
|
struct DiffReport {
|
|
20
16
|
base_dir: String,
|
|
@@ -111,11 +107,8 @@ struct CategorizedImages {
|
|
|
111
107
|
|
|
112
108
|
pub fn make_command(command: Command) -> Command {
|
|
113
109
|
command
|
|
114
|
-
.about("
|
|
115
|
-
.long_about(
|
|
116
|
-
"Compare two directories of snapshot images locally using odiff.\n\n\
|
|
117
|
-
{EXPERIMENTAL_WARNING}"
|
|
118
|
-
))
|
|
110
|
+
.about("Compare two directories of snapshot images locally using odiff.")
|
|
111
|
+
.long_about("Compare two directories of snapshot images locally using odiff.")
|
|
119
112
|
.arg(
|
|
120
113
|
Arg::new("base_dir")
|
|
121
114
|
.value_name("BASE_DIR")
|
|
@@ -171,8 +164,6 @@ pub fn make_command(command: Command) -> Command {
|
|
|
171
164
|
}
|
|
172
165
|
|
|
173
166
|
pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
174
|
-
eprintln!("{EXPERIMENTAL_WARNING}");
|
|
175
|
-
|
|
176
167
|
let base_dir = PathBuf::from(
|
|
177
168
|
matches
|
|
178
169
|
.get_one::<String>("base_dir")
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
use std::fs;
|
|
2
2
|
use std::io;
|
|
3
3
|
use std::path::PathBuf;
|
|
4
|
+
use std::thread::sleep;
|
|
5
|
+
use std::time::{Duration, Instant};
|
|
4
6
|
|
|
5
7
|
use anyhow::{bail, Result};
|
|
6
8
|
use clap::{Arg, ArgMatches, Command};
|
|
7
9
|
|
|
8
|
-
use crate::api::Api;
|
|
10
|
+
use crate::api::{Api, AuthenticatedApi};
|
|
9
11
|
use crate::config::Config;
|
|
10
12
|
use crate::utils::args::ArgExt as _;
|
|
11
13
|
use crate::utils::fs::{path_as_url, TempFile};
|
|
12
14
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
The command is subject to breaking changes, including removal, in any Sentry CLI release.";
|
|
15
|
+
const POLL_INTERVAL: Duration = Duration::from_secs(2);
|
|
16
|
+
const POLL_TIMEOUT: Duration = Duration::from_secs(300);
|
|
16
17
|
|
|
17
18
|
pub fn make_command(command: Command) -> Command {
|
|
18
19
|
command
|
|
19
|
-
.about("
|
|
20
|
-
.long_about(
|
|
20
|
+
.about("Download baseline snapshot images from Sentry.")
|
|
21
|
+
.long_about(
|
|
21
22
|
"Download baseline snapshot images from Sentry's preprod system to a local directory.\n\n\
|
|
22
23
|
Use --snapshot-id to download a specific snapshot, or --app-id to resolve the latest \
|
|
23
|
-
baseline (org auth tokens require --project with a numeric project ID for --app-id)
|
|
24
|
-
|
|
25
|
-
))
|
|
24
|
+
baseline (org auth tokens require --project with a numeric project ID for --app-id).",
|
|
25
|
+
)
|
|
26
26
|
.org_arg()
|
|
27
27
|
.project_arg(false)
|
|
28
28
|
.arg(
|
|
@@ -56,8 +56,6 @@ pub fn make_command(command: Command) -> Command {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
59
|
-
eprintln!("{EXPERIMENTAL_WARNING}");
|
|
60
|
-
|
|
61
59
|
let config = Config::current();
|
|
62
60
|
let org = config.get_org(matches)?;
|
|
63
61
|
let api_ref = Api::current();
|
|
@@ -96,6 +94,8 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
96
94
|
_ => bail!("Exactly one of --app-id or --snapshot-id must be provided"),
|
|
97
95
|
};
|
|
98
96
|
|
|
97
|
+
wait_for_archive(&api, &org, &snapshot_id)?;
|
|
98
|
+
|
|
99
99
|
eprintln!("Downloading snapshot {snapshot_id}...");
|
|
100
100
|
let tmp = TempFile::create()?;
|
|
101
101
|
let mut tmp_file = tmp.open()?;
|
|
@@ -137,3 +137,25 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
137
137
|
|
|
138
138
|
Ok(())
|
|
139
139
|
}
|
|
140
|
+
|
|
141
|
+
fn wait_for_archive(api: &AuthenticatedApi, org: &str, snapshot_id: &str) -> Result<()> {
|
|
142
|
+
if api.get_snapshot_archive_status(org, snapshot_id)?.ready {
|
|
143
|
+
return Ok(());
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
api.trigger_snapshot_archive_build(org, snapshot_id)?;
|
|
147
|
+
eprintln!("Building snapshot archive...");
|
|
148
|
+
|
|
149
|
+
let start = Instant::now();
|
|
150
|
+
while !api.get_snapshot_archive_status(org, snapshot_id)?.ready {
|
|
151
|
+
if start.elapsed() >= POLL_TIMEOUT {
|
|
152
|
+
bail!(
|
|
153
|
+
"Snapshot archive was not ready after {}s. The build may still be running; try again shortly.",
|
|
154
|
+
POLL_TIMEOUT.as_secs()
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
sleep(POLL_INTERVAL);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
Ok(())
|
|
161
|
+
}
|
|
@@ -23,7 +23,7 @@ pub fn make_command(mut command: Command) -> Command {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
command = command
|
|
26
|
-
.about("
|
|
26
|
+
.about("Manage and compare snapshots.")
|
|
27
27
|
.subcommand_required(true)
|
|
28
28
|
.arg_required_else_help(true);
|
|
29
29
|
each_subcommand!(add_subcommand);
|
|
@@ -18,24 +18,19 @@ use serde_json::Value;
|
|
|
18
18
|
use sha2::{Digest as _, Sha256};
|
|
19
19
|
use walkdir::WalkDir;
|
|
20
20
|
|
|
21
|
-
use crate::api::{Api,
|
|
21
|
+
use crate::api::{Api, ImageMetadata, SnapshotsManifest};
|
|
22
22
|
use crate::config::Config;
|
|
23
23
|
use crate::utils::args::ArgExt as _;
|
|
24
24
|
use crate::utils::build_vcs::collect_git_metadata;
|
|
25
25
|
use crate::utils::ci::is_ci;
|
|
26
26
|
use crate::utils::fs::IMAGE_EXTENSIONS;
|
|
27
27
|
|
|
28
|
-
const EXPERIMENTAL_WARNING: &str =
|
|
29
|
-
"[EXPERIMENTAL] The \"snapshots upload\" command is experimental. \
|
|
30
|
-
The command is subject to breaking changes, including removal, in any Sentry CLI release.";
|
|
31
28
|
const MAX_PIXELS_PER_IMAGE: u64 = 40_000_000;
|
|
32
29
|
|
|
33
30
|
pub fn make_command(command: Command) -> Command {
|
|
34
31
|
command
|
|
35
|
-
.about("
|
|
36
|
-
.long_about(
|
|
37
|
-
"Upload snapshots to a project.\n\n{EXPERIMENTAL_WARNING}"
|
|
38
|
-
))
|
|
32
|
+
.about("Upload snapshots to a project.")
|
|
33
|
+
.long_about("Upload snapshots to a project.")
|
|
39
34
|
.org_arg()
|
|
40
35
|
.project_arg(false)
|
|
41
36
|
.arg(
|
|
@@ -118,8 +113,6 @@ impl ImageInfo {
|
|
|
118
113
|
}
|
|
119
114
|
|
|
120
115
|
pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
121
|
-
eprintln!("{EXPERIMENTAL_WARNING}");
|
|
122
|
-
|
|
123
116
|
let config = Config::current();
|
|
124
117
|
let org = config.get_org(matches)?;
|
|
125
118
|
let project = config.get_project(matches)?;
|
|
@@ -214,10 +207,9 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
214
207
|
// POST manifest to API
|
|
215
208
|
println!("{} Creating snapshot...", style(">").dim());
|
|
216
209
|
let api = Api::current();
|
|
217
|
-
let response
|
|
210
|
+
let response = api
|
|
218
211
|
.authenticated()?
|
|
219
|
-
.create_preprod_snapshot(&org, &project, &manifest)
|
|
220
|
-
.convert()?;
|
|
212
|
+
.create_preprod_snapshot(&org, &project, &manifest)?;
|
|
221
213
|
|
|
222
214
|
println!(
|
|
223
215
|
"{} Created snapshot {} with {} {}",
|
|
@@ -109,7 +109,7 @@ impl LastUpdateCheck {
|
|
|
109
109
|
if let Some(ref release_v) = self.last_fetched_version;
|
|
110
110
|
if let Some(ref check_v) = self.last_check_version;
|
|
111
111
|
then {
|
|
112
|
-
Version::parse(
|
|
112
|
+
Version::parse(VERSION).unwrap() < Version::parse(release_v.as_str()).unwrap() &&
|
|
113
113
|
check_v.as_str() == VERSION
|
|
114
114
|
} else {
|
|
115
115
|
false
|
|
@@ -255,10 +255,7 @@ pub fn git_repo_remote_url(
|
|
|
255
255
|
cached_remote: &str,
|
|
256
256
|
) -> Result<String, git2::Error> {
|
|
257
257
|
let remote = repo.find_remote(cached_remote)?;
|
|
258
|
-
remote
|
|
259
|
-
.url()
|
|
260
|
-
.map(|url| url.to_owned())
|
|
261
|
-
.ok_or_else(|| git2::Error::from_str("No remote URL found"))
|
|
258
|
+
remote.url().map(|url| url.to_owned())
|
|
262
259
|
}
|
|
263
260
|
|
|
264
261
|
pub fn git_repo_head_ref(repo: &git2::Repository) -> Result<String> {
|
|
@@ -269,7 +266,7 @@ pub fn git_repo_head_ref(repo: &git2::Repository) -> Result<String> {
|
|
|
269
266
|
if head.is_branch() {
|
|
270
267
|
head.shorthand()
|
|
271
268
|
.map(|s| s.to_owned())
|
|
272
|
-
.
|
|
269
|
+
.with_context(|| "No HEAD reference found")
|
|
273
270
|
} else {
|
|
274
271
|
// In detached HEAD state, return an error to indicate no valid branch reference
|
|
275
272
|
Err(anyhow::anyhow!(
|
|
@@ -287,7 +284,7 @@ pub fn git_repo_base_ref(repo: &git2::Repository, remote_name: &str) -> Result<S
|
|
|
287
284
|
let name = remote_ref
|
|
288
285
|
.resolve()?
|
|
289
286
|
.shorthand()
|
|
290
|
-
.
|
|
287
|
+
.with_context(|| "Remote branch name is not valid UTF-8")?
|
|
291
288
|
.to_owned();
|
|
292
289
|
|
|
293
290
|
let expected_prefix = format!("{remote_name}/");
|
|
@@ -305,7 +302,7 @@ pub fn git_repo_base_ref(repo: &git2::Repository, remote_name: &str) -> Result<S
|
|
|
305
302
|
/// Prefers "upstream" if it exists, then "origin", otherwise uses the first remote.
|
|
306
303
|
pub fn find_best_remote(repo: &git2::Repository) -> Result<Option<String>> {
|
|
307
304
|
let remotes = repo.remotes()?;
|
|
308
|
-
let remote_names: Vec<&str> = remotes.iter().flatten().collect();
|
|
305
|
+
let remote_names: Vec<&str> = remotes.iter().filter_map(Result::ok).flatten().collect();
|
|
309
306
|
|
|
310
307
|
if remote_names.is_empty() {
|
|
311
308
|
return Ok(None);
|
|
@@ -469,7 +466,7 @@ fn find_matching_rev(
|
|
|
469
466
|
// mode we want to also check for matching URLs.
|
|
470
467
|
if_chain! {
|
|
471
468
|
if let Ok(remote) = repo.find_remote(&remote_name.unwrap_or_else(|| "origin".to_owned()));
|
|
472
|
-
if let
|
|
469
|
+
if let Ok(url) = remote.url();
|
|
473
470
|
then {
|
|
474
471
|
if !discovery || is_matching_url(url, &reference_url) {
|
|
475
472
|
debug!(" found match: {url} == {}, {r:?}", &reference_url);
|
|
@@ -501,7 +498,7 @@ fn find_matching_submodule(
|
|
|
501
498
|
) -> Result<Option<String>> {
|
|
502
499
|
// in discovery mode we want to find that repo in associated submodules.
|
|
503
500
|
for submodule in repo.submodules()? {
|
|
504
|
-
if let Some(submodule_url) = submodule.url() {
|
|
501
|
+
if let Ok(Some(submodule_url)) = submodule.url() {
|
|
505
502
|
debug!(" found submodule with URL {submodule_url}");
|
|
506
503
|
if is_matching_url(submodule_url, &reference_url) {
|
|
507
504
|
debug!(
|
|
@@ -792,9 +789,9 @@ pub fn generate_patch_set(
|
|
|
792
789
|
for (index, commit) in commits.iter().enumerate() {
|
|
793
790
|
let mut git_commit = GitCommit {
|
|
794
791
|
id: commit.id().to_string(),
|
|
795
|
-
author_name: commit.author().name().map(|s| s.to_owned()),
|
|
796
|
-
author_email: commit.author().email().map(|s| s.to_owned()),
|
|
797
|
-
message: commit.message().map(|s| s.to_owned()),
|
|
792
|
+
author_name: commit.author().name().ok().map(|s| s.to_owned()),
|
|
793
|
+
author_email: commit.author().email().ok().map(|s| s.to_owned()),
|
|
794
|
+
message: commit.message().ok().map(|s| s.to_owned()),
|
|
798
795
|
repository: repository.to_owned(),
|
|
799
796
|
timestamp: get_commit_time(commit.author().when()),
|
|
800
797
|
patch_set: vec![],
|
|
@@ -1375,7 +1372,7 @@ mod tests {
|
|
|
1375
1372
|
(
|
|
1376
1373
|
c.author().name().unwrap().to_owned(),
|
|
1377
1374
|
c.author().email().unwrap().to_owned(),
|
|
1378
|
-
c.summary(),
|
|
1375
|
+
c.summary().unwrap(),
|
|
1379
1376
|
)
|
|
1380
1377
|
})
|
|
1381
1378
|
.collect::<Vec<_>>());
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|