Skip to content

[KeyVault] - Migrate Key Vault Admin package to Core V2#15881

Merged
maorleger merged 17 commits intoAzure:mainfrom
maorleger:keyvault-admin-core-v2
Jun 23, 2021
Merged

[KeyVault] - Migrate Key Vault Admin package to Core V2#15881
maorleger merged 17 commits intoAzure:mainfrom
maorleger:keyvault-admin-core-v2

Conversation

@maorleger
Copy link
Copy Markdown
Member

@maorleger maorleger commented Jun 21, 2021

What

  • Migrate @azure/keyvault-admin to core V2
  • Migrate KeyVaultBackupClient and KeyVaultAccessControlClient to core CAE
  • Bump our minimum @azure/core-lro version to 1.0.6

Why

This PR proves out two important things: it demonstrates that core continuous access evaluation works for both container
registry (already done) and Key Vault (this PR). It also demonstrates the migration path for Core V2 for Key Vault.

The change to core-lro addresses an issue where core-lro was incorrectly depending on core-http (#15880) That has been fixed on 1.0.6
and allows package owners to migrate to core-rest-pipeline and remove core-http without seeing build breaks.

Resolves #15522
Resolves #14306

@ghost ghost added the KeyVault label Jun 21, 2021
@check-enforcer
Copy link
Copy Markdown

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run js - [service] - ci

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Because core-client depends on core-rest-pipeline 1.0.3 which still references preview 11, we need to downgrade here as well.

Once we GA core-rest-pipeline 1.1.0 and move all the packages to it we should be able to bump everyone to preview 12 in unison

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Going to try addressing this in #15881

Comment thread sdk/keyvault/keyvault-admin/package.json Outdated
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Moved these here while Azure/autorest.typescript#1013 is investigated

@maorleger maorleger marked this pull request as ready for review June 21, 2021 20:04
Comment thread sdk/keyvault/keyvault-admin/src/accessControlClient.ts Outdated
@maorleger
Copy link
Copy Markdown
Member Author

/check-enforcer evaluate

@praveenkuttappan
Copy link
Copy Markdown
Member

test comment

@praveenkuttappan
Copy link
Copy Markdown
Member

/azp run js - keyvault - ci

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@maorleger
Copy link
Copy Markdown
Member Author

/azp run js - keyvault - ci

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@maorleger
Copy link
Copy Markdown
Member Author

/azp run js - keyvault - ci

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

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.

:o this is pretty!

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.

Oh wow! This is a lot more thought through than what we had. I appreciate it!

Copy link
Copy Markdown
Contributor

@sadasant sadasant left a comment

Choose a reason for hiding this comment

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

No stones left unturned! Bravo :)

@maorleger maorleger force-pushed the keyvault-admin-core-v2 branch from 36a760d to 4dbb469 Compare June 22, 2021 01:06
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.

Maor and I have talked about whether this is a breaking change. I don’t think so, but Let’s get @xirzec ‘s thoughts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are 3 relatively minor breaking changes:

  • Optional property mode was removed from retryOptions since it only ever had a single enum value and was never used.
  • handleRedirects was removed from redirectOptions, as the policy can now be controlled by removing it from the pipeline or setting maxRedirects to 0.
  • keepAliveOptions were removed. Keep alive can be disabled on a per-request basis with disableKeepAlive.

These were all fairly niche options that tended to be used internally by our clients rather than set by consumers, but since we did expose them, we should consider what versioning implication this poses.

Alongside the change to remove _response, a strict semver interpretation would be to major version the package, but debatably a minor bump could be sufficient. /cc @chradek @ramya-rao-a @jeremymeng - I think we should have broad agreement on what our policy is here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I do plan to merge this PR, but leaving this conversation open if folks want to chime in. I'll also add it to the list of team meeting topics I have here 👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since this package is still a beta I am less worried about it and don't think the discussion is blocking this PR

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 we log an issue to ensure the discussion is continued and we come to a conclusion before this package goes GA?

Copy link
Copy Markdown
Member Author

@maorleger maorleger Jun 23, 2021

Choose a reason for hiding this comment

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

Sure, opened #15916

Copy link
Copy Markdown
Member

@jeremymeng jeremymeng left a comment

Choose a reason for hiding this comment

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

Did you re-generate from swagger? I am wondering why there isn't user agent related changes in generated code as we have seen in https://github.com/Azure/azure-sdk-for-js/pull/15777/files#diff-7a8e7d3e28eff9b33911029639e9b1582d1a692a0e39893e9fc6970916506c02

Comment thread sdk/keyvault/keyvault-admin/package.json Outdated
Comment thread sdk/keyvault/keyvault-admin/src/accessControlClient.ts Outdated
Comment thread sdk/keyvault/keyvault-admin/src/accessControlClient.ts Outdated
Comment thread sdk/keyvault/keyvault-admin/src/backupClient.ts Outdated
@maorleger maorleger force-pushed the keyvault-admin-core-v2 branch from 4252827 to d651fd1 Compare June 22, 2021 22:20
Copy link
Copy Markdown
Member

@xirzec xirzec left a comment

Choose a reason for hiding this comment

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

Nice work on this! Very clean upgrade.

Comment thread common/config/rush/common-versions.json Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since this package is still a beta I am less worried about it and don't think the discussion is blocking this PR

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Key Vault] Move one Key Vault package to use core-rest-pipeline [Key Vault] Use the CAE feature.

6 participants