Skip to content

Conversation

@yuandrew
Copy link
Contributor

@yuandrew yuandrew commented Dec 4, 2025

What was changed

Use HashSet instead of Vec for plugins

Why?

To better enforce deduping duplicate plugin names. Note, due to Version being a part of the struct, this doesn't fully dedupe plugins with the same names (when they have different versions), but it still helps.

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

Note

Replace plugin list with a HashSet across worker config/bridge and sort by name when emitting heartbeats; update tests accordingly.

  • Core config:
    • Change WorkerConfig.plugins from Vec<PluginInfo> to HashSet<PluginInfo> in crates/common/src/worker.rs.
  • C-bridge:
    • Convert plugins input to HashSet<_> and build HashSet<PluginInfo> in crates/sdk-core-c-bridge/src/worker.rs.
  • Heartbeat emission:
    • Collect plugins from set and sort by name before sending in WorkerHeartbeat in crates/sdk-core/src/worker/mod.rs.
  • Tests:
    • Update worker_heartbeat_tests.rs to pass plugins as HashSet<PluginInfo>.

Written by Cursor Bugbot for commit 481543d. This will update automatically on new commits. Configure here.

@yuandrew yuandrew requested a review from a team as a code owner December 4, 2025 18:27
@yuandrew yuandrew changed the title Use hashset to dedupe plugin names for Lang Use hashset to dedupe plugin names from Lang Dec 4, 2025
@yuandrew yuandrew enabled auto-merge (squash) December 4, 2025 18:56
@yuandrew yuandrew merged commit 7419ada into temporalio:master Dec 4, 2025
20 checks passed
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