Skip to content

Conversation

@mezpahlan
Copy link

@mezpahlan mezpahlan commented Jun 16, 2018

If public_url not available typically because we are using an API key
that has insufficient permissions to create releases. In this scenario installUrl resolves to null/app_versions/{buildId} which makes no sense to be creating.

@jenkinsci/code-reviewers would you do the honours, please. Thanks.

If public_url not available typically because we are using an API key
that has insufficient permissions to create releases.
@daniel-beck
Copy link
Member

I don't understand the problem domain well enough to comment (and I expect I'm not the only one in the group). Perhaps an automated test would help?

Using id can cause issues when the UploadApp method is used as the id is
 static and points to the id of the app rather than the version which is
 what we want.
@mezpahlan
Copy link
Author

@daniel-beck that's a fair comment. I've added additional tests to cover these scenarios. In short, if an upload API key the user is using has insufficient permissions, we should not be creating a build action as it is meaningless. The old code assumed we would always receive a field in the returned JSON response from HockeyApp. Hope the tests help in that regard. Let me know if there is anything else.

Copy link
Member

@daniel-beck daniel-beck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the blind man on the galloping horse (as Stephen Connolly likes to say), LGTM 😃

In general this change looks straightforward. Assuming the domain is implemented correctly, there's little that can go wrong here. Are you concerned about something specific, or just want the additional pair of eyes on this change?

@mezpahlan
Copy link
Author

mezpahlan commented Jun 18, 2018 via email

@daniel-beck daniel-beck reopened this Jun 18, 2018
@daniel-beck
Copy link
Member

@mezpahlan Oops, sorry about the accidental closing, got my browser tabs confused.

@mezpahlan mezpahlan merged commit 6a81baa into jenkinsci:master Jun 20, 2018
@mezpahlan mezpahlan deleted the bugfix/JENKINS-51982-only-expose-installation-link-if-downloads-are-allowed branch June 20, 2018 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants