Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed
- Allow a larger set of permissions for configuration files and folders.

### Added
- Add validation confirmation messages for Astarte Interface and Trigger in the utils package for improved user feedback.

## [24.5.1] - 2024-09-19
### Changed
- `cluster instance` {`deploy` | `destroy` | `show`} are deprecated and
Expand Down
4 changes: 3 additions & 1 deletion cmd/utils/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var validateInterfaceCmd = &cobra.Command{
Note that the checks performed by this function are not as thorough as the ones performed by Astarte, so there could be false positives (but no false negatives).
This command is thought to be used in CI pipelines to validate that new interfaces are "reasonable enough".

Returns 0 and does not print anything if the interface is valid, returns 1 and prints an error message if it isn't.`,
Returns 0 and print message if the interface is valid, returns 1 and prints an error message if it isn't.`,
Example: ` astartectl utils interfaces validate com.my.Interface.json`,
Args: cobra.ExactArgs(1),
RunE: validateInterfaceF,
Expand All @@ -57,5 +57,7 @@ func validateInterfaceF(command *cobra.Command, args []string) error {
os.Exit(1)
}

fmt.Printf("%s is a valid Astarte Interface\n", interfacePath)

return nil
}
4 changes: 3 additions & 1 deletion cmd/utils/triggers.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var validateTriggerCmd = &cobra.Command{
Note that the checks performed by this function are not as thorough as the ones performed by Astarte, so there could be false positives (but no false negatives).
This command is thought to be used in CI pipelines to validate that new triggers are "reasonable enough".

Returns 0 and does not print anything if the trigger is valid, returns 1 and prints an error message if it isn't.`,
Returns 0 and print message if the trigger is valid, returns 1 and prints an error message if it isn't.`,
Example: ` astartectl utils triggers validate my_trigger.json`,
Args: cobra.ExactArgs(1),
RunE: validateTriggerF,
Expand All @@ -57,5 +57,7 @@ func validateTriggerF(command *cobra.Command, args []string) error {
os.Exit(1)
}

fmt.Printf("%s is a valid Astarte Trigger\n", triggerPath)

return nil
}
Loading