-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
mitchnielsen
added
the
maintenance
Maintenance work - won't show in release notes
label
Nov 21, 2024
mitchnielsen
requested a deployment
to
Acceptance Tests
November 21, 2024 23:47
— with
GitHub Actions
Waiting
mitchnielsen
requested a deployment
to
Acceptance Tests
November 22, 2024 00:25
— with
GitHub Actions
Waiting
mitchnielsen
requested a deployment
to
Acceptance Tests
November 22, 2024 00:48
— with
GitHub Actions
Waiting
mitchnielsen
requested a deployment
to
Acceptance Tests
November 22, 2024 00:58
— with
GitHub Actions
Waiting
mitchnielsen
requested a deployment
to
Acceptance Tests
November 22, 2024 04:48
— with
GitHub Actions
Waiting
mitchnielsen
requested a deployment
to
Acceptance Tests
November 22, 2024 18:56
— with
GitHub Actions
Waiting
mitchnielsen
temporarily deployed
to
Acceptance Tests
November 22, 2024 19:39
— with
GitHub Actions
Inactive
parkedwards
reviewed
Nov 23, 2024
parkedwards
approved these changes
Nov 23, 2024
There was a problem hiding this 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
requested a deployment
to
Acceptance Tests
November 25, 2024 15:23
— with
GitHub Actions
Waiting
…t into dedupe-client-code
mitchnielsen
temporarily deployed
to
Acceptance Tests
November 25, 2024 17:27
— with
GitHub Actions
Inactive
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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