Skip to content

fix(config): apply defaults to generators-list entries (PIPE-1493) - #316

Open
Dylan-M wants to merge 1 commit into
dylanmyers/pipe-1446-support-multiple-simultaneous-outputs-fan-outfrom
dylanmyers/pipe-1493-apply-defaults-to-generators-list-entries
Open

Dylan-M wants to merge 1 commit into
dylanmyers/pipe-1446-support-multiple-simultaneous-outputs-fan-outfrom
dylanmyers/pipe-1493-apply-defaults-to-generators-list-entries

Conversation

@Dylan-M

@Dylan-M Dylan-M commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Proposed Change

Entries in the generators: list did not receive the defaults the singular generator: gets. An entry that omitted a field like workers ran with a zero value and produced nothing. EffectiveGenerators now overlays each list entry onto the defaulted singular Generator, filling unset fields while entry-set fields win.

A config that sets both generator and generators is now rejected at load, since the two together are ambiguous.

Checklist
  • Changes are tested
  • CI has passed

@Dylan-M
Dylan-M requested review from a team as code owners September 22, 2026 21:46
@Dylan-M
Dylan-M force-pushed the dylanmyers/pipe-1446-support-multiple-simultaneous-outputs-fan-out branch from 8495fa9 to 1efedbd Compare September 22, 2026 22:04
…erator+generators

Assisted-By: Claude Opus 4.8
@Dylan-M
Dylan-M force-pushed the dylanmyers/pipe-1493-apply-defaults-to-generators-list-entries branch from 5f4444d to e8839a9 Compare September 22, 2026 22:04
Comment thread internal/config/config.go
Comment on lines +88 to +92
merged := make([]Generator, len(c.Generators))
for i, g := range c.Generators {
m := g
fillZeroFields(reflect.ValueOf(&m).Elem(), reflect.ValueOf(c.Generator))
merged[i] = m

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This has the same zero-fill problem, now for generators:. An explicit wel.manageEventSources: false becomes true, so blitz registers and deregisters event sources (which needs admin) after the user opted out. filegen.cache-enabled: false also becomes true.

This branch has not been deployed

No deployments
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