Skip to content

Conversation

mob-sakai
Copy link
Contributor

@mob-sakai mob-sakai commented Oct 8, 2025

The error is caused by old unity-changeset that doesn't support GraphQL.

Changes

  • upgrade unity-changeset@^2.0.0 to unity-changeset@^3.0.0

Related Issues

Related PRs

  • None

Successful Workflow Run Link

PRs don't have access to secrets so you will need to provide a link to a successful run of the workflows from your own
repo.

  • None

Checklist

  • Read the contribution guide and accept the
    code of conduct
  • Docs (If new inputs or outputs have been added or changes to behavior that should be documented. Please make a PR
    in the documentation repo)
  • Readme (updated or not needed)
  • Tests (added, updated or not needed)
  • Build with npm run build

Summary by CodeRabbit

  • Chores
    • Updated a core dependency to the latest major version to maintain compatibility and incorporate upstream improvements. No user-facing behavior changes expected.

This error is caused by old `unity-changeset` that doesn't support GraphQL.
Copy link

github-actions bot commented Oct 8, 2025

Cat Gif

Copy link

coderabbitai bot commented Oct 8, 2025

📝 Walkthrough

Walkthrough

Updates dependency version of unity-changeset in package.json from ^2.0.0 to ^3.0.0 and adjusts end-of-file newline.

Changes

Cohort / File(s) Summary
Dependency bump
package.json
Upgrade unity-changeset from ^2.0.0 to ^3.0.0; normalized end-of-file newline

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested reviewers

  • GabLeRoux

Poem

I twitch my nose at version three,
A tidy hop from two to be—
Dependencies aligned just so,
Carrot commits that softly grow.
One newline tucked, we’re bounded neat,
Thump-thump: the release feels fleet! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The description covers the required sections for Changes, Related Issues, Related PRs, and Checklist with clear details on the upgrade, but the “Successful Workflow Run Link” section is left empty without a provided link to an actual workflow run. Please update the “Successful Workflow Run Link” section with a link to a successful CI workflow execution from your own repository so that reviewers can verify the build and tests pass.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly describes the specific error being fixed (“No changesets found” on MacOS) and follows the repository’s conventional “fix:” prefix, clearly summarizing the main change in a single sentence.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 88a89c9 and 3ca788a.

