Skip to content

KVS based on ApifyFileSystemKeyValueStoreClient can get purged twice #657

@Pijukatel

Description

@Pijukatel

Can be reproduced by this test:

async def test_no_double_purge_for_filesystem_storage_client() -> None:
    expected_value = 'some value'
    expected_key = 'some key'

    async with Actor():
        await Actor.set_value(expected_key, expected_value)
        # RQ uses KVS under the hood for persistence, so it will try to open same default KVS as it was already opened,
        # but based on different client - FileSystemStorageClient.
        await Actor.open_request_queue()
        assert expected_value == await Actor.get_value(expected_key)

Draft fix here:
master...prevent-double-purging-of-kvs

Let's not merge the fix as there are open questions about INPUT file expected behavior, which is the only reason for having ApifyFileSystemKeyValueStoreClient, which is the root cause of this issue

Merge the quickfix only if someone reports severe issues.

Metadata

Metadata

Assignees

Labels

t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions