arabold/serverless-sentry-plugin

The plugin shouldn't send latest git tag when i's not the latest commit

vcarel opened this issue · 3 comments

I have the following commits:

  • 5ec98be (HEAD -> serverless, origin/serverless) RCH-183 Try Sentry git version
  • 66b3337 (tag: v0.23.0-rc1) v0.23.0-rc1
  • 8b0db54 RCH-183 Add more lambda memory for more speed
  • ...

During serverless deployment, the release pushed to Sentry is v0.23.0-rc1, which corresponds to the latest tag. But that's not the latest commit.

Serverless: Sentry: Creating new release "v0.23.0-rc1"...
Serverless: Sentry: Received error response from Sentry:
{"refs": ["Invalid repository names: my_company/my_repo"]}

I think we should push the latest git tag only when it's on HEAD.

Yes, you're right. I'll look into that. It might be best to fully drop tags and always use the latest hash as the hash is unique and cannot be overwritten or modified.

@vcarel , it took me a while but this is finally addressed in v1.0.0. Please let me know if this solves the problem for you.

@arabold Thanks a lot for the fix! I have to apologize I can't test it anymore, since my team had to switch to regular VMs because of cost issues...
Anyway keep going, your plugin is super convenient :-) I hope it will help others as it did for us.