#Git Submodules
31 messages · Page 1 of 1 (latest)
I honestly doubt --auto will work here but have you tried it?
I am not sure we support this usecase
Auto doesn't work, as it doesn't detect the submodules (which are in a subfolder)
yeah I don't think we support this usecase
But you do allow it in sentry's frontend
I can add multiple repositories through the gitlab integration and set up code mappings to point at certain submodules
So, what would the command do in my OP?
I would just try it out and see what happens
Just try it out seems like an unreasonable strategy for production environments tbf
😂 not wrong
It's a bit uncharted territory for me at least. I would file it under undefined behavior. Maybe @kind badger can chime in.
🫣 any updates?
Hi @blissful grotto, missed this one, my apologies
Tbh I’m unsure, I’m not really that familiar with git submodules. I’d have to investigate a bit
You could try out the command with a test project and see what happens
Otherwise I’ll have some time to take a look tomorrow
Hey @blissful grotto, after reading up on git submodules, it appears that you can use git submodules foreach to execute an arbitrary shell command (such as Sentry CLI) on each of the submodules individually
So, I would expect the command you provided to work. If it does not, please let us know
Okay, but what does the sentry-cli command do, does it keep adding commits or does it replace the already added commits?
It just sets which commits will be associated with your Sentry release. It does not make any commits
I mean to the release
Ah okay I think I get it now: you’re wondering if the loop will cause the previous commits associated with the release to be overwritten on that release. Is that correct?
My guess is that the commits most likely get overwritten, which would mean we don’t support your use case, but I’d need to investigate to be sure. You could also just try it out with a test project
Are you all of the sub modules using the same project in Sentry?
@blissful grotto from what I can tell, calling set-commits would indeed overwrite any commit history for the given release, so the foreach would not work as expected
So, it seems like we do not support this use case
Yes, all submodules are part of the final project, we use submodules for tenants in our SaaS
which means I somehow have to manually collect the commits, no?
Yeah, unfortunately I think that would be the solution here
Our backend API seems to lack a way to add commits without overwriting the existing ones, so basically all the commits have to be provided in one go
Do you think that will be a suitable workaround for you @blissful grotto?
It'll have to, as long as I'll be able to link commits to a repository, obviously
Feature request would be support for this though
Automatically, in sentry-cli