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

CLOUDP-57844: List matcher fields, Atlas #62

Merged
merged 11 commits into from
Mar 26, 2020
Merged

Conversation

andreaangiolillo
Copy link
Collaborator

@andreaangiolillo andreaangiolillo commented Mar 23, 2020

Jira ticket: CLOUDP-57844

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code

Further comments

./bin/mongocli atlas alerts config fields type

[
	"TYPE_NAME",
	"HOSTNAME",
	"PORT",
	"HOSTNAME_AND_PORT",
	"REPLICA_SET_NAME",
	"SHARD_NAME",
	"CLUSTER_NAME"
]

@andreaangiolillo andreaangiolillo added the waiting_atlas Waiting atlas go client release label Mar 23, 2020
@andreaangiolillo andreaangiolillo requested a review from gssbzn March 23, 2020 19:09
Copy link
Collaborator

@gssbzn gssbzn left a comment

Choose a reason for hiding this comment

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

couple of things here around naming, probably my bad as the ticket was not updated when we decided to go from alert-config to alerts config

"github.com/spf13/cobra"
)

func AtlasAlertConfigsFieldsBuilder() *cobra.Command {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The ticket was out dated, remember we changed alert-config to alerts config this should be

Suggested change
func AtlasAlertConfigsFieldsBuilder() *cobra.Command {
func AtlasAlertsConfigsFieldsBuilder() *cobra.Command {

Please also remember to change the file name

"github.com/spf13/cobra"
)

type atlasAlertConfigFieldsTypeOpts struct {
Copy link
Collaborator

Choose a reason for hiding this comment

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

same comment, this should be

Suggested change
type atlasAlertConfigFieldsTypeOpts struct {
type atlasAlertsConfigFieldsTypeOpts struct {

opts := &atlasAlertConfigFieldsTypeOpts{}
cmd := &cobra.Command{
Use: "type",
Short: "List alert configurations for a project.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Short: "List alert configurations for a project.",
Short: "List alert configurations available field types.",

@@ -35,10 +35,15 @@ type AlertConfigurationDeleter interface {
DeleteAlertConfiguration(string, string) error
}

type AlertConfigurationFieldsLister interface {
Copy link
Collaborator

Choose a reason for hiding this comment

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

[q] why not MatcherFieldsLister ? not a needed change but just wondering about this

@gssbzn
Copy link
Collaborator

gssbzn commented Mar 24, 2020

waiting on mongodb/go-client-mongodb-atlas#70

@andreaangiolillo andreaangiolillo removed the waiting_atlas Waiting atlas go client release label Mar 25, 2020
@andreaangiolillo andreaangiolillo requested a review from gssbzn March 25, 2020 15:45
Copy link
Collaborator

@gssbzn gssbzn left a comment

Choose a reason for hiding this comment

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

small grammar fix but code looks great 👍

internal/cli/atlas_alerts_config_fields.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@gssbzn gssbzn left a comment

Choose a reason for hiding this comment

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

LGTM

@andreaangiolillo andreaangiolillo merged commit 1cd6752 into master Mar 26, 2020
@andreaangiolillo andreaangiolillo deleted the CLOUDP-57844 branch March 26, 2020 09:53
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.

2 participants