-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow uploading sources for debug files #773
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
should we also add tests? We already test that the binaries are being uploaded for all supported platforms: #763
To do that we would likely need to
- enable the new option in the integration test project (...-update-sentry.ps1 script)
- maybe update the
symbol-upload-server.py
- if the source-code upload uses a new API - update common.ps1
CheckSymbolServerOutput()
with to check that the right files were uploaded.
I think the source bundles are the same as other debug files in that sense. I can bug @bitsandfoxes to help me set up the integration tests so I can get something up and running. |
I'll give it a quick go myself, since I've done the symbol upload tests I know these pieces by heart |
In sentry, all these files have the same name, with the same debug_id. But they have different contents, like here: So I think this is perfectly fine. Although I agree its confusing. We do use |
One thing to watch out for. Some time ago we had the problem that source bundles were being re-uploaded all the time, because they were different all the time because of unstable sorting order internally. Now we should have a stable sorting order. But it seems that at least my local sentry-cli still re-uploads these files over and over again, so that bug is not fixed yet :-( The reason I say this is because you would probably end up with different chunk hashes, and thus wouldn’t be able to use snapshot testing for this. |
So far the symbol upload tests didn't use the hash, just the |
Isn’t that a bit contradictory? Using the content, but then the contents are not actually uploaded because the server says chunks already exist? Btw, this was the issue with source bundles: getsentry/sentry-cli#831 The problem is rather timestamps -_- So maybe there is a fairly easy workaround for this in symbolic. |
sorry, brain lag there - I was going to say "file name" instead of "content", I've fixed the comment. |
0531955
to
a9fc9d8
Compare
a9fc9d8
to
6165918
Compare
6165918
to
6c034ad
Compare
6c034ad
to
21cb45b
Compare
I've added the tests (took way more effort than anticipated... as usual), though only based on the number of uploaded files as I couldn't (in a self-imposed time box) figure out unpacking & analyzing the content of the uploaded files. Should be still good to catch issues in the future: 21cb45b |
|
||
process_upload_symbols() {{ | ||
./{SentryCli.SentryCliMacOS} --log-level=info upload-dif $BUILT_PRODUCTS_DIR 2>&1 | tee ./sentry-symbols-upload.log | ||
./{0} --log-level=info upload-dif {1} $BUILT_PRODUCTS_DIR 2>&1 | tee ./sentry-symbols-upload.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a nifty way of getting some additional arguments in there!
❤️ thanks so much for taking this over! @vaind |
@@ -35,7 +35,7 @@ public Fixture() | |||
} | |||
|
|||
public DebugSymbolUpload GetSut() => new(new UnityLogger(new SentryOptions(), LoggerInterceptor), | |||
UnityProjectPath, GradleProjectPath, IsExporting, Application); | |||
null, UnityProjectPath, GradleProjectPath, IsExporting, Application); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add unit tests for the path that adds --include-sources
?
@@ -129,7 +129,7 @@ public void AddBuildPhaseSymbolUpload_CleanXcodeProject_BuildPhaseSymbolUploadAd | |||
xcodeProject.ReadFromProjectFile(); | |||
|
|||
var didContainUploadPhase = xcodeProject.MainTargetContainsSymbolUploadBuildPhase(); | |||
xcodeProject.AddBuildPhaseSymbolUpload(_fixture.Options.DiagnosticLogger); | |||
xcodeProject.AddBuildPhaseSymbolUpload(_fixture.Options.DiagnosticLogger, new SentryCliOptions()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since uploadSources
is false
by default, should we add unit tests for the path that adds --include-sources
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than missing tests LGTM
Co-authored-by: Stefan Jandl <[email protected]> Co-authored-by: Bruno Garcia <[email protected]>
merging as is to get the changes for #785 , I'll add unit tests & update CI to run alternatively with/without sources in a follow up PR |
No description provided.