Open afscrome opened 2 months ago
Excellent report, thanks for writing it.
There are two main sources of incrementality failures that I see today that would need to be addressed:
$(PublishDir)
, but for incrementality tracking purposes we should be depending on the specific files inside this directory (so in MSBuild terms an Item with an Include of $(PublishDir)/**/*.*
Incremental checks on Labels would need to ignore the ContainerGenerateLabelsImageCreated
labels that get defaulted to the current time. Or perhaps there we can use another more stable date that can be used (e.g. the LastModifiedDate of the entry point file)
Correct, that would overlap with the determinism concerns that we were talking about in another, separate issue
If you run
dotnet publish /t:PublishContainer
on a project that hasn't changed since the last container publish, the SDK will build a new image, even though nothing's changedRepro Steps
dotnet publish /t:PublishContainer
dotnet publish /t:PublishContainer
a second time, without making any other code changesExpected Results
The second (and subsequent) publish command shouldn't build a whole new container until something else has changed
Actual Results
The second (and subsequent) commands build a new image - note how in the below example the image id has changed between the two publishes.