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

Change up worker connector semantics slightly #1365

Merged
merged 6 commits into from
May 19, 2020

Conversation

jamiebrynes7
Copy link
Contributor

@jamiebrynes7 jamiebrynes7 commented May 19, 2020

Description

WorkerConnecter.Connect now throws when it fails to connect. This makes the HandleWorkerConnectionFailed redundant and has been removed. I've also made a couple of behavioural tweaks:

  • The WorkerConnector no longer destroys itself when it fails to connect. Only concern I have here is embedded in the WorkerConnector is this odd disposable MonoBehaviour, I think the reason it destroyed itself was that it was considered "consumed" after a disconnect, but there's no reason why you can't use the same object to connect again! This feels like its tied up in a confused abstraction (where the WorkerConnector is both a way to connect a worker and something to represent the worker after connection).
  • The WorkerConnector won't log the failure (since an unhandled exception would log, and a handled exception.. is well.. handled).

I expect we will want further work to refine this abstraction (probably related to some of the thoughts that @zeroZshadow had).

Tests

Tested successful & failed worker connections to observe the behaviour.

Documentation

@improbable-prow-robot improbable-prow-robot added jira/no-ticket Indicates a PR has no corresponding JIRA ticket size/M Denotes a PR that changes 40-149 lines, ignoring generated files. labels May 19, 2020
@jamiebrynes7 jamiebrynes7 force-pushed the bugfix/worker-connector-semantics branch from 48c6062 to 0ce9259 Compare May 19, 2020 09:58
@improbable-prow-robot improbable-prow-robot added A: core Area: Core GDK A: playground Area: Playground labels May 19, 2020
@jamiebrynes7 jamiebrynes7 force-pushed the bugfix/worker-connector-semantics branch from 0ce9259 to a235270 Compare May 19, 2020 10:27
UPGRADE_GUIDE.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
jamiebrynes7 and others added 2 commits May 19, 2020 13:11
Copy link
Contributor

@paulbalaji paulbalaji left a comment

Choose a reason for hiding this comment

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

@sonarqubecloud
Copy link

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

@jamiebrynes7 jamiebrynes7 merged commit 0266b65 into develop May 19, 2020
@improbable-prow-robot improbable-prow-robot deleted the bugfix/worker-connector-semantics branch May 19, 2020 15:34
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/no-ticket Indicates a PR has no corresponding JIRA ticket 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.

4 participants