Level 2: Apache Contributor Onboarding

Level 1 gave you a Tez you can build, test, and run a DAG on. This level turns that capability into merged code. You will learn how Apache Tez is actually contributed to today — which is not the JIRA-plus-.patch-file folklore that most "Apache workflow" write-ups still describe. Modern Tez is a GitHub pull-request project that keeps JIRA as its issue tracker: you file (or find) a TEZ-XXXX issue on issues.apache.org, open a PR on github.com/apache/tez whose title is the JIRA key, and a committer squash-merges it after Yetus precommit goes green and a human reviews it.

This is deliberately a workflow level. The changes are surgical — a Javadoc fix, an input validation guard, a missing test. Nothing here will surprise a reviewer. That is the point: you drill the mechanics now, against the real repository, so that Levels 3–9 can be about the engine.

Ground truth. Everything in this level is checked against a current apache/tez checkout: the root pom.xml module list, .asf.yaml, .github/workflows/build.yml, the Jenkinsfile, dev-support/tez-personality.sh, and git log. Where this page says "run this," run it against your own clone and trust its output over any text — the code moves between branches.


Learning Objectives

By the end of Level 2 you must be able to:

  1. Describe the real Tez contribution model end-to-end: JIRA issue → fork → branch → commit (TEZ-XXXX: …) → GitHub PR → GitHub Actions + Jenkins/Yetus precommit → review → squash-merge.
  2. Navigate every top-level module in the root pom.xml and say what each is for and what it depends on.
  3. Create an Apache JIRA account, find a Minor/Trivial unassigned issue, and comment on it without stepping on another contributor.
  4. Write a commit and PR title in the enforced TEZ-XXXX: Description form (verified against git log).
  5. Run the same gates precommit runs — spotless, checkstyle, apache-rat, spotbugs, and the scoped unit tests — locally, so CI is green on the first push.
  6. Read a Yetus/GitHub Actions failure and map each check back to the local command that reproduces it.
  7. Review a PR the way a committer does: correctness, test coverage, compatibility, style, diagnostics.

The Modern Tez Contribution Model

Apache projects vary widely in mechanics. Do not assume the "email a patch to the list" model — Tez does not work that way anymore. Read .asf.yaml in the repo root and you can see the current setup encoded directly:

sed -n '/^github:/,/^notifications:/p' .asf.yaml

The load-bearing lines:

