You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you omc use a must-gather/inspect, the printed Project does not match the current context being used. In case no omc.json is present, an empty project is printed:
$ git switch main
Previous HEAD position was 7273c934 [FIX] close #162
Switched to branch 'main'
Your branch is up to date with 'upstream/main'.
$ go build -o omc main.go
# let's start with a clean env
$ rm ~/.omc/omc.json
$ tree cmd/use/testdata/useContext/must-gather-singleNS.sample/
cmd/use/testdata/useContext/must-gather-singleNS.sample/
└── namespaces
└── openshift-etcd
└── openshift-etcd.yaml
3 directories, 1 file
# project is not printed
$ ./omc use cmd/use/testdata/useContext/must-gather-singleNS.sample
Must-Gather : /home/gistella/Projects/github.com/gmeghnag/omc/cmd/use/testdata/useContext/must-gather-singleNS.sample
Project :
# to show an old context is kept in memory, I will create a mock inspect
$ mkdir -p test-inspect/namespaces/ns-1
$ touch test-inspect/timestamp
# Notice how the previous namespace gets printed, even though the new path is correctly selected
$ ./omc use test-inspect
Must-Gather : /home/gistella/Projects/github.com/gmeghnag/omc/test-inspect
Project : openshift-etcd
Ensure the in-memory state of a must-gather/inspect's path and
project are consistent with the context being used, regardless of
wether the context is new.
Fixesgmeghnag#171
Ensure the in-memory state of a must-gather/inspect's path and
project are consistent with the context being used, regardless of
wether the context is new.
Fixesgmeghnag#171
When you
omc use
a must-gather/inspect, the printed Project does not match the current context being used. In case no omc.json is present, an empty project is printed:This appears to be a side effect of ccaf241.
The text was updated successfully, but these errors were encountered: