-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Certificates api changes #6309
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
Certificates api changes #6309
Conversation
joshfree
left a comment
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.
left minor comments
...t-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClient.java
Outdated
Show resolved
Hide resolved
...t-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClient.java
Outdated
Show resolved
Hide resolved
| * Expiry date in UTC. | ||
| */ | ||
| private OffsetDateTime expires; | ||
| private OffsetDateTime expiresOn; |
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.
can you confirm that we landed on "On" and not "At"
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.
KV is using "On" suffix across all languages.
Storage and Identity too use "On" suffix, I believe.
...tificates/src/main/java/com/azure/security/keyvault/certificates/CertificateAsyncClient.java
Show resolved
Hide resolved
...tificates/src/main/java/com/azure/security/keyvault/certificates/CertificateAsyncClient.java
Outdated
Show resolved
Hide resolved
...tificates/src/main/java/com/azure/security/keyvault/certificates/CertificateAsyncClient.java
Outdated
Show resolved
Hide resolved
...tificates/src/main/java/com/azure/security/keyvault/certificates/CertificateAsyncClient.java
Show resolved
Hide resolved
...tificates/src/main/java/com/azure/security/keyvault/certificates/CertificateAsyncClient.java
Outdated
Show resolved
Hide resolved
...tificates/src/main/java/com/azure/security/keyvault/certificates/CertificateAsyncClient.java
Outdated
Show resolved
Hide resolved
...tificates/src/main/java/com/azure/security/keyvault/certificates/CertificateAsyncClient.java
Outdated
Show resolved
Hide resolved
...t-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClient.java
Show resolved
Hide resolved
...certificates/src/main/java/com/azure/security/keyvault/certificates/OrganizationDetails.java
Show resolved
Hide resolved
...ficates/src/main/java/com/azure/security/keyvault/certificates/models/CertificateIssuer.java
Outdated
Show resolved
Hide resolved
heaths
left a comment
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.
A few comments, both otherwise LGTM.
...tificates/src/main/java/com/azure/security/keyvault/certificates/CertificateAsyncClient.java
Show resolved
Hide resolved
...tificates/src/main/java/com/azure/security/keyvault/certificates/CertificateAsyncClient.java
Show resolved
Hide resolved
...tificates/src/main/java/com/azure/security/keyvault/certificates/CertificateAsyncClient.java
Outdated
Show resolved
Hide resolved
...ates/src/main/java/com/azure/security/keyvault/certificates/models/AdministratorContact.java
Outdated
Show resolved
Hide resolved
...ficates/src/main/java/com/azure/security/keyvault/certificates/models/CertificateIssuer.java
Outdated
Show resolved
Hide resolved
...ficates/src/main/java/com/azure/security/keyvault/certificates/models/CertificatePolicy.java
Show resolved
Hide resolved
...t-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClient.java
Outdated
Show resolved
Hide resolved
...ates/src/main/java/com/azure/security/keyvault/certificates/models/AdministratorContact.java
Outdated
Show resolved
Hide resolved
samvaity
left a comment
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.
Would there be a review again in the API review tool after this is merged?
...tificates/src/main/java/com/azure/security/keyvault/certificates/CertificateAsyncClient.java
Show resolved
Hide resolved
...tificates/src/main/java/com/azure/security/keyvault/certificates/CertificateAsyncClient.java
Show resolved
Hide resolved
| } catch (RuntimeException ex) { | ||
| return monoError(logger, ex); | ||
| } | ||
| public PollerFlux<DeletedCertificate, Void> beginDeleteCertificate(String name) { |
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.
same here, can return an NPE if status is null or if any of the three other than the mentioned ones and passed to the PollResponse<>
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.
for delete case, non-null status is returned in all cases.
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 will always return a non-null status. But here we initialize the status variable to null and only update it if the service returned status is either inProgress, completed or failed. But if it is not any of those we keep the status value as null and that is further passed to PollResponse which expects a non-null status.
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.
updated the default case in switch statement to parse a response other than those three, but that state should not hit ideally, as service should not emit any other status than those three.
Fixes #6285 , #6408