Use devstats.PID.json as devstate (#6713)

* Use devstate.PID.json

* odo describe component gets forwarded ports from devstate.json

* Pass pid in context

* Add platform to state

* Overwrite devstate.json if PId not exists

* odo describe component displays forwarded ports from podman/cluster

* Start only one session on platform

* Fix integration test

* Review

* Fix

* Update pkg/state/errors.go

Co-authored-by: Armel Soro <armel@rm3l.org>

* Integration tests

* Fix integration test

---------

Co-authored-by: Armel Soro <armel@rm3l.org>
This commit is contained in:
Philippe Martin
2023-04-19 10:16:08 +02:00
committed by GitHub
parent 0dc2f4dfbd
commit bd5098eb53
21 changed files with 481 additions and 60 deletions

View File

@@ -14,6 +14,7 @@ import (
"github.com/redhat-developer/odo/pkg/log"
"github.com/redhat-developer/odo/pkg/odo/cli"
"github.com/redhat-developer/odo/pkg/odo/cli/version"
odocontext "github.com/redhat-developer/odo/pkg/odo/context"
"github.com/redhat-developer/odo/pkg/odo/util"
"github.com/redhat-developer/odo/pkg/odo/util/completion"
"github.com/redhat-developer/odo/pkg/preference"
@@ -31,6 +32,7 @@ func main() {
util.LogErrorAndExit(err, "")
}
ctx = envcontext.WithEnvConfig(ctx, *envConfig)
ctx = odocontext.WithPID(ctx, os.Getpid())
// create the complete command
klog.InitFlags(nil)