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-139997: Add the command atlas cluster advancedSettings update to AtlasCLI #1479

Merged
merged 16 commits into from
Oct 19, 2022

Conversation

andreaangiolillo
Copy link
Collaborator

@andreaangiolillo andreaangiolillo commented Oct 12, 2022

Proposed changes

Jira ticket: CLOUDP-139997

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 in document requirements section listed in CONTRIBUTING.md (if appropriate)
  • I have addressed the @mongodb/docs-cloud-team comments (if appropriate)
  • I have updated test/README.md (if an e2e test has been added)
  • I have run make fmt and formatted my code

Further comments

./bin/atlas cluster advancedSettings update Cluster69449 --oplogSizeMB 1222                                                                                                1.18
Updating advanced configuration settings of your cluster'.
./bin/atlas cluster advancedSettings update --help                                                                                                                         1.18
Update advanced configuration settings for one cluster.

Usage:
  atlas clusters advancedSettings update <clusterName> [flags]

Examples:
  Update oplog minimum size for a cluster:
  $ atlas cluster advancedSettings update <clusterName> --projectId <projectId> --oplogSizeMB 1000

  Update minimum TLS protocol for a cluster:
  $ atlas cluster advancedSettings update <clusterName> --projectId <projectId> --minimumEnabledTLSProtocol "TLS1_0"

Flags:
      --disableFailIndexKeyTooLong             Flag that indicates whether you can insert or update documents where all indexed entries don't exceed 1024 bytes. If you provide this flag, mongod writes documents that exceed this limit but doesn't index them.
      --disableJavascript                      Flag that indicates whether the cluster allows execution of operations that perform server-side executions of JavaScript.
  -h, --help                                   help for update
      --noTableScan                            Flag that indicates whether the cluster disables executing any query that requires a collection scan to return results.
      --oplogMinRetentionHours float           Minimum retention window for cluster's oplog expressed in hours.
      --oplogSizeMB int                        Storage limit of cluster's oplog expressed in megabytes.
  -o, --output string                          Output format. Valid values are json, json-path, go-template, or go-template-file.
      --projectId string                       Project ID to use. Overrides the settings in the configuration file or environment variable.
      --readConcern string                     Default level of acknowledgment requested from MongoDB for read operations set for this cluster. (default "available")
      --sampleRefreshIntervalBIConnector int   Interval in seconds at which the mongosqld process re-samples data to create its relational schema.
      --sampleSizeBIConnector int              Number of documents per database to sample when gathering schema information. (default 1000)
      --tlsProtocol string                     Minimum Transport Layer Security (TLS) version that the cluster accepts for incoming connections.
      --writeConcern string                    Default level of acknowledgment requested from MongoDB for write operations set for this cluster. (default "1")

Global Flags:
  -P, --profile string   Profile to use from your configuration file.

Waiting for mongodb/go-client-mongodb-atlas#316

@andreaangiolillo andreaangiolillo added the waiting_atlas Waiting atlas go client release label Oct 12, 2022
@andreaangiolillo andreaangiolillo removed the waiting_atlas Waiting atlas go client release label Oct 18, 2022
@andreaangiolillo andreaangiolillo marked this pull request as ready for review October 18, 2022 08:59
@andreaangiolillo andreaangiolillo requested a review from a team as a code owner October 18, 2022 08:59
@andreaangiolillo andreaangiolillo requested a review from a team October 18, 2022 08:59
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.

for all the disable there should be an enable, same with the noTableScan to allow people to enable them again

@gssbzn
Copy link
Collaborator

gssbzn commented Oct 18, 2022

for all the disable there should be an enable, same with the noTableScan to allow people to enable them again

also remember to make them mutually exclusive

gssbzn
gssbzn previously approved these changes Oct 18, 2022
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 thanks for all the work here

Copy link
Contributor

@jwilliams-mongo jwilliams-mongo left a comment

Choose a reason for hiding this comment

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

@andreaangiolillo LGTM with a few minor suggestions

internal/cli/atlas/clusters/advancedsettings/update.go Outdated Show resolved Hide resolved
internal/cli/atlas/clusters/advancedsettings/update.go Outdated Show resolved Hide resolved
internal/cli/atlas/clusters/advancedsettings/update.go Outdated Show resolved Hide resolved
Comment on lines 35 to 37
defaultReadConcern = "available"
defaultWriteConcern = "1"
defaultSampleSizeBIConnector = 1000
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm catching just now that I think these should be removed, you are doing and if this value then don't set it for the request, which means if I change the read concern and want to go back to the default I can't, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, good catch!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

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 9ba6b0a into master Oct 19, 2022
@andreaangiolillo andreaangiolillo deleted the CLOUDP-139997 branch October 19, 2022 10:36
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