-
Alex Ellis authored
Signed-off-by:
Alex Ellis <alexellis2@gmail.com>
Alex Ellis authoredSigned-off-by:
Alex Ellis <alexellis2@gmail.com>
Contributing
Guidelines
Guidelines for contributing.
How can I get involved?
The Slack community is the best place to keep up to date with the project and to get help contributing. Here we exchange ideas, ask questions and chat about OpenFaaS. There are also channels for Raspberry Pi/ARM, Kubernetes and other cloud-native topics. (See below for how to join)
There are a number of areas where contributions can be accepted:
- Write Golang code for the CLI, Gateway or other providers
- Write features for the front-end UI (JS, HTML, CSS)
- Write sample functions in any language
- Review pull requests
- Test out new features or work-in-progress
- Get involved in design reviews and technical proof-of-concepts (PoCs)
- Help release and package OpenFaaS including the helm chart, compose files,
kubectl
YAML, marketplaces and stores - Manage, triage and research Issues and Pull Requests
- Engage with the growing community by providing technical support on Slack/GitHub
- Create docs, guides and write blogs
- Speak at meet-ups, conferences or by helping folks with OpenFaaS on Slack
This is just a short list of ideas, if you have other ideas for contributing please make a suggestion.
I want to contribute on GitHub
I've found a typo
- A Pull Request is not necessary. Raise an Issue and we'll fix it as soon as we can.
I have a (great) idea
The OpenFaaS maintainers would like to make OpenFaaS the best it can be and welcome new contributions that align with the project's goals. Our time is limited so we'd like to make sure we agree on the proposed work before you spend time doing it. Saying "no" is hard which is why we'd rather say "yes" ahead of time. You need to raise a proposal.
Every feature carries a cost - a cost if developed wrong, a cost to carry and maintain it and if it wasn't needed in the first place then this is an unnecessary burden. See Yagni from Martin Fowler. The best proposals are defensible with real data and are more than a hypothesis.
Please do not raise a proposal after doing the work - this is counter to the spirit of the project. It is hard to be objective about something which has already been done
What makes a good proposal?
- Brief summary including motivation/context
- Any design changes
- Pros + Cons
- Effort required up front
- Effort required for CI/CD, release, ongoing maintenance
- Migration strategy / backwards-compatibility
- Mock-up screenshots or examples of how the CLI would work
- Clear examples of how to reproduce any issue the proposal is addressing
Once your proposal receives a design/approved
label you may go ahead and start work on your Pull Request.
If you are proposing a new tool or service please do due diligence. Does this tool already exist in a 3rd party project or library? Can we reuse it? For example: a timer / CRON-type scheduler for invoking functions is a well-solved problem, do we need to reinvent the wheel?
Paperwork for Pull Requests
Please read this whole guide and make sure you agree to the Developer Certificate of Origin (DCO) agreement (included below):
- See guidelines on commit messages (below)
- Sign-off your commits (
git commit --signoff
or-s
) - Complete the whole template for issues and pull requests
- Reference addressed issues in the PR description & commit messages - use 'Fixes #IssueNo'
- Always give instructions for testing
- Provide us CLI commands and output or screenshots where you can
Commit messages
The first line of the commit message is the subject, this should be followed by a blank line and then a message describing the intent and purpose of the commit. These guidelines are based upon a post by Chris Beams.
- When you run
git commit
make sure you sign-off the commit by typinggit commit --signoff
orgit commit -s
- The commit subject-line should start with an uppercase letter
- The commit subject-line should not exceed 72 characters in length
- The commit subject-line should not end with punctuation (., etc)
Note: please do not use the GitHub suggestions feature, since it will not allow your commits to be signed-off.
When giving a commit body:
- Leave a blank line after the subject-line
- Make sure all lines are wrapped to 72 characters
Here's an example that would be accepted:
Add alexellis to the .DEREK.yml file
We need to add alexellis to the .DEREK.yml file for project maintainer
duties.
Signed-off-by: Alex Ellis <alex@openfaas.com>
Some invalid examples:
(feat) Add page about X to documentation
This example does not follow the convention by adding a custom scheme of
(feat)
Update the documentation for page X so including fixing A, B, C and D and F.
This example will be truncated in the GitHub UI and via
git log --oneline
If you would like to ammend your commit follow this guide: Git: Rewriting History
Unit testing with Golang
Please follow style guide on this blog post from The Go Programming Language
If you are making changes to code that use goroutines, consider adding goleak
to your test to help ensure that we are not leaking any goroutines. Simply add
defer goleak.VerifyNoLeaks(t)
at the very beginning of the test, and it will fail the test if it detects goroutines that were opened but never cleaned up at the end of the test.
I have a question, a suggestion or need help
If you have a simple question you can join the Slack community and ask there, but please bear in mind that contributors may live in a different timezone or be working to a different timeline to you. If you have an urgent request then let them know about this.
If you have a deeply technical request or need help debugging your application then you should prepare a simple, public GitHub repository with the minimum amount of code required to reproduce the issue.
If you feel there is an issue with OpenFaaS or were unable to get the help you needed from the Slack channels then raise an issue on one of the GitHub repositories.
I need to add a dependency
The concept of vendoring
is used in projects written in Go. This means that a copy of the source-code of dependencies is stored within each repository in the vendor
folder. It allows for a repeatable build and isolates change.
The chosen tool for vendoring code in the project is dep.
Note: despite the availability of Go modules in Go 1.11, they are not being used in the project at this time. If and when the decision is made to move, a complete overhaul of all repositories will need to be made in a coordinated fashion, including regression and integration testing. This is not a trivial task.
How are releases made?
Releases are made by the Project Lead on a regular basis and when deemed necessary. If you want to request a new release then mention this on your PR or Issue.
Releases are cut with git
tags and a successful Travis build results in new binary artifacts and Docker images being published to the Docker Hub and Quay.io. See the "Build" badge on each GitHub README file for more.
Credentials for the openfaas
and/or functions
Docker Hub and quay.io accounts are coordinated by the project lead using.
Governance
OpenFaaS is an independent open-source project which was created by the Project Lead Alex Ellis in 2016. OpenFaaS is now being built by Alex, a number of volunteer teams, and a wider community of open-source developers.
OpenFaaS Ltd (company no. 11076587) sponsors the development and maintenance of OpenFaaS. OpenFaaS Ltd provides professional services, consultation and support. Email: sales@openfaas.com to make a query.
OpenFaaS ® is a registered trademark in England and Wales.
Project Lead
Responsibility for the project starts with the Project Lead*, who delegates specific responsibilities and the corresponding authority to the Core and Members team.
Some duties include:
- Setting overall technical & community leadership
- Engaging end-user community to advocate needs of end-users and to capture case-studies
- Defining and curating roadmap for OpenFaaS & OpenFaaS Cloud
- Building a community and team of contributors
- Community & media briefings, out-bound communications, partnerships, relationship management and events
How do I become a maintainer?
In the OpenFaaS community there are four levels of structure or maintainership:
- Core Team (GitHub org)
- Members Team (GitHub org)
- Those with Derek access
- The rest of the community.
Core Team
The Core Team includes:
- Alex Ellis (@alexellis)
- Richard Gee (@rgee0)
- Stefan Prodan (@stefanprodan)
- Lucas Roesler (@LucasRoesler)
- Burton Rheutan (@burtonr)
- Ed Wilde (@ewilde)
The Core Team have the ear of the Project Lead. They help with strategy, project maintenance, community management, and make a regular commitment of time to the project on a weekly basis. The Core Team will usually be responsible for, or be a subject-matter-expert (SME) for a sub-system of OpenFaaS. Core Team may be granted write (push) access to one or more sub-systems.
The Core Team gain access to a private core channel and are required to participate on a regular basis.
The Core Team have the same expectations and perks of the Membership Team, in addition will need to keep in close contact with the rest of the Core Team and the Project Lead.
- Core Team are expected to attend 1:1 Zoom calls with the Project Lead up to once per month
- Core Team members will notify the Project Lead and Core Team of any leave of a week or more and set a status in Slack of "away".
Core Team attend all project meetings and calls. Allowances will be made for timezones and other commitments.
Members Team
The Members Team are contributors who are well-known to the community with a track record of:
- fixing, testing and triaging issues and PRs
- offering support to the project
- providing feedback and being available to help where needed
- testing and reviewing pull requests
- joining contributor meetings and supporting new contributors
Note: An essential skill for being in a team is communication. If you cannot communicate with your team on a regular basis, then membership may not be for you and you are welcome to contribute as community.
Varying levels of write access are made available via the project bot Derek to help regular contributors transition to the Members Team.
Members Team Perks:
- access to a private Slack channel
- profile posted on the Team page of the OpenFaaS website
- membership of the GitHub organisations openfaas/openfaas-incubator
Upon request and subject to availability: