Merge branch 'master' into mpa-playbooks

Этот коммит содержится в:
Giorgi Bochorishvili
2023-01-16 15:02:40 +04:00
родитель 98c2e9f518 6b6150d374
Коммит 4732c32495
13 изменённых файлов: 189 добавлений и 160 удалений

Просмотреть файл

@@ -130,23 +130,6 @@ func (ch *Channels) syncPluginsActiveState() {
}
if pluginEnabled {
// Disable focalboard in product mode.
if pluginID == model.PluginIdFocalboard && ch.cfgSvc.Config().FeatureFlags.BoardsProduct {
msg := "Plugin cannot run in product mode. Disabling."
mlog.Warn(msg, mlog.String("plugin_id", model.PluginIdFocalboard))
// This is a mini-version of ch.disablePlugin.
// We don't call that directly, because that will recursively call
// this method.
ch.cfgSvc.UpdateConfig(func(cfg *model.Config) {
cfg.PluginSettings.PluginStates[pluginID] = &model.PluginState{Enable: false}
})
pluginsEnvironment.SetPluginError(pluginID, msg)
ch.unregisterPluginCommands(pluginID)
disabledPlugins = append(disabledPlugins, plugin)
continue
}
enabledPlugins = append(enabledPlugins, plugin)
} else {
disabledPlugins = append(disabledPlugins, plugin)
@@ -322,6 +305,16 @@ func (ch *Channels) syncPlugins() *model.AppError {
var wg sync.WaitGroup
for _, plugin := range availablePlugins {
// Disable focalboard in product mode.
if plugin.Manifest.Id == model.PluginIdFocalboard && ch.cfgSvc.Config().FeatureFlags.BoardsProduct {
mlog.Info("Plugin cannot run in product mode, disabling.", mlog.String("plugin_id", model.PluginIdFocalboard))
appErr := ch.disablePlugin(model.PluginIdFocalboard)
if appErr != nil {
mlog.Error("Error disabling plugin", mlog.Err(err))
}
continue
}
wg.Add(1)
go func(pluginID string) {
defer wg.Done()

Просмотреть файл

@@ -293,8 +293,9 @@ func NewServer(options ...Option) (*Server, error) {
}
return event
},
TracesSampler: sentry.TracesSamplerFunc(func(ctx sentry.SamplingContext) sentry.Sampled {
return sentry.SampledFalse
EnableTracing: false,
TracesSampler: sentry.TracesSampler(func(ctx sentry.SamplingContext) float64 {
return 0.0
}),
}); err2 != nil {
mlog.Warn("Sentry could not be initiated, probably bad DSN?", mlog.Err(err2))

Просмотреть файл

@@ -102,7 +102,6 @@ func TestAddUserToTeam(t *testing.T) {
})
t.Run("block user by domain but allow bot", func(t *testing.T) {
t.Skip("MM-48973")
th.BasicTeam.AllowedDomains = "example.com"
_, err := th.App.UpdateTeam(th.BasicTeam)
require.Nil(t, err, "Should update the team")

Просмотреть файл

@@ -321,12 +321,14 @@ func (a *App) createUserOrGuest(c request.CTX, user *model.User, guest bool) (*m
// table in CWS. This is then used to calculate how much the customers have to pay in addition for the extra users. If the
// workspace is currently on a monthly plan, then this function will not do anything.
go func() {
_, err := a.SendSubscriptionHistoryEvent(ruser.Id)
if err != nil {
c.Logger().Error("Failed to create/update the SubscriptionHistoryEvent", mlog.Err(err))
}
}()
if a.Channels().License().IsCloud() {
go func(userId string) {
_, err := a.SendSubscriptionHistoryEvent(userId)
if err != nil {
c.Logger().Error("Failed to create/update the SubscriptionHistoryEvent", mlog.Err(err))
}
}(ruser.Id)
}
return ruser, nil
}