feat: add device_ids matrix to node schemas#425
Open
Leechael wants to merge 3 commits into
Open
Conversation
A node can expose multiple device_ids (one per dstack OS image version). Add an additive device_ids field (DeviceIdEntry: device_id, os_image_ids, enabled) alongside the existing single device_id on NodeRef and TeepodCapacity across the JS, Python, and Go SDKs. The legacy device_id field is preserved for backward compatibility.
Contributor
📋 Check Results✨ JS SDK - Code FormattingShow format check results🔍 JS SDK - TypeScript Type CheckShow type check output🧪 JS SDK - Test ResultsShow test output📝 JS SDK - Lint CheckShow lint results🌐 JS SDK - Browser CompatibilityShow browser test results🌐 Browser Compatibility ReportBrowser compatibility tests completed across:
The SDK has been verified to work in modern browser environments. Check run: https://github.com/Phala-Network/phala-cloud/actions/runs/26987653631 |
The device_id derivation algorithm (semver, e.g. v2.0.0 / v3.0.0) is now part of each node device_ids entry. Add the algorithm_version field to DeviceIdEntry across the JS, Python, and Go SDKs.
device_id is determined by the node and KMS algorithm version alone; the OS image plays no part, so the matrix entry no longer carries os_image_ids.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Additive support for the node multi-device-id model (backend: Phala-Network/phala-cloud-monorepo#1562).
A physical node can expose multiple device_ids — one per dstack OS image version, because the PPID-to-device_id derivation changed across OS releases. This adds a
device_idsfield (DeviceIdEntry:device_id,os_image_ids,enabled) alongside the existing singledevice_idonNodeRefandTeepodCapacity, across the JS, Python, and Go SDKs.device_idfield is preserved (now the resolved single value);device_idsis additive and defaults to empty.DeviceIdEntrySchema+device_idsonNodeRefSchema/ TeepodCapacity. Python:DeviceIdEntrymodel + field onNodeRef/TeepodCapacity. Go:DeviceIDEntry+DeviceIDsonNodeRef/TeepodCapacity.Validation: JS (725 tests) / Python (54) / Go all green; type-check clean. CLI interface-compat baseline failures are pre-existing in local env and unrelated to this change.