Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

OVERVIEW

Support Packet Generation tool will allow users to grab information about their Mattermost instance to provide to the support team to save the trouble for support asking manually for this information. It is in the hopes of increasing productivity and making the process of getting information from a customer faster and easier.

...

  1. We wanted it somewhere in the system console. I’ve only ever seen plugins implement stuff in chat facing side whether as a slash command or UI component. I believe we don’t have the infrastructure setup such that plugins can inject code into the system console which could add extra work. Ask Integrations if we have this or not .

  2. We noticed that we already have a commercial support link in the dropdown in the hamburger menu of the system console which leads you the a generic Mattermost support webpage. We decided that it makes most sense to take that and improve on it. This allows us to take something existing within Mattermost which isn’t all that helpful and improve and make it better. Phrase it in a more positive way, mention how you can take it and make more improve

  3. Personally, only having done 1 plugin in the past which was server sided slash command, there will be some time spent learning how the injection of code into the webapp works and this may take time to learn and get familiar with. This is not valid as someone else could be writing it

GOALS

  1. - Make it easier for support to gather the information they need by providing an downloadable zip file that provides

  2. API endpoint that responds with text file expand more

Ask support about the format they want since they do a lot of scripting. Text or Json? Verify with them

// Could have an api endpoint with json payload.

SCOPE

Mention phase 2 is out of scope

In:

Out:

BACKGROUND READING

TERMINOLOGY

SPECIFICATIONS

High-level Architecture

Developers Perspective

Describe how it works, hit 1? hit 2? existing endpoint or not?


Permissions

Anyone who has access to system console (any admin role) should be allowed to do this.

Schema

No database changes required

REST API

GET /api4/system/generate_support_packet

...

Explain response , what files it will include, the format of the files, give an example of what the response is going to looks like. Make sure zip file name is unique and how to name it.

Server OS:

In golang, we can use runtime.GOOS to get the operating system which the server is running on.

...

List plugins installed (including versions) (JSON In text?? make this a separate file?? plugins.json):

We can do a

Code Block
     response, err := c.App.GetPlugins()     
     if err != nil {         
      c.Err = err         
      return     
     }

...

already has this implemented (https://github.com/olivere/elastic/blob/v6.2.35/plugins.go#L24)

Log File:

Describe this is an example of how you retrieve the mattermost.log file to be attached to the zip.

Code Block
languagego
if *s.Config().LogSettings.EnableFile {
   		logFile := utils.GetLogFileLocation(*s.Config().LogSettings.FileLocation)
		file, err := os.Open(logFile)
		// Write that file into the zip the user will download
}

Active Config Settings:Setting (Sanitized Config.json or something, but make sure it is a separate file!!, have it in the example!)

A matter of calling c.App.GetSanitizedConfig() as it already seems to scrub out all confidential information

...

Regarding debug level, check to see if their out logs to file is enabled and if the file log levels is set to debug. If not, then let’s show the message in the design to encourage them to enable it and set it to debug and try to recreate their issue to provide us with the most amount of information.

Specify that this is simple modal with translated text

CLI

List CLI additions

...

Zip file creation not accessible via CLI in any of the current phases.

Talk to Kaite / Support team and ask them about it.

Webapp only

Mobile and Webapp

Mobile does not have anything because it is only accessible in the system console

Performance

Will there be No performance degradation or impact?

...

impact expected as this is simple/request response that is retrieving information.

CREDITS

Big thanks to Scott Bishel and Martin Kraft for their help and support.