-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(datasource/unity3d): Use Unity Releases API #33240
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,14 @@ | |||
export interface UnityReleasesJSON { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use zod schema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Unity3dDatasource.streams.stable, | ||
Unity3dDatasource.streams.lts, | ||
]; | ||
override readonly defaultRegistryUrls = [Unity3dDatasource.streams.lts]; | ||
|
||
override readonly defaultVersioning = Unity3dVersioning.id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
release timestamp message below needs an update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
static readonly homepage = 'https://unity.com/'; | ||
static readonly streams: Record<string, string> = { | ||
lts: `${Unity3dDatasource.homepage}releases/editor/lts-releases.xml`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need a compatibility helper which translates old registry urls to the new API urls. otherwise this is a breaking change.
another option is to check passed registry url and use old RSS API when an old url is passed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! I used a "translator"
Changes
The API has been changed to use the new Unity Releases API instead of the "old RSS system".
The new API is richer in metadata, allows more granularity by having queries (number of results, stream, os, architecture, version, ...). Example: https://services.api.unity.com/unity/editor/release/v1/releases?stream=LTS&platform=WINDOWS&architecture=X86_64
I have removed many tests that no longer make sense and were there before because of the inconsistencies of the RSS system. This new API has filters and these inconsistencies no longer occur.
I have also aligned the Unity terminology of streams (lts, tech, alpha, beta).
Context
Unity Releases API: https://services.docs.unity.com/release/v1/#tag/Release/operation/getUnityReleases
Example call: https://services.api.unity.com/unity/editor/release/v1/releases?stream=LTS
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: