azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

Add pagination to Costmanagement Query API

Open GuillaumeColom opened this issue 2 years ago • 3 comments

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.

GuillaumeColom avatar Jun 10 '22 13:06 GuillaumeColom

Thank you for your contribution GuillaumeColom! We will review the pull request and get back to you soon.

ghost avatar Jun 10 '22 13:06 ghost

CLA assistant check
All CLA requirements met.

ghost avatar Jun 10 '22 13:06 ghost

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.

ghost avatar Aug 12 '22 10:08 ghost

Hello,

We are waiting another pull request to be completed (for API spec) before pursuing here.

Thank you.

GuillaumeColom avatar Aug 18 '22 18:08 GuillaumeColom

@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!

neiser avatar Sep 07 '22 13:09 neiser

@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!

neiser avatar Sep 10 '22 10:09 neiser

@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 avatar Sep 12 '22 08:09 neiser

@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

weidongxu-microsoft avatar Sep 13 '22 02:09 weidongxu-microsoft

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.

ghost avatar Nov 18 '22 10:11 ghost

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.

ghost avatar Nov 25 '22 11:11 ghost

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

Totox64 avatar Jul 04 '23 14:07 Totox64

/reopen

Totox64 avatar Jul 04 '23 14:07 Totox64

Sorry, @Totox64, only the original author can reopen this pull request.

github-actions[bot] avatar Jul 04 '23 14:07 github-actions[bot]

@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

weidongxu-microsoft avatar Jul 05 '23 02:07 weidongxu-microsoft