getsentry / action-release

GitHub Action for creating a release on Sentry
Apache License 2.0
446 stars 53 forks source link

"Sentry not part of build pipeline" when using action for source maps #164

Open codybswaney opened 1 year ago

codybswaney commented 1 year ago

Github Sentry Action Release Bug Report

Hello, I'm trying to understand why sentry is saying "Sentry not part of build pipeline" when using this to create a release and upload source maps. Admittedly, our situation is specific in that we need to upload source maps without deploying the maps themselves to our production environment. Perhaps there is a better way to go here?

Appreciate any help you can provide!

Environment

Standard GitHub runners on ubuntu-latest, using v1 action

Steps to Reproduce

  1. Generate source maps
  2. Inject debugIds via sentry-cli sourcemaps inject out/_next/static
  3. Use action to create release and upload source maps
            - name: Create Sentry Release
              uses: getsentry/action-release@v1
              env:
                  SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
                  SENTRY_ORG: ${{ vars.SENTRY_ORG }}
                  SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
              with:
                  environment: staging
                  finalize: false
                  sourcemaps: ./out/_next/static
                  version: ${{ env.COMMIT_SHA_SHORT }}
  4. Remove sourcemaps before production deploy
  5. Production deploy initializes sentry and finalizes the release

Expected Result

Viewing errors would un-minify the javascript.

Actual Result

Sentry not part of build pipeline Read Guide Integrate Sentry into your build pipeline using a tool like Webpack or the CLI.

Screenshot 2023-07-19 at 4 21 40 PM

I can see the artifacts associated with the release in sentry as well

Screenshot 2023-07-19 at 4 24 55 PM
steveatkoan commented 1 year ago

I have a similar problem. I can see the github action working as expected (no errors). Sourcemaps and js files are uploaded as expected, and are found in Source Maps > Release Bundles as per https://docs.sentry.io/platforms/javascript/guides/vue/sourcemaps/troubleshooting_js/#verify-artifacts-are-uploaded

It seems that the github action is either

It was tricky getting sourcemaps working to begin with. I try not to touch this stuff, so it was probably some kind of 0.0.1 release of the sentry npm modules that was not actually backwards compatible (not following semver)?

steveatkoan commented 1 year ago

Looking at the github action log, i see Download action repository 'getsentry/action-release@v1' (SHA: 586b62368d564f25d694ce05fcb9cf53de65ac4f) This matches the v1.3.1. release from 4 March. Latest release from is 1.4.1 from 21 April. Today is 20 Jul. So for some reason it is not pulling the latest release when the action runs...

if I hard code the version number in the github action eg getsentry/action-release@v1.4.1 i get the correct version, but still see the above behaviour

mindrunner commented 1 year ago

Sentry support asked me to migrate from manually uploading sourcemaps to using this action. Looks like it was a bad idea, since it seems same broken than the cli tool.

Same/similar issue here. Super frustrated :(