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

Add context aware funcs for all existing api functions #144

Merged
merged 4 commits into from
Dec 15, 2023

Conversation

recht
Copy link
Contributor

@recht recht commented Sep 21, 2023

Most functions didn't do this, which meant that timeouts, tracing, etc didn't work correctly.

@tulir
Copy link
Member

tulir commented Oct 7, 2023

Contexts are good in general, not sure if there's any reason to duplicate all the functions instead of just adding a context parameter 🤔

There are lots of breaking changes anyway, the library is still v0.x

@recht
Copy link
Contributor Author

recht commented Oct 7, 2023

I can definitely change the existing functions instead, I just didn't know if backwards compatibility was a priority. I'll update the PR to just change the existing functions since that is much cleaner.

Doing so had pretty wide-spread effects, but at least context propagation is more or less everywhere
@recht
Copy link
Contributor Author

recht commented Oct 12, 2023

I updated the PR to change existing functions - that required quite a lot of other changes, but on the positive side context propagation is then everywhere

@tulir tulir merged commit 753cdb2 into mautrix:master Dec 15, 2023
3 checks passed
recht added a commit to recht/mautrix that referenced this pull request Dec 22, 2023
This should have been done in mautrix#144, but I forgot it. When context is being propagated, the context might be cancelled at any point, which will result in an error that needs to be handled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants