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

Deduplicate client HTTP requests #307

Merged
merged 16 commits into from
Nov 25, 2024
Merged

Deduplicate client HTTP requests #307

merged 16 commits into from
Nov 25, 2024

Conversation

mitchnielsen
Copy link
Contributor

Add helper functions for common HTTP requests

The HTTP requests across all of our PrefectClient-compatible clients are
very similar, leading to a lot of duplicate code. This leaves room for
error when adding new clients, and makes things a bit tougher to
maintain.

This change adds helper functions to replace this redundant code, coming
with all the usual benefits of DRY-ing things up.

This is also relevant as we aim for parity with the Prefect API, and the
less code we have to write, the better!

Related to https://linear.app/prefect/issue/PLA-690/cycle-6-catch-all

The HTTP requests across all of our PrefectClient-compatible clients are
very similar, leading to a lot of duplicate code. This leaves room for
error when adding new clients, and makes things a bit tougher to
maintain.

This change adds helper functions to replace this redundant code, coming
with all the usual benefits of DRY-ing things up.

This is also relevant as we aim for parity with the Prefect API, and the
less code we have to write, the better!

Related to https://linear.app/prefect/issue/PLA-690/cycle-6-catch-all
Copy link
Contributor

@parkedwards parkedwards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so so clean

@mitchnielsen mitchnielsen merged commit 9bab0ca into main Nov 25, 2024
7 checks passed
@mitchnielsen mitchnielsen deleted the dedupe-client-code branch November 25, 2024 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance work - won't show in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants