Skip to content

fix: Yamato jobs not testing built player - #4194

Open
EmandM wants to merge 15 commits into
develop-3.x.xfrom
fix/yamato-jobs
Open

EmandM wants to merge 15 commits into
develop-3.x.xfrom
fix/yamato-jobs

Conversation

@EmandM

@EmandM EmandM commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Purpose of this PR

I noticed in #4188 that the CMB tests have become very flaky. This was blocking CoreCLR changes from landing as fast as they should be able to.

In investigating this, I discovered that the desktop and console standalone tests weren't running the tests on the pre-built players, they were accidentally falling back to using the editor instead. This meant we weren't running our tests on a number of platforms.

This PR:

  1. Updates the Standalone jobs to correctly use the pre-built players to run our tests
  2. Excludes tests (with JIRA tickets) that fail on Playstation platforms
  3. Removes the repetition of the NetworkVariableTests. They already have multiple different values, and many of these tests are duplicated elsewhere in our test framework now. The [Repeat] attribute was causing the tests to be flakey
  4. Fixes NetcodeIntegrationTest to ensure the test scene is always set back to the active scene, and that the test framework will wait until all the scenes loaded by the test are unloaded before finishing teardown.
  5. Updates ObjectNameIdentifier to use the DA compatible OnOwnershipChanged (NetworkObjectSynchronizationTests(DAHost).NetworkObjectDeserializationFailure was failing because of it)
  6. Couple of other small fixes.

Jira ticket

UUM-155844

Changelog

  • Fixed: various small test framework fixes
    API was removed and what they should use instead.

Documentation

  • No documentation changes or additions were necessary.

Testing & QA (How your changes can be verified during release Playtest)

Functional Testing

Manual testing :

  • Manual testing done

Automated tests:

  • Covered by existing automated tests
  • Covered by new automated tests

Does the change require QA team to:

  • Review automated tests?
  • Execute manual tests?
  • Provide feedback about the PR?

If any boxes above are checked the QA team will be automatically added as a PR reviewer.

Up-port

Backports

We started having issues because the addition of N4E slowed the CMB service tests down juuuust enough. Not sure if we need to backport this one.

@EmandM
EmandM marked this pull request as ready for review October 16, 2026 17:21
@EmandM
EmandM requested review from a team and NoelStephensUnity as code owners October 16, 2026 17:21
@u-pr

u-pr Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

⚠️ Some settings were ignored in '.pr_agent.toml (repository root)' repo settings

Check the configuration's TOML syntax, permitted settings, and size limit. See the error below.


Error message:
Ignored prohibited settings: github_app.handle_pr_actions. Permitted settings were applied.

Configuration content:
# This is the configuration for the u-pr bot
# https://github.cds.internal.unity3d.com/unity/u-pr
# For configuration of this file:
# https://developer.portal.internal.unity.com/catalog/default/component/u-pr/docs/configuration/automatic_runs/

[github_app]
handle_pr_actions = ['opened', 'ready_for_review']  # PR events that auto-run pr_commands
pr_commands       = ["/harness-review"]             # what runs on those events
reviewer_commands = ["/harness-review"]             # what runs when @u-pr is added as reviewer

# run_cmb_service.sh builds and starts a release version of the full CMB service (along with the limited echo server)
- ./Tools/CI/service.cmb/run_cmb_service.sh -e $ECHO_SERVER_PORT -s $CMB_SERVICE_PORT -l artifacts

- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %}{% if backend == "coreclr" %}{% unless coreclr_runtime_editors contains editor %} -c {{ platform.coreclr_component }} {% endunless %}{% endif %} --arch {{ platform.architecture }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

don't we need to download the editor?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Or is it because in order to execute tests on a build we don't need to download the editor

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Nope! Because we've already built the players with the editor in the separate build step, and apparently UnityTestRunner is pre-installed the bokken images we use.

The job runs faster (no need to grab unity) and really relieves the memory pressure on the machine (no unity taking up resources). And! If we ever have this problem again, without unity there UTR can't silently fall-back to using the editor to run the tests

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Harness Review

LGTM

The change makes standalone jobs explicitly execute built players and updates shared test helpers, but several ownership and cleanup safeguards remain incomplete.

Reviewed commit 5fe06fc

🤖 Helpful? 👍/👎

Comment thread com.unity.netcode.gameobjects/Tests/Runtime/TestHelpers/NetcodeIntegrationTest.cs Outdated
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
{% endif %}
commands:
# Installing editor. We still need the editor to run tests on standalone build and for that the Editor is required

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this comment false?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, I think I thought that UTR came from the editor, but apparently it's already on the image.

@NoelStephensUnity NoelStephensUnity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very nice!
Good catches!
:godmode:

@codecov-github-com

codecov-github-com Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

@@              Coverage Diff               @@
##           develop-3.x.x    #4194   +/-   ##
==============================================
  Coverage          76.11%   76.11%           
==============================================
  Files                159      159           
  Lines              27333    27333           
==============================================
  Hits               20805    20805           
  Misses              6528     6528           
Flag Coverage Δ
NGOv2_project_testproject_ubuntu 75.16% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
com.unity.netcode.gameobjects 76.11% <ø> (ø)

ℹ️ Need help interpreting these results?

This branch has not been deployed

No deployments
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