Skip to content

[13/n] [meta] migrate BGP config IDs to typed UUIDs#10654

Merged
sunshowers merged 4 commits into
mainfrom
sunshowers/spr/13n-meta-migrate-bgp-config-ids-to-typed-uuids
Jul 2, 2026
Merged

[13/n] [meta] migrate BGP config IDs to typed UUIDs#10654
sunshowers merged 4 commits into
mainfrom
sunshowers/spr/13n-meta-migrate-bgp-config-ids-to-typed-uuids

Conversation

@sunshowers

@sunshowers sunshowers commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

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
opctx,
&bgp_config_id
.into_untyped_uuid()
.into(),

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.

Should we have a From<TypedUuid<T>> for NameOrId? (I don't have strong feelings and don't remember seeing this two-step conversion before now)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I'm not sure to be honest! In general I hesitate to suggest From impls due to their potential for magic. But also maybe this one is okay because we're losing information.

Another option is to introduce a separate TypedUuid method/enum variant here, or even add a NameOrTypedUuid<T>.

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.

Yeah, I'm not sure either. I'm fine with just leaving this as-is too; we can always revisit if it starts to pop up more.

@sunshowers sunshowers changed the base branch from sunshowers/spr/main.13n-meta-migrate-bgp-config-ids-to-typed-uuids to main July 2, 2026 03:10
Created using spr 1.3.6-beta.1
@sunshowers sunshowers merged commit e1941b8 into main Jul 2, 2026
20 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/13n-meta-migrate-bgp-config-ids-to-typed-uuids branch July 2, 2026 06:13
sunshowers added a commit that referenced this pull request Jul 2, 2026
Previously, we'd silently pick one of the BGP configs. That seems wrong
-- let's reject this situation outright.

This is a functional change similar to the earlier one in #10650, where
a previously-invalid state was silently accepted and is now rejected.

Like in the earlier commits in the stack, I haven't touched the
non-bootstore paths in this PR to avoid colliding with other work. But
they have the same issue as well where they silently pick one.

Depends on:

* #10654
* earlier commits in the stack
nicolaskagami added a commit that referenced this pull request Jul 3, 2026
Fixes a mismerge between #10609 and #10654.

Only `test_bgp_config_by_name` is affected.
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