You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
We use Expo-managed workflow for our apps. And we have been using pipelines to send OTA updates, which works really well.
We have s `postPublish` hook that uploads our source maps to sentry for better tracing the errors. But we are getting [10:11:14] Error uploading sourcemaps to Sentry: 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. error since the last few builds. We haven't changed anything in our pipeline so maybe something changed internally?
I asked about the issue in the Github repo here, but they refer to it as Sentry-specific or Bitbucket pipeline issue.
Just to give you some context, Pipelines builds run in Docker containers. For every step of your build, a Docker container starts using the image you have specified in your bitbucket-pipelines.yml file. The repo is cloned in that container, and then the commands of the step's script are executed. When the step finishes that Docker container gets destroyed.
Do the pipeline builds with this issue run on a branch definition? For Pipelines running on a branch, this specific branch is cloned with a default depth of 50 (the last 50 commits of this branch will get cloned).
Based on the error message you posted, it looks like a command in your build is trying to find an earlier commit that is not available in the clone. If your build needs all commits of this branch to be available, you can add the following in your bitbucket-pipelines.yml, either as a top-level configuration for all steps or to a single step (this way all the commits of the branch will get cloned):
Documentation for reference:
Please feel free to let me know if this works for you and if you need anything further!