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

fix: prevent api calls when printing bound models #305

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

jooola
Copy link
Member

@jooola jooola commented Sep 26, 2023

On large objects such as servers, we might generate more than 10 API calls just to print a single server object. This is because the __repr__ method will recursively generate the __repr__ for each bound model property and will trigger a reload on incomplete models to gather the information from the API.

Related to:

Fixes #304

On large objects such as servers, we might generate more than 10 api calls just to print a single server object. This is because the `__repr__` method will recursively generate the `__repr__` for each bound model property and will trigger a `reload` on incomplete models to gather the information from the API.
@jooola jooola merged commit c1de7ef into hetznercloud:main Sep 26, 2023
8 checks passed
@jooola jooola deleted the fix-bound-models-repr branch September 26, 2023 11:20
jooola pushed a commit that referenced this pull request Sep 26, 2023
🤖 I have created a release *beep* *boop*
---


##
[1.29.1](v1.29.0...v1.29.1)
(2023-09-26)


### Bug Fixes

* prevent api calls when printing bound models
([#305](#305))
([c1de7ef](c1de7ef))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

Hang and failure when accessing attributes like Server and Images
2 participants