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

update to support s3 and avro serialization #18

Merged
merged 20 commits into from
Aug 26, 2024
Merged

update to support s3 and avro serialization #18

merged 20 commits into from
Aug 26, 2024

Conversation

good-lly
Copy link
Owner

#17 integrating pipelines for testing on minio + cloudflare
#13 compatibility w S3 (check https://github.com/sentienhq/ultralight-s3)
#11 adding option to enter some own props like https://github.com/good-lly/lowstorage/tree/v2?tab=readme-ov-file#constructoroptions-s3options / dirPrexif + access to s3

@good-lly good-lly self-assigned this Aug 22, 2024
@good-lly
Copy link
Owner Author

@lu-ko review?

@good-lly good-lly added the enhancement New feature or request label Aug 22, 2024
Copy link
Collaborator

@lu-ko lu-ko left a comment

Choose a reason for hiding this comment

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

Please check all your catch blocks and error handling.

src/helpers.ts Show resolved Hide resolved
};

const _hasColName = (colName: string = ''): void => {
if (colName.trim() === '' || colName === null || typeof colName === 'undefined' || colName.length > 255 || colName === null) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

colName === null is checked twice.

src/lowstorage.ts Outdated Show resolved Hide resolved
src/lowstorage.ts Outdated Show resolved Hide resolved
src/lowstorage.ts Outdated Show resolved Hide resolved
src/lowstorage.ts Outdated Show resolved Hide resolved
this._schemas.set(colName, schema);
}
} catch (error) {
throw new SchemaValidationError(`${MODULE_NAME}: Schema is invalid: ${schema}`, lowstorage_ERROR_CODES.SCHEMA_VALIDATION_ERROR);
Copy link
Collaborator

Choose a reason for hiding this comment

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

It will be difficult to troubleshoot cause of the problem, if error.message is not logged/passed to SchemaValidationError.

Copy link
Collaborator

Choose a reason for hiding this comment

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

And, maybe change SchemaValidationError to lowstorageError on this line, to reduce ${MODULE_NAME}: chaining on line nr.241.

Copy link
Owner Author

Choose a reason for hiding this comment

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

hmmm yes plus if error class has constructor - there is no reason the provider module name on so many places for errors

src/lowstorage.ts Outdated Show resolved Hide resolved
src/lowstorage.ts Show resolved Hide resolved
src/lowstorage.ts Outdated Show resolved Hide resolved
@good-lly good-lly merged commit 86cbf15 into dev Aug 26, 2024
4 checks passed
@good-lly good-lly deleted the v2 branch August 26, 2024 11:22
@good-lly
Copy link
Owner Author

fixed in version 2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants