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

Copy pared down prefect-redis to integrations #13758

Merged
merged 1 commit into from
Jun 4, 2024
Merged

Conversation

bunchesofdonald
Copy link
Contributor

@bunchesofdonald bunchesofdonald commented Jun 3, 2024

This copies over a pared down / refactored version of prefect-redis that only includes the filesystem capabilities and full test coverage.

There are a couple things left for follow-up PRs:

  • Fill in the README
  • Copy / update the documentationo

Related to #12249

from prefect.filesystems import WritableFileSystem


class RedisFilesystem(WritableFileSystem):
Copy link
Member

Choose a reason for hiding this comment

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

I know this is copying what currently exists, but I think we should change the name since RedisFilesystem seems paradoxical. Doesn't need to be part of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original name was actually 'RedisCredentials'. This is the renamed version, RedisFilesystem is what the issue suggested.

In what way do you think it's paradoxical? The point of the block is to treat redis as a filesystem, much the same way GCS or S3 work, so the name makes sense to me, but happy to consider alternatives.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The tests are failing for this because it doesn't have redis running in CI. But I'm going to go ahead and merge this, and have a follow-up to get those tests running. We can talk about naming, etc. in slack.

Copy link
Member

Choose a reason for hiding this comment

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

I thought that Redis isn't an object storage solution like S3 and GCS that uses file-like semantics, so it feels weird to call it a filesystem. I guess we've backed ourselves into a corner with the Filesystem interface name. My vote would be to name it RedisDatabase or something like that since other classes that implement a Filesystem interface are named things like S3Bucket and AzureBlobStorageContainer to try and make it clear how they map onto external concepts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, It's not an object storage system in general, at least not like S3/GCS, I was meaning that this class is treating redis as if it were like those in that it's letting you store 'file content' (bytes) associated with a 'path' (a key) much the same as GCS works.

@bunchesofdonald bunchesofdonald merged commit c83eca6 into main Jun 4, 2024
20 of 25 checks passed
@bunchesofdonald bunchesofdonald deleted the issue-12249 branch June 4, 2024 13:55
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.

2 participants