Skip to content

Commit a8d4f32

Browse files
ci: [Backport] Fixes to few test failures (#3774)
* Initial change for PR creation * fix Compilation error due to the changed return value of ClientIdToTransportId. * fix Moving the mid-test #endif and moving it to the bottom. * Revert "fix" This reverts commit 1de0142. * Corrected docs helper URLs * corrected logging and code coverage typo --------- Co-authored-by: Noel Stephens <[email protected]>
1 parent c4ccbb8 commit a8d4f32

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

.yamato/_run-all.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#-----------------------------------------------------------------------------------
1212

13+
1314
# This job runs the fastest checks (PVP and code standards)
1415
# This is mainly used to quickly validate the easy mistakes before for example running PR trigger jobs (see _triggers.yml)
1516
run_quick_checks:

.yamato/code-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ code_coverage_{{ platform.name }}_{{ editor }}:
3838
commands:
3939
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models
4040
- upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --unity .Editor
41-
- UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage coverage-upload-options="reportsDir:$PWD/test-results/CoverageResults;name:NGOv1_{{ platform.name }}_{{ editor }};flags:NGOv1_{{ platform.name }}_{{ editor }};verbose" --coverage-results-path=$PWD/test-results/CoverageResults --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout={ test_timeout }} --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --artifacts-path=test-results
41+
- UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage coverage-upload-options="reportsDir:$PWD/test-results/CoverageResults;name:NGOv1_{{ platform.name }}_{{ editor }};flags:NGOv1_{{ platform.name }}_{{ editor }};verbose" --coverage-results-path=$PWD/test-results/CoverageResults --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout={{ test_timeout }} --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --artifacts-path=test-results
4242
artifacts:
4343
logs:
4444
paths:

.yamato/project-builders/project-builders.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ build_{{ netcodeProject[0] }}_project:
3434
commands:
3535
# Validate inputs passed via Yamato variables
3636
- python Tools/scripts/BuildAutomation/validate_params.py
37-
- echo Building {{ netcodeProject[0] }} project from branch {{ netcodeProject[1].defaultBranch }} with Unity version of %UNITY_VERSION%, Scripting backend %SCRIPTING_BACKEND_IL2CPP_MONO%, Burst %BURST_ON_OFF% for platform %PLATFORM_WIN64_MAC_ANDROID%
37+
- echo Building {{ netcodeProject[0] }} project from branch %SAMPLE_BRANCH% with Unity version of %UNITY_VERSION%, Scripting backend %SCRIPTING_BACKEND_IL2CPP_MONO%, Burst %BURST_ON_OFF% for platform %PLATFORM_WIN64_MAC_ANDROID%
3838

3939
# Clone the external project repository into a specific directory. Notice that branch is also specified.
4040
- git clone --single-branch --branch %SAMPLE_BRANCH% {{ netcodeProject[1].GithubRepo }} C:/ClonedProject

com.unity.netcode.gameobjects/Runtime/HelpUrls.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ internal static class HelpUrls
1010
public const string NetworkManager = k_BaseManualUrl + "components/core/networkmanager.html";
1111
public const string NetworkObject = k_BaseManualUrl + "components/core/networkobject.html";
1212
public const string NetworkAnimator = k_BaseManualUrl + "components/helper/networkanimator.html";
13-
public const string NetworkRigidbody = k_BaseManualUrl + "advanced-topics/physics.html#networkrigidbody";
14-
public const string NetworkRigidbody2D = k_BaseManualUrl + "advanced-topics/physics.html#networkrigidbody2d";
13+
public const string NetworkRigidbody = k_BaseManualUrl + "components/helper/networkrigidbody.html";
14+
public const string NetworkRigidbody2D = k_BaseManualUrl + "components/helper/networkrigidbody.html#networkrigidbody2d";
1515
public const string NetworkTransform = k_BaseManualUrl + "components/helper/networktransform.html";
1616
public const string AnticipatedNetworkTransform = k_BaseManualUrl + "advanced-topics/client-anticipation.html";
1717
public const string UnityTransport = k_BaseApiUrl + ".Transports.UTP.UnityTransport.html";

com.unity.netcode.gameobjects/Runtime/Transports/UTP/UnityTransport.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,10 @@ private void ExtractNetworkMetrics()
10481048
continue;
10491049
}
10501050
var transportClientId = NetworkManager.ConnectionManager.ClientIdToTransportId(ngoConnectionId);
1051-
ExtractNetworkMetricsForClient(transportClientId);
1051+
if (transportClientId.Item2)
1052+
{
1053+
ExtractNetworkMetricsForClient(transportClientId.Item1);
1054+
}
10521055
}
10531056
}
10541057
else

0 commit comments

Comments
 (0)