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

Add full path to event message #447

Open
robklg opened this issue Feb 15, 2023 · 3 comments
Open

Add full path to event message #447

robklg opened this issue Feb 15, 2023 · 3 comments
Assignees

Comments

@robklg
Copy link
Contributor

robklg commented Feb 15, 2023

Problem
When an event like PUT happens, a message can be sent to Pub/Sub. This message contains a path, but the path is relative to the virtual root of that user. There are use cases where the full path is desired. This applies to all storage backends.

Solution
Add a field that contains the entire path. Optionally (in case of GCS) add a URL to the object.

@joostderuijter joostderuijter self-assigned this Nov 9, 2023
@joostderuijter
Copy link

I'll take a look at this 👀

@joostderuijter
Copy link

@robklg Should we only include this additional field for Put events? I believe the use case from the feature request was for uploading a file, but I think it would be nice to also add it to all other DataEvent types that currently return a relative path. Which would be these ( not including Put ):

Got { path: String },
Deleted { path: String },
MadeDir { path: String },
RemovedDir { path: String },

@robklg
Copy link
Contributor Author

robklg commented Nov 12, 2023

Hi @joostderuijter, yes, for any operation on an object, basically any event that currently has a relative path, add the object's full path.

From what I remember in earlier conversations, the change would need to be applied to ControlChanMsg as well. And we should add a field, something like realpath. It would be generic over storage backends, and would be specific to each backend. For instance, for GCS it would give https://storage.google.com/object/bucket/something, and for regular filesystem /var/lib/ftproot/userdir/something

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

No branches or pull requests

2 participants