-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[Hub Generated] Review request for Microsoft.RecoveryServices to add version 2018-07-10 #5207
[Hub Generated] Review request for Microsoft.RecoveryServices to add version 2018-07-10 #5207
Conversation
Automation for azure-sdk-for-pythonNothing to generate for azure-sdk-for-python |
Automation for azure-sdk-for-rubyThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-goNothing to generate for azure-sdk-for-go |
Automation for azure-sdk-for-javaNothing to generate for azure-sdk-for-java |
Can one of the admins verify this patch? |
Automation for azure-sdk-for-nodeA PR has been created for you based on this PR content. Once this PR will be merged, content will be added to your service PR: |
Automation for azure-sdk-for-jsEncountered an unknown error: (azure-sdk-for-js)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
yield context
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
sdk_tag=sdk_tag
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 309, in generate_sdk_from_git_object
sdk_repo.git.push('origin', base_branch, set_upstream=True)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git push --set-upstream origin restapi_auto_recoveryservicessiterecovery/resource-manager
stderr: 'remote: Permission to Azure/azure-sdk-for-js.git denied to AutorestCI.
fatal: unable to access 'https://AutorestCI:58ab395c311d1bd75b3e1db1cc8adaf9acc42afe@github.com/Azure/azure-sdk-for-js.git/': The requested URL returned error: 403' |
Introduced new API version 2018-07-10 for Azure Site Recovery (ASR) service: Breaking changes:
Incremental changes:
Ran autorest --azure-validator and sanity tools under OpenAPI Validation Tools and found no issues. |
"type": "string" | ||
}, | ||
{ | ||
"name": "migrationI |
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.
Resolvability -> Resolvable? Could just be a boolean that way
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.
Basically, we thought of the boolean approach. But decided against it, due to the limitation in future extendability if we ever wanted a new value apart from the current set i.e Allowed, NotAllowed.
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.
few comments
@@ -3322,6 +3476,83 @@ | |||
} | |||
} | |||
}, | |||
"/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/ResolveHealthErrors": { |
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.
nit: camel case for subscriptions
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 will be taking later as it reflects all the existing APIs too.
@@ -3180,6 +3257,83 @@ | |||
} | |||
} | |||
}, | |||
"/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/removeDisks": { |
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.
ensure linked access check is happening in ARM manifest.
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.
As @innosam has communicated over mail, we are updating manifest in parallel.
@@ -7189,6 +7485,17 @@ | |||
"description": "The data pending at source virtual machine in MB.", | |||
"type": "number" | |||
}, | |||
"diskState": { |
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.
this should be modeled as enum
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.
As far as I know using enums is not considered a good practice. Are you are referring to allowed values construct?
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.
why is enums not a good practice? you can set modelasString:true and that will not be a breaking change when you add new values.
@@ -8127,13 +8502,6 @@ | |||
"type": "string" | |||
} | |||
}, | |||
"roleAssignments": { |
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.
why is this property being removed?
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.
Om Nishant omnishan@microsoft.com: After the roles and responsibilities were revisited to keep up with compliance and customer expectations, extraneous fields were removed to prevent any misleading and unrealistic expectations.
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.
what happens when customer sets this property using an old api-version which supported it and gets the resource using new api-version. And then may be after that, does a PUT again from the new api-version
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.
roleAssignments under AzureToAzureVmSyncedConfigDetails is present only in response of GET ReplicationProtectedItem.
Actually these are role assignments of the Virtual Machine that is getting replicated (Virtual Machine and ReplicationProtectedItem have 1:1 association in ASR).
We were storing & syncing roleAssignments of the Virtual Machine - which we have stopped doing (shared the reason from Om Nishant in previous comment).
So, there is no PUT and only GET associated with the property which we have removed.
...ger/Microsoft.RecoveryServices/stable/2018-07-10/examples/SupportedOperatingSystems_Get.json
Outdated
Show resolved
Hide resolved
There is an open issue with this design which is due to a limitation in ASR service and second this has already been implemented on service side. Ideally addDisk, removeDisk, resolveHealthError kind of scenarios should have been addressed via a PUT or PATCH on the parent resource instead of as a POST action. Please make sure you are doing the right auth check in the manifest _Gaurav Bhatnagar Sent from Outlook From: Gaurav Bhatnagar Gaurav.Bhatnagar@microsoft.com For #1 comment below - Does the second PUT fail on an existing resource fail if some property values are changed in the payload. If a property is patchable using a PATCH API, it should be updatable using a PUT as well. I can confirm that for replication protected item, the second PUT call with the same input is handled idempotence. While, if some of the input is changed, we fail with a user error. #2a -Seems like an internal implementation detail. yes this is specific to asr, but the jobs are available as ARM resource replicationJobs/{jobname}. And, when the get is done on the resource we expose the list of task executed for a particular long running job. #2b - IMO, it doesn't complicate the scenario. May be it complicates the implementation on the backend. But, as far as user experience is concerned, it provides flexibility to the user. The user can choose to update any number of properties as part of the patch. the user doesn't have to update a few properties using PATCH and somehow figure out that for disk update they need a separate POST API. Yes, it does complicate the implementation. From user experience perspective, the bright side for the POST call is that user need not provided the existing disk set and their parameters, when adding a new disk. Moreover, in the current model, RBAC is broken. Since now someone without /write permissions on replicationProtectedItems can change its state by doing a POST. It looks like this has already been implemented. Can you please confirm? If yes, I would recommend that we atleast do a linked access check to ensure the RBAC is not an issue. Yes, we have already completed the implementation. I will definitely ensure that the linked access check to ensure the RBAC is not an issue. Thanks for bringing this point, I will reach you if I have doubts on “how to” of this required action. Thanks, Gaurav Sent from Outlook From: Harkirat Singh Hey Gaurav, I was away last week for Diwali holidays, so could not respond. Yes, we did consider the PATCH/PUT call, and eventually decided on separate POST due to following reasons: PUT
PATCH
a. The PATCH call fires a workflow/job which is generic in nature. The add/remove disk scenario needed descriptive task which are different from the current PATCH. b. And, if we do allow the disk update through PATCH, user can club different updates together with add/remove disk, which complicates the scenario. In summary separate API’s is more convenient to the user as only the diff of the disk needs to be provided. Thanks Harkirat Singh_ |
@sriramvu - just one pending open question |
} | ||
], | ||
"properties": { | ||
"vmDisksUris": { |
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.
is naming fine DisksUris?
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.
property names should also be camel cased.
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.
vmDisksUris is camel cased, did not get the comment.
Suggesting a change?
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.
vmDiskUris
double plural is odd
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.
yes, this is correct. I thought you asked a question and I replied saying es, propertynames should also be camel cased.
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.
Service is already out with changes.
No point in holding things for this minor things.
} | ||
], | ||
"properties": { | ||
"vmDisksUris": { |
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.
vmDiskUris
double plural is odd
Signing off from ARM side. |
If you are a MSFT employee you can view your work branch via this link.
Contribution checklist: