Giter Club home page Giter Club logo

Comments (16)

mhihasan avatar mhihasan commented on May 29, 2024 6

Hi, I am getting the same error even after adding fetch-depth: 0 at the new repository. Any solution?

- uses: actions/checkout@v2
  with:
    fetch-depth: 0
- name: Create Sentry release
  uses: getsentry/action-release@v1
  env:
    SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
    SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
    SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
  with:
    environment: production

from action-release.

Fredx87 avatar Fredx87 commented on May 29, 2024 3

I have the same issue, I created a release from a feature branch, then squashed the commits, and then the merge to master created a new release. The release creation on master fails with Could not find the SHA of the previous release in the git history..

This case is mentioned in the documentation: https://docs.sentry.io/product/cli/releases/#dealing-with-missing-commits. Probably it would be nice to add the ignore-missing flag to the parameters of the action.

from action-release.

peterjgrainger avatar peterjgrainger commented on May 29, 2024 1

Actually my issue was I didn't have the Sentry <-> GitHub integration configured correctly

from action-release.

abecks avatar abecks commented on May 29, 2024 1

Can confirm fetch-depth: 0 is no longer resolving error: Could not find the SHA of the previous release in the git history. Increase your git clone depth.

from action-release.

drummerjolev avatar drummerjolev commented on May 29, 2024 1

@NisanthanNanthakumar could you add the ignore-missing flag?

from action-release.

NicHaley avatar NicHaley commented on May 29, 2024 1

In case anyone else is experiencing this still, our team found it was due to using git rebase.

from action-release.

peterjgrainger avatar peterjgrainger commented on May 29, 2024

Pretty sure this is the same issue getsentry/sentry-cli#792

from action-release.

pierresaad avatar pierresaad commented on May 29, 2024

Same here getting the same error even after adding fetch-depth: 0

from action-release.

gilles-yvetot avatar gilles-yvetot commented on May 29, 2024

@mgaeta @scefali Unfortunately it looks like fetch-depth: 0 is not solving the problem :( Any input on that?

from action-release.

localheinz avatar localheinz commented on May 29, 2024

What can we do to help move this issue forward?

from action-release.

mhihasan avatar mhihasan commented on May 29, 2024

My problem was actually elsewhere. I needed to add the integration between repository and sentry.

from action-release.

qua11q7 avatar qua11q7 commented on May 29, 2024

My integration was working perfectly fine between Sentry and repository, but after I hard reset a commit, sentry started to give this error. Setting fetch-depth: 0 didn't fix the issue. The order of operations I did as follows:

  1. At the initial state, let's call the current hash of the commit hash0. Sentry correctly shows this as a release.
  2. I pushed a commit to branch and it triggered the sentry GitHub Action, this release worked fine. Let's call this hash hash1
  3. I hard reset the commit to the previous commit hash0 and force pushed it to the branch. This also triggered the GitHub action. Sentry gave the following error: Command failed: /action-release/dist/sentry-cli releases set-commits hash0 --auto error: No commits found. Leaving release alone.
  4. I pushed another commit to the branch with hash hash2. This time Sentry gave the following error: Command failed: /action-release/dist/sentry-cli releases set-commits hash2 --auto error: Could not find the SHA of the previous release in the git history.
  5. I have altered the GitHub Action to include fetch-depth: 0 and pushed it. The same error is given in the workflow for the new commit hash.

I have tried to delete the release for the faulty hash1 from Sentry, as it no longer exists in GitHub commit history. I couldn't find a way of deleting from Sentry and only archived the release. It didn't solve the problem. Any help is appreciated.

from action-release.

gilles-yvetot avatar gilles-yvetot commented on May 29, 2024

I don't think this repo is maintained anymore

from action-release.

drummerjolev avatar drummerjolev commented on May 29, 2024

Having the same error, shame this is no longer maintained

from action-release.

NisanthanNanthakumar avatar NisanthanNanthakumar commented on May 29, 2024

Hi everyone! I need some more info to help debug this issue for y'all.
@mhihasan did your project have a release from another repo before you setup this action?
@qua11q7 yes it sounds like the cli is trying to find hash1 in your git tree bc the last found release ended with hash1. I am not sure if you can delete a release in the Sentry UI without the proper auth role.
You can use our API to delete: https://docs.sentry.io/api/releases/delete-an-organizations-release/

from action-release.

tazik561 avatar tazik561 commented on May 29, 2024

when I am using
flutter packages pub run sentry_dart_plugin --ignore-missing
after building with --source-map
still I got error:

☑ uploading source maps                                                             

Could not determine any commits to be associated with a repo-based integration. Proceeding to find commits from local git tree.

error: Could not find the SHA of the previous release in the git history. If you limit the clone depth, try to increase it. Otherwise, it means that the commit we are looking for was amended or squashed and cannot be retrieved. Use --ignore-missing flag to skip it and create a new release with the default commits count.
Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.

exitCode: 1

my project yml file:

dependencies:
  flutter:
    sdk: flutter
  sentry_flutter: ^7.18.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  build_runner: ^2.4.6
  sentry_dart_plugin: ^1.0.0

sentry:
  upload_debug_symbols: false
  upload_source_maps: true
  upload_sources: false
  project: my_project_name
  org: myorg
  auth_token: a9.....287
  log_level: error
  commits: auto

from action-release.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.