Replace the bespoke BRP schedule.graph implementation with ScheduleData.#23733
Merged
alice-i-cecile merged 1 commit intobevyengine:mainfrom Apr 9, 2026
Merged
Replace the bespoke BRP schedule.graph implementation with ScheduleData.#23733alice-i-cecile merged 1 commit intobevyengine:mainfrom
alice-i-cecile merged 1 commit intobevyengine:mainfrom
Conversation
477b5c8 to
622c671
Compare
Contributor
Author
|
This endpoint was only added in the 0.19 cycle (#23452), so no migration is needed. |
alice-i-cecile
approved these changes
Apr 9, 2026
Member
alice-i-cecile
left a comment
There was a problem hiding this comment.
I would much prefer to standardize on this!
Zeophlite
approved these changes
Apr 9, 2026
ChristopherBiscardi
approved these changes
Apr 9, 2026
kfc35
approved these changes
Apr 9, 2026
viridia
pushed a commit
to viridia/bevy
that referenced
this pull request
Apr 10, 2026
…ta. (bevyengine#23733) # Objective - A possible step towards bevyengine#10981. - Followup to bevyengine#22520. - We accidentally have two implementations of the same thing! We created a way to collect schedule data in `bevy_dev_tools` and in `bevy_remote`. `ScheduleData` is a more complete implementation of collecting schedule data, and is less tied to the internals of BRP (e.g., it supports serializing to disk instead of only through the BRP API), so we switch to that. ## Solution - Replace the implementation of `schedule.graph` with the `ScheduleData` API. A disadvantage is that we now need to wait for the schedules to be initialized before we can read them. Since users have to connect with BRP though, it is almost certain that the schedules will be initialized by the time they request the schedules. This may not be true of schedules like state transitions though - since these only run rarely. In a future PR, we can build the schedules on-demand instead. ## Testing - Updated the test for this. - Ran the same test as bevyengine#23452 - Terminal 1: `cargo r --example server --features=bevy_remote` - Terminal 2: `curl -d'{"jsonrpc":"2.0","method":"schedule.graph","id":1,"params":{"schedule_label":"First"}}' -X POST -H "Accept: applcation/json" -H "Content-Type: application/json" http://127.0.0.1:15702` - It dumped out a whole load of JSON that looked expected! - I don't have a visualization of the schedule data yet, so I can't validate that it's correct, but there's no reason to believe its wrong given the existing `ScheduleData` tests.
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.
Objective
bevy_dev_toolsand inbevy_remote.ScheduleDatais a more complete implementation of collecting schedule data, and is less tied to the internals of BRP (e.g., it supports serializing to disk instead of only through the BRP API), so we switch to that.Solution
schedule.graphwith theScheduleDataAPI.A disadvantage is that we now need to wait for the schedules to be initialized before we can read them. Since users have to connect with BRP though, it is almost certain that the schedules will be initialized by the time they request the schedules. This may not be true of schedules like state transitions though - since these only run rarely. In a future PR, we can build the schedules on-demand instead.
Testing
schedule.graphendpoint #23452cargo r --example server --features=bevy_remotecurl -d'{"jsonrpc":"2.0","method":"schedule.graph","id":1,"params":{"schedule_label":"First"}}' -X POST -H "Accept: applcation/json" -H "Content-Type: application/json" http://127.0.0.1:15702ScheduleDatatests.