Skip to content

Ignore ports variable if length is 0 #433

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

Merged
merged 3 commits into from
Feb 23, 2019
Merged

Conversation

drshrey
Copy link
Contributor

@drshrey drshrey commented Feb 22, 2019

Only go through the ports-creation logic in the service mutation if the length of the ports input is greater than 0. Currently, we pass in a ports variable from the client-side regardless of the service type. However, the one-shot service type passes in a 0 length, non-nil ports parameter which means we cannot create one-shot services from the panel client inputs right now.

This fixes it by allowing to hit ports creation logic only if it is not nil and the ports length is greater than 0.

@drshrey drshrey added T/Bug Type: Bug P/Critical Priority: Critical S/Review Status: Please review labels Feb 22, 2019
@drshrey drshrey requested a review from aballman February 22, 2019 19:37
@codecov
Copy link

codecov bot commented Feb 22, 2019

Codecov Report

Merging #433 into master will increase coverage by 0.03%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #433      +/-   ##
==========================================
+ Coverage   61.31%   61.34%   +0.03%     
==========================================
  Files          51       51              
  Lines        5260     5260              
==========================================
+ Hits         3225     3227       +2     
+ Misses       1717     1715       -2     
  Partials      318      318

@drshrey drshrey merged commit 65603bb into master Feb 23, 2019
@drshrey drshrey deleted the fix-service-ports-issue branch February 23, 2019 01:36
drshrey added a commit that referenced this pull request Feb 25, 2019
drshrey added a commit that referenced this pull request Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P/Critical Priority: Critical S/Review Status: Please review T/Bug Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants