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-secrets] Migrate to TypeSpec #31848

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

maorleger
Copy link
Member

@maorleger maorleger commented Nov 19, 2024

-### Packages impacted by this PR

@azure/keyvault-secrets

Issues associated with this PR

Describe the problem that is addressed by this PR

What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

Are there test cases added in this PR? (If not, why?)

Provide a list of related PRs (if any)

Command used to generate this PR: (Applicable only to SDK release request PRs)

Checklists

  • Added impacted package name to the issue description.
  • Does this PR need any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here.)
  • Added a changelog (if necessary).

@@ -101,8 +101,6 @@ export function parseKeyVaultSecretIdentifier(id: string): KeyVaultSecretIdentif

export { PollerLike }

export { PollOperationState }
Copy link
Member Author

Choose a reason for hiding this comment

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

re-export this

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@maorleger maorleger marked this pull request as ready for review November 20, 2024 21:34
@maorleger maorleger requested review from bterlson, a team and timovv as code owners November 20, 2024 21:34
@@ -0,0 +1,86 @@
#!/usr/bin/env node

const { execSync } = require("child_process");
Copy link
Member Author

Choose a reason for hiding this comment

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

The end result is that this file should be deleted once all the workarounds are no longer needed

Copy link
Member

Choose a reason for hiding this comment

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

Should we have this at the top level? Or should we have one per package (in case there are package-specific things which need to be done, generating from a specific package's spec, etc)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I can move it inside the package folder. My hope (and so far that's been the case) is that the same set of customizations need to happen for all packages. I figured if they start diverging I can push them down into the individual package folder. But my real hope is that this script gets deleted by end of January as its a workaround, not a solution.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah if there are no differences between packages no problem with just keeping the script here. Whatever is least work for you.

)
.replace(
/nbf: !item\["notBefore"\] \? item\["notBefore"\] : item\["notBefore"\].getTime\(\),/g,
'nbf: !item["notBefore"] ? item["notBefore"] : item["notBefore"].getTime() / 1000,'
Copy link
Member

Choose a reason for hiding this comment

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

May want to truncate the decimal here

}
}
return mapPagedAsyncIterable(
this.client.getSecretVersions(secretName, options),
Copy link
Member

Choose a reason for hiding this comment

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

Random thought, do we know if maxPageSize works here? It's not defined on PageOptions in the generated code so am wondering if the property is now being ignored.

Cc @MaryGao

Copy link
Member

@MaryGao MaryGao Nov 22, 2024

Choose a reason for hiding this comment

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

maxPageSize is no longer support as a general option and we update the guideline also here.

@deyaaeldeen @xirzec I was wondering if we need to provide a standard way to expose this parameter for services still needing this option: https://github.com/search?q=repo%3AAzure%2Fazure-sdk-for-js+maxPageSize+language%3ATypeScript+samples-dev&type=code.

Copy link
Member

Choose a reason for hiding this comment

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

In the mean time for Key Vault perhaps we can customize the paging helpers to accept maxPageSize and pass it as maxresults like Key Vault is expecting? I'm not sure what kind of effort would be needed for that

@@ -0,0 +1,86 @@
#!/usr/bin/env node

const { execSync } = require("child_process");
Copy link
Member

Choose a reason for hiding this comment

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

Should we have this at the top level? Or should we have one per package (in case there are package-specific things which need to be done, generating from a specific package's spec, etc)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Untriaged
Development

Successfully merging this pull request may close these issues.

4 participants