K9s: release v0.25.7 (#1343)

* fix #1341

* fix tests
mine
Fernand Galiana 2021-11-26 14:02:44 -07:00 committed by GitHub
parent 5add5b9ec1
commit 6b6a490c73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 36 additions and 14 deletions

View File

@ -5,7 +5,7 @@ PACKAGE := github.com/derailed/$(NAME)
GIT_REV ?= $(shell git rev-parse --short HEAD)
SOURCE_DATE_EPOCH ?= $(shell date +%s)
DATE ?= $(shell date -u -d @${SOURCE_DATE_EPOCH} +"%Y-%m-%dT%H:%M:%SZ")
VERSION ?= v0.25.6
VERSION ?= v0.25.7
IMG_NAME := derailed/k9s
IMAGE := ${IMG_NAME}:${VERSION}

View File

@ -0,0 +1,25 @@
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s_small.png" align="right" width="200" height="auto"/>
# Release v0.25.7
## Notes
Thank you to all that contributed with flushing out issues and enhancements for K9s! I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev and see if we're happier with some of the fixes! If you've filed an issue please help me verify and close. Your support, kindness and awesome suggestions to make K9s better are as ever very much noted and appreciated!
If you feel K9s is helping your Kubernetes journey, please consider joining our [sponsorship program](https://github.com/sponsors/derailed) and/or make some noise on social! [@kitesurfer](https://twitter.com/kitesurfer)
On Slack? Please join us [K9slackers](https://join.slack.com/t/k9sers/shared_invite/enQtOTA5MDEyNzI5MTU0LWQ1ZGI3MzliYzZhZWEyNzYxYzA3NjE0YTk1YmFmNzViZjIyNzhkZGI0MmJjYzhlNjdlMGJhYzE2ZGU1NjkyNTM)
## Maintenance Release!
Happy (`Wild`) Turkey Day Everyone!!
---
## Resolved Issues
* [Issue #1341](https://github.com/derailed/k9s/issues/1341) Colored container logs are not displayed correctly.
---
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2020 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)

2
go.mod
View File

@ -14,7 +14,7 @@ require (
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/cenkalti/backoff/v4 v4.1.2
github.com/derailed/popeye v0.9.8
github.com/derailed/tview v0.6.4
github.com/derailed/tview v0.6.5
github.com/fatih/color v1.13.0
github.com/fsnotify/fsnotify v1.5.1
github.com/fvbommel/sortorder v1.0.2

4
go.sum
View File

@ -333,8 +333,8 @@ github.com/derailed/popeye v0.9.8 h1:53Rdx09WloOj6ltZZq9OeS48zH0F44mEMcs8XaI1g0Q
github.com/derailed/popeye v0.9.8/go.mod h1:Ih3wTG7wBOuxdqz5tlCuCFq/vyB+Te/IpqY5HwgUTEA=
github.com/derailed/tcell/v2 v2.3.1-rc.2 h1:9TmZB/IwL3MA1Jf4pC4rfMaPTcVYIN62IwE7X7A9emU=
github.com/derailed/tcell/v2 v2.3.1-rc.2/go.mod h1:wegJ+SscH+jPjEQIAV/dI/grLTRm5R4IE2M479NDSL0=
github.com/derailed/tview v0.6.4 h1:LKNIqodvwW/IT/OXGMz52bIV53sGBBYFYqSFT68ExZk=
github.com/derailed/tview v0.6.4/go.mod h1:A1LXWlbx/YDMXr3GVTy+IgclAkBssJpw/FiZ7aqUgzU=
github.com/derailed/tview v0.6.5 h1:e377Rv6zYtwtmzDZFmwgkJiiZl/Ax3KIqfx2rlcwWo4=
github.com/derailed/tview v0.6.5/go.mod h1:A1LXWlbx/YDMXr3GVTy+IgclAkBssJpw/FiZ7aqUgzU=
github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=

View File

@ -306,7 +306,6 @@ func (l *Log) updateLogs(ctx context.Context, c dao.LogChan) {
return
}
if item == dao.ItemEOF {
log.Debug().Msgf("!!!!!GOT EOF!!!!!!")
l.fireCanceled()
return
}
@ -323,7 +322,6 @@ func (l *Log) updateLogs(ctx context.Context, c dao.LogChan) {
case <-time.After(l.flushTimeout):
l.Notify()
case <-ctx.Done():
log.Debug().Msgf("!!!LOG_MODEL IS CANCELED!!!")
return
}
}

View File

@ -23,11 +23,11 @@ import (
)
const (
logTitle = "logs"
logMessage = "Waiting for logs...\n"
logFmt = " Logs([hilite:bg:]%s[-:bg:-])[[green:bg:b]%s[-:bg:-]] "
logCoFmt = " Logs([hilite:bg:]%s:[hilite:bg:b]%s[-:bg:-])[[green:bg:b]%s[-:bg:-]] "
flushTimeout = 1 * time.Millisecond
logTitle = "logs"
logMessage = "Waiting for logs...\n"
logFmt = " Logs([hilite:bg:]%s[-:bg:-])[[green:bg:b]%s[-:bg:-]] "
logCoFmt = " Logs([hilite:bg:]%s:[hilite:bg:b]%s[-:bg:-])[[green:bg:b]%s[-:bg:-]] "
defaultFlushTimeout = 50 * time.Millisecond
)
// Log represents a generic log viewer.
@ -53,7 +53,7 @@ func NewLog(gvr client.GVR, opts *dao.LogOptions) *Log {
l := Log{
Flex: tview.NewFlex(),
logChan: make(dao.LogChan, 2),
model: model.NewLog(gvr, opts, flushTimeout),
model: model.NewLog(gvr, opts, defaultFlushTimeout),
follow: true,
}

View File

@ -50,7 +50,7 @@ func TestLogFlush(t *testing.T) {
items.Lines(0, false, ll)
v.Flush(ll)
assert.Equal(t, "[orange::d]Waiting for logs...\n[black:]blee\n[green:]Bozo\n\n", v.Logs().GetText(false))
assert.Equal(t, "[orange::d]Waiting for logs...\n[black::]blee\n[green::]Bozo\n\n", v.Logs().GetText(false))
}
func BenchmarkLogFlush(b *testing.B) {

View File

@ -116,7 +116,6 @@ func (t *Table) defaultEnv() Env {
if env["FILTER"] == "" {
env["NAMESPACE"], env["FILTER"] = client.Namespaced(path)
}
env["RESOURCE_GROUP"] = t.GVR().G()
env["RESOURCE_VERSION"] = t.GVR().V()
env["RESOURCE_NAME"] = t.GVR().R()