getsentry / sentry-dart-plugin

A Dart Build Plugin that uploads debug symbols for Android, iOS/macOS and source maps for Web to Sentry via sentry-cli
MIT License
68 stars 28 forks source link

`--ignore-missing` doesn't work #153

Closed feinstein closed 1 year ago

feinstein commented 1 year ago

I got an error at the end of the upload saying:

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

So then I added the --ignore-missing flag and run dart run sentry_dart_plugin --ignore-missing, but then I continue to get the same error.

The commit was squashed.

buenaflor commented 1 year ago

Hi! thank you for the issue, I'll be looking into it

feinstein commented 1 year ago

Just a little bit more info, I develop new features into a branch and then I squash and merge this branch into the development branch. So I think I uploaded the debug symbols in a feature branch (the feature was to add sentry and test sentry debug symbols upload), and later when I merge/squased this branch I can't upload the symbols without seeing an error.

mattsolle commented 1 year ago

Any update? This is effecting our application's CI/CD pipeline for production.

brightknight08 commented 1 year ago

happening to my projects too.

denrase commented 1 year ago

We are looking into this now, thank you for reporting this.

denrase commented 1 year ago

@feinstein Just a question, does it work as expected when you add ignore_missing: true to the yaml config?

https://github.com/getsentry/sentry-dart-plugin/blob/0f8766167c25caf1044a4769fd98a4cf816c95b0/README.md?plain=1#L59

denrase commented 1 year ago

This is probably an error message from sentry-cli, which we are using/wrapping. Everything in the dart plugin should be configured via the yaml config and not by command line parameters.

feinstein commented 1 year ago

It does work when I add it to the yaml file.

This limitation would be useful to be added into the docs.

denrase commented 1 year ago

@feinstein Yes, It's not ideal that the error references a solution that does not work for the plugin, but rather for the underlying component we are using. Only adds confusion.

@mattsolle @brightknight08 Please also check if adding ignore_missing: true to your configuration to see if this resolves your issue.

denrase commented 1 year ago

@feinstein We have updated our troubleshooting section.

feinstein commented 1 year ago

Great, thanks a lot!