connectors: refactor spawn_source_handler takes 11 parameters
- Dominant language
- Rust
- Stars
- 4.9k
- Forks
- 432
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 173
Description
Split out of the #3795 review at hubcio's suggestion.
`source::spawn_source_handler` is at 11 parameters and carries `#[allow(clippy::too_many_arguments)]`. The natural fix is passing `&SourceConfig` instead of the individual fields.
That is blocked on a prerequisite: `SourceConnectorPlugin` needs the resolved-path/version split first, since the call site currently threads resolved values that are not on `SourceConfig`. So this is follow-up sized rather than a quick tidy, which is why it is an issue rather than a change in #3795.
No behaviour change intended, purely a signature and ownership cleanup.
Contributor guide
Research direction
Start with source::spawn_source_handler and trace its call site through SourceConnectorPlugin. Read the prerequisite resolved-path/version split and how SourceConfig currently represents the remaining values. Done means the handler accepts &SourceConfig, the resolved values are handled separately, and the too-many-arguments allowance can be removed without behavior changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100