refactor(update): clean up actions/update
This PR tries to refactor the update code flow to make it easier to understand, maintain and extend.
actions/update:
- move common arguments to a shared struct (
updateSession) - remove unused fields
- fix outdated names
- improve logging/error handling
lifecycle:
- removes unwieldy SkipUpdate return value in favor of errors.Is
- generalizes the code for all four phases
- allows timeout to be defined for all phases
- enables explicit unit in timeout label values (in addition to implicit minutes)
container:
- rename
StaletoMarkedForUpdaterenames thecontainer.Stalefield to what it's actually used for, as staleness is not the only factor used to decide whether a container should be updated anymore
Codecov Report
Attention: 67 lines in your changes are missing coverage. Please review.
Comparison is base (
76f9cea) 70.55% compared to head (a42eb28) 69.97%.
Additional details and impacted files
@@ Coverage Diff @@
## main #1895 +/- ##
==========================================
- Coverage 70.55% 69.97% -0.59%
==========================================
Files 26 27 +1
Lines 2493 2498 +5
==========================================
- Hits 1759 1748 -11
- Misses 633 648 +15
- Partials 101 102 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hi @piksel . Just curious if there was any movement on this PR? Would love to update my other PR for deferred updates to match this code and get that resolved too whenever you're ready. LMK if there's anything else I can do to help here!
It would be nice to finish this work
@piksel would also be interested in this too for defer functionality