Skip to content
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

[KeyVault] Addressed feedback on samples #5447

Merged
merged 3 commits into from
Oct 8, 2019

Conversation

sadasant
Copy link
Contributor

@sadasant sadasant commented Oct 8, 2019

Jonathan found that some of the samples have issues. Here's a PR fixing them.

Since this is only in the samples, perhaps this doesn't affect the current release build?

Fixes #5444

@sadasant sadasant added Client This issue points to a problem in the data-plane of the library. KeyVault labels Oct 8, 2019
@sadasant sadasant requested a review from sophiajt October 8, 2019 03:05
@sadasant sadasant self-assigned this Oct 8, 2019
@@ -42,22 +42,14 @@ async function main(): Promise<void> {

// Reading the certificate will give us back the issuer name, but no other information.
const certificate = await client.getCertificate("MyCertificate", "");
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like it still gives the error: "Error: The 'version' cannot be empty."

@sophiajt
Copy link
Contributor

sophiajt commented Oct 8, 2019

Feels like we should land these, though I noticed a couple related issues that aren't addressed quite yet. I left a comment about one.

backupAndRestore for certificates also gave me this error:

error code:  Conflict
error message:  Conflict while restoring certificate https://joturner-keyvault4.vault.azure.net/certificates/MyCertificate2336/322018317dd541f793d6fbf3a6d0f15d - certificate already exists or concurrent access
error stack:  Error: Conflict while restoring certificate https://joturner-keyvault4.vault.azure.net/certificates/MyCertificate2336/322018317dd541f793d6fbf3a6d0f15d - certificate already exists or concurrent access
    at new RestError (C:\Source\preview4\certs\node_modules\@azure\core-http\dist\coreHttp.node.js:1698:28)
    at C:\Source\preview4\certs\node_modules\@azure\core-http\dist\coreHttp.node.js:2915:37
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

In my version I changed it to:

  await client.deleteCertificate("MyCertificate2338");

  // It might take less time, or more, depending on your location, internet speed and other factors.
  await delay(30000);

  await client.purgeDeletedCertificate("MyCertificate2338");
  await delay(30000);

And that seemed to work

@sophiajt sophiajt merged commit f028c79 into Azure:master Oct 8, 2019
@sadasant sadasant deleted the feature/fix5444 branch October 8, 2019 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. KeyVault
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[KeyVault] Preview #4 - release testing
2 participants