Skip to content

[3/n] [sync-switch] move bfd and address lot reads back to bg task, make the builder pure#10644

Merged
sunshowers merged 5 commits into
mainfrom
sunshowers/spr/3n-sync-switch-move-bfd-and-address-lot-reads-back-to-bg-task-make-the-builder-pure
Jun 28, 2026
Merged

[3/n] [sync-switch] move bfd and address lot reads back to bg task, make the builder pure#10644
sunshowers merged 5 commits into
mainfrom
sunshowers/spr/3n-sync-switch-move-bfd-and-address-lot-reads-back-to-bg-task-make-the-builder-pure

Conversation

@sunshowers

@sunshowers sunshowers commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Move the infra address-lot and BFD reads back into the caller, passing their results in via a new RackNetworkConfigInput struct. With those gone, the builder performs no database access at all, so it becomes a synchronous, pure function.

The nexus-switch-config crate still has dependencies on nexus-db-model and nexus-db-queries, but those are only for types. Later commits in the series will introduce domain types and get rid of this dependency.

This commit reorders some reads slightly, but otherwise is meant to be pure refactoring with no functional changes.

Depends on:

Created using spr 1.3.6-beta.1

[skip ci]
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1

[skip ci]
Created using spr 1.3.6-beta.1

@andrewjstone andrewjstone left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it!

@sunshowers sunshowers changed the base branch from sunshowers/spr/main.3n-sync-switch-move-bfd-and-address-lot-reads-back-to-bg-task-make-the-builder-pure to main June 28, 2026 10:14
Created using spr 1.3.6-beta.1
@sunshowers sunshowers enabled auto-merge (squash) June 28, 2026 10:14
@sunshowers sunshowers merged commit 8c857d2 into main Jun 28, 2026
19 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/3n-sync-switch-move-bfd-and-address-lot-reads-back-to-bg-task-make-the-builder-pure branch June 28, 2026 11:26
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.

2 participants