Commit Graph

3 Commits

Author SHA1 Message Date
Natalie Arellano df6be88240
Recover corrupted cache (#1381)
* add failing test to restorer

Signed-off-by: Joey Brown <brown.joseph@salesforce.com>

* restorer and exporter working as expected

Signed-off-by: Joey Brown <brown.joseph@salesforce.com>

* lint

Signed-off-by: Joey Brown <brown.joseph@salesforce.com>

* Update phase/restorer.go

Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Joey Brown <brown.joseph@salesforce.com>

* Update phase/cache.go

Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Joey Brown <brown.joseph@salesforce.com>

* Update cache/image_cache.go

Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Joey Brown <brown.joseph@salesforce.com>

* Update cache/volume_cache.go

Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Joey Brown <brown.joseph@salesforce.com>

* Update cache/volume_cache.go

Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Joey Brown <brown.joseph@salesforce.com>

* Update cache/volume_cache.go

Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Joey Brown <brown.joseph@salesforce.com>

* Update cache/volume_cache.go

Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Joey Brown <brown.joseph@salesforce.com>

* Update cache/volume_cache.go

Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Joey Brown <brown.joseph@salesforce.com>

* update based on feedback

Signed-off-by: Joey Brown <brown.joseph@salesforce.com>

* fix log

* temp fix

* this does not work as is. I think we need to modify img utils.

Image utils should fail with a Layer Not found in both ReuseLayer & GetLayer.

For GetLayer, when there is a missing blob, it's return an unexpected EOF error.

For ReuseLayer, when there is a missing blob, it's not returning an error but it should.

* add eof check

* add not exist check

* reuse layer test

* fix test regression

---------

Signed-off-by: Joey Brown <brown.joseph@salesforce.com>
Co-authored-by: Joey Brown <brown.joseph@salesforce.com>
2024-07-17 10:39:20 -04:00
Jesse Brown 653a46fa26
Print `Timer` logs in debug mode only (#1230)
The default of emitting timings to info is too noisy.  This change lets platforms that want to see timings do so by setting the log level to debug.

Signed-off-by: Jesse Brown <jabrown85@gmail.com>
2023-10-30 17:51:30 -04:00
Natalie Arellano 6c7d16a718
Move lifecycle package to sub-directory (#1205)
* Move files

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Fix imports

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Update mockgen directives

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* WIP: add TODOs

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Rename lifecycle -> phase

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Address TODOs by adding comments

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Update phase/handlers.go

Signed-off-by: Natalie Arellano <narellano@vmware.com>

---------

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-09-26 11:30:50 -04:00