Closed cknaap closed 3 weeks ago
This is not a bug, but a feature. Set regenerate to false to get the desired behaviour. I must be missing something ;-)
Offline discussion added some new insights:
true
seems to be not really useful, since -except for some testing usecases- it's not clear why you'd like to snapshot again and again.false
is what most people want: generate the snapshot if it does not exist or re-generate it when it's not done by our tools. This is the default and many tools will depend on it. If we'd apply #2803 we will certainly get regressions, since this PR will cause true
to result in the old behaviour for false, and false
(still the default) will cause 3rd-party snapshots to be used instead of being regenerated.
A first conclusion might be that the current regenerate option is not particularly useful (we'd be better of without it), is not documented clearly and does not allow for 3rd-party snapshots to be used. We should obsolete it and introduce a more explicit setting. Basically there are only two cases:
Describe the bug SnapshotSource should return the same snapshot upon multiple retrievals. Instead, it regenerates the snapshot every time.
To Reproduce Steps to reproduce the behavior:
regenerate: true
, based on a CachedResolverExpected behavior When the SnapshotSource has generated (by the Generator) a snapshot, it is marked as
IsCreatedBySnapshotGenerator()
, and it should not be re-generated again upon subsequent retrievals.Screenshots n/a
Version used:
Additional context