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

Refactor ConcurrencyLimit CRUD methods in client #16567

Merged
merged 12 commits into from
Jan 2, 2025

Conversation

aaazzam
Copy link
Collaborator

@aaazzam aaazzam commented Jan 1, 2025

Related to #16472, this PR continues the optimization pattern established for Artifacts. Like the previous PRs, it:

  • Refactors the client's ConcurrencyLimit CRUD methods into a standalone module
  • Uses ForwardRefs for heavy imports, moving them into the call itself

Copy link

codspeed-hq bot commented Jan 1, 2025

CodSpeed Performance Report

Merging #16567 will not alter performance

Comparing concurrency-limit-refactor (e6ec6a9) with main (670fb80)

Summary

✅ 3 untouched benchmarks

@aaazzam
Copy link
Collaborator Author

aaazzam commented Jan 1, 2025

fun catch, before this PR:

    async def decrement_v1_concurrency_slots(
        self,
        names: list[str],
        task_run_id: UUID,
        occupancy_seconds: float,
    ) -> httpx.Response:

but in the sync API,

    def decrement_v1_concurrency_slots(
        self, 
        names: list[str], 
        occupancy_seconds: float,  # positional args in different order =/
        task_run_id: UUID
    ) -> httpx.Response:

Copy link
Collaborator

@zzstoatzz zzstoatzz left a comment

Choose a reason for hiding this comment

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

just some nits about consistency / docstrings but lgtm!

@aaazzam aaazzam merged commit 1c801c7 into main Jan 2, 2025
38 checks passed
@aaazzam aaazzam deleted the concurrency-limit-refactor branch January 2, 2025 16:51
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.

3 participants