feat: allow for object versioining in gcp aws - #2628
Open
ppatel9703 wants to merge 28 commits into
Open
Conversation
Contributor
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Object Versioning Support for AWS S3 & Google Cloud Storage
Summary
Adds object versioning support to the SEMOSS storage layer for AWS S3 and Google Cloud Storage engines. The approach is minimal:
copyToStoragenow returns aString(the version ID) instead ofvoid. When bucket versioning is enabled, the SDK naturally returns the version identifier — we simply capture and surface it. No extra configuration, detection logic, or.smssproperties needed.Changes
Interface & Base Class
IStorageEngine.java— Changedvoid copyToStorage(...)→String copyToStorage(...). AddedlistVersions(path)andcopyToLocal(path, dir, versionId)as default methods.AbstractStorageEngine.java— Cleaned up (removed unused versioning fields)Engine Implementations (return version ID)
AWSNativeBlobStorageEngine.java—copyToStoragereturnsPutObjectResponse.versionId()(null when versioning disabled). AddedlistVersions()(ListObjectVersions API) andcopyToLocal(..., versionId)(GetObjectRequest with versionId).GoogleCloudNativeBlobStorageEngine.java—copyToStoragereturnsBlob.getGeneration()as String. AddedlistVersions()(BlobListOption.versions(true)) andcopyToLocal(..., versionId)(BlobId with generation).Engine Implementations (return null — no versioning)
AzureNativeBlobStorageEngine.java—void→String, returnsnullAbstractRCloneStorageEngine.java—void→String, returnsnullDeveloperLocalFileSystemStorageEngine.java—void→String, returnsnullSFTPStorageEngine.java—void→String, returnsnullJCIFSStorageEngine.java—void→String, returnsnullReactors
PushToStorageReactor.java— CallscopyToStorage, if return is non-null returns{success: true, versionId: "..."}as MAP, otherwise returns booleantruePullFromStorageReactor.java— Accepts optionalversionparameter; delegates to versionedcopyToLocalwhen providedListStorageVersionsReactor.java(new) — Lists all versions of a specific storage objectPixel Usage
Design Decisions
copyToStorageVersioned(),isVersioningEnabled(), or.smssconfig, we simply changed the return type. The SDK always returns version info when versioning is on — no detection needed.null. Callers (PushToStorageReactor) branch on null vs non-null.listVersions()and versionedcopyToLocal()throwUnsupportedOperationExceptionby default. Only AWS/GCS override them.Testing
parth-semoss-test, us-east-2) with versioning enabledPushToStoragereturns versionId:"rAIoC2FkJ_VVnsU0hSSRk9Uz.WPaQU7Q"ListStorageVersionsreturns version history withisLatestflagPullFromStoragewithversionparam downloads specific versionFiles Changed (12)
src/prerna/engine/api/IStorageEngine.javavoid→Stringreturn; +2 default methodssrc/prerna/engine/impl/storage/AbstractStorageEngine.javasrc/prerna/engine/impl/storage/AWSNativeBlobStorageEngine.javasrc/prerna/engine/impl/storage/GoogleCloudNativeBlobStorageEngine.javasrc/prerna/engine/impl/storage/AzureNativeBlobStorageEngine.javavoid→String, returns nullsrc/prerna/engine/impl/storage/AbstractRCloneStorageEngine.javavoid→String, returns nullsrc/prerna/engine/impl/storage/DeveloperLocalFileSystemStorageEngine.javavoid→String, returns nullsrc/prerna/engine/impl/storage/SFTPStorageEngine.javavoid→String, returns nullsrc/prerna/engine/impl/storage/JCIFSStorageEngine.javavoid→String, returns nullsrc/prerna/reactor/storage/PushToStorageReactor.javasrc/prerna/reactor/storage/PullFromStorageReactor.javaversionparamsrc/prerna/reactor/storage/ListStorageVersionsReactor.javaAWS NATIVE BLOB TEST


GCP STORAGE TEST

