./docs/Contribution_Guide/Contributing/Contributing.mdsla# Contributing to the Punch
First off, thanks for taking the time to contribute!
The following is a set of guidelines for contributing to the punch and its packages, which are hosted in the thales digital gitlab. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
I just have a question¶
We have different officials ways of communicating where you can find detailed answers and where our team provides helpful tips for questions.
- Punchplatform official website
- Stable documentation
- Punchplatform Service desk, if you have questions
If chat is more your speed, you can join the Punchplatform Slack team:
- Join the Punch Discord
- Use the
#discussionschannel for general questions or discussions
- Check out the
#welcomechannels for latest infos.
- Use the
What should I know before I get started ?¶
The punch is a large project hosted on the Thales Digital Gitlab. When you initially consider contributing to the punch, you might be unsure about which of those repositories implements the functionality you want to change or report a bug for. This section should help you with that.
The punch is intentionally very modular. Although a single git repositorycontains everything, each folder in there contains a specific part.
pp-grok- the essential libraries used in all others : configuration, punch language, socket connectors etc..
pp-core- contains most of the stream processing and punch administration modules. This is the biggest folder.
pp-analytics- Contains the spark|java punchline modules.
pp-python- Python and pyspark apps.
pp-external- used to download and embedthe punch external dependencies, like Elasticsearch, Storm and Spark.
pp-gui- the punch various HMI and kibana plugins
pp-resources- standard parsers, one-node configurations, and standalone dashboards are in this package.
pp-packaging- a builder folder used to package the final packages as delivered to customers .
Some conventions have been developed over time
- Maven artifacts and distribution Packages are named
How Can I Contribute?¶
This section guides you through submitting a bug report for Punchplatform. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.
Before creating bug reports, please check this list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible. Fill out as completely as possible the Jira form, the information it asks for helps us resolve issues faster.
Note: If you find a Closed issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
Before Submitting A Bug Report¶
- If the git repository related to your problem has a README with a debugging section, check if this enables you to investigate yourself. You might be able to find the cause of the problem and fix things yourself. Most importantly, check if you can reproduce the problem in the latest version of the punch, if the problem occurs when you run Punchplatform in safe mode, and if you can get the desired behavior by changing Punchplatform's or packages' config settings.
- Check the troubleshooting section of this documentation for a list of common questions and problems.
- Determine which repository the problem should be reported in.
- Perform a cursory search to see if the problem has already been reported. If it has and the issue is still open, add a comment to the existing issue instead of opening a new one.
How Do I Submit A (Good) Bug Report?¶
Bugs are tracked as Service Desk. After you have determined which repository your bug is related to, create an issue on that repository and provide the following information to explain the problem and include additional details to help maintainers reproduce the problem:
- Use a clear and descriptive title for the issue to identify the problem.
- Describe the exact steps which reproduce the problem in as many details as possible. For example, start by explaining how you started Punchplatform, e.g. which command exactly you used in the terminal, or how you started Punchplatform otherwise. When listing steps, don't just say what you did, but explain how you did it. For example, if you moved the cursor to the end of a line, explain if you used the mouse, or a keyboard shortcut or an Punchplatform command, and if so which one?
- Provide specific examples to demonstrate the steps. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use Markdown code blocks.
- Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
- Explain which behavior you expected to see instead and why.
- Include screenshots and animated GIFs which show you following the described steps and clearly demonstrate the problem. If you use the keyboard while following the steps, record the GIF with the Keybinding Resolver shown. You can use this tool to record GIFs on macOS and Windows, and this tool or this tool on Linux.
- If you're reporting that Punchplatform crashed, include a crash report with a stack trace from the operating system. On macOS, the crash report will be available in
Console.appunder "Diagnostic and usage information" > "User diagnostic reports". Include the crash report in the issue in a code block, a file attachment, or put it in a gist and provide link to that gist.
- If the problem is related to performance or memory, include a
CPU profile capturewith your report.
- If the problem wasn't triggered by a specific action, describe what you were doing before the problem happened and share more information using the guidelines below.
Provide more context by answering these questions:
- Can you reproduce the problem ?
- Did the problem start happening recently (e.g. after updating to a new version of Punchplatform) or was this always a problem?
- If the problem started happening recently, can you reproduce the problem in an older version of Punchplatform? What's the most recent version in which the problem doesn't happen? You can download older versions of Punchplatform from Download page.
- Can you reliably reproduce the issue? If not, provide details about how often the problem happens and under which conditions it normally happens.
Include details about your configuration and environment:
- Which version of Punchplatform are you using? You can get the exact version by running
punchplatform -vin your terminal, or by starting Punchplatform and running the
Application: Aboutcommand from the Command Palette.
- What's the name and version of the OS you're using?
- Are you running Punchplatform in a virtual machine? If so, which VM software are you using and which operating systems and versions are used for the host and the guest?
- Which packages do you have used (developer only)?
- Are you using
local configuration files
parsersto customize Punchplatform? If so, provide the contents of those files, preferably in a code block or with a link to a gist.
- Which keyboard layout are you using? Are you using a US layout or some other layout?
This section guides you through submitting an enhancement suggestion for Punchplatform, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions :mag_right:.
Before creating enhancement suggestions, please check this list as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please include as many details as possible. Includes the steps that you imagine you would take if the feature you're requesting existed.
Before Submitting An Enhancement Suggestion¶
- Check if you are using the latest version of Punchplatform and if you can get the desired behavior by changing Punchplatform's or packages' config settings.
- Check if there is already a package which provides that enhancement.
- Determine which repository the enhancement should be suggested in.
- Perform a cursory search to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
How Do I Submit A (Good) Enhancement Suggestion?¶
Enhancement suggestions are tracked as Jira issues. After you've determined which repository your enhancement suggestion is related to, create an issue on that repository and provide the following information:
- Use a clear and descriptive title for the issue to identify the suggestion.
- Provide a step-by-step description of the suggested enhancement in as many details as possible.
- Provide specific examples to demonstrate the steps. Include copy/pasteable snippets which you use in those examples, as Markdown code blocks.
- Describe the current behavior and explain which behavior you expected to see instead and why.
- Include screenshots or animated GIFs which help you demonstrate the steps or point out the part of Punchplatform which the suggestion is related to. You can use this tool to record GIFs on macOS and Windows, and this tool or this tool on Linux.
- Explain why this enhancement would be useful to most Punchplatform users and isn't something that can or should be implemented as a community package.
- List some other text editors or applications where this enhancement exists.
- Specify which version of Punchplatform you're using. You can get the exact version by running
punchplatform -vin your terminal.
- Specify the name and version of the OS you're using.
The punchplatform team follows a trunk base development process. The most important observation is the following:
Branches create distance between developers and we do not want that
In a nutshell, there is a single branch. We commit often, we do not stop coding whenever a release approaches, the single branch is always release ready, and all developers run the build locally.
Make sure you read the trunk based developments observed habits.
Punchplatform Core and all packages can be developed locally. For instructions on how to do this, see the following sections in the Punchplatform Core repository:
The process described here has several goals:
- Maintain Punchplatform's quality
- Fix problems that are important to users
- Engage the community in working toward the best possible Punchplatform
- Enable a sustainable system for Punchplatform's maintainers to review contributions
Please follow these steps to have your contribution considered by the maintainers:
- Follow the styleguides
- After you submit your pull request, verify that all status checks are passing.
What if the status checks are failing?
If a status check is failing, and you believe that the failure is unrelated to your change, please leave a comment on the pull request explaining why you believe the failure is unrelated. A maintainer will re-run the status check for you. If we conclude that the failure was a false positive, then we will open an issue to track that problem with our status check suite.
While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted.
Contributing Documentation Changes¶
To propose a change to release documentation (that is, docs that appear under https://doc.punchplatform.com/), edit the Markdown source files in
pp-documentation repository, whose README file shows how to build the documentation locally to test your changes. The process to propose a doc change is otherwise the same as the process for proposing code changes below.
Git Commit Messages¶
- use only lower case ("add new great feature" not "Add new Great features")
- Use the present tense ("add feature" not "added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Consider starting the commit message with the reference issues and title
Language Style Guide¶
Documentation Style Guide¶
Read the Punchplatform Contributing guide.