-
Notifications
You must be signed in to change notification settings - Fork 231
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
Update CreatePersistentVolumeClaimController to use getPreferredVersion #2160
Update CreatePersistentVolumeClaimController to use getPreferredVersion #2160
Conversation
@@ -24,6 +25,8 @@ angular.module('openshiftConsole') | |||
$scope.accessModes="ReadWriteOnce"; | |||
$scope.claim = {}; | |||
|
|||
var perpersistentVolumeClaimsVersion = APIService.getPreferredVersion('buildconfigs'); |
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.
s/buildconfigs/persistentvolumeclaims
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.
thx @spadgett, updating
1ee46ca
to
30e2807
Compare
updated. |
@@ -24,6 +25,8 @@ angular.module('openshiftConsole') | |||
$scope.accessModes="ReadWriteOnce"; | |||
$scope.claim = {}; | |||
|
|||
var perpersistentVolumeClaimsVersion = APIService.getPreferredVersion('persistentvolumeclaims'); |
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.
perper? :)
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.
oh good grief, not cool. ok, my review process sucks. lemme fix my system, sorry
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.
To be fair, I missed that on first review :)
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.
at least var name consistently wrong but not broken, heh.... Updating.
30e2807
to
b5e2aec
Compare
ok updated w/fixed var name. |
Version is not updated in the resource body we POST
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.
Hey @benjaminapetersen Missed this on first review, but we shouldn't use the preferred version for create. We should use the version in the object body that we construct. That should be updated to use the API group.
b5e2aec
to
909e639
Compare
Updated w/ |
@@ -49,7 +52,7 @@ angular.module('openshiftConsole') | |||
.then(_.spread(function(project, context) { | |||
$scope.project = project; | |||
|
|||
if (!AuthorizationService.canI('persistentvolumeclaims', 'create', $routeParams.project)) { | |||
if (!AuthorizationService.canI(persistentVolumeClaimsVersion, 'create', $routeParams.project)) { |
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 should be checking the same resourceGroupVersion that we create
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.
Yeah that makes sense. Let me update.
909e639
to
4910f8d
Compare
updated |
kind: "PersistentVolumeClaim", | ||
apiVersion: "v1", | ||
metadata: { | ||
name: $scope.claim.name, |
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.
$scope.claim.name
is not set at this point.
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.
Oop, thx, fixed & tested.
4910f8d
to
8b7d4c4
Compare
updated |
@@ -59,7 +75,8 @@ angular.module('openshiftConsole') | |||
if ($scope.createPersistentVolumeClaimForm.$valid) { | |||
$scope.disableInputs = true; | |||
var claim = generatePersistentVolumeClaim(); | |||
DataService.create('persistentvolumeclaims', null, claim, context) | |||
var createClaimVersion = APIService.objectToResourceGroupVersion(claim); |
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'd use the createPVCVersion
from above since we already have it
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.
Yeah doesn't really make sense to do the work again, should still have the same rgv
value. I'll update.
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.
Going to move it up as well, most of these I have near the top of the file, before the ProjectService.get()
8b7d4c4
to
eb19bc2
Compare
Updated/retested. |
[merge] |
flake #1684 [merge] |
Evaluated for origin web console merge up to eb19bc2 |
Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin_web_console/278/) (Base Commit: 0177053) (PR Branch Commit: eb19bc2) |
No view updates.
@spadgett