Skip to content

Commit

Permalink
add current zos version to zos logs on upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
Eslam-Nawara committed Nov 6, 2024
1 parent f3dade9 commit e7b3252
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func (u *Upgrader) Version() semver.Version {
func (u *Upgrader) nextUpdate() time.Duration {
jitter := rand.Intn(checkJitter)
next := checkForUpdateEvery + (time.Duration(jitter) * time.Minute)
log.Info().Str("after", next.String()).Msg("checking for update after")
log.Info().Str("after", next.String()).Msg("checking for update")
return next
}

Expand Down Expand Up @@ -295,7 +295,7 @@ func (u *Upgrader) update() error {
}
}

log.Info().Str("version", filepath.Base(remote.Target)).Msg("updating system...")
log.Info().Str("running version", u.Version().String()).Str("updating to version", filepath.Base(remote.Target)).Msg("updating system...")
if err := u.updateTo(remote, &current); err != nil {
return errors.Wrapf(err, "failed to update to new tag '%s'", remote.Target)
}
Expand Down Expand Up @@ -436,9 +436,11 @@ func newInMemoryCache() (*inMemoryCache, error) {
func (c *inMemoryCache) flistCache() string {
return c.flist
}

func (c *inMemoryCache) fileCache() string {
return c.file
}

func (c *inMemoryCache) clean() {
os.RemoveAll(c.root)
}
Expand Down

0 comments on commit e7b3252

Please sign in to comment.