GithubHelp home page GithubHelp logo

Comments (5)

sadohert avatar sadohert commented on July 3, 2024 2

Thanks @levb .... I'll close this issue. Ultimately I wanted to understand the "developer workflow" for code > build > deploy > test > repeat. I wasn't finding repeating the steps in the server/plugin docs was resulting in a sane workflow (seemed like I was having to restart the server and kill plugins to see updated behaviour)... BUT, after:

  1. Updating my server to the latest,
  2. Removing the mattermost-demo-plugin from my local setup (this still doesn't seem to clean up properly on make stop-server, I'll submit somethign separate),
  3. Setting up these environment variables:
export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_USERNAME=<admin account>
export MM_ADMIN_PASSWORD=<admin password>

I can successfully code > build > deploy > test > repeat without server restarts or killing plugins.

Thanks

from mattermost-developer-documentation.

hanzei avatar hanzei commented on July 3, 2024

Hey @sadohert,

The most efficient approach is to run just make deploy. It takes care of removing the old plugin and enables the new installed version. No further steps are needed.

The site you linked is a generic introduction into plugins. make deploy is only available on plugins which use the Sample Plugin template. Hence I would much rather improve the readme on https://github.com/mattermost/mattermost-plugin-sample/.

What do you think about this?

from mattermost-developer-documentation.

sadohert avatar sadohert commented on July 3, 2024

Ahhh yes. I wasn't thinking about the make deploy being a plugin project-specific thing. So yes, probably makes sense to improve the readme.

But even within the context of someone building a plugin with their own build scripts, are you saying we should be able to just replace the plugin binary and the server will pick this up and start using it? For me, I:

  • cloned the plugin-sample,
  • edited the hello world print statement with a new string,
  • rebuilt with make deploy, and then
  • refreshed http://<myserver>/plugins/<my cloned plugin>

... and I don't see the changed string (e.g., "Hello World 2"). I checked the timestamp of the plugin binary file on the server and it's updated. Only way I'm able to get the plugin behaviour to change (i.e., print my new string) is to disable and re-enable the plugin. As soon as I disable then re-enable, the plugin string changes.

Maybe something else I'm doing wrong?

My setup follows these server development instructions.

Incidentally, in previous testing I noticed that make stop-server wasn't actually killing the process for the 2 plugins I have installed (mattermost-plugin-sample, and mattermost-plugin-demo). I had to manually kill them.... discussed this with @lieut-data and was going to submit a separate report for that.

from mattermost-developer-documentation.

levb avatar levb commented on July 3, 2024

@sadohert did you update your server to the most recent master? The exit time dead-lock you were referring to was leaving the old plugin executables running even after you kill the server. I would also recommend tailing the server logs to make sure make deploy worked as designed.

1/5 the issue here was not so much the quality of the documentation (which should be improved!), but a combination of (a) bug(s), and (b) lack of detailed visibility into each plugin's deployment history and/or running status details (including the plugin-specific logs?). IMO we need to improve the latter to help us diagnose and service these kinds of situations.

from mattermost-developer-documentation.

hanzei avatar hanzei commented on July 3, 2024

Thank you very much for your feedback @sadohert!

from mattermost-developer-documentation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.