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

use tusd datastorages #7499

Closed
wants to merge 18 commits into from
Closed

use tusd datastorages #7499

wants to merge 18 commits into from

Conversation

butonic
Copy link
Member

@butonic butonic commented Oct 16, 2023

companion PR for cs3org/reva#4148

adds config options to configure a different prefix for the tus s3 store upload bucket

@update-docs
Copy link

update-docs bot commented Oct 16, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@mmattel
Copy link
Contributor

mmattel commented Oct 16, 2023

We should add some explanation in the storage-users readme about prepended object prefixes to give admins a better view on it.

@butonic butonic force-pushed the use-tus-data-storage branch 5 times, most recently from 22d70e2 to 111a9d1 Compare November 22, 2023 14:27
UploadMetadataPrefix string `yaml:"upload_metadata_prefix" env:"STORAGE_USERS_S3NG_UPLOAD_METADATA_PREFIX" desc:"The metadata object prefix is prepended to the name of each .info and .part S3 object that is created. If it is not set, then object prefix is used."`
UploadTemporaryDirectory string `yaml:"upload_temporary_directory" env:"STORAGE_USERS_S3NG_UPLOAD_TEMPORARY_DIRECTORY" desc:"Path where temporary files will be stored on disk during the upload."`
DisableSSL bool `yaml:"disable_ssl" env:"STORAGE_USERS_S3NG_DISABLE_SSL" desc:"Disable SSL when accessing the S3 bucket."`
ForcePathStyle bool `yaml:"force_path_style" env:"STORAGE_USERS_S3NG_FORCE_PATH_STYLE" desc:"Force path style S3 requests."`
Copy link
Contributor

@mmattel mmattel Nov 22, 2023

Choose a reason for hiding this comment

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

Suggested change
ForcePathStyle bool `yaml:"force_path_style" env:"STORAGE_USERS_S3NG_FORCE_PATH_STYLE" desc:"Force path style S3 requests."`
ForcePathStyle bool `yaml:"force_path_style" env:"STORAGE_USERS_S3NG_FORCE_PATH_STYLE" desc:"Enforce 'path style' URL requests. With 'false' which is the default, 'virtual hosted-style' URLs are used."`

I hope I got it right from the description...
medium.com and amazon.com

Bucket string `yaml:"bucket" env:"STORAGE_USERS_S3NG_BUCKET" desc:"Name of the S3 bucket."`
UploadObjectPrefix string `yaml:"upload_object_prefix" env:"STORAGE_USERS_S3NG_UPLOAD_OBJECT_PREFIX" desc:"This object prefix is prepended to the name of each S3 object that is created to store uploaded files. It can be used to create a pseudo-directory structure in the bucket, like 'path/to/my/uploads'."`
UploadMetadataPrefix string `yaml:"upload_metadata_prefix" env:"STORAGE_USERS_S3NG_UPLOAD_METADATA_PREFIX" desc:"The metadata object prefix is prepended to the name of each .info and .part S3 object that is created. If it is not set, then object prefix is used."`
UploadTemporaryDirectory string `yaml:"upload_temporary_directory" env:"STORAGE_USERS_S3NG_UPLOAD_TEMPORARY_DIRECTORY" desc:"Path where temporary files will be stored on disk during the upload."`
Copy link
Contributor

Choose a reason for hiding this comment

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

There should be a default value and written in the description, as we use on other locations like:
If not defined, the temp directory derives from $OCIS_BASE_DATA_PATH:/storage/s3ng_temp
As an example see the envvar: STORAGE_USERS_S3NG_ROOT

Endpoint string `yaml:"endpoint" env:"STORAGE_USERS_S3NG_ENDPOINT" desc:"Endpoint for the S3 bucket."`
Bucket string `yaml:"bucket" env:"STORAGE_USERS_S3NG_BUCKET" desc:"Name of the S3 bucket."`
UploadObjectPrefix string `yaml:"upload_object_prefix" env:"STORAGE_USERS_S3NG_UPLOAD_OBJECT_PREFIX" desc:"This object prefix is prepended to the name of each S3 object that is created to store uploaded files. It can be used to create a pseudo-directory structure in the bucket, like 'path/to/my/uploads'."`
UploadMetadataPrefix string `yaml:"upload_metadata_prefix" env:"STORAGE_USERS_S3NG_UPLOAD_METADATA_PREFIX" desc:"The metadata object prefix is prepended to the name of each .info and .part S3 object that is created. If it is not set, then object prefix is used."`
Copy link
Contributor

Choose a reason for hiding this comment

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

It is not clear what to set here and what the default is.
If it is not set, then object prefix is used. means what?
When does one needs this?

@aduffeck aduffeck force-pushed the use-tus-data-storage branch 3 times, most recently from 9222db5 to c844761 Compare November 29, 2023 10:32
butonic and others added 16 commits December 4, 2023 14:27
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: Martin <github@diemattels.at>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This reverts commit c6cf6c8.
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Copy link

sonarcloud bot commented Dec 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

73.7% 73.7% Coverage
0.0% 0.0% Duplication

@butonic
Copy link
Member Author

butonic commented Dec 5, 2023

  • I notice that we have no logging whatsoever when uploads fail to an s3 (well when handling tus uploads). We need to be able to get at least the logger config in reva ... hm maybe it is easiest to add a loglevel to the decomposedfs config.

  • we need s3store fix incomplete part keys tus/tusd#1042

@butonic
Copy link
Member Author

butonic commented Jul 29, 2024

We evolved our own DataStore into a OcisSession that also covers postprocessing.

@butonic butonic closed this Jul 29, 2024
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.

3 participants