Skip to content

Uploading snapshots does not set commit metadataΒ #3402

Description

@janpapenbrock

CLI Version

3.7.0

Operating System and Architecture

  • macOS (arm64)
  • macOS (x86_64)
  • Linux (i686)
  • Linux (x86_64)
  • Linux (armv7)
  • Linux (aarch64)
  • Windows (i686)
  • Windows (x86_64)

Operating System Version

Amazon Linux 2023

Link to reproduction repository

No response

CLI Command

sentry-cli snapshots upload

Exact Reproduction Steps

In our CI, I am building some screenshots and then attempt to upload them as snapshots to Sentry.

Uploading works, but the git metadata apparently gets lost.

This is the request I'm making (changed all names etc):

    + npx --no-install sentry-cli --version
      sentry-cli 3.7.0

    + npx --no-install sentry-cli snapshots upload tmp/screenshots --app-id foobar-app --org foobar --project foobar-app --head-sha 123...456 --vcs-provider github --head-repo-name foobar/foobar-app --base-repo-name foobar/foobar-app
    > Found 123 image files
    > Processing 123 image files
    > 123 of 123 images already uploaded, uploading 0 new
    > Uploaded 0 new image files
    > Creating snapshot...
    > Created snapshot 12345 with 123 images
    > View snapshots at https://foobar.sentry.io/preprod/snapshots/12345

Maybe I'm doing something wrong or misunderstood the command. I followed https://docs.sentry.io/cli/snapshots/#git-metadata, stating Pass any of these flags explicitly to override auto-detection.

Thanks!

Expected Results

    {
      "app_id": "foobar-app",
      "base_artifact_id": null,
      "comparison_state": null,
      "diff_threshold": null,
      "head_artifact_id": "12345",
      "project_id": "1234567890123456",
      "vcs_info": {
          "head_sha": '123...456',
          "base_sha": 'previous_sha_maybe?',
          "provider": 'github',
          "head_repo_name": 'foobar/foobar-app',
          "base_repo_name": 'foobar/foobar-app',
          "head_ref": null,
          "base_ref": null,
          "pr_number": null
      }
  }

Actual Results

On the snapshot details, this is the Build Metadata shown:

    {
      "app_id": "foobar-app",
      "base_artifact_id": null,
      "comparison_state": null,
      "diff_threshold": null,
      "head_artifact_id": "12345",
      "project_id": "1234567890123456",
      "vcs_info": {
          "head_sha": null,
          "base_sha": null,
          "provider": null,
          "head_repo_name": null,
          "base_repo_name": null,
          "head_ref": null,
          "base_ref": null,
          "pr_number": null
      }
  }

Logs

Can provide more detailed logs if they help. Above truncated output looks fine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIssue typeCLIProduct area

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions