Contributing

Please do! Thanks for your help! 🎈 Meshery is community-built and welcomes collaboration. Contributors are expected to adhere to the CNCF’s Code of Conduct.

General Contribution Flow

Meshery and it’s various architectural components are written in different languages, including Golang, Javascript (React.js and Next.js) To make building, testing, and the experience of contributing consistent across all Meshery components, a Makefile is included in the every repository. These make targets are what you will use to build, run, test, and document.

To contribute to Meshery, please follow this basic fork-and-pull request gitflow.

Adding your sign-off on commits (Developer Certificate of Origin)
  • To contribute to this project, you must agree to the Developer Certificate of Origin (DCO) for each commit you make. The DCO is a simple statement that you, as a contributor, have the legal right to make the contribution.
  • See the DCO file for the full text of what you must agree to and how it works here. To signify that you agree to the DCO for contributions, you simply add a line to each of your git commit messages:
    
    Signed-off-by: Jane Smith 
    
  • In most cases, you can add this signoff to your commit automatically with the -s or --signoff flag to git commit. You must use your real name and a reachable email address (sorry, no pseudonyms or anonymous contributions). An example of signing off on a commit:
    $ git commit -s -m “my commit message w/signoff”
  • To ensure all your commits are signed, you may choose to add this alias to your global .gitconfig:

    ~/.gitconfig

    
    [alias]
      amend = commit -s --amend
      cm = commit -s -m
      commit = commit -s
    

    Or you may configure your IDE, for example, VSCode to automatically sign-off commits for you:

  • Should an unsigned commit slip through anyway, the repository's commit-msg hook (installed with the UI dependencies, see ui/.husky/) rejects it locally rather than letting the DCO check fail in CI, where the only remedy is rewriting the branch. To sign off a commit you have already written:
    $ git commit --amend -s --no-edit

Cloning the Repository

The meshery/meshery repository is large - a full clone is on the order of tens of gigabytes and keeps growing. Two directories account for most of that weight, and neither is needed for the vast majority of contributions:

  • models/ - the generated Meshery Model registry (400+ models). A typical build of the server, UI, or CLI only needs the meshery-core and kubernetes models.
  • docs/static/v*/ - archived snapshots of previously released documentation. Only the latest snapshot is needed to build and preview the current docs.

Unless you are specifically working on the model registry or on an archived documentation version, clone sparsely. You still get the full commit history and everything required to build the server, UI, CLI, and current docs, while skipping gigabytes of generated content.

# 1. Blobless partial clone - fetches history metadata, not every file's contents
git clone --no-checkout --filter=blob:none https://github.com/meshery/meshery.git
cd meshery

# 2. Check out everything EXCEPT the bulky generated directories:
#      - every model except meshery-core and kubernetes
#      - archived docs snapshots (keep only the latest, docs/static/v0.9)
git sparse-checkout set --no-cone \
  '/*' \
  '!/models/*' \
  '/models/meshery-core/' \
  '/models/kubernetes/' \
  '!/docs/static/v0.8/'

# 3. Populate the working tree
git checkout master

This yields a working tree a fraction of the size of a full clone. --filter=blob:none makes it a partial clone, so Git transparently fetches any excluded file on demand if you ever check one out - nothing is permanently lost, and git log/git blame keep working across the full history.

The !/models/* pattern excludes the contents of models/ (not the directory itself), which is what lets the two following lines re-include only the meshery-core and kubernetes models. For the docs, exclude the older archived snapshots under docs/static/ and keep the newest (currently docs/static/v0.9); add another ! line for each older version as new snapshots are archived.

Re-including an excluded directory

Working on the model registry, or on an older archived docs version? Re-include just what you need at any time:

# Bring back the full model registry
git sparse-checkout add '/models/'

# ...or a single archived docs version
git sparse-checkout add '/docs/static/v0.8/'

Or restore the full working tree entirely:

git sparse-checkout disable

Not sure where to start?

Follow these steps and you'll be right at home.
  1. See the Newcomers Guide for how, where, and why to contribute.
  2. Sign up for a MeshMate to find the perfect Mentor to help you explore the projects and find your place in the community.
  3. Familiarize yourself with the broader set of projects in Meshery's ecosystem, including the meshery-extensions repositories (the community handbook is a helpful resource): Spend time understanding each of the initiatives through high-level overviews available in the community drive and through discussions with your MeshMate.
  4. Identify your area of interest: Use the time with your MeshMate to familiarize yourself with the architecture and technologies used in the projects. Inform your MeshMate of your current skills and what skills you aim to develop.
  5. Play with Meshery: Put on your user hat and walk-through all of Meshery’s features and functions as a user.
  6. Build Meshery Server and UI: Confirm that you have a usable development environment. See Guides below.
  7. Discuss with the community by engaging in the discussion forum.
  8. Contribute by grabbing any open issue with the help-wanted label and jump in. If needed, create a new issue. All pull requests should reference an open issue. Include keywords in your pull request descriptions, as well as commit messages, to automatically close issues in GitHub.
  9. Fill in a community member form to gain access to community resources.

Specific Contribution Guides

Here is a complete list of all of Meshery’s contributing guides from Server to UI to CLI to Extensions and so on.