Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

UTY-2504: Nullable command response #1428

Merged
merged 8 commits into from
Jul 21, 2020

Conversation

BryanJY-Wong
Copy link
Contributor

@BryanJY-Wong BryanJY-Wong commented Jul 16, 2020

Description

The GetResponse<T>(CommandRequestId) method in the IDiffCommandResponseStorage and CommandSystem now returns a T? instead of MessageSpan<T>

Tests

Simple validation in the playground's PlayerCommandSystem

  1. log sent request
  2. log the checking for response until response is received
  3. log received response

Documentation

How is this documented (for example: release note, upgrade guide, feature page, in-code documentation)?

  • Did you remember a changelog entry?

Primary reviewers

If your change will take a long time to review, you can name at most two primary reviewers who are ultimately responsible for reviewing this request. @ mention them.

@improbable-prow-robot
Copy link

Corresponding JIRA ticket: https://improbableio.atlassian.net/browse/UTY-2504

@improbable-prow-robot improbable-prow-robot added jira/UTY size/M Denotes a PR that changes 40-149 lines, ignoring generated files. labels Jul 16, 2020
Copy link
Contributor

@jamiebrynes7 jamiebrynes7 left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -39,6 +41,20 @@ protected override void OnCreate()

protected override void OnUpdate()
{
if (lastId.HasValue)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to add this to playground?
This might be rather spammy in a cloud build

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It only logs when you left/right-click, but if its still too spammy I can remove it. @jamiebrynes7 @paulbalaji what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

It might be useful locally, but don't think it's worth keeping for cloud builds

#if UNITY_EDITOR
lastId = commandSystem.SendCommand(request, entities[0]);
Debug.Log($"Launching {lastId.Value.Raw}");
#else
Copy link
Contributor

Choose a reason for hiding this comment

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

Just checking if you tested this works? I think this now means that it won't send commands in the editor

Copy link
Contributor Author

@BryanJY-Wong BryanJY-Wong Jul 17, 2020

Choose a reason for hiding this comment

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

😕 if editor send command, store id and log else just send command, and yes I did test it

@sonarcloud
Copy link

sonarcloud bot commented Jul 21, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@BryanJY-Wong BryanJY-Wong merged commit e935704 into develop Jul 21, 2020
@improbable-prow-robot improbable-prow-robot deleted the feature/nullable-command-response branch July 21, 2020 10:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A: core Area: Core GDK A: playground Area: Playground jira/UTY size/M Denotes a PR that changes 40-149 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants