Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Documentation is created in AsciiDoc.

Supported Versions

NiFi automated builds run on the latest updated versions of the following Java Long Term Support releases:

  • Java 21

Minimum Required Versions

For each supported version of Java, NiFi requires the follow minimum update version:

  • Java 21

NiFi automated builds run on the latest updated version of Apache Maven and require the following minimum version, which can be executed using the Maven Wrapper scripts included in the repository:

  • Apache Maven 3.9.2

Running NiFi in Debug mode

...

Are located in '<code checkout location>/nifi-docs/src/main/asciidoc' and can be changed by making changes to the ASCIIdoc files and following the code contribution process described in "Providing code or documentation contributions" section of this document.

...

As with other contributions, component level documentation should follow the process described in "Providing code or documentation contributions" section of this document.

...

git remote add upstream https://github.com/apache/nifi.git


Checkout the '

...

main' or '1.x.0' branch

git checkout -b master origin/master will main origin/main will create a local, tracking branch named master main.

git checkout -b 0.x origin/1.x.0 will create a local, tracking branch named 1.x.0.

The master branch main branch currently represents the next major release line (1.x.0). 

...

  • Use of a central repository
  • Branch per feature similar to the Feature Branch Workflow
  • Work is done locally and then pushed to the central repo
  • 'mastermain' branch contains the official release history.  Code changes (not code formatting, administrative updates) require Review-Then-Commit (RTC) by another committer to get incorporated.

...

Create a local branch that relates the associated JIRA issue with the branch.  Such an example would be:

git checkout -b nifi-359 mastermain

This provides instant traceability to the supporting issue and provides a means of linking discussion.

...

If you are working on a branch over an extended period of time, it helps to keep your code current with the master branch main branch to ensure your changes are applied as anticipated and to facilitate the merging process.

This is best accomplished through the git rebase functionality.  There are many ways in which git rebase can be utilized in this context of branching and rebasing.  Typically, the command to do so is performed from your feature branch.  Continuing on with the sample of NIFI-359, we will show one way of accomplishing this task.

Update your local copy of 

...

main

$ git checkout mastermain
Switched to branch 'mastermain'
$ git fetch upstream
remote: Counting objects: 52, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 16 (delta 7), reused 0 (delta 0)
Unpacking objects: 100% (16/16), done.
From https://git-wip-us.apache.org/repos/asf/nifi
a49a03d..8d745c2 mastermain -> upstream/mastermain
$ git merge upstream/mastermain
Updating a49a03d..8d745c2
Fast-forward
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/StandardDataFlow.java | 27 ++++++++++-----------------
1 file changed, 10 insertions(+), 17 deletions(-)

...

$ git checkout nifi-359
Switched to branch 'nifi-359'
$ git rebase mastermain
First, rewinding head to replay your work on top of it...
Applying: NIFI-359: Removing the output to System.out and providing some simple checks to ensure extraction of attributes is consistent with the sample file used in the test.

...

Steps to merge/close pull requests with two main branches

As NiFi now has a 1.0 x (mastermain) and 01.x.y (support) branchbranches, pull requests (PR) must may be applied to bothto both, but typically will only be targetted at main. Here is a step-by-step guide for committers to ensure this occurs for all PRs.


  1. Check out the latest master main
    1. $ git checkout mastermain
    2. $ git pull upstream mastermain
  1. Check out the PR (example #327). This will be in detached-HEAD state. (Note: You may need to edit the .git/config file to add the fetch lines below)
    1. $ git checkout github/pr/327
  1. Create a branch for the PR

...

    1. $ git commit --amend -s
    2. Edit the commit file to contain "This closes #327. "
    3. $ git log
    4. Copy commit id of last commit
  1. Switch back to the master main branch
    1. $ git checkout mastermain
  1. Merge the changes. You can use cherry-pick, merge, etc.

...

    1. $ git log
  1. Push to the Apache repository (master main branch)
    1. $ git push apache mastermain
  1. (Optional) Switch to the support branch - the following steps are only required if the change is specifically being targetted for a patch release of an existing build (e.g. a bug fix to create 1.15.3 from the 1.15.2 build)
    1. $ git checkout -t upstreamsupport/01.x.y
  1. (Optional) Check the status of the branch
    1. $ git log
  1. (Optional) Apply the changes from the PR branch
    1. $ git cherry-pick <commit id>
  1. (Optional) Push to the Apache repository (support branch)
    1. $ git push apache 0support/nifi-1.x.y

Anchor
fetch-config
fetch-config
Fetch Config

...

[remote "github"]
url = git@github.com:apache/nifi.git
fetch = +refs/heads/*:refs/remotes/github/*
fetch = +refs/pull/*/head:refs/remotes/github/pr/*

Code Style

This is a developing standard and will be updated to reflect an agreed upon format further supported by the maven-checkstyle-plugin.  Our current checkstyle rules can be found here.

TODO: Provide code formatters for the common IDEs

IntelliJ IDEA Users

nifi-checkstyle.xml is a Checkstyle configuration file created by extracting checkstyleRules from nifi/pom.xml. 

Steps for IntelliJ users:

*

Code Style

The maven-checkstyle-plugin enforces minimum code style requirements.

The checkstyle.xml configuration in the project root directory contains the current set of style rules.

IntelliJ IDEA Users

  1.  Download Checkstyle-IDEA plugin
  2. Install plugin by loading the downloaded zip from: Preferences -> Plugins -> Install plugin from disk...
  3. After restarting IntelliJ, configure Checkstyle plugin to use NiFi Checkstyle configuration file from: Preferences -> Other Settings -> Checkstyle
  4. Add nifi-checkstyle.xml in in Configuration File and activate it

...

  1. the configuration

Eclipse Users

Code formatter rules that adhere to our checkstyle rules can be found here.

Consider using the The Eclipse Checkstyle Plugin can be configured with our the project checkstyle rules to see what portions of your code are conflicting with our coding standard.
Consider installing these templates that help generate common Apache NiFi code snippets.  TODO: provide link.xml to evaluate conformance with project coding standards.

Contact us!

The developer mailing list (dev@nifi.apache.org) is monitored pretty closely, and we tend to respond quickly.  If you have a question, don't hesitate to shoot us an e-mail - we're here to help! Unfortunately, though, e-mails can get lost in the shuffle, so if you do send an e-mail and don't get a response within a day or two, it's our fault - don't worry about bothering us. Just ping the mailing list again.