-
-
Notifications
You must be signed in to change notification settings - Fork 235
feat(preprod): Show analysis URL after mobile-app upload #2675
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
Conversation
e900afe
to
eb9eef4
Compare
c77f660
to
270f8ca
Compare
270f8ca
to
41feac8
Compare
41feac8
to
de1d2de
Compare
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.
The code looks alright to me. However, I am unsure we should implement this feature, see the inline comment about how this would require us to wait for assembly to finish.
If you have any questions, please feel free to reach out.
src/commands/mobile_app/upload.rs
Outdated
response | ||
.artifact_id | ||
.ok_or(anyhow!("Missing artifactId in response")) |
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.
The disadvantage here is that because we require the artifact ID to be present in the response, we will always have to wait until the artifact has finished assembling, which could significantly slow down the command. It looks like we are already doing this, but in the future we may want to change it, as it is likely not the ideal behavior.
If we want to print the URL, there's probably no way around waiting for the assembly to finish. But, it is likely worth reconsidering whether we really think it is worth waiting for assembly to finish, just to be able to print the URL (with no way to opt in or out of this behavior)
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.
Also, is the artifact_id
always expected to be there if we hit this line (i.e., if the assembly status is OK)?
If not, I would suggest improving the error message to make it more actionable to the user.
If we do expect the artifact_id
to be there, I would suggest we rewrite the error message to indicate that this is an internal error with the CLI and/or with the server, as it is not fixable by the user. You can do this by using expect
rather than returning an error, as expect
panics, and Sentry CLI's panic handler prints a message stating that an internal error has occurred, and that users should file a bug report
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.
Edit: Not sure the above is accurate, I am currently reviewing #2683 and getsentry/sentry#97435 to verify this
Edit to the edit: I think my initial thoughts here were correct
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.
We've updated the way this works so now the artifact id/url is available immediately.
This change would conflict with what @NicoHinderling is implementing in #2683, as I describe here, since #2683 removes the assembly polling, on which this PR depends |
Yes! Partly because of what you were saying (assembly can be slow) and also that assembly happens in a task so it's awkward to get the file.id out (turned out the query we were running was far to slow on |
de1d2de
to
3670f47
Compare
3670f47
to
ab71fc0
Compare
@chromy just wanted to write it here so the discussion is preserved: after meeting with @NicoHinderling and understanding his changes better, I believe this PR should not conflict with his PR, once the needed changes are made on that PR and once this PR is rebased on it |
7090e8e
to
ab71fc0
Compare
Thanks! Nico and I have updated this one to hopefully take in to account all the feedback on both PRs (with the exception of having the server return a URL rather than an id which we would like to do in a follow up after this lands since it requires a server side change). |
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.
LGTM aside from some nits
19a3331
to
ab71fc0
Compare
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.
I also left some suggestions, the rest looks good though!
e86d183
to
7f7e773
Compare
7f7e773
to
18162ba
Compare
Thanks both! |
Adds output when uploading a mobile app to show the analysis URL:
Also updates the
sentry-cli
logic for recent changes to the upload endpoint:gitSha
renamed toheadSha
artifactId
artfiactId
and trigger an assembly jobThis avoids having to wait for the (slow) assembly process to complete prior to the CLI exiting.