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

Fix for External Storage Uploads from gxObject SD Rest Services #689

Merged
merged 5 commits into from
Sep 20, 2022

Conversation

ggallotti
Copy link
Member

@ggallotti ggallotti commented Sep 16, 2022

  • Enable Buffering for .NET in order to External Storage Clients (S3, Azure) to be able to handle the Stream for uploading.
  • Add UnitTests for gxObject Upload Service to S3.
  • Add Methods for setting External Storage programatically. (for UnitTesting)
Amazon.S3.AmazonS3Exception: Could not determine content length
   at Amazon.S3.Model.Internal.MarshallTransformations.PutObjectRequestMarshaller.GetStreamWithLength(Stream baseStream, Int64 hintLength)
   at Amazon.S3.Model.Internal.MarshallTransformations.PutObjectRequestMarshaller.Marshall(PutObjectRequest putObjectRequest)
   at Amazon.S3.Model.Internal.MarshallTransformations.PutObjectRequestMarshaller.Marshall(AmazonWebServiceRequest input)
   at Amazon.Runtime.Internal.Marshaller.PreInvoke(IExecutionContext executionContext)
   at Amazon.Runtime.Internal.Marshaller.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.S3.Internal.AmazonS3PreMarshallHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.CallbackHandler.<>n__0[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.S3.Internal.AmazonS3ExceptionHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext)
   at GeneXus.Storage.GXAmazonS3.ExternalProviderS3.PutObject(PutObjectRequest request)
   at GeneXus.Storage.GXAmazonS3.ExternalProviderS3.UploadSimple(String fileName, Stream stream, GxFileType destFileType)
   at GeneXus.Storage.GXAmazonS3.ExternalProviderS3.Upload(String fileName, Stream stream, GxFileType destFileType)
   at GxExternalFileInfo.Create(Stream data)
   at GxFile.Create(Stream data)

Azure Exception:

System.NotSupportedException: Specified method is not supported.
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream.set_Position(Int64 value)
   at GeneXus.Storage.GXAzureStorage.AzureStorageExternalProvider.Upload(String fileName, Stream stream, GxFileType fileType)
   at GxExternalFileInfo.Create(Stream data)
   at GxFile.Create(Stream data)

@ggallotti ggallotti temporarily deployed to external-storage-tests September 16, 2022 17:51 Inactive
@genexusbot
Copy link
Collaborator

Cherry pick to beta success

…zure) to be able to handle the Stream for uploading.

Add UnitTests
Add Methods for setting External Storage programatically.
@ggallotti ggallotti temporarily deployed to external-storage-tests September 16, 2022 20:29 Inactive
@genexusbot
Copy link
Collaborator

Cherry pick to beta failed, 2 conflicted files in commit 83cfdab
  • dotnet/test/DotNetCoreUnitTest/DotNetCoreUnitTest.csproj
  • dotnet/test/DotNetCoreUnitTest/Middleware/RestServiceTest.cs

@genexusbot genexusbot added the conflict Conflict merging to beta branch label Sep 16, 2022
@ggallotti ggallotti requested a review from a team as a code owner September 16, 2022 20:47
@ggallotti ggallotti temporarily deployed to external-storage-tests September 16, 2022 20:47 Inactive
@ggallotti ggallotti temporarily deployed to external-storage-tests September 16, 2022 20:48 Inactive
@ggallotti ggallotti removed the request for review from a team September 16, 2022 20:49
@ggallotti ggallotti removed the conflict Conflict merging to beta branch label Sep 19, 2022
@ggallotti ggallotti temporarily deployed to external-storage-tests September 19, 2022 13:56 Inactive
@genexusbot
Copy link
Collaborator

Cherry pick to beta failed, 1 conflicted file in commit 83cfdab
  • dotnet/test/DotNetCoreUnitTest/DotNetCoreUnitTest.csproj

@genexusbot genexusbot added the conflict Conflict merging to beta branch label Sep 19, 2022
@ggallotti ggallotti removed the conflict Conflict merging to beta branch label Sep 19, 2022
@ggallotti ggallotti merged commit a29855c into master Sep 20, 2022
@ggallotti ggallotti deleted the sd-upload-externalstorage branch September 20, 2022 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants