Skip to content

Commit e1eaffa

Browse files
committed
Clarify hotReloadCapable field
1 parent 1df96d2 commit e1eaffa

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

pkg/apis/workspaces/v1alpha1/commands.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,11 @@ type ExecCommand struct {
139139
Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
140140

141141
// +optional
142-
// Whether the command is capable to reload itself when source code changes.
143-
// If set to `true` the command won't be restarted and it is expected to handle file changes on its own.
142+
// Whether the command is restarted when source code changes.
143+
// If set to `true` the command won't be restarted.
144+
// A *hotReloadCapable* `run` or `debug` command is expected to handle file changes on its own and won't be restarted.
145+
// A *hotReloadCapable* `build` command is expected to be executed only once and won't be executed again.
146+
// This field is ignored for commands other than `build`, `run` or `debug`.
144147
//
145148
// Default value is `false`
146149
HotReloadCapable bool `json:"hotReloadCapable,omitempty"`

pkg/apis/workspaces/v1alpha2/commands.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,11 @@ type ExecCommand struct {
144144
Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
145145

146146
// +optional
147-
// Whether the command is capable to reload itself when source code changes.
148-
// If set to `true` the command won't be restarted and it is expected to handle file changes on its own.
147+
// Whether the command is restarted when source code changes.
148+
// If set to `true` the command won't be restarted.
149+
// A *hotReloadCapable* `run` or `debug` command is expected to handle file changes on its own and won't be restarted.
150+
// A *hotReloadCapable* `build` command is expected to be executed only once and won't be executed again.
151+
// This field is ignored for commands other than `build`, `run` or `debug`.
149152
//
150153
// Default value is `false`
151154
// +devfile:default:value=false

0 commit comments

Comments
 (0)