Skip to content

Conversation

@augustuswm
Copy link
Contributor

@augustuswm augustuswm commented Jun 5, 2023

Release candidate 1 for 0.7.0.

  • All clients now use a shared version.
  • This update refactors all of the clients and changes the way responses are handled. Previously methods that make calls to a third party service would return an anyhow::Result<T> over some structured interpretation of the response body (i.e. a deserialized struct, a unit type, or a raw string). Methods now return a Result<Response<T>, ClientError> where a Response<T> contains the body T that was previously returned along with the status code and headers that were sent from the third party service.
    • When requesting unfolded paginated results the status code and headers returned will be the values returned from the final request made to the service.
    • ClientError now provides a more structure error type than the previous anyhow error.
  • Clients are updated to use the 0.2 reqwest-middleware ecosystem.
  • Clients no longer follow redirects by default.
  • OpenTelemetry 0.17 is no longer a default feature.

@chantra
Copy link
Contributor

chantra commented Jun 5, 2023

Thanks @augustuswm !

@adamchalmers
Copy link

Hi! Any chance of getting reqwest-middleware ecosystem bumped from 0.1 to 0.2 in this release?

@augustuswm
Copy link
Contributor Author

Definitely, that should already be in actually. There are a few changes that are missing from the PR description that I need to add. In the meantime https://github.com/oxidecomputer/third-party-api-clients/blob/rc-build/CHANGELOG.md has a better list of the upcoming changes.

@chantra
Copy link
Contributor

chantra commented Jun 9, 2023

@augustuswm I tried the rc build of octorust and pretty much everything went well after appending .body to the old client calls.
I tried the download_artifact call and was able to access .headers.get(reqwest::header::LOCATION) to get the actual URL of the artifacts.
I did not give it a proper "prod" run, but was able to quickly run a service that collects GH actions workflow runs/jobs metrics with no issue.

@augustuswm
Copy link
Contributor Author

Great, going to get a RC version published today. Definitely let me know if you run into any issues with it. There are still a couple changes that I might add in to this release, particularly around calls which panic instead of returning errors.

@augustuswm augustuswm merged commit f24df9e into main Jun 12, 2023
@augustuswm augustuswm deleted the rc-build branch June 12, 2023 12:43
@augustuswm augustuswm restored the rc-build branch June 12, 2023 12:43
@chantra
Copy link
Contributor

chantra commented Jun 28, 2023

This has been working nicely for my use case BTW.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants