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

GriptapeCloudFileManagerDriver #1267

Open
wants to merge 35 commits into
base: dev
Choose a base branch
from
Open

GriptapeCloudFileManagerDriver #1267

wants to merge 35 commits into from

Conversation

cjkindel
Copy link
Contributor

Describe your changes

A new File Manager Driver for Griptape Cloud. Built on top of Griptape Cloud Bucket and Asset resources. Also added save/load_artifact methods to allow for saving/loading of artifacts instead of requiring bytes.

Issue ticket number and link

@cjkindel cjkindel changed the title Feature/gtc file manager GriptapeCloudFileManagerDriver Oct 17, 2024
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@cjkindel cjkindel self-assigned this Oct 17, 2024
@cjkindel cjkindel requested a review from a team October 17, 2024 19:06
@cjkindel cjkindel marked this pull request as ready for review October 17, 2024 21:29
CHANGELOG.md Outdated Show resolved Hide resolved
Comment on lines +72 to +76
elif self.bucket_name:
data = {"name": uuid.uuid4().hex} if self.bucket_name is None else {"name": self.bucket_name}
post_bucket_response = self._call_api(method="post", path="/buckets", json=data).json()
self.bucket_id = post_bucket_response["bucket_id"]
logger.info("Created new Bucket with ID: %s", self.bucket_id)
Copy link
Member

Choose a reason for hiding this comment

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

I don't love the Driver auto-creating a resource like this. What use-case would this enable?

Copy link
Contributor Author

@cjkindel cjkindel Oct 17, 2024

Choose a reason for hiding this comment

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

Use case is "Upload a file to a new path in the bucket" For S3/local filesystem, there is no need to create an underlying asset but there is for GTC

Misread what line this was for. We can require users to create the bucket in GTC outside of the framework, which would match S3's pattern. Seems like friction to ez GTC usage but OK with that change

Copy link
Member

Choose a reason for hiding this comment

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

We've made the conscious decision to not auto-create control-plane resources in things like Vector Store Drivers so this does feel like it's going against that decision. Maybe we can include some provisioning sample code in the docs example?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am OK with that for Buckets. But creating an Asset on try_save_file seems valuable to me.

Copy link
Member

Choose a reason for hiding this comment

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

Yes definitely on assets. Data plane resources are fine.

Copy link
Member

@collindutter collindutter left a comment

Choose a reason for hiding this comment

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

Just realized we don't have a section on file manager drivers. Could you pretty please add one? It can be super bare bones for the other Drivers.

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