No commits associated with a release


#1

Hi,

I created releases several times for my oraganization as per https://docs.sentry.io/learn/releases/#releases-are-better-with-commits, but the commits tab for the release is empty, displaying There are no commits associated with this release.

I linked the repository for the specific project in the Repository menu, correctly set the refs field in the request and the release creation was successful, expect the lack of commits. I am also registered as an early adopter. Am I missing some extra step?

Mention: I am running hosted sentry.

Thanks


#2

Are you using sentry-cli to tag off a release?

(This assumes you run this from within your git repository where HEAD is what you deploy)

export SENTRY_AUTH_TOKEN=...
export SENTRY_ORG=organization-slug
VERSION=$(sentry-cli releases propose-version)
sentry-cli releases new -p my-project -p my-other-project $VERSION
sentry-cli releases set-commits --auto $VERSION

#3

I am directly calling my Sentry API (from a Go program)


#4

Can you show how you invoke the API?


#5

The invocation is not important. It’s a HTTPS request. With curl it also doesn’t work.

The repository appears in the Repositories menu correctly as <my_org>/<appX>. Also, <my_org> is the same on Sentry and GitHub.

curl https://<hostname>/api/0/organizations/<my_org>/releases/ \
  -X POST \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '
{
        "version": "<latest_commit>",
        "refs": [
                {
                        "repository": "<my_org>/<appX>",
                        "commit": "<latest_commit>"
                }
        ],
        "projects": [
                "<appX>"
        ]
}

#6

It’s hard to tell right now what the issue here would be. Did you try what happens if you create a release from the command line interface? I could imagine what happens is that the webhook is not set up correctly in your github repository so commits are not pushed to us.


#7

I have the same problem as bogatuadrian.

GitHub has sent commit information to on-premise Sentry with 204 status code each time a new release has been created but no commit information is shown in Sentry.

We use curl to send release information and source maps. Source maps work fine but commits do not.

I can provide more information if necessary!


#8

Same problem here. We are using the release hook which says “The release webhook accepts the same parameters as the “Create a new Release” API endpoint”. So we’re doing this in our gulpfile:

gulp.task('deploy:track', ['build'], function(cb) {
  git.branch(function (branch) {
    git.long(function (revision) {
      rp({
        method: 'POST',
        uri: 'https://sentry.io/api/hooks/release/builtin/…/…/',
        body: {
          version: revision,
          refs: [{
            commit: revision,
            repository: 'ZipBooks/zipbooks',
          }],
        },
        json: true // Automatically stringifies the body to JSON
      }).then(function (_parsedBody) {
        console.log(`sentry notified of deploy: ${branch}:${revision}`)
        cb()
      })
      .catch(function (err) {
        console.log('sentry notify of deploy failed: ' + JSON.stringify(err))
        cb()
      })
    })
  })
})

and no commits show up:


#9

I’ve got this issue too, and I wonder if it could be related to us having two releases with the same name. We don’t use git hashes for versions since they don’t make any sense when compared to each other, we use “server”-style dotted releases. I saw elsewhere that releases are now global to the organization, which doesn’t make any sense to me, but do you believe that could be the problem?


#10

I managed to get commits added to my releases up until yesterday, but today when I run my release scripts they don’t seem to be getting added. I’ve tried adding commits manually and automatically and neither work.


#11

We’re looking into some issues that might have been created recently on sentry.io. Can you confirm the repository provider you’re using?


#12

Actually we spotted two issues: bitbucket and github. This is due to a change the landed yesterday that had some flaws in it.

https://github.com/getsentry/sentry-plugins/pull/263

We’ll get this out shortly, and apologize for the inconvenience. A lot of this code is a bit more legacy, so the automated testing was less rigorous :expressionless:


#13

Just came here to say that I saw that commits were being tracked again, thanks for getting out such a quick fix!