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

ci: [1.X] CI failures fixes and disabled tests Jira tracking informations #3303

Merged
merged 22 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .yamato/_run-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,13 @@ run_all_project_tests_desktop_standalone:
{% for platform in test_platforms.desktop -%}
{% for editor in validation_editors.all -%}
{% for backend in scripting_backends -%}
# There is an error 'No usable version of libssl' when it comes to building with combination of ubuntu and 2021 editor. It's not really worth to address it since
# 1) The 2021 editor will soon be out of support
# 2) We still have the same coverage by using mac and ubuntu is used in a whole bunch of different tests, so I'm quite sure it won't lead to any bug leaks
# 3) The solution could be to manually install libss1.1 (since image has libssl3 and this causes conflicts on 2021 editor related to dotnet versions and support). There were several threads on this topic which can be looked on
{% if editor != "2021.3" or platform.name != "ubuntu" %}
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}
Expand Down Expand Up @@ -158,7 +164,13 @@ run_all_project_tests_desktop_standalone_2021:
{% for project in projects.default -%}
{% for platform in test_platforms.desktop -%}
{% for backend in scripting_backends -%}
# There is an error 'No usable version of libssl' when it comes to building with combination of ubuntu and 2021 editor. It's not really worth to address it since
# 1) The 2021 editor will soon be out of support
# 2) We still have the same coverage by using mac and ubuntu is used in a whole bunch of different tests, so I'm quite sure it won't lead to any bug leaks
# 3) The solution could be to manually install libss1.1 (since image has libssl3 and this causes conflicts on 2021 editor related to dotnet versions and support). There were several threads on this topic which can be looked on
{% if platform.name != "ubuntu" %}
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_2021.3
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}
Expand Down Expand Up @@ -206,7 +218,10 @@ run_all_project_tests_console_standalone:
{% for project in projects.default -%}
{% for platform in test_platforms.console_test -%}
{% for editor in validation_editors.all -%}
# When building consoles with 2023 editor there are errors related to SDK version or uninstalled components. I will disable those for now and will add to my investigation list
{% if editor != "2023.3" %}
- .yamato/console-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}
Expand Down
2 changes: 1 addition & 1 deletion .yamato/_triggers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ develop_nightly:
dependencies:
# Run project standards to verify package/default project
- .yamato/project-standards.yml#standards_ubuntu_testproject_trunk
- .yamato/project-standards.yml#standards_ubuntu_testproject_2021.3
# - .yamato/project-standards.yml#standards_ubuntu_testproject_2021.3 # Tracked in MTT-11382
# Run APV jobs to make sure the change won't break any dependants
- .yamato/wrench/preview-a-p-v.yml#all_preview_apv_jobs
# Run package EditMode and Playmode tests on desktop platforms on trunk and 2021.3
Expand Down
5 changes: 3 additions & 2 deletions .yamato/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ code_coverage_{{ platform.name }}_{{ editor }}:
commands:
- npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- unity-downloader-cli -u {{ editor }} -c Editor --fast --wait
- {% if platform.name == "ubuntu" %}DISPLAY=:0 {% endif %} upm-ci package test -u {{ editor }} --package-path com.unity.netcode.gameobjects --enable-code-coverage --code-coverage-options 'generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime' --extra-utr-arg="--extra-editor-arg=--burst-disable-compilation --extra-editor-arg=-testCategory --extra-editor-arg=!Performance --timeout=1800 --reruncount=1 --clean-library-on-rerun"
- DISPLAY=:0 upm-ci package test -u {{ editor }} --package-path com.unity.netcode.gameobjects --enable-code-coverage --code-coverage-options 'generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime' --extra-utr-arg="--extra-editor-arg=--burst-disable-compilation --extra-editor-arg=testCategory --extra-editor-arg=!Performance --timeout=1800 --reruncount=1 --clean-library-on-rerun"
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
- "upm-ci~/test-results/CoverageResults/**/*"
dependencies:
- .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }}
- .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }}_upmCI
{% endfor -%}
{% endfor -%}
6 changes: 6 additions & 0 deletions .yamato/console-standalone-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
{% for project in projects.default -%}
{% for platform in test_platforms.console_build -%}
{% for editor in validation_editors.all -%}
# When building consoles with 2023 editor there are errors related to SDK version or uninstalled components. I will disable those for now and will add to my investigation list
{% if editor != "2023.3" %}
build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
name: Build {{ project.name }} - [{{ platform.name }}, {{ editor }}, il2cpp{% if platform.name == "switch" %}, arm64{% endif %}]
agent:
Expand Down Expand Up @@ -47,6 +49,7 @@ build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
logs:
paths:
- "artifacts/**/*"
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}
Expand All @@ -57,6 +60,8 @@ build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
{% for project in projects.default -%}
{% for platform in test_platforms.console_test -%}
{% for editor in validation_editors.all -%}
# When building consoles with 2023 editor there are errors related to SDK version or uninstalled components. I will disable those for now and will add to my investigation list
{% if editor != "2023.3" %}
run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}:
name: Run {{ project.name }} Tests - [{{ platform.name }}, {{ editor }}, il2cpp]
agent:
Expand Down Expand Up @@ -91,6 +96,7 @@ run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}:
- "test-results/**/*"
dependencies:
- .yamato/console-standalone-test.yml#build_{{ project.name }}_{{ platform.name }}_{{ editor }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}
12 changes: 12 additions & 0 deletions .yamato/desktop-standalone-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
{% for platform in test_platforms.desktop -%}
{% for editor in validation_editors.all -%}
{% for backend in scripting_backends -%}
# There is an error 'No usable version of libssl' when it comes to building with combination of ubuntu and 2021 editor. It's not really worth to address it since
# 1) The 2021 editor will soon be out of support
# 2) We still have the same coverage by using mac and ubuntu is used in a whole bunch of different tests, so I'm quite sure it won't lead to any bug leaks
# 3) The solution could be to manually install libss1.1 (since image has libssl3 and this causes conflicts on 2021 editor related to dotnet versions and support). There were several threads on this topic which can be looked on
{% if editor != "2021.3" or platform.name != "ubuntu" %}
desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}:
name : Standalone Build - NGO {{ project.name }} - [{{ platform.name }}, {{ editor }}, {{ backend }}]
agent:
Expand Down Expand Up @@ -57,6 +62,7 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{

dependencies:
- .yamato/project-pack.yml#project_pack_-_{{ project.name }}_{{ platform.name }}
{% endif %}
{% endfor -%}
{% endfor -%}
{% endfor -%}
Expand All @@ -70,6 +76,11 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{
{% for platform in test_platforms.desktop -%}
{% for editor in validation_editors.all -%}
{% for backend in scripting_backends -%}
# There is an error 'No usable version of libssl' when it comes to building with combination of ubuntu and 2021 editor. It's not really worth to address it since
# 1) The 2021 editor will soon be out of support
# 2) We still have the same coverage by using mac and ubuntu is used in a whole bunch of different tests, so I'm quite sure it won't lead to any bug leaks
# 3) The solution could be to manually install libss1.1 (since image has libssl3 and this causes conflicts on 2021 editor related to dotnet versions and support). There were several threads on this topic which can be looked on
{% if editor != "2021.3" or platform.name != "ubuntu" %}
desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}:
name : Standalone Test - NGO {{ project.name }} - [{{ platform.name }}, {{ editor }}, {{ backend }}]
agent:
Expand Down Expand Up @@ -102,6 +113,7 @@ desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{
- "test-results/**/*"
dependencies:
- .yamato/desktop-standalone-tests.yml#desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
{% endif %}
{% endfor -%}
{% endfor -%}
{% endfor -%}
Expand Down
23 changes: 23 additions & 0 deletions .yamato/package-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,27 @@ package_pack_-_ngo_{{ platform.name }}:
packages:
paths:
- "upm-ci~/**"
{% endfor -%}

# This is in essence the same job as the one above with the difference that upm-ci is used instead of upm-pvp
# The reason for using it is that I had some problems with Code Coverage which in its current form uses upm-ci but if we would use the other pack job (the one above) we would need to use upm-pvp
# I had some problems with getting it to work so as temporary solution I created this pack job which is used ONLY as a dependency of Code Coverage job (other jobs use the above definition of pack job)
# TODO: remove this job and utilize the above one for Code Coverage job. This is tracked in MTT-11383
{% for platform in test_platforms.default -%}
{% for project in projects.default -%}
package_pack_-_ngo_{{ platform.name }}_upmCI:
name: Package Pack (legacy upm-ci) - NGO [{{ platform.name }}]
agent:
type: {{ platform.type }}
image: {{ platform.image }}
flavor: {{ platform.flavor }}
timeout: 0.25
commands:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci project pack --project-path {{ project.path }}
artifacts:
packages:
paths:
- "upm-ci~/packages/**/*"
{% endfor -%}
{% endfor -%}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public WaitForMetricValues(IMetricDispatcher dispatcher, DirectionalMetricInfo d
dispatcher.RegisterObserver(this);
}

abstract public void Observe(MetricCollection collection);
public abstract void Observe(MetricCollection collection);

public void AssertMetricValuesHaveNotBeenFound()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void OutOfOrderShouldStillWork()
Assert.That(interpolator.GetInterpolatedValue(), Is.EqualTo(2f).Within(k_Precision));
}

[Ignore("TODO: Fix this test to still handle testing message loss without extrapolation")]
[Ignore("TODO: Fix this test to still handle testing message loss without extrapolation. This is tracked in MTT-11338")]
[Test]
public void MessageLoss()
{
Expand Down Expand Up @@ -306,7 +306,7 @@ public void TestUpdatingInterpolatorWithNoData()
Assert.Throws<InvalidOperationException>(() => interpolator.Update(1f, serverTime));
}

[Ignore("TODO: Fix this test to still test duplicated values without extrapolation")]
[Ignore("TODO: Fix this test to still test duplicated values without extrapolation. This is tracked in MTT-11338")]
[Test]
public void TestDuplicatedValues()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class NetworkMetricsRegistrationTests
.ToArray();

[TestCaseSource(nameof(s_MetricTypes))]
[Ignore("Disable test while we reevaluate the assumption that INetworkMetricEvent interfaces must be reported from MLAPI.")]
[Ignore("Disable test while we reevaluate the assumption that INetworkMetricEvent interfaces must be reported from MLAPI. This is tracked in MTT-11339")]
public void ValidateThatAllMetricTypesAreRegistered(Type metricType)
{
var dispatcher = new NetworkMetrics().Dispatcher as MetricDispatcher;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ public void WhenANetworkVariableDeltaMessageArrivesBeforeASpawnArrives_ItIsDefer
}

[Test]
//[Ignore("Disabling this temporarily until it is migrated into new integration test.")]
public void WhenASpawnMessageArrivesBeforeThePrefabIsAvailable_ItIsDeferred()
{
m_SkipAddingPrefabsToClient = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using System.Collections;
using NUnit.Framework;
using Unity.Multiplayer.Tools.NetStats;
using UnityEngine.TestTools;
using Unity.Netcode.TestHelpers.Runtime;
using UnityEngine.TestTools;

namespace Unity.Netcode.RuntimeTests.Metrics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
using System.Linq;
using NUnit.Framework;
using Unity.Multiplayer.Tools.MetricTypes;
using Unity.Netcode.TestHelpers.Runtime.Metrics;
using UnityEngine;
using UnityEngine.TestTools;

using Unity.Netcode.TestHelpers.Runtime.Metrics;

namespace Unity.Netcode.RuntimeTests.Metrics
{
internal class NetworkObjectMetricsTests : SingleClientMetricTestBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using System.Linq;
using NUnit.Framework;
using Unity.Multiplayer.Tools.MetricTypes;
using UnityEngine.TestTools;
using Unity.Netcode.TestHelpers.Runtime.Metrics;
using UnityEngine.TestTools;

namespace Unity.Netcode.RuntimeTests.Metrics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
using NUnit.Framework;
using Unity.Collections;
using Unity.Multiplayer.Tools.MetricTypes;
using UnityEngine;
using UnityEngine.TestTools;
using Unity.Netcode.TestHelpers.Runtime;
using Unity.Netcode.TestHelpers.Runtime.Metrics;
using UnityEngine;
using UnityEngine.TestTools;

namespace Unity.Netcode.RuntimeTests.Metrics
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#if MULTIPLAYER_TOOLS
#if MULTIPLAYER_TOOLS_1_0_0_PRE_7

using System.Collections;
using NUnit.Framework;
using Unity.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using NUnit.Framework;
using Unity.Collections;
using Unity.Multiplayer.Tools.MetricTypes;
using UnityEngine.TestTools;
using Unity.Netcode.TestHelpers.Runtime.Metrics;
using UnityEngine.TestTools;

namespace Unity.Netcode.RuntimeTests.Metrics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using NUnit.Framework;
using Unity.Collections;
using Unity.Multiplayer.Tools.MetricTypes;
using UnityEngine.TestTools;
using Unity.Netcode.TestHelpers.Runtime.Metrics;
using UnityEngine.TestTools;

namespace Unity.Netcode.RuntimeTests.Metrics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
using NUnit.Framework;
using Unity.Collections;
using Unity.Multiplayer.Tools.MetricTypes;
using UnityEngine.TestTools;
using Unity.Netcode.TestHelpers.Runtime;
using Unity.Netcode.TestHelpers.Runtime.Metrics;
using UnityEngine.TestTools;

namespace Unity.Netcode.RuntimeTests.Metrics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
using NUnit.Framework;
using Unity.Collections;
using Unity.Multiplayer.Tools.MetricTypes;
using UnityEngine.TestTools;
using Unity.Netcode.TestHelpers.Runtime.Metrics;
using UnityEngine.TestTools;

namespace Unity.Netcode.RuntimeTests.Metrics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected override void OnServerAndClientsCreated()

[UnityTest]
// When this test fails it does so without an exception and will wait the default ~6 minutes
[Timeout(360000)]
[Timeout(360000)] // Tracked in MTT-11360
public IEnumerator WhenManyObjectsAreSpawnedAtOnce_AllAreReceived()
{
for (int x = 0; x < k_SpawnedObjects; x++)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ public AnticipatedNetworkTransform GetOtherClientComponent()
}

[Test]
// I will add this test to track in Jira as next step (after having working CI in place). The job is failing on Android
[UnityPlatform(exclude = new[] { RuntimePlatform.Android })]
[UnityPlatform(exclude = new[] { RuntimePlatform.Android })] // Tracked in MTT-11361
public void WhenAnticipating_ValueChangesImmediately()
{
var testComponent = GetTestComponent();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1844,6 +1844,7 @@ public void WhenSerializingAndDeserializingValueTypeNetworkVariables_ValuesAreSe
}

[Test]
[UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // Tracked in MTT-11356. The job is failing on mobile devices on 2021 editor specifically
public void WhenSerializingAndDeserializingValueTypeNativeArrayNetworkVariables_ValuesAreSerializedCorrectly(

[Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint),
Expand Down Expand Up @@ -2179,7 +2180,7 @@ public string ArrayStr<T>(NativeArray<T> arr) where T : unmanaged
}

[Test]
[UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // I will add this test to track in Jira as next step (after having working CI in place). The job is failing on iOS
[UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // Tracked in MTT-11356.
[Repeat(5)]
public void WhenSerializingAndDeserializingVeryLargeValueTypeNativeArrayNetworkVariables_ValuesAreSerializedCorrectly(

Expand Down Expand Up @@ -2645,7 +2646,7 @@ public string DictionaryStr<TKey, TVal>(Dictionary<TKey, TVal> list)
}

[Test]
[UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // I will add this test to track in Jira as next step (after having working CI in place). The job is failing on iOS
[UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // Tracked in MTT-11356.
[Repeat(5)]
public void WhenSerializingAndDeserializingVeryLargeListNetworkVariables_ValuesAreSerializedCorrectly(

Expand Down Expand Up @@ -2832,7 +2833,7 @@ public void WhenSerializingAndDeserializingVeryLargeListNetworkVariables_ValuesA
}

[Test]
[UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // I will add this test to track in Jira as next step (after having working CI in place). The job is failing on iOS
[UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // Tracked in MTT-11356.
[Repeat(5)]
public void WhenSerializingAndDeserializingVeryLargeHashSetNetworkVariables_ValuesAreSerializedCorrectly(

Expand Down Expand Up @@ -2988,7 +2989,7 @@ public void WhenSerializingAndDeserializingVeryLargeHashSetNetworkVariables_Valu
}

[Test]
[UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // I will add this test to track in Jira as next step (after having working CI in place). The job is unstable on mobile devices
[UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // Tracked in MTT-11356.
[Repeat(5)]
public void WhenSerializingAndDeserializingVeryLargeDictionaryNetworkVariables_ValuesAreSerializedCorrectly(

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Unity.Collections;
using Unity.Netcode.TestHelpers.Runtime;
using UnityEngine;
using UnityEngine.TestTools;
using Quaternion = UnityEngine.Quaternion;
using Vector2 = UnityEngine.Vector2;
using Vector3 = UnityEngine.Vector3;
Expand Down Expand Up @@ -1503,6 +1504,7 @@ public void WhenSendingAnArrayOfValueTypesOverAnRpc_ValuesAreSerializedCorrectly
}

[Test]
[UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // Tracked in MTT-11356. The job is failing on mobile devices on 2021 editor specifically
public void WhenSendingANativeArrayOfValueTypesOverAnRpc_ValuesAreSerializedCorrectly(

[Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint),
Expand Down
Loading