Allow BRP schedule.graph to initialize the schedules it is collecting.#23743
Open
andriyDev wants to merge 2 commits intobevyengine:mainfrom
Open
Allow BRP schedule.graph to initialize the schedules it is collecting.#23743andriyDev wants to merge 2 commits intobevyengine:mainfrom
schedule.graph to initialize the schedules it is collecting.#23743andriyDev wants to merge 2 commits intobevyengine:mainfrom
Conversation
63fc5bc to
d579593
Compare
kfc35
approved these changes
Apr 10, 2026
| let response = serde_json::from_value::<BrpScheduleGraphResponse>(response).unwrap(); | ||
|
|
||
| // We expect 3 edges thanks to the cached metadata: f1 -> f2, f1 -> apply_deferred -> f2 | ||
| assert_eq!(response.schedule_data.dependency.len(), 3); |
Contributor
There was a problem hiding this comment.
would heavily prefer we asserted that these systems are the systems we expect. I recently ran into a test suite that only used the counts like this in an ecosystem crate and it was more confusing to fix than it needed to be, since the test didn't include which items it expected to exist other than the count.
As an example (anything similar would be fine if you prefer .find or something):
Suggested change
| assert_eq!(response.schedule_data.dependency.len(), 3); | |
| assert!(response.schedule_data.systems[0].name.ends_with("f1")); | |
| assert!(response.schedule_data.systems[1] | |
| .name | |
| .ends_with("apply_deferred")); | |
| assert!(response.schedule_data.systems[2].name.ends_with("f2")); | |
| assert_eq!(response.schedule_data.dependency.len(), 3); |
ChristopherBiscardi
approved these changes
Apr 10, 2026
Zeophlite
approved these changes
Apr 10, 2026
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
ScheduleDataAPI for the BRPschedule.graphendpoint.apply_deferredsystems.Solution
ScheduleBuildMetadatawhenever a schedule is built (theScheduleBuiltevent).schedule.graphruns, and use it to extract the schedule data.Testing