azure-sdk-for-java
azure-sdk-for-java copied to clipboard
Add pagination to Costmanagement Query API
Description
Add Pagination capability to Costmanagement - Query API
All SDK Contribution checklist:
-
[ ] The pull request does not introduce [breaking changes] Introduce some breaking changes by adding skipToken parameter to methods in Query API
-
[X] CHANGELOG is updated for new features, bug fixes or other significant changes.
-
[X] I have read the contribution guidelines.
General Guidelines and Best Practices
- [X] Title of the pull request is clear and informative.
- [X] 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 more information on cleaning up the commits in your PR, see this page.
Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.
Thank you for your contribution GuillaumeColom! We will review the pull request and get back to you soon.
Hi @GuillaumeColom. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.
Hello,
We are waiting another pull request to be completed (for API spec) before pursuing here.
Thank you.
@GuillaumeColom Thank you very much for this contribution! I highly appreciate it. The blocking PR https://github.com/Azure/azure-rest-api-specs/pull/19609 appears to have been merged now. I hope this one can then be merged as well soon. Eagerly waiting for it!
@weidongxu-microsoft Any chance of getting this merged soon? Do you have a timeline? Sorry for bugging you with this, but I'm actually blocked by this issue and I'm considering copying this patch manually into my project unless this gets merged/released within the next few days. So, if you already know it will take some weeks until it's merged, please let me know. Thank you!
@GuillaumeColom After looking into this code change in more detail, I think exposing skipToken
in com.azure.resourcemanager.costmanagement.models.Queries#usage
is a bad idea, as it's introducing a breaking change. Pagination should be handled similar how the com.azure.resourcemanager.costmanagement.implementation.OperationsClientImpl#listAsync()
is doing it by chaining the requests.
@neiser
Romain is checking with cost management service to sign off on swagger https://github.com/Azure/azure-rest-api-specs/pull/19609
After it signed-off, Java will regenerate the whole SDK with 2022-08-01-preview api-version.
For the pageable, it is also due to swagger. If service supports it correctly, it should be annotated with x-ms-pageable
, e.g. https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-08-01-preview/costmanagement.json#L70-L72
Hi @GuillaumeColom. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.
Hi @GuillaumeColom. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing "/reopen" if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the "no-recent-activity" label; otherwise, this is likely to be closed again with the next cleanup pass.
Hello @weidongxu-microsoft, I would like to know if it's possible to reopen this PR. Since the PR in the rest api spec is merged, this sould be quite straight forward
/reopen
Sorry, @Totox64, only the original author can reopen this pull request.
@Totox64 backend decided not to change (issue here https://github.com/Azure/azure-rest-api-specs/issues/23405)
java provided a workaround here https://github.com/Azure/azure-sdk-for-java/issues/34455