Skip to content

Mark key vault creation as a long running operation#2436

Merged
dsgouda merged 1 commit intoAzure:masterfrom
seanbamsft:feature/vault-create-delay
Feb 6, 2018
Merged

Mark key vault creation as a long running operation#2436
dsgouda merged 1 commit intoAzure:masterfrom
seanbamsft:feature/vault-create-delay

Conversation

@seanbamsft
Copy link
Copy Markdown
Contributor

@seanbamsft seanbamsft commented Feb 6, 2018

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.

PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

@AutorestCI
Copy link
Copy Markdown

AutorestCI commented Feb 6, 2018

Automation for azure-sdk-for-python

Swagger to SDK encountered an unknown error: (azure-sdk-for-python)

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/github_tools.py", line 29, in exception_to_github
    yield context
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 195, in rest_handle_action
    return rest_pull_open(body, github_con, restapi_repo, sdk_pr_target_repo, context_tags, sdkbase, sdk_tag)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 269, in rest_pull_open
    base=sdk_base
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/github_tools.py", line 137, in get_or_create_pull
    base=base
  File "/usr/local/lib/python3.6/dist-packages/github/Repository.py", line 994, in create_pull
    return self.__create_pull_1(*args, **kwds)
  File "/usr/local/lib/python3.6/dist-packages/github/Repository.py", line 1003, in __create_pull_1
    return self.__create_pull(title=title, body=body, base=base, head=head)
  File "/usr/local/lib/python3.6/dist-packages/github/Repository.py", line 1016, in __create_pull
    input=post_parameters
  File "/usr/local/lib/python3.6/dist-packages/github/Requester.py", line 172, in requestJsonAndCheck
    return self.__check(*self.requestJson(verb, url, parameters, headers, input, cnx))
  File "/usr/local/lib/python3.6/dist-packages/github/Requester.py", line 180, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 422 {'message': 'Validation Failed', 'errors': [{'resource': 'PullRequest', 'code': 'custom', 'message': 'No commits between master and restapi_auto_keyvault/resource-manager'}], 'documentation_url': 'https://developer.github.com/v3/pulls/#create-a-pull-request'}

"Vaults"
],
"operationId": "Vaults_CreateOrUpdate",
"x-ms-long-running-operation": true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you verify if Vaults_Update is also a long running operation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vault_Update isn't expected to be long-running. The issue I'm addressing here is that vault creation happens in <1 second, but it may take 15+ seconds for DNS to successfully resolve when a vault is first created. On the service-side, I've implemented a 15 second delay for returning a terminal provisioningState (so the initial PUT and all GETs in the first 15 seconds return a non-terminal and currently unspecified provisioningState). The goal is to ensure that a PowerShell script that calls New-AzureRmKeyVault followed by Set-AzureKeyVaultSecret won't run into errors due to DNS propagation delays. The New-AzureRmKeyVault cmdlet will end up handling the long-running operation, so even if the script does other vault updates via Set-AzureRmKeyVaultAccessPolicy, the desired delay will have already occurred.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying.

@AutorestCI
Copy link
Copy Markdown

Swagger to SDK encountered a Subprocess error: (Azure/azure-sdk-for-go)

Command: profileBuilder -s preview -name preview
Finished with return code 127
and output:

/bin/sh: 1: profileBuilder: not found

@azuresdkciprbot
Copy link
Copy Markdown

Hi There,

I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:

File: specification/keyvault/resource-manager/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@dsgouda dsgouda merged commit 99c15f0 into Azure:master Feb 6, 2018
@seanbamsft seanbamsft deleted the feature/vault-create-delay branch February 6, 2018 22:13
@AutorestCI
Copy link
Copy Markdown

Swagger to SDK encountered an unknown error: (Azure/azure-sdk-for-go)

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/github_tools.py", line 29, in exception_to_github
    yield context
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 180, in rest_handle_action
    return rest_pull_close(body, github_con, restapi_repo, sdk_pr_target_repo, sdkbase)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 302, in rest_pull_close
    rest_pull_open(body, github_con, restapi_repo, sdk_pr_target_repo, sdk_default_base)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 215, in rest_pull_open
    sdk_default_base
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 269, in generate_sdk_from_git_object
    manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id) as restapi_git_folder, \
  File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/github_tools.py", line 200, in manage_git_folder
    clone_to_path(gh_token, temp_dir, split_git_id[0], branch=branch)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/github_tools.py", line 142, in clone_to_path
    _git_clone_to_path(https_authenticated_url, folder, branch)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/git_tools.py", line 60, in clone_to_path
    repo.git.checkout(branch_or_commit)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 551, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1010, in _call_process
    return self.execute(call, **exec_kwargs)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 821, in execute
    raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
  cmdline: git checkout feature/vault-create-delay
  stderr: 'error: pathspec 'feature/vault-create-delay' did not match any file(s) known to git.'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants