Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cdk): dev-mode command #957

Merged
merged 1 commit into from
Oct 18, 2022
Merged

feat(cdk): dev-mode command #957

merged 1 commit into from
Oct 18, 2022

Conversation

afiune
Copy link
Contributor

@afiune afiune commented Oct 18, 2022

Summary

Wanna develop a new CDK component? Run the command:

lacework component dev <component_name>

Signed-off-by: Salim Afiune Maya [email protected]

How did you test this change?

ddev-mode.mp4

Issue

https://lacework.atlassian.net/browse/ALLY-1186

Wanna develop a new CDK component? Run the command:
```
lacework component dev <component_name>
```

Signed-off-by: Salim Afiune Maya <[email protected]>
@hazedav hazedav self-requested a review October 18, 2022 02:27
}

if component.UnderDevelopment() {
return errors.New("component already under development.")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: do you want to return an error here or just nil and output info?

Comment on lines +83 to +88
componentsDevModeCmd = &cobra.Command{
Use: "dev <component>",
Hidden: true,
Short: "Enter development mode of a new or existing component",
Args: cobra.ExactArgs(1),
RunE: runComponentsDevMode,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I know this is hidden, but a 'long' description with more details on cmd usage would be nice.

Copy link
Collaborator

@dmurray-lacework dmurray-lacework left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question on this, if I have an existing component and I enter dev mode on it, how do I then exit dev mode?

component, found := cli.LwComponents.GetComponent(args[0])
if !found {
component = &lwcomponent.Component{
Name: args[0],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be any restrictions on a component name. For example I could pass in "!"

@afiune afiune merged commit faff0ae into main Oct 18, 2022
@afiune afiune deleted the afiune/cdk-dev branch October 18, 2022 16:03
@lacework-releng lacework-releng mentioned this pull request Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants