-
Notifications
You must be signed in to change notification settings - Fork 495
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
Rename the MongoSnap fields to JujuDBSnap to match snap name. #11475
Merged
jujubot
merged 1 commit into
juju:develop
from
howbazaar:rename-mongo-snap-to-juju-db-snap
Apr 21, 2020
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,9 +133,9 @@ const ( | |
// detault | ||
MongoMemoryProfile = "mongo-memory-profile" | ||
|
||
// MongoSnapChannel selects the channel to use when installing mongo | ||
// JujuDBSnapChannel selects the channel to use when installing mongo | ||
// snaps for focal or later. The value is ignored for older releases. | ||
MongoSnapChannel = "mongo-snap-channel" | ||
JujuDBSnapChannel = "juju-db-snap-channel" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and here wrt other suggestion |
||
|
||
// MaxDebugLogDuration is used to provide a backstop to the execution of a debug-log | ||
// command. If someone starts a debug-log session in a remote screen for example, it | ||
|
@@ -238,9 +238,9 @@ const ( | |
// DefaultMongoMemoryProfile is the default profile used by mongo. | ||
DefaultMongoMemoryProfile = MongoProfDefault | ||
|
||
// DefaultMongoSnapChannel is the default snap channel for installing | ||
// DefaultJujuDBSnapChannel is the default snap channel for installing | ||
// mongo in focal or later. | ||
DefaultMongoSnapChannel = "4.0/stable" | ||
DefaultJujuDBSnapChannel = "4.0/stable" | ||
|
||
// DefaultMaxDebugLogDuration is the default duration that debug-log commands | ||
// can run before being terminated by the API server. | ||
|
@@ -329,7 +329,7 @@ var ( | |
SetNUMAControlPolicyKey, | ||
StatePort, | ||
MongoMemoryProfile, | ||
MongoSnapChannel, | ||
JujuDBSnapChannel, | ||
MaxDebugLogDuration, | ||
MaxTxnLogSize, | ||
MaxPruneTxnBatchSize, | ||
|
@@ -696,9 +696,9 @@ func (c Config) MongoMemoryProfile() string { | |
return DefaultMongoMemoryProfile | ||
} | ||
|
||
// MongoSnapChannel returns the channel for installing mongo snaps. | ||
func (c Config) MongoSnapChannel() string { | ||
return c.asString(MongoSnapChannel) | ||
// JujuDBSnapChannel returns the channel for installing mongo snaps. | ||
func (c Config) JujuDBSnapChannel() string { | ||
return c.asString(JujuDBSnapChannel) | ||
} | ||
|
||
// NUMACtlPreference returns if numactl is preferred. | ||
|
@@ -1099,7 +1099,7 @@ var configChecker = schema.FieldMap(schema.Fields{ | |
AutocertDNSNameKey: schema.String(), | ||
AllowModelAccessKey: schema.Bool(), | ||
MongoMemoryProfile: schema.String(), | ||
MongoSnapChannel: schema.String(), | ||
JujuDBSnapChannel: schema.String(), | ||
MaxDebugLogDuration: schema.TimeDuration(), | ||
MaxTxnLogSize: schema.String(), | ||
MaxPruneTxnBatchSize: schema.ForceInt(), | ||
|
@@ -1138,7 +1138,7 @@ var configChecker = schema.FieldMap(schema.Fields{ | |
AutocertDNSNameKey: schema.Omit, | ||
AllowModelAccessKey: schema.Omit, | ||
MongoMemoryProfile: DefaultMongoMemoryProfile, | ||
MongoSnapChannel: DefaultMongoSnapChannel, | ||
JujuDBSnapChannel: DefaultJujuDBSnapChannel, | ||
MaxDebugLogDuration: DefaultMaxDebugLogDuration, | ||
MaxTxnLogSize: fmt.Sprintf("%vM", DefaultMaxTxnLogCollectionMB), | ||
MaxPruneTxnBatchSize: DefaultMaxPruneTxnBatchSize, | ||
|
@@ -1244,7 +1244,7 @@ they don't have any access rights to the controller itself`, | |
Type: environschema.Tstring, | ||
Description: `Sets mongo memory profile`, | ||
}, | ||
MongoSnapChannel: { | ||
JujuDBSnapChannel: { | ||
Type: environschema.Tstring, | ||
Description: `Sets channel for installing mongo snaps when bootstrapping on focal or later`, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,7 +139,7 @@ func (s *AgentConfigUpdaterSuite) TestCentralHubMissing(c *gc.C) { | |
*result = params.ControllerConfigResult{ | ||
Config: map[string]interface{}{ | ||
"mongo-memory-profile": "default", | ||
"mongo-snap-channel": controller.DefaultMongoSnapChannel, | ||
"juju-db-snap-channel": controller.DefaultJujuDBSnapChannel, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
}, | ||
} | ||
default: | ||
|
@@ -224,7 +224,7 @@ func (s *AgentConfigUpdaterSuite) startManifold(c *gc.C, a agent.Agent, mockAPIP | |
*result = params.ControllerConfigResult{ | ||
Config: map[string]interface{}{ | ||
"mongo-memory-profile": "default", | ||
"mongo-snap-channel": controller.DefaultMongoSnapChannel, | ||
"juju-db-snap-channel": controller.DefaultJujuDBSnapChannel, | ||
}, | ||
} | ||
default: | ||
|
@@ -388,14 +388,14 @@ func (mc *mockConfig) SetMongoMemoryProfile(profile mongo.MemoryProfile) { | |
mc.profileSet = true | ||
} | ||
|
||
func (mc *mockConfig) MongoSnapChannel() string { | ||
func (mc *mockConfig) JujuDBSnapChannel() string { | ||
if mc.snapChannel == "" { | ||
return controller.DefaultMongoSnapChannel | ||
return controller.DefaultJujuDBSnapChannel | ||
} | ||
return mc.snapChannel | ||
} | ||
|
||
func (mc *mockConfig) SetMongoSnapChannel(snapChannel string) { | ||
func (mc *mockConfig) SetJujuDBSnapChannel(snapChannel string) { | ||
mc.snapChannel = snapChannel | ||
mc.snapChannelSet = true | ||
} | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps can we make this
jujudb-snap-channel
The other fields don't have hyphens (they should) and reducing the number we use in this new field looks a little tidier IMO