Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

fix(api): check if release.build is NoneType#1078

Merged
bacongobbler merged 1 commit intodeis:masterfrom
bacongobbler:hotfix-unit-test-failure
Sep 18, 2016
Merged

fix(api): check if release.build is NoneType#1078
bacongobbler merged 1 commit intodeis:masterfrom
bacongobbler:hotfix-unit-test-failure

Conversation

@bacongobbler
Copy link
Copy Markdown
Member

closes #1077

@bacongobbler bacongobbler added this to the v2.6 milestone Sep 16, 2016
@bacongobbler bacongobbler self-assigned this Sep 16, 2016
@deis-bot
Copy link
Copy Markdown

@helgi, @kmala and @Joshua-Anderson are potential reviewers of this pull request based on my analysis of git blame information. Thanks @bacongobbler!

@helgi helgi added the LGTM1 label Sep 16, 2016
@helgi
Copy link
Copy Markdown
Contributor

helgi commented Sep 16, 2016

Just had a look, the reason why this fails is because the code assumes (incorrectly I suppose) that it's being called from within run/scale/deploy and all of those already do a release.build check and raise an exception. _gather_app_settings should not be even returning anything without release.build being set

#1076 made it so the release object does not have Build and is calling _gather_app_settings directly, whichi s why it got triggered.

I think you can overall change all the above checks to just this at the top of the function

        if release.build is None:
            raise DeisException('No build associated with this release to run this command')

@helgi helgi removed the LGTM1 label Sep 16, 2016
@bacongobbler bacongobbler force-pushed the hotfix-unit-test-failure branch from da0074f to 730dda2 Compare September 16, 2016 16:45
@bacongobbler
Copy link
Copy Markdown
Member Author

bacongobbler commented Sep 16, 2016

This also consistently fails because I'm on my laptop and don't have python3 installed while at the conference so I'm just abusing CI as my tester.

_gather_app_settings should not be even returning anything without release.build being set

Sure, I'll make that change.

@bacongobbler bacongobbler force-pushed the hotfix-unit-test-failure branch 5 times, most recently from bd45667 to 699c8ee Compare September 16, 2016 17:50
@bacongobbler bacongobbler force-pushed the hotfix-unit-test-failure branch from 699c8ee to 8da43b8 Compare September 16, 2016 20:39
@helgi helgi added the LGTM1 label Sep 16, 2016
@bacongobbler bacongobbler merged commit b8aa206 into deis:master Sep 18, 2016
@bacongobbler bacongobbler deleted the hotfix-unit-test-failure branch September 18, 2016 20:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unit tests failing

5 participants