Skip to content

Commit 9c8b710

Browse files
committed
fix: add back missing verbs
1 parent 517005b commit 9c8b710

File tree

14 files changed

+65
-29
lines changed

14 files changed

+65
-29
lines changed

cmd/internal/exec.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func execFunc(ctx *context.Context, cmd *cobra.Command, verb executable.Verb, ar
113113
if err != nil {
114114
logger.FatalErr(err)
115115
}
116-
s, err := store.NewStore()
116+
s, err := store.NewStore(store.Path())
117117
if err != nil {
118118
logger.FatalErr(err)
119119
}
@@ -145,7 +145,7 @@ func execFunc(ctx *context.Context, cmd *cobra.Command, verb executable.Verb, ar
145145
logger.FatalErr(err)
146146
}
147147
dur := time.Since(startTime)
148-
processStore, err := store.NewStore()
148+
processStore, err := store.NewStore(store.Path())
149149
if err != nil {
150150
logger.Errorf("failed clearing process store\n%v", err)
151151
}

cmd/internal/store.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func storeSetFunc(ctx *context.Context, _ *cobra.Command, args []string) {
7070
value = strings.Join(args[1:], " ")
7171
}
7272

73-
s, err := store.NewStore()
73+
s, err := store.NewStore(store.Path())
7474
if err != nil {
7575
ctx.Logger.FatalErr(err)
7676
}
@@ -105,7 +105,7 @@ func registerStoreGetCmd(ctx *context.Context, rootCmd *cobra.Command) {
105105
func storeGetFunc(ctx *context.Context, _ *cobra.Command, args []string) {
106106
key := args[0]
107107

108-
s, err := store.NewStore()
108+
s, err := store.NewStore(store.Path())
109109
if err != nil {
110110
ctx.Logger.FatalErr(err)
111111
}
@@ -148,7 +148,7 @@ func storeClearFunc(ctx *context.Context, cmd *cobra.Command, _ []string) {
148148
ctx.Logger.PlainTextSuccess("Store store cleared")
149149
return
150150
}
151-
s, err := store.NewStore()
151+
s, err := store.NewStore(store.Path())
152152
if err != nil {
153153
ctx.Logger.FatalErr(err)
154154
}

docs/cli/flow_library.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ flow library [flags]
1414
-h, --help help for library
1515
-n, --namespace string Filter executables by namespace.
1616
-t, --tag stringArray Filter by tags.
17-
-v, --verb string Filter executables by verb. One of: [abort activate add analyze apply build bundle check clean clear compile create deactivate delete deploy destroy disable enable erase exec execute fetch generate get init inspect install kill launch lint monitor new open package pause publish purge push reboot refresh release reload remove request reset restart retrieve run scan send set setup show start stop teardown terminate test tidy track trigger undeploy uninstall unset validate verify view watch]
17+
-v, --verb string Filter executables by verb. One of: [abort activate add analyze apply build bundle check clean clear compile create deactivate debug delete deploy destroy disable edit enable erase exec execute fetch fix generate get init inspect install kill launch lint modify monitor new open package patch pause profile publish purge push reboot refresh release reload remove request reset restart retrieve run scan send set setup show start stop teardown terminate test tidy trace track transform trigger undeploy uninstall unset update upgrade validate verify view watch]
1818
-w, --workspace string Filter executables by workspace.
1919
```
2020

docs/cli/flow_library_glance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ flow library glance [flags]
1515
-n, --namespace string Filter executables by namespace.
1616
-o, --output string Output format. One of: yaml, json, doc, or list.
1717
-t, --tag stringArray Filter by tags.
18-
-v, --verb string Filter executables by verb. One of: [abort activate add analyze apply build bundle check clean clear compile create deactivate delete deploy destroy disable enable erase exec execute fetch generate get init inspect install kill launch lint monitor new open package pause publish purge push reboot refresh release reload remove request reset restart retrieve run scan send set setup show start stop teardown terminate test tidy track trigger undeploy uninstall unset validate verify view watch]
18+
-v, --verb string Filter executables by verb. One of: [abort activate add analyze apply build bundle check clean clear compile create deactivate debug delete deploy destroy disable edit enable erase exec execute fetch fix generate get init inspect install kill launch lint modify monitor new open package patch pause profile publish purge push reboot refresh release reload remove request reset restart retrieve run scan send set setup show start stop teardown terminate test tidy trace track transform trigger undeploy uninstall unset update upgrade validate verify view watch]
1919
-w, --workspace string Filter executables by workspace.
2020
```
2121

docs/guide/conditional.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ executables:
8787
serial:
8888
execs:
8989
- cmd: flow store set feature-flag enabled
90-
- if: data["feature-flag"] == "enabled"
90+
- if: store["feature-flag"] == "enabled"
9191
cmd: echo "Feature is enabled"
92-
- if: len(data["optional-key"]) > 0
92+
- if: len(store["optional-key"]) > 0
9393
cmd: echo "Optional key exists"
9494
```
9595
@@ -105,7 +105,7 @@ executables:
105105
execs:
106106
- if: os == "linux" and env["CI"] == "true"
107107
cmd: echo "Running in Linux CI environment"
108-
- if: len(data["build-id"]) > 0 and (os == "darwin" or os == "linux")
108+
- if: len(store["build-id"]) > 0 and (os == "darwin" or os == "linux")
109109
cmd: echo "Valid build on Unix-like system"
110110
```
111111

docs/schemas/flowfile_schema.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@
510510
}
511511
},
512512
"ExecutableVerb": {
513-
"description": "Keywords that describe the action an executable performs. While executables are configured with a single verb, \nthe verb can be aliased to related verbs within its group. For example, the `activate` verb can be replaced \nwith \"enable\" or \"start\" when referencing an executable. This allows users to use the verb that best describes \nthe action they are performing.\n\n### Verb Groups\n\n- **Activation Group**: `activate`, `enable`, `start`, `trigger`\n- **Execution Group**: `exec`, `run`, `execute`\n- **Deactivation Group**: `deactivate`, `disable`, `stop`, `pause`\n- **Termination Group**: `kill`, `terminate`, `abort`\n- **Monitoring Group**: `watch`, `monitor`, `track`\n- **Restart Group**: `restart`, `reboot`, `reload`, `refresh`\n- **Installation Group**: `install`, `setup`, `deploy`\n- **Build Group**: `build`, `package`, `bundle`, `compile`\n- **Uninstallation Group**: `uninstall`, `teardown`, `undeploy`\n- **Update Group**: `update`, `upgrade`, `patch`\n- **Configuration Group**: `configure`, `manage`\n- **Edit Group**: `edit`, `transform`, `modify`\n- **Publish Group**: `publish`, `release`\n- **Distribution Group**: `push`, `send`, `apply`\n- **Test Group**: `test`, `validate`, `check`, `verify`\n- **Analysis Group**: `analyze`, `scan`, `lint`, `inspect`\n- **Launch Group**: `open`, `launch`, `show`, `view`\n- **Creation Group**: `create`, `generate`, `add`, `new`, `init`\n- **Set Group**: `set`\n- **Destruction Group**: `remove`, `delete`, `destroy`, `erase`\n- **Unset Group**: `unset`, `reset`\n- **Cleanup Group**: `clean`, `clear`, `purge`, `tidy`\n- **Retrieval Group**: `retrieve`, `fetch`, `get`, `request`\n\n### Usage Notes\n\n1. [Verb group + Name] must be unique within the namespace of the workspace.\n2. When referencing an executable, users can use any verb from the appropriate group.\n3. Choose the verb that most accurately describes the action being performed.\n4. Be consistent in verb usage within projects or teams to maintain clarity.\n\n### Examples\n\n- An executable configured with the `activate` verb could also be referenced using \"enable\" or \"start\".\n- A build process might use `build` as its primary verb, but could also be invoked with \"package\" or \"assemble\".\n- A cleanup routine configured with `clean` could be called using \"purge\" or \"sanitize\" for more specific connotations.\n \nBy organizing verbs into these groups, flow provides flexibility in how actions are described while maintaining a \nclear structure for executable operations.\n",
513+
"description": "Keywords that describe the action an executable performs. While executables are configured with a single verb, \nthe verb can be aliased to related verbs within its group. For example, the `activate` verb can be replaced \nwith \"enable\" or \"start\" when referencing an executable. This allows users to use the verb that best describes \nthe action they are performing.\n\n### Verb Groups\n\n- **Activation Group**: `activate`, `enable`, `start`, `trigger`\n- **Execution Group**: `exec`, `run`, `execute`\n- **Deactivation Group**: `deactivate`, `disable`, `stop`, `pause`\n- **Termination Group**: `kill`, `terminate`, `abort`\n- **Monitoring Group**: `watch`, `monitor`, `track`\n- **Restart Group**: `restart`, `reboot`, `reload`, `refresh`\n- **Installation Group**: `install`, `setup`, `deploy`\n- **Build Group**: `build`, `package`, `bundle`, `compile`\n- **Uninstallation Group**: `uninstall`, `teardown`, `undeploy`\n- **Update Group**: `update`, `upgrade`, `patch`\n- **Configuration Group**: `configure`, `manage`\n- **Edit Group**: `edit`, `transform`, `modify`, `fix`\n- **Publish Group**: `publish`, `release`\n- **Distribution Group**: `push`, `send`, `apply`\n- **Test Group**: `test`, `validate`, `check`, `verify`\n- **Analysis Group**: `analyze`, `scan`, `lint`, `inspect`\n- **Launch Group**: `open`, `launch`, `show`, `view`\n- **Creation Group**: `create`, `generate`, `add`, `new`, `init`\n- **Set Group**: `set`\n- **Destruction Group**: `remove`, `delete`, `destroy`, `erase`\n- **Unset Group**: `unset`, `reset`\n- **Cleanup Group**: `clean`, `clear`, `purge`, `tidy`\n- **Retrieval Group**: `retrieve`, `fetch`, `get`, `request`\n- **Debug Group**: `debug`, `trace`, `profile`\n\n### Usage Notes\n\n1. [Verb group + Name] must be unique within the namespace of the workspace.\n2. When referencing an executable, users can use any verb from the appropriate group.\n3. Choose the verb that most accurately describes the action being performed.\n4. Be consistent in verb usage within projects or teams to maintain clarity.\n\n### Examples\n\n- An executable configured with the `activate` verb could also be referenced using \"enable\" or \"start\".\n- A build process might use `build` as its primary verb, but could also be invoked with \"package\" or \"assemble\".\n- A cleanup routine configured with `clean` could be called using \"purge\" or \"sanitize\" for more specific connotations.\n \nBy organizing verbs into these groups, flow provides flexibility in how actions are described while maintaining a \nclear structure for executable operations.\n",
514514
"type": "string",
515515
"default": "exec",
516516
"enum": [
@@ -553,6 +553,7 @@
553553
"edit",
554554
"transform",
555555
"modify",
556+
"fix",
556557
"publish",
557558
"release",
558559
"push",
@@ -589,7 +590,10 @@
589590
"retrieve",
590591
"fetch",
591592
"get",
592-
"request"
593+
"request",
594+
"debug",
595+
"trace",
596+
"profile"
593597
]
594598
},
595599
"FromFile": {

docs/types/flowfile.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ the action they are performing.
388388
- **Uninstallation Group**: `uninstall`, `teardown`, `undeploy`
389389
- **Update Group**: `update`, `upgrade`, `patch`
390390
- **Configuration Group**: `configure`, `manage`
391-
- **Edit Group**: `edit`, `transform`, `modify`
391+
- **Edit Group**: `edit`, `transform`, `modify`, `fix`
392392
- **Publish Group**: `publish`, `release`
393393
- **Distribution Group**: `push`, `send`, `apply`
394394
- **Test Group**: `test`, `validate`, `check`, `verify`
@@ -400,6 +400,7 @@ the action they are performing.
400400
- **Unset Group**: `unset`, `reset`
401401
- **Cleanup Group**: `clean`, `clear`, `purge`, `tidy`
402402
- **Retrieval Group**: `retrieve`, `fetch`, `get`, `request`
403+
- **Debug Group**: `debug`, `trace`, `profile`
403404

404405
### Usage Notes
405406

@@ -460,6 +461,7 @@ clear structure for executable operations.
460461
- `edit`
461462
- `transform`
462463
- `modify`
464+
- `fix`
463465
- `publish`
464466
- `release`
465467
- `push`
@@ -497,6 +499,9 @@ clear structure for executable operations.
497499
- `fetch`
498500
- `get`
499501
- `request`
502+
- `debug`
503+
- `trace`
504+
- `profile`
500505

501506

502507

internal/runner/parallel/parallel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (r *parallelRunner) Exec(
4747
}
4848

4949
if len(parallelSpec.Execs) > 0 {
50-
str, err := store.NewStore()
50+
str, err := store.NewStore(store.Path())
5151
if err != nil {
5252
return err
5353
}

internal/runner/serial/serial.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (r *serialRunner) Exec(
4747
}
4848

4949
if len(serialSpec.Execs) > 0 {
50-
str, err := store.NewStore()
50+
str, err := store.NewStore(store.Path())
5151
if err != nil {
5252
return err
5353
}

internal/services/store/store.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,13 @@ type BoltStore struct {
4040
processBucket string
4141
}
4242

43-
func NewStore() (Store, error) {
44-
db, err := bolt.Open(Path(), 0666, &bolt.Options{Timeout: 5 * time.Second})
43+
// NewStore creates a new store with a given db path
44+
// If dbPath is empty, it will use the default path
45+
func NewStore(dbPath string) (Store, error) {
46+
if dbPath == "" {
47+
dbPath = Path()
48+
}
49+
db, err := bolt.Open(dbPath, 0666, &bolt.Options{Timeout: 5 * time.Second})
4550
if err != nil {
4651
return nil, fmt.Errorf("failed to open db: %w", err)
4752
}

0 commit comments

Comments
 (0)