.asf.yaml settingWhat it means for you
features: { wiki: false, issues: false, projects: false }GitHub Issues are off. Bugs and tasks live in Apache JIRA (TEZ-XXXX), not GitHub.
enabled_merge_buttons: { squash: true, merge: false, rebase: false }Every PR is squash-merged. Your commit history inside the PR does not survive; the squash subject does.
notifications: { pullrequests: issues@tez.apache.org, jira_options: link label worklog }PRs are announced to issues@ and auto-linked to the JIRA issue named in the title.
rulesets … restrict_force_push, restrict_deletionmaster and release/* are protected. You never push to them; you push to your fork and open a PR.

So the pieces you must internalize:

ArtifactWhat it isWhere
JIRA issueA bug, improvement, task, or sub-task — the unit of "what should change." Keyed TEZ-XXXX.issues.apache.org/jira/projects/TEZ
Pull requestYour proposed change against master, from a branch on your fork.github.com/apache/tez
Commit / PR titleTEZ-XXXX: Description. The JIRA key links the two systems.Enforced by convention; visible in git log.
Yetus precommitThe Jenkins job that runs compile, unit tests, checkstyle, spotbugs, javadoc, shellcheck, codespell on your diff and comments the result on the PR.Jenkinsfile + dev-support/tez-personality.sh
GitHub Actions buildA cross-platform compile matrix (.github/workflows/build.yml)..github/workflows/
dev@tez.apache.orgWhere design and release discussion happens. Not where you submit code.lists.apache.org/list.html?dev@tez.apache.org

There is no .github/pull_request_template.md in the repo — confirm with ls .github (you will see only workflows/). Tez does not auto-populate a PR checklist, which means the discipline is on you: a clear title, a description of the problem and fix, a note of how you tested, and a link to the JIRA. Governance context — the PMC, meritocracy, how committership is earned — is covered in committer-mindset and pmc-responsibilities; for contribution mechanics, this page is enough.

JIRA still matters

The JIRA key is the spine of the whole flow. It names your branch, prefixes your commit, titles your PR, and (via jira_options: link) gets back-linked from the PR automatically. File issues and read existing ones as covered in jira-review and design-via-jira.


The PR Lifecycle

flowchart TD
    A["Find or file a TEZ-XXXX JIRA issue"] --> B["Comment: 'I'm looking into this'"]
    B --> C["Fork apache/tez; clone; add upstream remote"]
    C --> D["git checkout -b TEZ-XXXX from up-to-date master"]
    D --> E["Make the surgical change (+ test)"]
    E --> F["mvn spotless:apply"]
    F --> G["Local gates: checkstyle, apache-rat, spotbugs, scoped tests"]
    G --> H["git commit -m 'TEZ-XXXX: Description'"]
    H --> I["git push origin TEZ-XXXX; open PR against master"]
    I --> J["GitHub Actions build matrix + Jenkins/Yetus precommit"]
    J -->|red| G
    J -->|green| K["Committer review"]
    K -->|changes requested| E
    K -->|approved| L["Committer squash-merges to master"]
    L --> M["JIRA moved to Resolved/Fixed, fixVersion set"]

The state machine in words:

  1. Claim. Find a Minor/Trivial, unassigned issue with no open PR, and comment before you start. Etiquette is in community-interaction.
  2. Fork and branch from an up-to-date master. Branch name is conventionally the JIRA key (TEZ-XXXX) — you will see this exact convention in the merged history.
  3. Change exactly what the issue asks — plus a test. Scope creep is the #1 reason first PRs stall.
  4. Format and gate locally. mvn spotless:apply first (it fixes import order, trailing whitespace, license headers, and the final newline automatically), then the checks below.
  5. Commit with a TEZ-XXXX: Description subject. You do not need to squash your own commits — the committer squashes at merge — but keep them coherent.
  6. Push and open a PR against master. Title it TEZ-XXXX: Description; write a body even though no template forces you to.
  7. CI. GitHub Actions compiles across a Java 21/25 × Ubuntu/macOS matrix; Jenkins runs Yetus, which posts a per-check comment (with emoji votes) on the PR.
  8. Review and merge. Address every comment with new commits. A committer squash-merges once green and approved, and moves the JIRA to Resolved.

The CI checks you will see

Two systems run. Map each to the local command that reproduces it:

CheckWhere it runsWhat it verifiesLocal equivalent
build matrixGitHub Actions (build.yml)mvn clean install -DskipTests compiles on Java 21 & 25, Ubuntu & macOSmvn clean install -DskipTests -Dmaven.javadoc.skip=true
compile / javacYetusYour diff compiles with strict -Ptest-patch lintmvn compile -Ptest-patch
unitYetusThe affected modules' tests passmvn test -pl <module> -am
checkstyleYetusStyle rules in tez-build-tools/.../checkstyle/checkstyle.xmlmvn checkstyle:check -pl <module>
spotbugsYetusNo new static-analysis bugsmvn compile spotbugs:spotbugs -Pspotbugs -pl <module>
javadocYetusJavadoc still buildsmvn javadoc:javadoc -pl <module>
spotless (validate)Maven validate phaseImport order, whitespace, license header, final newlinemvn spotless:check / fix with mvn spotless:apply
apache-ratMaven verifyEvery source file carries the ASF license headermvn apache-rat:check
shellcheck / codespellYetusShell scripts and .md/.txt are cleanonly triggered when you touch those files

Running spotless:apply + checkstyle:check + the scoped tests before you push is the single biggest lever on review speed. Quality expectations are in patch-quality.


Source Areas to Inspect

You do not need to read these end-to-end; you need to know they exist and what they govern.

File / dirWhy it matters
pom.xml (root)The <modules> list (build order), <dependencyManagement>, plugin config for spotless/checkstyle/rat.
.asf.yamlThe whole contribution model in ~50 lines — merge buttons, issue tracker, branch protection.
.github/workflows/build.ymlThe GitHub Actions compile matrix.
JenkinsfileThe Yetus precommit pipeline (Docker, Yetus rel/0.15.1, personality).
dev-support/tez-personality.shWhich Yetus tests fire for which file types (.java → javac+spotbugs+checkstyle+javadoc).
tez-build-tools/src/main/resources/checkstyle/checkstyle.xmlThe actual style rules (LineLength max 120, naming, Javadoc).
tez-build-tools/src/main/resources/checkstyle/suppressions.xmlWhich checks are relaxed where (e.g. JavadocPackage off for tests).
dev-support/spotless/license.javaThe canonical ASF header spotless enforces on every .java.

Apache Tez JIRA Structure

Issues are typed and prioritised. As a Level 2 contributor you work only the bottom of the priority table.

TypeDescriptionPriorityMeaning
BugA defect in behaviorBlockerPrevents a release
ImprovementEnhancement to existing behaviorCriticalData loss / correctness risk
New FeatureSomething that does not exist yetMajorImportant, not release-blocking
TaskNon-code work (docs, release)MinorSmall issue or improvement
Sub-taskPart of a larger issueTrivialTypo, cosmetic, cleanup

For Level 2: work only Minor and Trivial issues until you have at least three accepted PRs. Do not pick up Major+ work yet — you will get it wrong in ways that burn reviewer trust.

Components point you at a module: Tez (core/DAG), Tez UI, Test, and area labels that map onto the modules in Lab 2.1. Browse recent issues with project = TEZ ORDER BY updated DESC to see what active work actually looks like.


Deliverables

Demonstrate all of the following before advancing to Level 3:

  • An Apache JIRA account, and one Minor/Trivial issue you have studied and commented on.
  • A fork of apache/tez with an upstream remote and a TEZ-XXXX topic branch off an up-to-date master (Lab 2.1, Lab 2.2).
  • A module map you built yourself from the root pom.xml, with each module's role and its inter-module dependencies (Lab 2.1).
  • A clean local mvn spotless:check, mvn checkstyle:check, and mvn apache-rat:check on your change.
  • A commit whose subject is TEZ-XXXX: Description, matching the form in git log.
  • A walked bug fix with a reproducing unit test in the TestTezIds style (Lab 2.3).
  • A completed review of the flawed example patch — you found every flaw a committer would flag (Lab 2.4).

Common Mistakes

MistakeConsequenceFix
Assuming the old .patch-to-JIRA flowYou attach a diff nobody looks at; the repo expects a PROpen a GitHub PR against master; JIRA is the tracker, GitHub is the code.
Filing a bug on GitHub IssuesIt cannot be filed — issues are disabledFile on Apache JIRA (TEZ-XXXX).
Commit subject fix bug or TEZ-1234. …Doesn't match the enforced TEZ-XXXX: form; breaks JIRA linkagegit commit -m "TEZ-XXXX: Short imperative description".
Formatting churn in unrelated linesNoisy diff; reviewer asks for a re-rollRun mvn spotless:apply, then commit only intended lines.
Skipping spotless:applySpotless fails in the validate phase before tests even runAlways spotless:apply before committing.
No test with a bug fixReviewer blocks: Tez expects a test that fails before, passes afterAdd a reproducing test (Lab 2.3).
Claiming an issue silentlyDuplicate work, community frictionComment on the JIRA before you start.
Force-pushing over review historyReviewers lose the threadAdd new commits during review; the committer squashes at merge.

How to Verify Success

# Your branch is clean relative to master and contains only intended changes
git fetch upstream
git diff upstream/master --stat        # only the files you meant to touch

# The full local gate, on the module you changed
mvn spotless:check       -pl <module>
mvn checkstyle:check     -pl <module>
mvn apache-rat:check     -pl <module>
mvn test                 -pl <module> -am -Dtest=<RelevantTestClass>

# Your commit subject matches the enforced form
git log -1 --pretty=%s   # -> TEZ-XXXX: Description

PR Profile: Level 2 Graduate

A Level 2 graduate can credibly open these PRs end-to-end, with green CI on the first or second push:

PR typeExample (real, from history)Test requirement
Config/constant fixTEZ-4683: Fix tez framework mode config name — one-character constant bugNone (constant); explain in the PR why not
Javadoc improvementAdd a missing @param/@throws to a public API methodNone; must pass checkstyle Javadoc rules
Input-validation fixMake a fromString throw IllegalArgumentException instead of swallowing and returning nullA reproducing test (Lab 2.3)
Security/robustness guardTEZ-4699: Add canonical path checks in CSVResult — guard + new testA test that fails before, passes after
Style/cleanupFix unused imports or LineLength across a modulemvn checkstyle:check -pl <module>

You are not yet ready to submit changes to the state machines, the shuffle path, the AM scheduling, or the wire/protobuf formats — those are Levels 3–9. What you are ready for is the thing most contributors get wrong: a clean, focused, tested, correctly-titled PR that a committer can squash-merge without a five-round back-and-forth.

Next: Lab 2.1 — Navigate the Tez Repository Structure.