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
BuildConfig editor fix #7109
BuildConfig editor fix #7109
Conversation
@@ -351,7 +354,7 @@ angular.module('openshiftConsole') | |||
$scope.imageSourceBuildFrom.tags = {}; | |||
var projectImageStreams = imageStreams.by("metadata.name"); | |||
if (!_.isEmpty(projectImageStreams)) { | |||
if (!Object.keys(projectImageStreams).contains($scope.imageSourceBuildFrom.imageStream) && projectName === $scope.imageSourceBuildFrom.namespace) { | |||
if (!Object.keys(projectImageStreams).contains($scope.imageSourceBuildFrom.imageStream) && projectName === $scope.imageSourceBuildFrom.namespace && !selectFirstOption) { |
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.
These should really use Object.hasOwnProperty
or _.has
.
!_.has(projectImageStreams, $scope.imageSourceBuildFrom.imageStream)
Not new in this PR, but worth fixing since we're changing the code.
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.
👍 will update right away
LGTM except for the one comment |
@spadgett sorry for the confusion on the irc, there are only 3 substitutions not 13. |
LGTM [merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/918/) (Image: devenv-rhel7_3363) |
Evaluated for origin merge up to cb63a00 |
[Test]ing while waiting on the merge queue |
Evaluated for origin test up to cb63a00 |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/918/) |
When changing the builder/output/imageSource Type from imageStreamImage || dockerImage to imageStreamTag the imageStream value has been added to the list of the imageStream options, which should be done only when the data are loaded, that means when the buildConfig has specified different imageStream than exists, to prevent loss of data.
Also renaming
imageSourcesOptions
toimageSourceOptions
which wasnt causing any issues, but forgot to rename when was doing final updates.@spadgett I've tested the change and should be working now as desired. PTAL.