-
Notifications
You must be signed in to change notification settings - Fork 5
How to Contribute
Contributions to NiFi Hub are welcome — whether adding a new extension bundle, a new flow, or improving existing ones. This page summarises the process; see CONTRIBUTING.md in the repository root for complete requirements.
- Java 21+ (Maven is provided via
./mvnwwrapper) - Python 3.12+ (for flow validation tests)
- Git
Use the provided script to generate the standard directory structure:
./create-bundle.sh <category> <sub-category> <name>
# Example: ./create-bundle.sh data snowflake nifi-snowflakeThis creates extensions/<category>/<sub-category>/nifi-<name>-bundle/ with the correct POM hierarchy, package structure, and a starter processor.
Alternatively, copy the example bundle as a template and rename.
- Place Java source in
nifi-<name>-processors/src/main/java/com/snowflake/nifihub/<category>/<name>/ - Register the processor in
src/main/resources/META-INF/services/org.apache.nifi.processor.Processor - Write unit tests using the
nifi-mockframework (minimum 80% line coverage required)
This project uses NiFi's coding conventions:
- All variables that can be
finalmust befinal - No star imports
- 200-character line width maximum, 4-space indentation
- SLF4J loggers (never
System.out.println) - Apache 2.0 license header on all source files
Run the full check locally before opening a PR:
./mvnw clean verify -Pcontrib-check -f extensions/<your-bundle>/pom.xmlEach bundle needs a SKILL.md at its root documenting its purpose, processors, configuration, and usage examples. This file is used by AI coding assistants to understand the bundle.
- The Bundle CI workflow will run automatically
- Coverage results are posted as a PR comment
- At least one approving review is required
In the NiFi UI, right-click the process group you want to share and select Download Flow Definition (NiFi 2.x) or Download Flow (NiFi 1.x). Save the JSON file.
flows/<bucket>/
├── <flow-name>.json # The exported flow definition
├── <flow-name>.md # Documentation (see below)
└── tests/
└── test_<flow-name>.py # Validation tests
Choose or create a <bucket> that matches the flow's category (e.g., examples, salesforce, data).
The .md file must explain:
- Purpose — what the flow does
- Components — key processors and controller services
- Required NARs — which NAR files must be installed
- Parameters — any NiFi parameters the flow uses
- Configuration — how to set it up after import
- Expected Behaviour — what the flow does when running
See hello-world.md as an example.
Tests in tests/test_<flow-name>.py use nipyapi to validate the flow's structure without running it. Typical checks:
- Process group imports successfully
- Required processors are present and of the right type
- Required controller services are present
- Parameters are defined
- Connections are correctly wired
Run tests locally:
pip install -r flows/requirements.txt
pytest flows/<bucket>/tests/ -v- The Flow CI workflow runs the Snowflake Flow Diff Action and validation tests automatically
- The flow diff and any checkstyle violations are posted as a PR comment
- At least one approving review is required
- Maintainers can optionally trigger a live deploy test with
deploy this flow— see CD Pipeline
To publish a new version of a bundle:
- In a PR, change the
<revision>property in the bundle'spom.xmlfromX.Y.Z-SNAPSHOTtoX.Y.Z - Merge the PR to
main - The Auto Release workflow detects the non-SNAPSHOT version and automatically builds the bundle, creates a GitHub Release with the NAR attached, and bumps the version to
X.Y.(Z+1)-SNAPSHOT
For version jumps or retries, admins can use the Release Bundle workflow from the Actions tab.
Open an issue or reach out to the maintainers listed in CODEOWNERS.