[arvados] created: 2.7.0-6598-ge98e166cea
git repository hosting
git at public.arvados.org
Thu May 23 17:17:41 UTC 2024
at e98e166ceab6e377036fc87ce31e4d0d5238994f (commit)
commit e98e166ceab6e377036fc87ce31e4d0d5238994f
Author: Tom Clegg <tom at curii.com>
Date: Thu May 23 13:14:51 2024 -0400
15397: Move remaining Mail configs to Users section.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/doc/admin/upgrading.html.textile.liquid b/doc/admin/upgrading.html.textile.liquid
index 23b701dcd1..3d2aa16f8e 100644
--- a/doc/admin/upgrading.html.textile.liquid
+++ b/doc/admin/upgrading.html.textile.liquid
@@ -32,6 +32,18 @@ h2(#main). development main
"previous: Upgrading to 2.7.1":#v2_7_1
+h3. Configuration entries have been removed or renamed
+
+The following configuration keys have been renamed or removed. Renamed keys will still be loaded if they appear with their old names, but you should update your @/etc/arvados/config.yml@ file to avoid warnings when services start up.
+* @Containers.JobsAPI.Enable@ has been removed
+* @Mail.EmailFrom@ has been removed
+* @Mail.IssueReporterEmailFrom@ has been removed
+* @Mail.IssueReporterEmailTo@ has been removed
+* @Mail.MailchimpAPIKey@ has been removed
+* @Mail.MailchimpListID@ has been removed
+* @Mail.SendUserSetupNotificationEmail@ has moved to @Users.SendUserSetupNotificationEmail@
+* @Mail.SupportEmailAddress@ has moved to @Users.SupportEmailAddress@
+
h3. Legacy container logging system has been removed
The following configuration keys are no longer supported. Remove them from your @/etc/arvados/config.yml@ file to avoid warnings when services start up.
diff --git a/lib/config/config.default.yml b/lib/config/config.default.yml
index 2569a52913..61c9c457c8 100644
--- a/lib/config/config.default.yml
+++ b/lib/config/config.default.yml
@@ -366,6 +366,17 @@ Clusters:
# other admin users exist will automatically become an admin user.
AutoAdminFirstUser: false
+ # Support email address to display in Workbench.
+ SupportEmailAddress: "arvados at example.com"
+
+ # Outgoing email configuration:
+ #
+ # In order to send mail, Arvados expects a default SMTP server
+ # on localhost:25. It cannot require authentication on
+ # connections from localhost. That server should be configured
+ # to relay mail to a "real" SMTP server that is able to send
+ # email on behalf of your domain.
+
# Recipient for notification email sent out when a user sets a
# profile on their account.
UserProfileNotificationAddress: ""
@@ -409,6 +420,10 @@ Clusters:
# Currently implemented for OpenID Connect only.
PreferDomainForUsername: ""
+ # Send an email to each user when their account has been set up
+ # (meaning they are able to log in).
+ SendUserSetupNotificationEmail: true
+
# Ruby ERB template used for the email sent out to users when
# they have been set up.
UserSetupMailText: |
@@ -1730,24 +1745,6 @@ Clusters:
# should leave this alone.
Serialize: false
- Mail:
- # In order to send mail, Arvados expects a default SMTP server
- # on localhost:25. It cannot require authentication on
- # connections from localhost. That server should be configured
- # to relay mail to a "real" SMTP server that is able to send
- # email on behalf of your domain.
-
- # See also the "Users" configuration section for additional
- # email-related options.
-
- # When a user has been set up (meaning they are able to log in)
- # they will receive an email using the template specified
- # earlier in Users.UserSetupMailText
- SendUserSetupNotificationEmail: true
-
- # Support email address to display in Workbench.
- SupportEmailAddress: "arvados at example.com"
-
RemoteClusters:
"*":
Host: ""
diff --git a/lib/config/deprecated.go b/lib/config/deprecated.go
index 0db3de7fc9..b567cdbaa5 100644
--- a/lib/config/deprecated.go
+++ b/lib/config/deprecated.go
@@ -31,6 +31,10 @@ type deprCluster struct {
ProviderAppID *string
ProviderAppSecret *string
}
+ Mail struct {
+ SendUserSetupNotificationEmail *bool
+ SupportEmailAddress *string
+ }
}
type deprecatedConfig struct {
@@ -87,6 +91,14 @@ func (ldr *Loader) applyDeprecatedConfig(cfg *arvados.Config) error {
if dst, n := &cluster.API.MaxRequestAmplification, dcluster.RequestLimits.MultiClusterRequestConcurrency; n != nil && *n != *dst {
*dst = *n
}
+ if dst, addr := &cluster.Users.SupportEmailAddress, dcluster.Mail.SupportEmailAddress; addr != nil {
+ *dst = *addr
+ ldr.Logger.Warnf("using your old config key Mail.SupportEmailAddress -- but you should rename it to Users.SupportEmailAddress")
+ }
+ if dst, b := &cluster.Users.SendUserSetupNotificationEmail, dcluster.Mail.SendUserSetupNotificationEmail; b != nil {
+ *dst = *b
+ ldr.Logger.Warnf("using your old config key Mail.SendUserSetupNotificationEmail -- but you should rename it to Users.SendUserSetupNotificationEmail")
+ }
// Google* moved to Google.*
if dst, n := &cluster.Login.Google.ClientID, dcluster.Login.GoogleClientID; n != nil && *n != *dst {
diff --git a/lib/config/deprecated_test.go b/lib/config/deprecated_test.go
index f73a92be5c..0feeec5e55 100644
--- a/lib/config/deprecated_test.go
+++ b/lib/config/deprecated_test.go
@@ -49,6 +49,26 @@ func testLoadLegacyConfig(content []byte, mungeFlag string, c *check.C) (*arvado
return cluster, nil
}
+func (s *LoadSuite) TestOldEmailConfiguration(c *check.C) {
+ logs := checkEquivalent(c, `
+Clusters:
+ z1111:
+ Mail:
+ SendUserSetupNotificationEmail: false
+ SupportEmailAddress: "support at example.invalid"
+`, `
+Clusters:
+ z1111:
+ Users:
+ SendUserSetupNotificationEmail: false
+ SupportEmailAddress: "support at example.invalid"
+`)
+ c.Check(logs, check.Matches, `(?ms).*deprecated or unknown config entry: .*Mail\.SendUserSetupNotificationEmail.*`)
+ c.Check(logs, check.Matches, `(?ms).*deprecated or unknown config entry: .*Mail\.SupportEmailAddress.*`)
+ c.Check(logs, check.Matches, `(?ms).*using your old config key Mail\.SendUserSetupNotificationEmail -- but you should rename it to Users\.SendUserSetupNotificationEmail.*`)
+ c.Check(logs, check.Matches, `(?ms).*using your old config key Mail\.SupportEmailAddress -- but you should rename it to Users\.SupportEmailAddress.*`)
+}
+
func (s *LoadSuite) TestLegacyVolumeDriverParameters(c *check.C) {
logs := checkEquivalent(c, `
Clusters:
diff --git a/lib/config/export.go b/lib/config/export.go
index aa9594913e..8355b76bb7 100644
--- a/lib/config/export.go
+++ b/lib/config/export.go
@@ -200,9 +200,6 @@ var whitelist = map[string]bool{
"Login.TokenLifetime": false,
"Login.TrustedClients": false,
"Login.TrustPrivateNetworks": false,
- "Mail": true,
- "Mail.SendUserSetupNotificationEmail": false,
- "Mail.SupportEmailAddress": true,
"ManagementToken": false,
"PostgreSQL": false,
"RemoteClusters": true,
@@ -243,6 +240,8 @@ var whitelist = map[string]bool{
"Users.NewUsersAreActive": false,
"Users.PreferDomainForUsername": false,
"Users.RoleGroupsVisibleToAll": false,
+ "Users.SendUserSetupNotificationEmail": false,
+ "Users.SupportEmailAddress": true,
"Users.SyncIgnoredGroups": true,
"Users.SyncRequiredGroups": true,
"Users.SyncUserAccounts": true,
diff --git a/sdk/go/arvados/config.go b/sdk/go/arvados/config.go
index f7daa4c40d..b8b2715a1d 100644
--- a/sdk/go/arvados/config.go
+++ b/sdk/go/arvados/config.go
@@ -213,10 +213,6 @@ type Cluster struct {
TrustPrivateNetworks bool
IssueTrustedTokens bool
}
- Mail struct {
- SendUserSetupNotificationEmail bool
- SupportEmailAddress string
- }
SystemLogs struct {
LogLevel string
Format string
@@ -244,6 +240,8 @@ type Cluster struct {
NewInactiveUserNotificationRecipients StringSet
NewUserNotificationRecipients StringSet
NewUsersAreActive bool
+ SendUserSetupNotificationEmail bool
+ SupportEmailAddress string
UserNotifierEmailFrom string
UserNotifierEmailBcc StringSet
UserProfileNotificationAddress string
diff --git a/services/api/app/models/user.rb b/services/api/app/models/user.rb
index c104ac6fda..299b20baa6 100644
--- a/services/api/app/models/user.rb
+++ b/services/api/app/models/user.rb
@@ -273,7 +273,7 @@ SELECT target_uuid, perm_level
# Send welcome email
if send_notification_email.nil?
- send_notification_email = Rails.configuration.Mail.SendUserSetupNotificationEmail
+ send_notification_email = Rails.configuration.Users.SendUserSetupNotificationEmail
end
if newly_invited and send_notification_email and !Rails.configuration.Users.UserSetupMailText.empty?
diff --git a/services/workbench2/cypress/e2e/search.cy.js b/services/workbench2/cypress/e2e/search.cy.js
index 4e5aa31f4d..f3c2de2645 100644
--- a/services/workbench2/cypress/e2e/search.cy.js
+++ b/services/workbench2/cypress/e2e/search.cy.js
@@ -199,7 +199,6 @@ describe("Search tests", function () {
Containers: {},
InstanceTypes: {},
Login: {},
- Mail: { SupportEmailAddress: "arvados at example.com" },
RemoteClusters: {
"*": {
ActivateUsers: false,
@@ -230,7 +229,7 @@ describe("Search tests", function () {
StorageClasses: {
default: { Default: true, Priority: 0 },
},
- Users: {},
+ Users: { SupportEmailAddress: "arvados at example.com" },
Volumes: {},
Workbench: {},
},
diff --git a/services/workbench2/src/common/config.ts b/services/workbench2/src/common/config.ts
index ed99e7d974..172425f332 100644
--- a/services/workbench2/src/common/config.ts
+++ b/services/workbench2/src/common/config.ts
@@ -47,9 +47,6 @@ export interface ClusterConfigJSON {
Scheme: string
}
};
- Mail?: {
- SupportEmailAddress: string;
- };
Services: {
Controller: {
ExternalURL: string;
@@ -139,6 +136,7 @@ export interface ClusterConfigJSON {
};
Users: {
AnonymousUserToken: string;
+ SupportEmailAddress: string;
};
}
@@ -360,7 +358,8 @@ export const mockClusterConfigJSON = (
},
Volumes: {},
Users: {
- AnonymousUserToken: ""
+ AnonymousUserToken: "",
+ SupportEmailAddress: "arvados at example.com",
},
...config,
});
diff --git a/services/workbench2/src/views/not-found-panel/not-found-panel-root.test.tsx b/services/workbench2/src/views/not-found-panel/not-found-panel-root.test.tsx
index d2acd77787..ce74b23b3f 100644
--- a/services/workbench2/src/views/not-found-panel/not-found-panel-root.test.tsx
+++ b/services/workbench2/src/views/not-found-panel/not-found-panel-root.test.tsx
@@ -23,7 +23,7 @@ describe('NotFoundPanelRoot', () => {
active: 'active',
},
clusterConfig: {
- Mail: {
+ Users: {
SupportEmailAddress: 'support at example.com'
}
} as ClusterConfigJSON,
@@ -48,7 +48,7 @@ describe('NotFoundPanelRoot', () => {
it('should render component without email url when no email', () => {
// setup
- props.clusterConfig.Mail.SupportEmailAddress = '';
+ props.clusterConfig.Users.SupportEmailAddress = '';
// when
const wrapper = mount(
@@ -84,4 +84,4 @@ describe('NotFoundPanelRoot', () => {
// and
expect(wrapper.find('a').length).toBe(1);
});
-});
\ No newline at end of file
+});
diff --git a/services/workbench2/src/views/not-found-panel/not-found-panel-root.tsx b/services/workbench2/src/views/not-found-panel/not-found-panel-root.tsx
index e5d8507b5c..cad98470da 100644
--- a/services/workbench2/src/views/not-found-panel/not-found-panel-root.tsx
+++ b/services/workbench2/src/views/not-found-panel/not-found-panel-root.tsx
@@ -81,8 +81,8 @@ export const NotFoundPanelRoot = withStyles(styles)(
<p>
The page you requested was not found,
{
- !!clusterConfig.Mail && clusterConfig.Mail.SupportEmailAddress ?
- getEmailLink(clusterConfig.Mail.SupportEmailAddress, classes) :
+ !!clusterConfig.Users && clusterConfig.Users.SupportEmailAddress ?
+ getEmailLink(clusterConfig.Users.SupportEmailAddress, classes) :
'email us'
}
if you suspect this is a bug.
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list