⛔ Files ignored due to path filters (4)
  • dist/index.js is excluded by !**/dist/**
  • dist/index.js.map is excluded by !**/dist/**, !**/*.map
  • dist/licenses.txt is excluded by !**/dist/**
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • package.json (2 hunks)
🔇 Additional comments (1)
package.json (1)

53-53: Lockfile updated
Yarn.lock now includes [email protected]; bump is applied.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

codecov bot commented Oct 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.34%. Comparing base (88a89c9) to head (3ca788a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #747   +/-   ##
=======================================
  Coverage   38.34%   38.34%           
=======================================
  Files          78       78           
  Lines        3169     3169           
  Branches      663      663           
=======================================
  Hits         1215     1215           
  Misses       1809     1809           
  Partials      145      145           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GabLeRoux
Copy link
Member

GabLeRoux commented Oct 8, 2025

Thanks for the fix 🎉
LGTM! 🫶


While reviewing, I asked myself why this change was necessary for unity-builder but not for unity-test-runner. Short answer: The test runner doesn't support executing tests on a macos runner.

If we plan to support executing tests directly on macos, we might want to consider extracting src/model/platform-setup/setup-mac.ts (where unity-changeset is currently used) as a shared dependency, but that is out of scope for this fix.

Here's a more detailed analysis (claude-4.5-sonnet)

Analysis: Why unity-builder uses unity-changeset but unity-test-runner doesn't

Based on my exploration of both projects, here's the key difference:

Unity Builder - Installs Unity Editor on macOS

unity-builder has platform-specific setup that installs Unity Editor when running on macOS (and potentially other platforms). Looking at the code:

const unityChangeset = await getUnityChangeset(buildParameters.editorVersion);
const moduleArguments = SetupMac.getModuleParametersForTargetPlatform(buildParameters.targetPlatform);
const architectureArguments = SetupMac.getArchitectureParameters();

const execArguments: string[] = [
  '--',
  '--headless',
  'install',
  ...['--version', buildParameters.editorVersion],
  ...['--changeset', unityChangeset.changeset],

Key point: When installing Unity via Unity Hub CLI, you need both the version number (e.g., 2021.3.1f1) and the changeset hash (e.g., a8c0cf11e2ae) to uniquely identify and install the correct Unity Editor build.

Unity Test Runner - Uses Docker Containers

unity-test-runner has a fundamentally different architecture:

get supportedPlatforms() {
  return ['linux', 'win32'];

It only supports Linux and Windows and runs tests inside Docker containers (see Docker.run() in main.ts). It doesn't install Unity locally - it uses pre-built Docker images that already have Unity installed.

The PR Fix

The PR #747 you referenced upgrades unity-changeset from ^2.0.0 to ^3.0.0 because:

  1. Version 2.x was failing with "No changesets found" errors on macOS
  2. Version 3.x uses GraphQL instead of scraping HTML pages from Unity's website, making it more reliable
  3. This issue was specific to the changeset lookup mechanism that broke when Unity changed their website structure

Summary Table

Aspect unity-builder unity-test-runner
Platforms Linux, Windows, macOS Linux, Windows only
Unity Setup Installs Unity locally on macOS via Unity Hub CLI Uses pre-built Docker images
Needs Changeset? ✅ Yes - required for Unity Hub installation ❌ No - Docker images already have Unity
Dependency unity-changeset@^3.0.0 None

Why the Changeset is Needed

Unity Hub CLI requires the changeset hash because Unity versions aren't truly unique by version string alone. The same version number can have different builds (e.g., for hotfixes), and the changeset uniquely identifies the exact binary.

The unity-changeset package queries Unity's version database to map version strings → changeset hashes, which is exactly what breaks when Unity changes their API (hence the v2→v3 upgrade).

Since unity-test-runner never installs Unity (it just runs containers), it never needs to look up changesets, so it doesn't need this dependency.

@webbertakken
Copy link
Member

We're probably going to need a similar fix in Versioning backend to fix game-ci/documentation#510

@webbertakken webbertakken merged commit 8ec161b into game-ci:main Oct 8, 2025
6 checks passed
@webbertakken
Copy link
Member

@mob-sakai Looks like the unity-changesets doesn't have graphql listed as a prod dependency?

Workflows are showing Error: Cannot find module 'graphql'

@GabLeRoux
Copy link
Member

@mob-sakai Looks like the unity-changesets doesn't have graphql listed as a prod dependency?

Workflows are showing Error: Cannot find module 'graphql'

As a workaround, we can install the GraphQL dependency ourselves, but fixing this upstream sounds ideal.

@webbertakken
Copy link
Member

I'm pressed for time atm. Can do quick replies but not PRs

@ozankasikci
Copy link
Contributor

Workflows are showing Error: Cannot find module 'graphql'

having the same issue here, can we expect a quick fix or should we install graphql on our servers as a workaround?

@webbertakken
Copy link
Member

Workaround is downgrade to v4.6.1.

But the fix should also be simple. We just need the dependency installed. or for the unity-changeset tool to include it.

@ozankasikci
Copy link
Contributor

@webbertakken I've just opened a PR to fix the issue: #749

@mob-sakai
Copy link
Contributor Author

@mob-sakai Looks like the unity-changesets doesn't have graphql listed as a prod dependency?

Workflows are showing Error: Cannot find module 'graphql'

Wow, sorry for the trouble everyone.

@webbertakken
Copy link
Member

@mob-sakai no worries of course! Actually thank you so much for helping out.

Do you think it's possible to make the executable include graphql? or have it install it as a prod dev internally?

@mob-sakai
Copy link
Contributor Author

Yeah, no problem! 👍
I checked and there were warnings about peer dependencies.
I missed them.

unity-builder $ yarn install

...

warning "unity-changeset > [email protected]" has unmet peer dependency "graphql@14 - 16".
warning "unity-changeset > graphql-request > @graphql-typed-document-node/[email protected]" has unmet peer dependency "graphql@^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0".

...

@mob-sakai
Copy link
Contributor Author

Released as [email protected].
Should I PR this project?

$ npm view [email protected] dependencies
{
  'graphql-request': '6.1.0',
  '@deno/shim-deno': '~0.18.0',
  graphql: '^16.8.1'
}

@webbertakken
Copy link
Member

It's no longer a peer dependency if it's absolutely required to run the tool.

Shall we move them to prod dependencies instead?

Looking at your second comment, that is exactly what you did. Sounds good!

@webbertakken
Copy link
Member

Can confirm that 3.0.1 works as expected.

See game-ci/versioning-backend#67 and game-ci/versioning-backend#68

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.

4 participants