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

feat: Add a separate web SDK for clients without HTTP 2.0 #568

Merged
merged 2 commits into from
Sep 6, 2024
Merged

Conversation

nand4011
Copy link
Contributor

@nand4011 nand4011 commented Sep 5, 2024

Add a new Momento.Sdk.Web artifact that uses gRPC-Web so that users without access to HTTP 2.0 can use the SDK. Building with the USE_GRPC_WEB will generate the new Momento.Sdk.Web.dll. Note that this will affect the unity build as well.

Add a pack and publish step to push the new artifact to nuget.

Add a new Momento.Sdk.Web artifact that uses gRPC-Web so that users
without access to HTTP 2.0 can use the SDK. Building with the
USE_GRPC_WEB will generate the new Momento.Sdk.Web.dll. Note that this
will affect the unity build as well.

Add a pack and publish step to push the new artifact to nuget.
echo "version: ${VERSION}"
dotnet build -p:DefineConstants=USE_GRPC_WEB --configuration Release
dotnet pack -p:DefineConstants=USE_GRPC_WEB -c Release -p:Version=${VERSION}
# dotnet nuget push ./bin/Release/Momento.Sdk.Web.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key=${{secrets.NUGET_API_KEY}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've executed the steps up to here locally. Do we have a good place to publish this temporarily to test that it works?

Copy link
Contributor

Choose a reason for hiding this comment

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

no, but since it's a net new package, no one will have deps on it yet, so it's not the end of the world if it's broken as long as we fast follow any necessary fixes.

@nand4011
Copy link
Contributor Author

nand4011 commented Sep 5, 2024

We should follow this with an addition to the examples that uses the new web SDK dependency.

cprice404
cprice404 previously approved these changes Sep 6, 2024
Copy link
Contributor

@cprice404 cprice404 left a comment

Choose a reason for hiding this comment

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

this lgtm if it looks good to @malandis

@@ -68,7 +79,7 @@ jobs:
dotnet publish --configuration Release -f netstandard2.0 -p:DefineConstants=USE_GRPC_WEB -p:VersionPrefix=${VERSION}
mkdir ./bin/Release/netstandard2.0/MomentoSdkUnity
pushd ./bin/Release/netstandard2.0/publish/
cp Google.Protobuf.dll Grpc.Core.Api.dll Grpc.Net.Client.dll Grpc.Net.Client.Web.dll Grpc.Net.Common.dll JWT.dll Microsoft.Bcl.AsyncInterfaces.dll Microsoft.Extensions.Logging.Abstractions.dll Momento.Protos.dll Momento.Sdk.dll Newtonsoft.Json.dll System.Diagnostics.DiagnosticSource.dll System.Runtime.CompilerServices.Unsafe.dll System.Threading.Channels.dll ../MomentoSdkUnity/
cp Google.Protobuf.dll Grpc.Core.Api.dll Grpc.Net.Client.dll Grpc.Net.Client.Web.dll Grpc.Net.Common.dll JWT.dll Microsoft.Bcl.AsyncInterfaces.dll Microsoft.Extensions.Logging.Abstractions.dll Momento.Protos.dll Momento.Sdk.Web.dll Newtonsoft.Json.dll System.Diagnostics.DiagnosticSource.dll System.Runtime.CompilerServices.Unsafe.dll System.Threading.Channels.dll ../MomentoSdkUnity/
Copy link
Contributor

Choose a reason for hiding this comment

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

we might need to update the unity demo docs after this goes in

Remove redundant build step.

Add comments above the standard and web SDK property groups.
@nand4011 nand4011 merged commit 9457e15 into main Sep 6, 2024
8 checks passed
@nand4011 nand4011 deleted the web-sdk branch September 6, 2024 17:56
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