Skip to content

Optimize GenerateBootstrapData() to handle multiple serial numbers for the same chassis since they share the same bootstrap data.#360

Merged
Chounoki merged 1 commit into
openconfig:mainfrom
Chounoki:pr0
Jul 16, 2026

Conversation

@Chounoki

Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request refactors the GenerateBootstrapData method across the chassis manager and service layers to process a slice of serial numbers in a single call, replacing the previous parallelized errgroup approach. In the test suite, the mock implementation of GenerateBootstrapData was found to assign the same pointer to all elements of the returned slice. Because the service mutates these elements, this shared reference can lead to test interference and flaky tests. It is recommended to clone the mock response template for each element using proto.Clone.

Comment thread server/service/service_test.go
@Chounoki
Chounoki force-pushed the pr0 branch 2 times, most recently from 57ec493 to 0e3b446 Compare July 16, 2026 05:05
…r the same chassis since they share the same bootstrap data.
@Chounoki
Chounoki merged commit e04d0da into openconfig:main Jul 16, 2026
13 checks passed
@Chounoki
Chounoki deleted the pr0 branch July 16, 2026 08:28
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