From 0c49262c48070ee537892c92d61bcc58f6420ef2 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Wed, 17 Sep 2025 14:06:01 +0200 Subject: [PATCH 01/41] Added GitHub workflow to prevent PR from merging when checks are running --- .github/workflows/all-checks-pass.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/all-checks-pass.yml diff --git a/.github/workflows/all-checks-pass.yml b/.github/workflows/all-checks-pass.yml new file mode 100644 index 0000000000..7409dcd49f --- /dev/null +++ b/.github/workflows/all-checks-pass.yml @@ -0,0 +1,19 @@ +# Check based on https://github.com/marketplace/actions/allcheckspassed to prevent PRs from merging when there is no required checks but some jobs are running + +name: All checks pass verification +on: + pull_request: + types: [ opened, synchronize, reopened, ready_for_review ] + +jobs: + allchecks: + runs-on: ubuntu-latest + permissions: + checks: read + contents: read + steps: + - uses: wechuli/allcheckspassed@v1 + with: + delay: '1' + retries: '48' + polling_interval: '5' \ No newline at end of file From 121d8033f5ad744b19e99919657f69b52430a4a7 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Wed, 17 Sep 2025 14:14:52 +0200 Subject: [PATCH 02/41] Added minimal required job set --- .yamato/_triggers.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index 549e90ccdb..bdb557e308 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -42,6 +42,20 @@ #----------------------------------------------------------------------------------- +# After some experimenting with CI setups we discovered that even though sometimes we don't need CI to run (no reason to run package tests if only Documentation is changed) there are some checks that devs may not realize but changes in seemingly unrelated files will cause their failures +# This trigger was created to ensure that ALL PRs run this minimal check even when we don't need to run full tests +minimal_required_checks_trigger: + name: Minimal PR check (develop, develop-2.0.0 & release branches) + dependencies: + - .yamato/package-pack.yml#package_pack_-_ngo_win + - .yamato/project-standards.yml#standards_ubuntu_testproject_trunk + triggers: + expression: |- + (pull_request.target eq "develop" OR + pull_request.target eq "develop-2.0.0" OR + pull_request.target match "release/*") AND + NOT pull_request.draft + cancel_old_ci: true # Run all relevant tasks when a pull request targeting the develop or release branch is created or updated. # In order to have better coverage we run desktop standalone tests with different configurations which allows to mostly cover for different platforms, scripting backends and editor versions. From 1d8fdfb0cd07d21626895b3fd7939d7a2f209f79 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Wed, 17 Sep 2025 14:27:00 +0200 Subject: [PATCH 03/41] changed delay and interval --- .github/workflows/all-checks-pass.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/all-checks-pass.yml b/.github/workflows/all-checks-pass.yml index 7409dcd49f..cf14ef08f8 100644 --- a/.github/workflows/all-checks-pass.yml +++ b/.github/workflows/all-checks-pass.yml @@ -14,6 +14,6 @@ jobs: steps: - uses: wechuli/allcheckspassed@v1 with: - delay: '1' - retries: '48' - polling_interval: '5' \ No newline at end of file + delay: '0' + retries: '100' + polling_interval: '3' \ No newline at end of file From f94cbc82a8dab1a78dd5a08f6db64029198992b6 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 12:39:39 +0200 Subject: [PATCH 04/41] Removed allcheckspassed GitHub action and added spare checkout rule for Yamato job --- .github/workflows/all-checks-pass.yml | 19 -------- .sparse-checkout-rules/pr-trigger.patterns | 2 + .yamato/_triggers.yml | 51 ++++++++++++---------- 3 files changed, 31 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/all-checks-pass.yml create mode 100644 .sparse-checkout-rules/pr-trigger.patterns diff --git a/.github/workflows/all-checks-pass.yml b/.github/workflows/all-checks-pass.yml deleted file mode 100644 index cf14ef08f8..0000000000 --- a/.github/workflows/all-checks-pass.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Check based on https://github.com/marketplace/actions/allcheckspassed to prevent PRs from merging when there is no required checks but some jobs are running - -name: All checks pass verification -on: - pull_request: - types: [ opened, synchronize, reopened, ready_for_review ] - -jobs: - allchecks: - runs-on: ubuntu-latest - permissions: - checks: read - contents: read - steps: - - uses: wechuli/allcheckspassed@v1 - with: - delay: '0' - retries: '100' - polling_interval: '3' \ No newline at end of file diff --git a/.sparse-checkout-rules/pr-trigger.patterns b/.sparse-checkout-rules/pr-trigger.patterns new file mode 100644 index 0000000000..20a214becf --- /dev/null +++ b/.sparse-checkout-rules/pr-trigger.patterns @@ -0,0 +1,2 @@ +/com.unity.netcde.gameobjects/ +/testproject/ \ No newline at end of file diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index bdb557e308..cca63f857a 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -42,28 +42,39 @@ #----------------------------------------------------------------------------------- -# After some experimenting with CI setups we discovered that even though sometimes we don't need CI to run (no reason to run package tests if only Documentation is changed) there are some checks that devs may not realize but changes in seemingly unrelated files will cause their failures -# This trigger was created to ensure that ALL PRs run this minimal check even when we don't need to run full tests -minimal_required_checks_trigger: - name: Minimal PR check (develop, develop-2.0.0 & release branches) +pull_request_trigger: + name: Pull Request Trigger (develop, develop-2.0.0, & release branches) + # Run the following tests on a selection of different desktop platforms dependencies: - - .yamato/package-pack.yml#package_pack_-_ngo_win - - .yamato/project-standards.yml#standards_ubuntu_testproject_trunk + - .yamato/_triggers#minimal_required_checks + - .yamato/_triggers#code_changes_check triggers: + # Note that PR tests will run ONLY if we are changing package/sample code. If changes are let's say docs only no tests will be triggered + # TODO: consider setting up and running tests from Examples/ + # TODO: or docs only changes are spelling/link check expression: |- - (pull_request.target eq "develop" OR + pull_request.comment eq "ngo" OR + ((pull_request.target eq "develop" OR pull_request.target eq "develop-2.0.0" OR pull_request.target match "release/*") AND NOT pull_request.draft cancel_old_ci: true +# After some experimenting with CI setups we discovered that even though sometimes we don't need CI to run (no reason to run package tests if only Documentation is changed) there are some checks that devs may not realize but changes in seemingly unrelated files will cause their failures +# This trigger was created to ensure that ALL PRs run this minimal check even when we don't need to run full tests +minimal_required_checks: + name: Minimal PR check (develop, develop-2.0.0 & release branches) + dependencies: + - .yamato/package-pack.yml#package_pack_-_ngo_win + - .yamato/project-standards.yml#standards_ubuntu_testproject_trunk + # Run all relevant tasks when a pull request targeting the develop or release branch is created or updated. # In order to have better coverage we run desktop standalone tests with different configurations which allows to mostly cover for different platforms, scripting backends and editor versions. # This job will FIRST run "run_quick_checks" jobs (defined in _run-all.yml) since it's the dependency of project pack jobs which is on the lowest dependency tier. This runs the fastest checks (like PVP or code standards) and ONLY IF those pass it will run the rest of the tests. # This optimization allows to speed up feedback look for any "obvious" errors and save resources. # Since standards job is a part of initial checks it's not present as direct dependency here!!!!!!!!!!!!!!!!!!!! -pull_request_trigger: - name: Pull Request Trigger (develop, develop-2.0.0, & release branches) +code_changes_check: + name: Package/Project Changes Trigger (develop, develop-2.0.0, & release branches) # Run the following tests on a selection of different desktop platforms dependencies: # Run package EditMode and Playmode package tests on trunk and an older supported editor (6000.0) @@ -78,19 +89,15 @@ pull_request_trigger: # Coverage on other standalone machines is present in Nightly job so it's enough to not run all of them for PRs - .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_win_il2cpp_6000.0 - .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_testproject_ubuntu_il2cpp_trunk - triggers: - # Note that PR tests will run ONLY if we are changing package/sample code. If changes are let's say docs only no tests will be triggered - # TODO: consider setting up and running tests from Examples/ - # TODO: or docs only changes are spelling/link check - expression: |- - pull_request.comment eq "ngo" OR - ((pull_request.target eq "develop" OR - pull_request.target eq "develop-2.0.0" OR - pull_request.target match "release/*") AND - NOT pull_request.draft AND - (pull_request.changes.any match "com.unity.netcode.gameobjects/**" OR - pull_request.changes.any match "testproject/**")) - cancel_old_ci: true + source: + files: + sparse_checkout_rules: .sparse-checkout-rules/pr-triger.patterns + + + + + + # Run all tests on trunk on nightly basis. # Same subset as pull_request_trigger with addition of mobile/desktop/console tests and webgl builds From 9c2e15e6367c689e293854968a599611d2285ae6 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 12:41:02 +0200 Subject: [PATCH 05/41] removed BOM --- .sparse-checkout-rules/pr-trigger.patterns | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.sparse-checkout-rules/pr-trigger.patterns b/.sparse-checkout-rules/pr-trigger.patterns index 20a214becf..7b7eb2a267 100644 --- a/.sparse-checkout-rules/pr-trigger.patterns +++ b/.sparse-checkout-rules/pr-trigger.patterns @@ -1,2 +1,2 @@ -/com.unity.netcde.gameobjects/ +/com.unity.netcde.gameobjects/ /testproject/ \ No newline at end of file From 04c0abf5146506a061dc5422ca9e95ce8aa9f749 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 12:49:18 +0200 Subject: [PATCH 06/41] typo --- .yamato/_triggers.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index cca63f857a..254bdc21ce 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -46,8 +46,8 @@ pull_request_trigger: name: Pull Request Trigger (develop, develop-2.0.0, & release branches) # Run the following tests on a selection of different desktop platforms dependencies: - - .yamato/_triggers#minimal_required_checks - - .yamato/_triggers#code_changes_check + - .yamato/_triggers.yml#minimal_required_checks + - .yamato/_triggers.yml#code_changes_check triggers: # Note that PR tests will run ONLY if we are changing package/sample code. If changes are let's say docs only no tests will be triggered # TODO: consider setting up and running tests from Examples/ From 8ba10475cec3319a05c10a4f035be12e7990e4d5 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 12:50:46 +0200 Subject: [PATCH 07/41] format --- .yamato/_triggers.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index 254bdc21ce..0ce5b06a2d 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -53,10 +53,10 @@ pull_request_trigger: # TODO: consider setting up and running tests from Examples/ # TODO: or docs only changes are spelling/link check expression: |- - pull_request.comment eq "ngo" OR - ((pull_request.target eq "develop" OR + (pull_request.comment eq "ngo" OR + (pull_request.target eq "develop" OR pull_request.target eq "develop-2.0.0" OR - pull_request.target match "release/*") AND + pull_request.target match "release/*")) AND NOT pull_request.draft cancel_old_ci: true From f9693305950d3fdae5f29911ff4bd3f5e2ffd7af Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 12:55:41 +0200 Subject: [PATCH 08/41] corrected pattern --- .sparse-checkout-rules/pr-trigger.patterns | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.sparse-checkout-rules/pr-trigger.patterns b/.sparse-checkout-rules/pr-trigger.patterns index 7b7eb2a267..a93851a9cd 100644 --- a/.sparse-checkout-rules/pr-trigger.patterns +++ b/.sparse-checkout-rules/pr-trigger.patterns @@ -1,2 +1,2 @@ -/com.unity.netcde.gameobjects/ -/testproject/ \ No newline at end of file +com.unity.netcde.gameobjects +testproject \ No newline at end of file From 748abaa87d2556c7222d8ff319a8131150ccaca2 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 12:57:23 +0200 Subject: [PATCH 09/41] name typo --- .yamato/_triggers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index 0ce5b06a2d..6a767d98ce 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -91,7 +91,7 @@ code_changes_check: - .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_testproject_ubuntu_il2cpp_trunk source: files: - sparse_checkout_rules: .sparse-checkout-rules/pr-triger.patterns + sparse_checkout_rules: .sparse-checkout-rules/pr-trigger.patterns From 0bcbbd5cda92882de960fba8ee749ee878e4b991 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 13:04:10 +0200 Subject: [PATCH 10/41] pattern correction --- .sparse-checkout-rules/pr-trigger.patterns | 4 ++-- .yamato/_triggers.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.sparse-checkout-rules/pr-trigger.patterns b/.sparse-checkout-rules/pr-trigger.patterns index a93851a9cd..d3a76423c7 100644 --- a/.sparse-checkout-rules/pr-trigger.patterns +++ b/.sparse-checkout-rules/pr-trigger.patterns @@ -1,2 +1,2 @@ -com.unity.netcde.gameobjects -testproject \ No newline at end of file +com.unity.netcode.gameobjects/** +testproject/** \ No newline at end of file diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index 6a767d98ce..6631782bf5 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -90,6 +90,7 @@ code_changes_check: - .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_win_il2cpp_6000.0 - .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_testproject_ubuntu_il2cpp_trunk source: + checkout_mode: sparse files: sparse_checkout_rules: .sparse-checkout-rules/pr-trigger.patterns From e712e5684051be4dbf352c96fe87734ea5ef0eea Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 13:38:22 +0200 Subject: [PATCH 11/41] modified pr-trigger.pattern to exclude Documentation folder etc --- .sparse-checkout-rules/pr-trigger.patterns | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.sparse-checkout-rules/pr-trigger.patterns b/.sparse-checkout-rules/pr-trigger.patterns index d3a76423c7..f3b3ab42bc 100644 --- a/.sparse-checkout-rules/pr-trigger.patterns +++ b/.sparse-checkout-rules/pr-trigger.patterns @@ -1,2 +1,5 @@ -com.unity.netcode.gameobjects/** +com.unity.netcode.gameobjects/Editor/** +com.unity.netcode.gameobjects/Runtime/** +com.unity.netcode.gameobjects/Tests/** +com.unity.netcode.gameobjects/package.json testproject/** \ No newline at end of file From 10bf12885d04baf5647b851651b55b8f0c8d206c Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 15:01:52 +0200 Subject: [PATCH 12/41] testing unrelated change --- com.unity.netcode.gameobjects/Documentation~/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Documentation~/index.md b/com.unity.netcode.gameobjects/Documentation~/index.md index 5fb2f77bd4..8ae8d454a9 100644 --- a/com.unity.netcode.gameobjects/Documentation~/index.md +++ b/com.unity.netcode.gameobjects/Documentation~/index.md @@ -15,5 +15,5 @@ Netcode for GameObjects supports the following platforms: - iOS and Android - XR platforms running on Windows, Android, and iOS operating systems - Most [**closed platforms**](https://unity.com/platform-installation), such as consoles. Contact us for more information about specific closed platforms. - - When working with consoles (such as PlayStation, Xbox, or Nintendo Switch), there may be Netcode-specific policies you should be aware of while testing and before launching your game live. Refer to the console's internal documentation for more information. This content is typically protected by NDA. + - When working with consoles (such as PlayStation, Xbox, or Nintendo Switch), there may be Netcode-specific policies you should be aware of while testing and before launching your game live. Refer to the console's internal documentation for more information. This content is typically protected by NDA - WebGL (requires Netcode for GameObjects 1.2.0+ and Unity Transport 2.0.0+) From 50ca0ec1822e0af2a2bb9ea7bde3fe104e17a483 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Sat, 20 Sep 2025 11:35:42 +0200 Subject: [PATCH 13/41] Revert "testing unrelated change" This reverts commit 10bf12885d04baf5647b851651b55b8f0c8d206c. --- com.unity.netcode.gameobjects/Documentation~/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Documentation~/index.md b/com.unity.netcode.gameobjects/Documentation~/index.md index 8ae8d454a9..5fb2f77bd4 100644 --- a/com.unity.netcode.gameobjects/Documentation~/index.md +++ b/com.unity.netcode.gameobjects/Documentation~/index.md @@ -15,5 +15,5 @@ Netcode for GameObjects supports the following platforms: - iOS and Android - XR platforms running on Windows, Android, and iOS operating systems - Most [**closed platforms**](https://unity.com/platform-installation), such as consoles. Contact us for more information about specific closed platforms. - - When working with consoles (such as PlayStation, Xbox, or Nintendo Switch), there may be Netcode-specific policies you should be aware of while testing and before launching your game live. Refer to the console's internal documentation for more information. This content is typically protected by NDA + - When working with consoles (such as PlayStation, Xbox, or Nintendo Switch), there may be Netcode-specific policies you should be aware of while testing and before launching your game live. Refer to the console's internal documentation for more information. This content is typically protected by NDA. - WebGL (requires Netcode for GameObjects 1.2.0+ and Unity Transport 2.0.0+) From 9ae4345fa9303a77b5db71ab316e53c4bfdd839b Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Sat, 20 Sep 2025 11:39:08 +0200 Subject: [PATCH 14/41] pattern correction test --- .sparse-checkout-rules/pr-trigger.patterns | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.sparse-checkout-rules/pr-trigger.patterns b/.sparse-checkout-rules/pr-trigger.patterns index f3b3ab42bc..f1282bb706 100644 --- a/.sparse-checkout-rules/pr-trigger.patterns +++ b/.sparse-checkout-rules/pr-trigger.patterns @@ -1,5 +1,4 @@ -com.unity.netcode.gameobjects/Editor/** -com.unity.netcode.gameobjects/Runtime/** -com.unity.netcode.gameobjects/Tests/** -com.unity.netcode.gameobjects/package.json -testproject/** \ No newline at end of file +/com.unity.netcode.gameobjects/Editor/ +/com.unity.netcode.gameobjects/Runtime/ +/com.unity.netcode.gameobjects/Tests/ +/testproject/ \ No newline at end of file From 9b74698bbd27f4877020104ba79c01c997ec9789 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Mon, 22 Sep 2025 14:44:01 +0200 Subject: [PATCH 15/41] Removed sparse checkout rules --- .sparse-checkout-rules/pr-trigger.patterns | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 .sparse-checkout-rules/pr-trigger.patterns diff --git a/.sparse-checkout-rules/pr-trigger.patterns b/.sparse-checkout-rules/pr-trigger.patterns deleted file mode 100644 index f1282bb706..0000000000 --- a/.sparse-checkout-rules/pr-trigger.patterns +++ /dev/null @@ -1,4 +0,0 @@ -/com.unity.netcode.gameobjects/Editor/ -/com.unity.netcode.gameobjects/Runtime/ -/com.unity.netcode.gameobjects/Tests/ -/testproject/ \ No newline at end of file From e20b35001533955b0f5c017c18dbfed4f502a1d3 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Mon, 22 Sep 2025 14:45:47 +0200 Subject: [PATCH 16/41] Modified triggers and added pr supervisor job --- .github/workflows/pr-supervisor.yaml | 88 ++++++++++++++++++++++++++++ .yamato/_triggers.yml | 51 +++++++++------- 2 files changed, 117 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/pr-supervisor.yaml diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml new file mode 100644 index 0000000000..343f83b8af --- /dev/null +++ b/.github/workflows/pr-supervisor.yaml @@ -0,0 +1,88 @@ +""" GitHub Actions workflow to monitor Yamato CI job status on pull requests.""" + +name: Yamato PR Supervisor + +on: + pull_request: + types: [opened, synchronize, reopened] + branches: + - develop + - develop-2.0.0 + - release/* + +jobs: + yamato-supervisor: + runs-on: ubuntu-latest + env: + # The name of the Yamato check to monitor + CHECK_NAME: "Code changes PR checks" + # How long to wait for the check to appear before assuming it won't run + GRACE_PERIOD_SECONDS: 120 # 2 minutes + # How often to poll the GitHub API to see if job has finished (fail or succeeded) + POLLING_INTERVAL_SECONDS: 30 + # Max time to wait for the job to finish + TIMEOUT_MINUTES: 360 + + steps: + - name: Wait and Verify Yamato Job Status + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + run: | + # Give Yamato a moment to trigger its jobs + echo "Waiting for 2 minutes to allow Yamato jobs to start..." + sleep 120 + + start_time=$(date +%s) + timeout_seconds=$((TIMEOUT_MINUTES * 60)) + + echo "Starting to monitor for the status of check: '$CHECK_NAME'" + + while true; do + current_time=$(date +%s) + elapsed_seconds=$((current_time - start_time)) + + # --- Timeout Check --- + if [ $elapsed_seconds -gt $timeout_seconds ]; then + echo "::error::Timeout of $TIMEOUT_MINUTES minutes reached. The Yamato job '$CHECK_NAME' did not complete in time." + exit 1 + fi + + # --- Get PR Checks using GitHub CLI --- + # This command gets all checks for the current PR in JSON format + checks_json=$(gh pr checks ${{ github.event.pull_request.number }} --json name,status,conclusion) + + # --- Find our specific check using jq --- + check_status=$(echo "$checks_json" | jq -r ".[] | select(.name == \"$CHECK_NAME\") | .status") + check_conclusion=$(echo "$checks_json" | jq -r ".[] | select(.name == \"$CHECK_NAME\") | .conclusion") + + # --- Main Logic --- + if [ -z "$check_status" ]; then + # Case 1: The check has not appeared yet. + if [ $elapsed_seconds -gt $GRACE_PERIOD_SECONDS ]; then + echo "Grace period of $GRACE_PERIOD_SECONDS seconds has passed and the check '$CHECK_NAME' was not found." + echo "Assuming it was not triggered (e.g., docs-only change). Success!" + exit 0 + else + echo "Check '$CHECK_NAME' not found yet. Continuing to poll..." + fi + elif [ "$check_status" == "in_progress" ] || [ "$check_status" == "queued" ]; then + # Case 2: The check is running. + echo "Check '$CHECK_NAME' is currently '$check_status'. Waiting..." + elif [ "$check_status" == "completed" ]; then + # Case 3: The check has finished. + if [ "$check_conclusion" == "success" ]; then + echo "Check '$CHECK_NAME' completed with conclusion: 'success'. Great!" + exit 0 + else + echo "::error::Check '$CHECK_NAME' completed with conclusion: '$check_conclusion'." + exit 1 + fi + else + # Case 4: Something unexpected happened. + echo "::error::Unknown status for check '$CHECK_NAME': '$check_status'." + exit 1 + fi + + # Wait before the next poll + sleep $POLLING_INTERVAL_SECONDS + done \ No newline at end of file diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index 6631782bf5..b6209ee358 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -40,18 +40,16 @@ # It's important to ensure that all dependencies exist (this can be verified in Yamato) since a modification in parameters may result in a given job not being generated, and thus we will not be able to run such erroneous job. -#----------------------------------------------------------------------------------- +#----------------------------------------------------------------------------------- -pull_request_trigger: - name: Pull Request Trigger (develop, develop-2.0.0, & release branches) - # Run the following tests on a selection of different desktop platforms +# After some experimenting with CI setups we discovered that even though sometimes we don't need CI to run (no reason to run package tests if only Documentation is changed) there are some checks that devs may not realize but changes in seemingly unrelated files will cause their failures +# This trigger was created to ensure that ALL PRs run this minimal check even when we don't need to run full tests +minimal_required_checks: + name: Minimal PR checks dependencies: - - .yamato/_triggers.yml#minimal_required_checks - - .yamato/_triggers.yml#code_changes_check + - .yamato/package-pack.yml#package_pack_-_ngo_win + - .yamato/project-standards.yml#standards_ubuntu_testproject_trunk triggers: - # Note that PR tests will run ONLY if we are changing package/sample code. If changes are let's say docs only no tests will be triggered - # TODO: consider setting up and running tests from Examples/ - # TODO: or docs only changes are spelling/link check expression: |- (pull_request.comment eq "ngo" OR (pull_request.target eq "develop" OR @@ -60,21 +58,14 @@ pull_request_trigger: NOT pull_request.draft cancel_old_ci: true -# After some experimenting with CI setups we discovered that even though sometimes we don't need CI to run (no reason to run package tests if only Documentation is changed) there are some checks that devs may not realize but changes in seemingly unrelated files will cause their failures -# This trigger was created to ensure that ALL PRs run this minimal check even when we don't need to run full tests -minimal_required_checks: - name: Minimal PR check (develop, develop-2.0.0 & release branches) - dependencies: - - .yamato/package-pack.yml#package_pack_-_ngo_win - - .yamato/project-standards.yml#standards_ubuntu_testproject_trunk # Run all relevant tasks when a pull request targeting the develop or release branch is created or updated. # In order to have better coverage we run desktop standalone tests with different configurations which allows to mostly cover for different platforms, scripting backends and editor versions. # This job will FIRST run "run_quick_checks" jobs (defined in _run-all.yml) since it's the dependency of project pack jobs which is on the lowest dependency tier. This runs the fastest checks (like PVP or code standards) and ONLY IF those pass it will run the rest of the tests. # This optimization allows to speed up feedback look for any "obvious" errors and save resources. # Since standards job is a part of initial checks it's not present as direct dependency here!!!!!!!!!!!!!!!!!!!! -code_changes_check: - name: Package/Project Changes Trigger (develop, develop-2.0.0, & release branches) +code_changes_checks: + name: Code changes PR checks # Run the following tests on a selection of different desktop platforms dependencies: # Run package EditMode and Playmode package tests on trunk and an older supported editor (6000.0) @@ -89,10 +80,26 @@ code_changes_check: # Coverage on other standalone machines is present in Nightly job so it's enough to not run all of them for PRs - .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_win_il2cpp_6000.0 - .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_testproject_ubuntu_il2cpp_trunk - source: - checkout_mode: sparse - files: - sparse_checkout_rules: .sparse-checkout-rules/pr-trigger.patterns + triggers: + expression: |- + (pull_request.comment eq "ngo" OR + (pull_request.target eq "develop" OR + pull_request.target eq "develop-2.0.0" OR + pull_request.target match "release/*")) AND + NOT pull_request.draft AND + pull_request.changes.any match [ + "com.unity.netcode.gameobjects/Editor/**", + "com.unity.netcode.gameobjects/Runtime/**", + "com.unity.netcode.gameobjects/Tests/**", + "testproject/**", + "com.unity.netcode.gameobjects/package.json" + ] AND + NOT pull_request.changes.all match [ + "**/Documentation~/**", + "**/InternalDocs~/**". + "**/*.md", + ] + cancel_old_ci: true From fbfd6e550a3f7cdd21adcfd7e85c86bad9c2a1ee Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Mon, 22 Sep 2025 14:49:57 +0200 Subject: [PATCH 17/41] typos --- .yamato/_triggers.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index b6209ee358..e5c78abb58 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -96,8 +96,8 @@ code_changes_checks: ] AND NOT pull_request.changes.all match [ "**/Documentation~/**", - "**/InternalDocs~/**". - "**/*.md", + "**/InternalDocs~/**", + "**/*.md" ] cancel_old_ci: true From 56b2aa625889cb73f88bda4fc301307d6871c797 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Mon, 22 Sep 2025 14:51:52 +0200 Subject: [PATCH 18/41] comment typo --- .github/workflows/pr-supervisor.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index 343f83b8af..a0c35c276f 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -1,4 +1,4 @@ -""" GitHub Actions workflow to monitor Yamato CI job status on pull requests.""" +# GitHub Actions workflow to monitor Yamato CI job status on pull requests name: Yamato PR Supervisor From 7d92af73dc6bb97ff1d7966372cbbc658521ea25 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Mon, 22 Sep 2025 14:54:58 +0200 Subject: [PATCH 19/41] corrected field name --- .github/workflows/pr-supervisor.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index a0c35c276f..1e7038c244 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -1,4 +1,4 @@ -# GitHub Actions workflow to monitor Yamato CI job status on pull requests +# GitHub Actions workflow to monitor Yamato CI job state on pull requests name: Yamato PR Supervisor @@ -35,7 +35,7 @@ jobs: start_time=$(date +%s) timeout_seconds=$((TIMEOUT_MINUTES * 60)) - echo "Starting to monitor for the status of check: '$CHECK_NAME'" + echo "Starting to monitor for the state of check: '$CHECK_NAME'" while true; do current_time=$(date +%s) @@ -49,10 +49,10 @@ jobs: # --- Get PR Checks using GitHub CLI --- # This command gets all checks for the current PR in JSON format - checks_json=$(gh pr checks ${{ github.event.pull_request.number }} --json name,status,conclusion) + checks_json=$(gh pr checks ${{ github.event.pull_request.number }} --json name,state,conclusion) # --- Find our specific check using jq --- - check_status=$(echo "$checks_json" | jq -r ".[] | select(.name == \"$CHECK_NAME\") | .status") + check_status=$(echo "$checks_json" | jq -r ".[] | select(.name == \"$CHECK_NAME\") | .state") check_conclusion=$(echo "$checks_json" | jq -r ".[] | select(.name == \"$CHECK_NAME\") | .conclusion") # --- Main Logic --- @@ -79,7 +79,7 @@ jobs: fi else # Case 4: Something unexpected happened. - echo "::error::Unknown status for check '$CHECK_NAME': '$check_status'." + echo "::error::Unknown state for check '$CHECK_NAME': '$check_status'." exit 1 fi From 50585836592e1f2b832c3158b2b07d0f5b4afff3 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Mon, 22 Sep 2025 15:10:48 +0200 Subject: [PATCH 20/41] corrected query fields --- .github/workflows/pr-supervisor.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index 1e7038c244..b137e5c944 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -49,11 +49,10 @@ jobs: # --- Get PR Checks using GitHub CLI --- # This command gets all checks for the current PR in JSON format - checks_json=$(gh pr checks ${{ github.event.pull_request.number }} --json name,state,conclusion) + checks_json=$(gh pr checks ${{ github.event.pull_request.number }} --json name,state) # --- Find our specific check using jq --- check_status=$(echo "$checks_json" | jq -r ".[] | select(.name == \"$CHECK_NAME\") | .state") - check_conclusion=$(echo "$checks_json" | jq -r ".[] | select(.name == \"$CHECK_NAME\") | .conclusion") # --- Main Logic --- if [ -z "$check_status" ]; then @@ -70,11 +69,11 @@ jobs: echo "Check '$CHECK_NAME' is currently '$check_status'. Waiting..." elif [ "$check_status" == "completed" ]; then # Case 3: The check has finished. - if [ "$check_conclusion" == "success" ]; then + if [ "$check_status" == "success" ]; then echo "Check '$CHECK_NAME' completed with conclusion: 'success'. Great!" exit 0 else - echo "::error::Check '$CHECK_NAME' completed with conclusion: '$check_conclusion'." + echo "::error::Check '$CHECK_NAME' completed with conclusion: '$check_status'." exit 1 fi else From ad29876fbdbcdebff1a6fe053232d94e46a4f895 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Mon, 22 Sep 2025 15:27:32 +0200 Subject: [PATCH 21/41] Added repo checkout as first step --- .github/workflows/pr-supervisor.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index b137e5c944..80a82e6be0 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -24,6 +24,9 @@ jobs: TIMEOUT_MINUTES: 360 steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Wait and Verify Yamato Job Status env: GH_TOKEN: ${{ secrets.GH_TOKEN }} @@ -48,6 +51,7 @@ jobs: fi # --- Get PR Checks using GitHub CLI --- + # https://cli.github.com/manual/gh_pr_checks # This command gets all checks for the current PR in JSON format checks_json=$(gh pr checks ${{ github.event.pull_request.number }} --json name,state) @@ -64,12 +68,11 @@ jobs: else echo "Check '$CHECK_NAME' not found yet. Continuing to poll..." fi - elif [ "$check_status" == "in_progress" ] || [ "$check_status" == "queued" ]; then + elif [ "$check_status" == "pending" ]; then # Case 2: The check is running. echo "Check '$CHECK_NAME' is currently '$check_status'. Waiting..." - elif [ "$check_status" == "completed" ]; then + elif [ "$check_status" == "pass" ]; then # Case 3: The check has finished. - if [ "$check_status" == "success" ]; then echo "Check '$CHECK_NAME' completed with conclusion: 'success'. Great!" exit 0 else From 13cfa9124b11e2970d69d0084ab5d544a65dba81 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Mon, 22 Sep 2025 15:50:11 +0200 Subject: [PATCH 22/41] corrected inlining --- .github/workflows/pr-supervisor.yaml | 72 +++++++++++++--------------- 1 file changed, 33 insertions(+), 39 deletions(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index 80a82e6be0..2d75958a0f 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -44,47 +44,41 @@ jobs: current_time=$(date +%s) elapsed_seconds=$((current_time - start_time)) - # --- Timeout Check --- - if [ $elapsed_seconds -gt $timeout_seconds ]; then - echo "::error::Timeout of $TIMEOUT_MINUTES minutes reached. The Yamato job '$CHECK_NAME' did not complete in time." - exit 1 - fi + # --- Timeout Check --- + if [ $elapsed_seconds -gt $timeout_seconds ]; then + echo "::error::Timeout of $TIMEOUT_MINUTES minutes reached. The Yamato job '$CHECK_NAME' did not complete in time." + exit 1 + fi - # --- Get PR Checks using GitHub CLI --- - # https://cli.github.com/manual/gh_pr_checks - # This command gets all checks for the current PR in JSON format - checks_json=$(gh pr checks ${{ github.event.pull_request.number }} --json name,state) + # --- Get PR Checks using GitHub CLI --- + # https://cli.github.com/manual/gh_pr_checks + # This command gets all checks for the current PR in JSON format + checks_json=$(gh pr checks ${{ github.event.pull_request.number }} --json name,state) - # --- Find our specific check using jq --- - check_status=$(echo "$checks_json" | jq -r ".[] | select(.name == \"$CHECK_NAME\") | .state") + # --- Find our specific check using jq --- + check_status=$(echo "$checks_json" | jq -r ".[] | select(.name == \"$CHECK_NAME\") | .state") - # --- Main Logic --- - if [ -z "$check_status" ]; then - # Case 1: The check has not appeared yet. - if [ $elapsed_seconds -gt $GRACE_PERIOD_SECONDS ]; then - echo "Grace period of $GRACE_PERIOD_SECONDS seconds has passed and the check '$CHECK_NAME' was not found." - echo "Assuming it was not triggered (e.g., docs-only change). Success!" - exit 0 - else - echo "Check '$CHECK_NAME' not found yet. Continuing to poll..." - fi - elif [ "$check_status" == "pending" ]; then - # Case 2: The check is running. - echo "Check '$CHECK_NAME' is currently '$check_status'. Waiting..." - elif [ "$check_status" == "pass" ]; then - # Case 3: The check has finished. - echo "Check '$CHECK_NAME' completed with conclusion: 'success'. Great!" - exit 0 - else - echo "::error::Check '$CHECK_NAME' completed with conclusion: '$check_status'." - exit 1 - fi - else - # Case 4: Something unexpected happened. - echo "::error::Unknown state for check '$CHECK_NAME': '$check_status'." - exit 1 - fi + if [ -z "$check_status" ]; then + # Case 1: The check has not appeared yet. + if [ $elapsed_seconds -gt $GRACE_PERIOD_SECONDS ]; then + echo "Grace period of $GRACE_PERIOD_SECONDS seconds has passed and the check '$CHECK_NAME' was not found." + echo "Assuming it was not triggered (e.g., docs-only change). Success!" + exit 0 + else + echo "Check '$CHECK_NAME' not found yet. Continuing to poll..." + fi + elif [ "$check_status" == "pending" ]; then + # Case 2: The check is running. + echo "Check '$CHECK_NAME' is currently '$check_status'. Waiting..." + elif [ "$check_status" == "pass" ]; then + # Case 3: The check has finished. + echo "Check '$CHECK_NAME' completed with conclusion: 'success'. Great!" + exit 0 + else + echo "::error::Check '$CHECK_NAME' completed with conclusion: '$check_status'." + exit 1 + fi # Wait before the next poll - sleep $POLLING_INTERVAL_SECONDS - done \ No newline at end of file + sleep $POLLING_INTERVAL_SECONDS + done \ No newline at end of file From 345cc8ca679a1b50d8421ce324213827c5949549 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Mon, 22 Sep 2025 15:55:37 +0200 Subject: [PATCH 23/41] Testing code change --- com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs index f4a77abc4c..fe44f7e002 100644 --- a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs @@ -11,7 +11,7 @@ namespace Unity.Netcode.Editor { /// - /// Internal use. Hides the script field for the given component. + /// Internal use. /// public class HiddenScriptEditor : UnityEditor.Editor { From 023383f9fc71bba6906e18fd08096c3fa2b7b7c0 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Mon, 22 Sep 2025 16:07:55 +0200 Subject: [PATCH 24/41] cleanup --- .github/workflows/pr-supervisor.yaml | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index 2d75958a0f..cbfc444feb 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -1,4 +1,6 @@ # GitHub Actions workflow to monitor Yamato CI job state on pull requests +# We are using https://cli.github.com/manual/gh_pr_checks +# The aim is to ensure that conditionally triggered Yamato jobs are completed successfully before allowing merges name: Yamato PR Supervisor @@ -20,8 +22,6 @@ jobs: GRACE_PERIOD_SECONDS: 120 # 2 minutes # How often to poll the GitHub API to see if job has finished (fail or succeeded) POLLING_INTERVAL_SECONDS: 30 - # Max time to wait for the job to finish - TIMEOUT_MINUTES: 360 steps: - name: Checkout repository @@ -31,10 +31,6 @@ jobs: env: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | - # Give Yamato a moment to trigger its jobs - echo "Waiting for 2 minutes to allow Yamato jobs to start..." - sleep 120 - start_time=$(date +%s) timeout_seconds=$((TIMEOUT_MINUTES * 60)) @@ -43,20 +39,8 @@ jobs: while true; do current_time=$(date +%s) elapsed_seconds=$((current_time - start_time)) - - # --- Timeout Check --- - if [ $elapsed_seconds -gt $timeout_seconds ]; then - echo "::error::Timeout of $TIMEOUT_MINUTES minutes reached. The Yamato job '$CHECK_NAME' did not complete in time." - exit 1 - fi - - # --- Get PR Checks using GitHub CLI --- - # https://cli.github.com/manual/gh_pr_checks - # This command gets all checks for the current PR in JSON format - checks_json=$(gh pr checks ${{ github.event.pull_request.number }} --json name,state) - # --- Find our specific check using jq --- - check_status=$(echo "$checks_json" | jq -r ".[] | select(.name == \"$CHECK_NAME\") | .state") + checks_json=$(gh pr checks ${{ github.event.pull_request.number }} --json name,state | jq ".[] | select(.name == \"$CHECK_NAME\")") if [ -z "$check_status" ]; then # Case 1: The check has not appeared yet. @@ -72,7 +56,7 @@ jobs: echo "Check '$CHECK_NAME' is currently '$check_status'. Waiting..." elif [ "$check_status" == "pass" ]; then # Case 3: The check has finished. - echo "Check '$CHECK_NAME' completed with conclusion: 'success'. Great!" + echo "Check '$CHECK_NAME' completed with conclusion: 'success'." exit 0 else echo "::error::Check '$CHECK_NAME' completed with conclusion: '$check_status'." From ae7ca1716156eee3dbc73603a6f3bbc44c5aa953 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Mon, 22 Sep 2025 16:10:50 +0200 Subject: [PATCH 25/41] Naming correction --- .github/workflows/pr-supervisor.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index cbfc444feb..0c1c819ea5 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest env: # The name of the Yamato check to monitor - CHECK_NAME: "Code changes PR checks" + CHECK_NAME: "[Yamato] Code changes PR checks" # How long to wait for the check to appear before assuming it won't run GRACE_PERIOD_SECONDS: 120 # 2 minutes # How often to poll the GitHub API to see if job has finished (fail or succeeded) @@ -43,7 +43,6 @@ jobs: checks_json=$(gh pr checks ${{ github.event.pull_request.number }} --json name,state | jq ".[] | select(.name == \"$CHECK_NAME\")") if [ -z "$check_status" ]; then - # Case 1: The check has not appeared yet. if [ $elapsed_seconds -gt $GRACE_PERIOD_SECONDS ]; then echo "Grace period of $GRACE_PERIOD_SECONDS seconds has passed and the check '$CHECK_NAME' was not found." echo "Assuming it was not triggered (e.g., docs-only change). Success!" @@ -52,10 +51,8 @@ jobs: echo "Check '$CHECK_NAME' not found yet. Continuing to poll..." fi elif [ "$check_status" == "pending" ]; then - # Case 2: The check is running. echo "Check '$CHECK_NAME' is currently '$check_status'. Waiting..." elif [ "$check_status" == "pass" ]; then - # Case 3: The check has finished. echo "Check '$CHECK_NAME' completed with conclusion: 'success'." exit 0 else From bf1cbb5f21011a2bf10cf2f8335c99faea1030b7 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Mon, 22 Sep 2025 16:18:30 +0200 Subject: [PATCH 26/41] simplified workflow --- .github/workflows/pr-supervisor.yaml | 42 ++-------------------------- 1 file changed, 2 insertions(+), 40 deletions(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index 0c1c819ea5..bfe6a46016 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -15,14 +15,6 @@ on: jobs: yamato-supervisor: runs-on: ubuntu-latest - env: - # The name of the Yamato check to monitor - CHECK_NAME: "[Yamato] Code changes PR checks" - # How long to wait for the check to appear before assuming it won't run - GRACE_PERIOD_SECONDS: 120 # 2 minutes - # How often to poll the GitHub API to see if job has finished (fail or succeeded) - POLLING_INTERVAL_SECONDS: 30 - steps: - name: Checkout repository uses: actions/checkout@v4 @@ -31,35 +23,5 @@ jobs: env: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | - start_time=$(date +%s) - timeout_seconds=$((TIMEOUT_MINUTES * 60)) - - echo "Starting to monitor for the state of check: '$CHECK_NAME'" - - while true; do - current_time=$(date +%s) - elapsed_seconds=$((current_time - start_time)) - - checks_json=$(gh pr checks ${{ github.event.pull_request.number }} --json name,state | jq ".[] | select(.name == \"$CHECK_NAME\")") - - if [ -z "$check_status" ]; then - if [ $elapsed_seconds -gt $GRACE_PERIOD_SECONDS ]; then - echo "Grace period of $GRACE_PERIOD_SECONDS seconds has passed and the check '$CHECK_NAME' was not found." - echo "Assuming it was not triggered (e.g., docs-only change). Success!" - exit 0 - else - echo "Check '$CHECK_NAME' not found yet. Continuing to poll..." - fi - elif [ "$check_status" == "pending" ]; then - echo "Check '$CHECK_NAME' is currently '$check_status'. Waiting..." - elif [ "$check_status" == "pass" ]; then - echo "Check '$CHECK_NAME' completed with conclusion: 'success'." - exit 0 - else - echo "::error::Check '$CHECK_NAME' completed with conclusion: '$check_status'." - exit 1 - fi - - # Wait before the next poll - sleep $POLLING_INTERVAL_SECONDS - done \ No newline at end of file + sleep 30 + gh pr checks ${{ github.event.pull_request.number }} --watch --fail-fast --interval 30 \ No newline at end of file From d6f5b2e57fe4e60118666c7abaee685f6445382d Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Mon, 22 Sep 2025 16:21:01 +0200 Subject: [PATCH 27/41] reverted code change --- .github/workflows/pr-supervisor.yaml | 2 +- com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index bfe6a46016..906497d335 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -24,4 +24,4 @@ jobs: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | sleep 30 - gh pr checks ${{ github.event.pull_request.number }} --watch --fail-fast --interval 30 \ No newline at end of file + gh pr checks ${{ github.event.pull_request.number }} --watch --fail-fast --interval 60 \ No newline at end of file diff --git a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs index fe44f7e002..f4a77abc4c 100644 --- a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs @@ -11,7 +11,7 @@ namespace Unity.Netcode.Editor { /// - /// Internal use. + /// Internal use. Hides the script field for the given component. /// public class HiddenScriptEditor : UnityEditor.Editor { From e5ec5055f759c159dc31f77c992d3aae697f8c3f Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Mon, 22 Sep 2025 16:29:18 +0200 Subject: [PATCH 28/41] more comments --- .github/workflows/pr-supervisor.yaml | 3 +++ .yamato/_triggers.yml | 16 ++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index 906497d335..0bcb0750c4 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -2,6 +2,9 @@ # We are using https://cli.github.com/manual/gh_pr_checks # The aim is to ensure that conditionally triggered Yamato jobs are completed successfully before allowing merges +# This job will be required in branch protection rules for develop, develop-2.0.0, and release/* branches. It's only goal will be to ensure that Yamato jobs are completed successfully before allowing Pr to merge. +# Note that conditional jobs will have 30s to show which is always the cas since they are showing up as soon as in distribution stage. + name: Yamato PR Supervisor on: diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index e5c78abb58..ec379d091b 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -4,6 +4,8 @@ # DESCRIPTION-------------------------------------------------------------------------- # This configuration defines three main CI trigger patterns: # 1. Pull Request Validation: Validation performed on PR basis + # - we have mandatory minimal checks that run on all PRs (even if only docs are changed) + # - we have more extensive pr_code_changes_checks that run if code is changed # 2. Nightly Development: Test set run nightly (validates most important test cases) # 3. Weekly Full Validation: Test set run weekly (validates all test cases to prevent any surprises) # Each pattern represents different balance between validation depth, execution time and CI resource usage @@ -11,12 +13,14 @@ # TRIGGER PATTERNS------------------------------------------------------------------- # Pull Request: - # This test validates Standards, Package tests, Project tests and Desktop standalone tests to ensure that main platforms are covered - # Focuses on critical validation paths that we should validate before merging PRs. It also cancels previous runs on new commits - # By default it's triggered if + # We have two PR triggers: + # 1) Minimal PR checks that run on all PRs (even if only docs are changed) + # 2) More extensive pr_code_changes_checks that run if code is changed. This test validates Standards, Package tests, Project tests and Desktop standalone tests to ensure that main platforms are covered + # By default pr_minimal_required_checks it's triggered if # 1) PR targets develop, develop-2.0.0 or release branches # 2) PR is not a draft - # 3) PR changes files in package or testproject folders (doesn't run on for example DOCS only changes) + # Then pr_code_changes_checks it's triggered if the same conditions apply plus: + # 1) PR changes code in com.unity.netcode.gameobjects package (Editor, Runtime or Tests folders) or in testproject folder or package.json file # Note that in other cases you can trigger it by writing a comment "/ci ngo" in the PR thread @@ -44,7 +48,7 @@ # After some experimenting with CI setups we discovered that even though sometimes we don't need CI to run (no reason to run package tests if only Documentation is changed) there are some checks that devs may not realize but changes in seemingly unrelated files will cause their failures # This trigger was created to ensure that ALL PRs run this minimal check even when we don't need to run full tests -minimal_required_checks: +pr_minimal_required_checks: name: Minimal PR checks dependencies: - .yamato/package-pack.yml#package_pack_-_ngo_win @@ -64,7 +68,7 @@ minimal_required_checks: # This job will FIRST run "run_quick_checks" jobs (defined in _run-all.yml) since it's the dependency of project pack jobs which is on the lowest dependency tier. This runs the fastest checks (like PVP or code standards) and ONLY IF those pass it will run the rest of the tests. # This optimization allows to speed up feedback look for any "obvious" errors and save resources. # Since standards job is a part of initial checks it's not present as direct dependency here!!!!!!!!!!!!!!!!!!!! -code_changes_checks: +pr_code_changes_checks: name: Code changes PR checks # Run the following tests on a selection of different desktop platforms dependencies: From 12deb8d02446f5269576bbf8700c7ae268617702 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Mon, 22 Sep 2025 17:01:43 +0200 Subject: [PATCH 29/41] code change test --- com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs index f4a77abc4c..39b0655adf 100644 --- a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs @@ -11,7 +11,7 @@ namespace Unity.Netcode.Editor { /// - /// Internal use. Hides the script field for the given component. + /// Internal use /// public class HiddenScriptEditor : UnityEditor.Editor { From 97d29b1d4f9257f9c8040195d23ba3de502bf58a Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Tue, 23 Sep 2025 11:15:32 +0200 Subject: [PATCH 30/41] Updated pr-supervisor script to extend timeout to 12h and modified logic to not wait for itself --- .github/workflows/pr-supervisor.yaml | 31 +++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index 0bcb0750c4..68eab9f811 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -18,6 +18,7 @@ on: jobs: yamato-supervisor: runs-on: ubuntu-latest + timeout-minutes: 720 steps: - name: Checkout repository uses: actions/checkout@v4 @@ -25,6 +26,34 @@ jobs: - name: Wait and Verify Yamato Job Status env: GH_TOKEN: ${{ secrets.GH_TOKEN }} + PR_NUMBER: ${{ github.event.pull_request.number }} run: | + set -e sleep 30 - gh pr checks ${{ github.event.pull_request.number }} --watch --fail-fast --interval 60 \ No newline at end of file + + MAX_ATTEMPTS=$((12*60)) + INTERVAL=60 + + for ((i=1;i<=MAX_ATTEMPTS;i++)); do + echo "Polling PR checks (attempt $i/$MAX_ATTEMPTS)..." + # We want to watch for pending checks beside this check + checks=$(gh pr checks $PR_NUMBER --json name,state --jq '[ .[] | select(.name != "yamato-supervisor") ]') + + pending=$(echo "$checks" | jq '[.[] | select(.state == "pending")] | length') + skipping=$(echo "$checks" | jq '[.[] | select(.state == "skipping")] | length') + failed=$(echo "$checks" | jq '[.[] | select(.state == "fail")] | length') + + if [[ "$failed" -gt 0 ]]; then + echo "A check has failed! Failing fast." + exit 1 + fi + + echo "Pending checks: $pending, Skipping checks: $skipping" + + if [[ "$pending" -eq 0 ]]; then + echo "All non-supervisor checks are completed!" + exit 0 + fi + + sleep $INTERVAL + done \ No newline at end of file From 8b34e6dfcc15f93f54e419199868a14b617c15ac Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Tue, 23 Sep 2025 11:54:12 +0200 Subject: [PATCH 31/41] Updated command to pass only after at least 1 job passed --- .github/workflows/pr-supervisor.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index 68eab9f811..41d8f6580c 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -42,15 +42,16 @@ jobs: pending=$(echo "$checks" | jq '[.[] | select(.state == "pending")] | length') skipping=$(echo "$checks" | jq '[.[] | select(.state == "skipping")] | length') failed=$(echo "$checks" | jq '[.[] | select(.state == "fail")] | length') + passed=$(echo "$checks" | jq '[.[] | select(.state == "pass")] | length') + + echo "Pending checks: $pending, Skipping checks: $skipping", Passed checks: $passed, Failed checks: $failed if [[ "$failed" -gt 0 ]]; then echo "A check has failed! Failing fast." exit 1 fi - echo "Pending checks: $pending, Skipping checks: $skipping" - - if [[ "$pending" -eq 0 ]]; then + if [[ "$pending" -eq 0 ]] && [[ "$passed" -gt 0 ]]; then echo "All non-supervisor checks are completed!" exit 0 fi From 17390ab54d7420077d1ea71f93fe06f17b5c868b Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Tue, 23 Sep 2025 14:58:24 +0200 Subject: [PATCH 32/41] debugging --- .github/workflows/pr-supervisor.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index 41d8f6580c..2fc4302004 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -37,7 +37,12 @@ jobs: for ((i=1;i<=MAX_ATTEMPTS;i++)); do echo "Polling PR checks (attempt $i/$MAX_ATTEMPTS)..." # We want to watch for pending checks beside this check + echo "Raw checks:" + gh pr checks $PR_NUMBER --json name,state checks=$(gh pr checks $PR_NUMBER --json name,state --jq '[ .[] | select(.name != "yamato-supervisor") ]') + + checks=$(gh pr checks $PR_NUMBER --json name,state) + echo "$checks" | jq . pending=$(echo "$checks" | jq '[.[] | select(.state == "pending")] | length') skipping=$(echo "$checks" | jq '[.[] | select(.state == "skipping")] | length') From 283f0fd4ffa0d53434e75756edbf1e3618649cac Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Tue, 23 Sep 2025 15:01:01 +0200 Subject: [PATCH 33/41] corrected values --- .github/workflows/pr-supervisor.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index 2fc4302004..f8c4338a3c 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -44,10 +44,10 @@ jobs: checks=$(gh pr checks $PR_NUMBER --json name,state) echo "$checks" | jq . - pending=$(echo "$checks" | jq '[.[] | select(.state == "pending")] | length') - skipping=$(echo "$checks" | jq '[.[] | select(.state == "skipping")] | length') - failed=$(echo "$checks" | jq '[.[] | select(.state == "fail")] | length') - passed=$(echo "$checks" | jq '[.[] | select(.state == "pass")] | length') + pending=$(echo "$checks" | jq '[.[] | select(.state == "IN_PROGRESS")] | length') + skipping=$(echo "$checks" | jq '[.[] | select(.state == "SKIPPED")] | length') + passed=$(echo "$checks" | jq '[.[] | select(.state == "SUCCESS")] | length') + failed=$(echo "$checks" | jq '[.[] | select(.state == "FAILURE")] | length') echo "Pending checks: $pending, Skipping checks: $skipping", Passed checks: $passed, Failed checks: $failed From d1b97b93c32cb2aaccf19460e6570836bf88e529 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Tue, 23 Sep 2025 15:03:11 +0200 Subject: [PATCH 34/41] removed debugging --- .github/workflows/pr-supervisor.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index f8c4338a3c..1615073b63 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -29,20 +29,17 @@ jobs: PR_NUMBER: ${{ github.event.pull_request.number }} run: | set -e - sleep 30 + MAX_ATTEMPTS=$((12*60)) INTERVAL=60 + sleep $INTERVAL for ((i=1;i<=MAX_ATTEMPTS;i++)); do echo "Polling PR checks (attempt $i/$MAX_ATTEMPTS)..." + # We want to watch for pending checks beside this check - echo "Raw checks:" - gh pr checks $PR_NUMBER --json name,state checks=$(gh pr checks $PR_NUMBER --json name,state --jq '[ .[] | select(.name != "yamato-supervisor") ]') - - checks=$(gh pr checks $PR_NUMBER --json name,state) - echo "$checks" | jq . pending=$(echo "$checks" | jq '[.[] | select(.state == "IN_PROGRESS")] | length') skipping=$(echo "$checks" | jq '[.[] | select(.state == "SKIPPED")] | length') From f710b00d02982bf268019d3d459ed47439c56842 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Tue, 23 Sep 2025 15:26:47 +0200 Subject: [PATCH 35/41] debug --- .github/workflows/pr-supervisor.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index 1615073b63..dd0407043b 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -40,6 +40,7 @@ jobs: # We want to watch for pending checks beside this check checks=$(gh pr checks $PR_NUMBER --json name,state --jq '[ .[] | select(.name != "yamato-supervisor") ]') + echo gh pr checks $PR_NUMBER --json name,state pending=$(echo "$checks" | jq '[.[] | select(.state == "IN_PROGRESS")] | length') skipping=$(echo "$checks" | jq '[.[] | select(.state == "SKIPPED")] | length') From cdb45d6b2c037f3549550f2a34c5449327195396 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Tue, 23 Sep 2025 15:32:01 +0200 Subject: [PATCH 36/41] debug --- .github/workflows/pr-supervisor.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index dd0407043b..a3bc873cc0 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -40,7 +40,8 @@ jobs: # We want to watch for pending checks beside this check checks=$(gh pr checks $PR_NUMBER --json name,state --jq '[ .[] | select(.name != "yamato-supervisor") ]') - echo gh pr checks $PR_NUMBER --json name,state + debugChecks=$(gh pr checks $PR_NUMBER --json name,state) + echo "debugChecks" | jq . pending=$(echo "$checks" | jq '[.[] | select(.state == "IN_PROGRESS")] | length') skipping=$(echo "$checks" | jq '[.[] | select(.state == "SKIPPED")] | length') From c992ea2026df3e945633600666ef0bd51610cac6 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Tue, 23 Sep 2025 15:34:15 +0200 Subject: [PATCH 37/41] typo --- .github/workflows/pr-supervisor.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index a3bc873cc0..53322e8f54 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -41,7 +41,7 @@ jobs: # We want to watch for pending checks beside this check checks=$(gh pr checks $PR_NUMBER --json name,state --jq '[ .[] | select(.name != "yamato-supervisor") ]') debugChecks=$(gh pr checks $PR_NUMBER --json name,state) - echo "debugChecks" | jq . + echo "$debugChecks" | jq . pending=$(echo "$checks" | jq '[.[] | select(.state == "IN_PROGRESS")] | length') skipping=$(echo "$checks" | jq '[.[] | select(.state == "SKIPPED")] | length') From 54699bddee9e0c71a4460865865310c1445cfe66 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Tue, 23 Sep 2025 15:36:47 +0200 Subject: [PATCH 38/41] corrected name --- .github/workflows/pr-supervisor.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index 53322e8f54..c05c731a0b 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -40,10 +40,9 @@ jobs: # We want to watch for pending checks beside this check checks=$(gh pr checks $PR_NUMBER --json name,state --jq '[ .[] | select(.name != "yamato-supervisor") ]') - debugChecks=$(gh pr checks $PR_NUMBER --json name,state) - echo "$debugChecks" | jq . + echo "$checks" | jq . - pending=$(echo "$checks" | jq '[.[] | select(.state == "IN_PROGRESS")] | length') + pending=$(echo "$checks" | jq '[.[] | select(.state == "PENDING")] | length') skipping=$(echo "$checks" | jq '[.[] | select(.state == "SKIPPED")] | length') passed=$(echo "$checks" | jq '[.[] | select(.state == "SUCCESS")] | length') failed=$(echo "$checks" | jq '[.[] | select(.state == "FAILURE")] | length') From 3b6f5ef041b804b16733555f60ec32bb884a6bb7 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Tue, 23 Sep 2025 15:38:55 +0200 Subject: [PATCH 39/41] cleaned debug --- .github/workflows/pr-supervisor.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index c05c731a0b..f0cce19c83 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -40,7 +40,6 @@ jobs: # We want to watch for pending checks beside this check checks=$(gh pr checks $PR_NUMBER --json name,state --jq '[ .[] | select(.name != "yamato-supervisor") ]') - echo "$checks" | jq . pending=$(echo "$checks" | jq '[.[] | select(.state == "PENDING")] | length') skipping=$(echo "$checks" | jq '[.[] | select(.state == "SKIPPED")] | length') From af8b03110632234802a1096cdbbaab9458b446fd Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Tue, 23 Sep 2025 15:42:42 +0200 Subject: [PATCH 40/41] added concurrency check so old workflow gets cancelled --- .github/workflows/pr-supervisor.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pr-supervisor.yaml b/.github/workflows/pr-supervisor.yaml index f0cce19c83..fe0ebbd6d7 100644 --- a/.github/workflows/pr-supervisor.yaml +++ b/.github/workflows/pr-supervisor.yaml @@ -14,6 +14,10 @@ on: - develop - develop-2.0.0 - release/* + +concurrency: + group: pr-${{ github.event.pull_request.number }} + cancel-in-progress: true jobs: yamato-supervisor: From d175aa710a3b8b55a326c6b93f2ede6e9c41f065 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Tue, 23 Sep 2025 16:14:34 +0200 Subject: [PATCH 41/41] Revert "code change test" This reverts commit 12deb8d02446f5269576bbf8700c7ae268617702. --- com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs index 39b0655adf..f4a77abc4c 100644 --- a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs @@ -11,7 +11,7 @@ namespace Unity.Netcode.Editor { /// - /// Internal use + /// Internal use. Hides the script field for the given component. /// public class HiddenScriptEditor : UnityEditor.Editor {