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

feat: add list_and_lock_head, delete_request_lock, prolong_request_lock, batch_add_requests, batch_delete_requests and list_requests methods #129

Merged
merged 12 commits into from
Jul 24, 2023

Conversation

drobnikj
Copy link
Member

@drobnikj drobnikj commented Jul 12, 2023

Python code after a long time, rather check it carefully. 😄

@github-actions github-actions bot added this to the 67th sprint - Platform team milestone Jul 12, 2023
@github-actions github-actions bot added t-platform Issues with this label are in the ownership of the platform team. tested Temporary label used only programatically for some analytics. labels Jul 12, 2023
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Pull Request Tookit has failed!

Pull request is neither linked to an issue or epic nor labeled as adhoc!

Copy link
Member

@jirimoravcik jirimoravcik left a comment

Choose a reason for hiding this comment

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

I'd extend the tests, e.g. lock the requests for 10 seconds, then wait ~11 seconds and check if they were unlocked or something like that. Or maybe we'll do more extensive testing in the SDK so it's ok to have less tests here. We'll see what @fnesveda thinks.

src/apify_client/clients/resource_clients/request_queue.py Outdated Show resolved Hide resolved
tests/integration/test_request_queue.py Outdated Show resolved Hide resolved
Copy link
Member

@fnesveda fnesveda left a comment

Choose a reason for hiding this comment

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

Nice! I like that you made integration tests for this, I'm sad that we don't have them for the rest of the client 😄 I just had some notes mostly to the docstrings.

And regarding Jirka's point - I'm not sure how complicated the tests need to be here, all the aspects of the platform features should be tested by the platform integration tests, not the client tests, so I think it's fine to just check if the API endpoints work and return what they should, without too many complicated tests.

Copy link
Member

@fnesveda fnesveda left a comment

Choose a reason for hiding this comment

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

I just realized, you should also bump the version and update the CHANGELOG.md

@jirimoravcik
Copy link
Member

I just realized, you should also bump the version and update the CHANGELOG.md

how about we automate this going forward?

@fnesveda
Copy link
Member

how about we automate this going forward?

I kind of like the versioning flexibility this gives us, plus we weren't making that many changes to these libraries for it to be worth investing the time into. But maybe there is some easy solution for this.

Copy link
Member

@fnesveda fnesveda left a comment

Choose a reason for hiding this comment

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

You should bump the version to 1.3.0 in pyproject.toml, otherwise the publishing workflow will fail because 1.2.2 already exists.

@drobnikj drobnikj requested a review from fnesveda July 20, 2023 08:50
@drobnikj drobnikj changed the title feat: add list_and_lock_head, delete_request_lock, prolong_request_lock methods feat: add list_and_lock_head, delete_request_lock, prolong_request_lock, batch_add_requests, batch_delete_requests and list_requests methods Jul 24, 2023
@drobnikj drobnikj merged commit 2145cae into master Jul 24, 2023
19 checks passed
@drobnikj drobnikj deleted the feat/request_queue_v2 branch July 24, 2023 08:26
@fnesveda fnesveda added the validated Issues that are resolved and their solutions fulfill the acceptance criteria. label Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-platform Issues with this label are in the ownership of the platform team. tested Temporary label used only programatically for some analytics. validated Issues that are resolved and their solutions fulfill the acceptance criteria.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants