Fix UX inconsistency when handling commands bound to events#6574
Conversation
…no msg is specified Displaying it adds a lot of unnecessary clutter.
…events This is to be more consistent with how the other messages are displayed.
…' events This is to be more consistent with how the other messages are displayed.
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
| msg := o.msg | ||
| if msg == "" { | ||
| msg = fmt.Sprintf("Executing %s command %q on container %q", command.Id, command.Exec.CommandLine, command.Exec.Component) | ||
| msg = fmt.Sprintf("Executing %s command on container %q", command.Id, command.Exec.Component) |
There was a problem hiding this comment.
@rm3l just to understand better, this function is used to execute command inside the container?
There was a problem hiding this comment.
Yes, it is an implementation of a generic libdevfile.Handler interface, used to "handle" commands defined in the Devfile that odo needs to take into account, depending on their type (apply, exec, ...).
Here it is the handler for exec commands, and it delegates to an exec client that does the job of executing the command inside the container (via again a generic platform client interface, with different implementations for Podman and K8s).
|
Kudos, SonarCloud Quality Gate passed!
|








What type of PR is this:
/kind bug
/area UX
/area dev
What does this PR do / why we need it:
See #6573.
For the example provided in the issue description, this PR changes the
odo devoutput from:to
Which issue(s) this PR fixes:
Fixes #6573
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer: