-
Notifications
You must be signed in to change notification settings - Fork 8
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
[AENT-7570]/client side fixes #196
Conversation
'_revision': ident['_revision'], | ||
'_record_type': 'project', | ||
} | ||
rrec = self._revision(dep2proj) |
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.
wanted to use the existing _revision
code to raise an error if the revision is not found. It would be nice if it would list the available revisions but didn't try to figure that out.
@@ -1551,7 +1551,19 @@ def deployment_open(self, ident, frame=False, format=None): | |||
|
|||
def deployment_patch(self, ident, format=None, **kwargs): | |||
drec = self._ident_record("deployment", ident) | |||
data = {k: v for k, v in kwargs.items() if v is not None} | |||
data = {k: v for k, v in kwargs.items() if v is not None and v != drec[k]} |
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.
Added the check that if the value in kwargs isn't different from existing deployment attribute, then don't bother calling the API (see this: v != drec[k]
). This isn't necessary since the operations are idempotent; but it seemed easy enough to add so I did. I don't know if the server side already takes care of this.
@sandhujasmine this is working great! I was able to verify that this successfully results in an update to our database as well as to the deployment itself. |
Add option to patch resource-profile; and the deployed-version.
Testing
Ensure this is being tested against latest deployment of anaconda-platform master so it has this fix (https://github.com/anaconda/anaconda-platform/pull/6970) in.
Follow the same testing instructions on the server side as listed in this PR#6970 to start a deployment with version 0.1.0; then create an update and tag it as 0.1.1
Now use this updated client side ae5 version to apply the patches:
a2-eca80be7b7a143f78299bd615cf66ab5
Watch the
anaconda-app
pod get updated to the latest 0.1.1 deployment. You can verify in the UI; verify in the response printed by the client; you can also verify in the AE server UI.