From 2fa9199eb540e8000e52173854062a9f6a1fd076 Mon Sep 17 00:00:00 2001 From: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com> Date: Thu, 6 Jun 2024 09:28:38 -0400 Subject: [PATCH] Use new bulk import flags (#1056) The flag --extract-content=false is used to increase import performance by skipping attachment parsing. The --json flag replaces the old format flag, but behaves the same. --- internal/supervisor/import.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/supervisor/import.go b/internal/supervisor/import.go index fc1b8395e..3ab117269 100644 --- a/internal/supervisor/import.go +++ b/internal/supervisor/import.go @@ -69,7 +69,7 @@ type mmctl struct { } func (m *mmctl) Run(args ...string) ([]byte, error) { - args = append([]string{"--format", "json", "--local"}, args...) + args = append([]string{"--json", "--local"}, args...) return m.provisioner.ExecMMCTL(m.cluster, m.clusterInstallation, args...) } @@ -381,7 +381,7 @@ func (s *ImportSupervisor) copyImportToWorkspaceFilestore(imprt *awat.ImportStat } func (s *ImportSupervisor) startImportProcessAndWait(mmctl *mmctl, logger logrus.FieldLogger, importArchiveFilename, awatImportID string) error { - output, err := mmctl.Run("import", "process", importArchiveFilename) + output, err := mmctl.Run("import", "process", "--extract-content=false", importArchiveFilename) if err != nil { return errors.Wrap(err, "failed to start import process in Mattermost itself") }