Mattermost Peer-to-Peer Forum

Mattermost separating /platform into two repositories on September 6th


#1

Mattermost will be separating the /platform repo into two repositories on September 6th:

Why the change?

Separates PRs for client and server with better naming conventions. This is similar to React Native and Redux repositories and helps us

  • work on one part of the system (webapp/server) without worrying about the other.
  • review PRs more easily as the webapp/server code is logically separated.

It’s also the first step towards de-coupling UI versions from the server, similar to the React Native apps, and helps model the architecture we want to achieve for the server.

How does this affect me?

Foremost, build process is not affected for most, with make run working as expected. There may however be some canges to the build process, which we’ll announce closer to September 6th.

Those running private forks would need to separate their server and webapp code after 4.2 is branched, and mimic what we’ll do when we split the platform repo. A doc with tips and best practices will be prepared to help with the transition.

Finally, those with work-in-progress PRs on September 6th may need to re-submit their pull request after the separation. For instance, PRs changing the UI would need to be re-submitted to the new mattermost-webapp repository.

Questions?

If you have any questions, let us know by responding to this post.


#2

#3

A reminder that Mattermost will be separating the /platform repo into two repositories on September 6th.

If you have any questions, let us know by responding to this post.


#4

The webapp has been split from the main repository. There are now two new repositories:

For developers and those running private forks of Mattermost should make the following changes:

  1. Clone the new mattermost-webapp repository. This should be done in the appropriate location in the golang source tree.
  2. Rename the platform repository to mattermost-server or change the origin for your mattermost-server repository to point at the new URL. Then delete webapp directory from the new mattermost-server repository.
  3. On the other copy created in step 1, run git filter-branch --prune-empty --subdirectory-filter webapp This rewrites the history as if the repository had always only contained the specified folder. This is now mattermost-webapp.

Sample commands:

  1. cd $GOPATH/src/gitthub.com/mattermost && git clone https://github.com/mattermost/mattermost-webapp (or the ssh equivalent)
  2. cd $GOPATH/src/gitthub.com/mattermost && mv platform mattermost-server
  3. git remote set-url origin https://github.com/mattermost/mattermost-server (or the ssh equivalent)

Past these changes a normal make run should work. Note that if you where using any of the make targets “dist, package, build” They might not work as you expect. Use the make run family of commands instead.

make help also has some descriptions of useful make commands.


#5

I see issues are disabled on the webapp repository. Will they continue to be in server?


#6

Great question. Yeah, issue reports will continue to be in the server repository.


#7

Hi,

Should we be having any problems running make test after the split? I cloned both server and webapp repos to $GOPATH/src/github.com/mattermost and haven’t succeeded in running tests as shown in the screenshot below (I ran make test inside the server repo). Really looking forward to working on some issues for the webapp once I get this resolved :slight_smile:


#8

Thanks @santos22 for your interest contributing to the webapp :slight_smile:

Can you help

  1. try run it again,
  2. if it fails, try run it with a clean database,
  3. if neither help, let us know which test(s) failed?

#9

Hi @jasonblais, thanks for the prompt response!

I ran a make clean and then a make nuke before re-running make test within the mattermost0server directory. Should there be a copy of package.json in the mattermost-server directory? I got a npm ERR! enoent ENOENT: no such file or directory, open ‘/Users/ssolorzano/go/src/github.com/mattermost/mattermost-server/package.json’ message as shown in the screenshot below.

I re-ran make test and didn’t get the npm message and saved the output of the run to a .txt file. I am going through this file but I don’t see any tests failing.


#10

Hi @jasonblais,

I re-cloned both repos and ran make test within the mattermost-server directory - the following was the exact same error message I was getting before the split occurred.

It looks like TestZZWebSocketTearDown is passing and then it fails on github.com/mattermost/mattermost-server/api4


#11

@santos22 any reason why you need make test? Do you need to test a specific method or anything you have implemented? Could you provide more details on your need?


#12

HI @prixone,

I am working on the following issue https://github.com/mattermost/mattermost-server/issues/7113 and noticed that make test is a part of the developer workflow required to submit a pull request.


#13

Yes, indeed that is written in the work flow, however you seem to be missing the point in there:

to make sure there are no errors with your syntax or tests.

Do you have any tests added with your changes? if so you could simple run the test directly.

You don’t need to run the whole make test to test only the tests you have changed or added, you can run those tests directly.

Furthermore, the ticket you’re working on, seems to be strictly webapp changes with no server changes(could be wrong here, but it seems so).


Also could you tell me what OS are you running the tests on and if possible could you run it as make test > output.log and attach the log somewhere as it does not fail at the end but some where else you will find a FAIL.