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

Resources S3 storage optimization #902

Merged
merged 9 commits into from
May 28, 2021
Merged

Resources S3 storage optimization #902

merged 9 commits into from
May 28, 2021

Conversation

michael-topchiev
Copy link
Contributor

No description provided.

return new S3LegacyResourceHandler(decodeURIComponent(path), bucketName, urlString); // endpoint from urlString is not used
};

module.exports = { constructor, deserializer };
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
module.exports = { constructor, deserializer };
module.exports = { constructor, deserializer };

const data = this.targetHandler.serialize();
return { metadata: this.metadata, data };
}
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
};
};

return new S3ResourceHandler(data.path, data.bucketName, data.location, data.endpoint);
};

module.exports = { constructor, deserializer };
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
module.exports = { constructor, deserializer };
module.exports = { constructor, deserializer };


});

});
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
});
});

console.log('All done!');
}

test().catch(console.log);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
test().catch(console.log);
test().catch(console.log);

}
}

module.exports = new StorageFactory();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
module.exports = new StorageFactory();
module.exports = new StorageFactory();

"s3": "app/storage/s3ResourceHandler",
"embedded": "app/storage/embeddedResourceHandler",
"s3legacy": "app/storage/legacyS3ResourceHandler"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
}
}


}

test().catch(console.log);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
test().catch(console.log);
test().catch(console.log);

return new EmbeddedResourceHandler(data);
};

module.exports = { constructor, deserializer };
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
module.exports = { constructor, deserializer };
module.exports = { constructor, deserializer };

}
*/

module.exports = { encrypt, decryptBuffer }; // encryptStream, decryptStream
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
module.exports = { encrypt, decryptBuffer }; // encryptStream, decryptStream
module.exports = { encrypt, decryptBuffer }; // encryptStream, decryptStream


const encryptionAlgorithm = 'aes-256-cbc';

const encrypt = (stringOrBuffer, encryptionKey) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this new encryption, or a refactoring of what was already there?

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 same encryption as we have today (has to be or decryption will not work), but it was duplicated across multiple files, now it's refactored a little and decoupled from S3client.

rmgraham
rmgraham previously approved these changes May 27, 2021
carrolp
carrolp previously approved these changes May 27, 2021
@carrolp
Copy link
Contributor

carrolp commented May 27, 2021

Added approval: combined rmgraham's earlier approval with @michael-topchiev 's approval of my added commit that dismissed rmgraham's.... == approved again.

dalehille
dalehille previously approved these changes May 28, 2021
@michael-topchiev michael-topchiev dismissed stale reviews from dalehille and carrolp via 4830e1f May 28, 2021 20:20
@dalehille dalehille merged commit aeca931 into master May 28, 2021
@dalehille dalehille deleted the resource.s3Data-#889 branch May 28, 2021 20:31
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.

None yet

5 participants