Step 9: JIRA and Documentation
The JIRA is the project's permanent memory. The PR is ephemeral — it lives on
GitHub, gets merged, fades into git log. The JIRA is what users grep when
they hit a similar bug two years later, what release managers read when
compiling release notes, what new contributors find when researching prior
art. Treating it as a checkbox is the laziest possible thing you can do.
This step is short on procedure and heavy on hygiene. Twenty minutes done well saves three different people an hour each later.
The Status Workflow
Tez uses Apache's standard JIRA workflow. The states you will pass through:
Open -> In Progress -> Patch Available -> Resolved -> Closed
^ ^
| |
(you) (committer)
| State | Set by | Meaning |
|---|---|---|
| Open | Reporter | Bug exists, nobody is working on it. |
| In Progress | Assignee | Someone is actively investigating. |
| Patch Available | Assignee | A patch / PR is ready for committer review. |
| Resolved | Committer | Patch merged. Resolution: Fixed plus Fix Version. |
| Closed | Anyone | Verified in a release. Often skipped — many Tez tickets stay Resolved indefinitely. |
Transitioning correctly
- You move it to In Progress when you claim it in Step 1.
- You move it to Patch Available when your PR is open and precommit is green. This is the signal "ready for human review, not just CI."
- You do NOT move it to Resolved. Only a committer does that when they merge. Setting it yourself will be reverted, and you will look new.
- If a committer asks you to revise, the state usually stays at Patch Available. Move back to In Progress only if you'll be rewriting significantly (multi-day rework).
The Patch Available ritual
When you flip to Patch Available, leave a comment:
PR is now open at <link>, precommit is green, ready for review.
Summary: <one paragraph from the PR description>.
Tests: <list>.
Specific reviewer requests: <if any, e.g. "would appreciate a look from
@someone since they wrote the original code">.
This wakes up the JIRA's watchers (committers who follow issues@) and
gives them enough context to decide whether to pick it up.
Required Fields
| Field | Who sets | What to set |
|---|---|---|
| Assignee | You | Yourself (Step 1). |
| Component | You | tez-dag, tez-runtime-library, etc. — whatever module you primarily changed. |
| Affects Version | Reporter or you | The earliest version where the bug reproduces. |
| Fix Version | Committer | Leave blank. Only PMC/committers set this. You can comment "suggesting fix version X.Y.Z" if you have a strong opinion. |
| Priority | Reporter or PMC | Don't bump your own. Comment if you think the priority is wrong. |
| Labels | You | Add flaky-test / recovery / shuffle if it helps grep later. Don't invent vanity labels. |
| Release Notes | You, if user-visible | Mandatory if behavior, API, or configuration changes are visible. See below. |
| Linked Issues | You | Link the PR (web link) and any related JIRAs. See below. |
Release Notes
If your fix changes anything a user can observe — output format, config key default, error message, performance characteristic — fill out the "Release Notes" field. Format:
Fixed an issue where vertices with speculatively-populated recovery data
would not transition to SUCCEEDED after all tasks completed. Affects DAGs
submitted via TezClient when checkpoint-based recovery is enabled. No
configuration or API change is required.
Two to four sentences. Past tense ("Fixed"). User-facing language ("DAGs", "TezClient"), not implementation jargon ("V_TASK_COMPLETED handler").
If your fix is purely internal (refactor of a private method, test-only change), leave Release Notes blank. The release manager will skip it.
Linking the PR
Issue Links → "is related to" → Web Link → paste the GitHub PR URL.
Tez also has a bot that auto-links a PR to the JIRA when the PR title starts
with TEZ-NNNN:. The bot fires within minutes. If after an hour the JIRA
does not have a "GitHub Pull Request" link visible, add it manually:
JIRA → More → Link → Web Link → URL: https://github.com/apache/tez/pull/<NNN> →
Link Text: GitHub PR.
Cross-Linking Related JIRAs
If your fix interacts with other tickets, link them explicitly:
| Relation | When to use |
|---|---|
| is duplicated by | Another JIRA is a duplicate of yours (close that one). |
| duplicates | Yours is the duplicate (close yours, work on the older one). |
| is related to | Touches similar code but distinct issue. |
| is blocked by | You cannot land until another JIRA lands first. |
| is caused by | Bisect identified TEZ-XYZ as the regression source. |
| supersedes | Your fix replaces an older abandoned attempt. |
Be conservative. Spurious links pollute the issue graph. Cross-link only where the connection is concrete.
Code Comments in the Fix
The JIRA explains what and why at the project level. Inline code comments explain why at the file level for the next person editing this line.
Good inline comment patterns:
// TEZ-NNNN: only short-circuit when recovery replay is actually in progress;
// recoveryData may be populated speculatively at vertex init even when no
// replay will occur. See the JIRA for the affected scenario.
if (recoveryData != null && isReplayingRecovery()) {
handleRecovery(event);
return;
}
Rules:
- Cite the JIRA number. Future-you grepping the file for
TEZ-will find the context immediately. - Explain the non-obvious invariant, not what the code obviously does.
Never write
// increment counternext tocount++. - One or two lines max. If you need a paragraph, write the design note in
the class Javadoc or in a markdown doc under
docs/. - Don't paste the entire root-cause document. The JIRA holds that.
Notifying Watchers
After Patch Available, the JIRA's watchers see an email. If you want a
specific committer's attention (e.g. the author of the introducing commit
from your git bisect), @mention them in a JIRA comment:
[~alice] (author of TEZ-2877) — would appreciate a sanity check on the
recovery short-circuit gating in this PR, since you wrote the original
branch. No urgency.
The [~jira-username] syntax is JIRA's mention. Find the username from
their JIRA profile URL (https://issues.apache.org/jira/people/<username>).
Do this once. Do not @-mention in every subsequent comment — committers filter their inboxes.
Backporting Fix to Branches
For most Capstone work, you fix on master and stop. But if your bug
affects a maintained release branch and a committer asks you to backport:
- Comment on the JIRA: "Will backport to branch-0.10 once master patch lands."
- After merge to master, create a new branch from
apache/branch-0.10:git fetch apache git checkout -b tez-NNNN-branch-0.10 apache/branch-0.10 git cherry-pick <master-fix-commit-sha> # Resolve conflicts (often minor; sometimes major if branch diverged). - Run validation on the branch (same Step 7 checks).
- Open a separate PR titled
TEZ-NNNN (branch-0.10): <summary>or attach aTEZ-NNNN.branch-0.10.01.patchto the same JIRA.
Each branch's PR/patch is a separate review.
After Merge
When a committer merges your PR:
- The PR is closed automatically, and they'll comment "Committed to master, thanks @you" with the merged-commit SHA.
- They (or the bot) set the JIRA to Resolved with
Resolution: FixedandFix Version: X.Y.Z. - You comment with a thanks and any follow-up plans:
Thanks for the review and merge, [~alice]. I'll watch for the next RC to verify it lands cleanly. Filed TEZ-MMMM for the follow-up refactor we discussed. - If you spotted a related improvement during review, file the follow-up JIRA immediately — do not let it slip.
Documentation Beyond the JIRA
Most bug fixes need no further doc. Exceptions:
| Change | Where to document |
|---|---|
| New config key | tez-api/src/main/resources/META-INF/services/... if not auto-generated; reference from the Tez site config docs page. |
| New public API | Javadoc on the new method/class + the relevant docs/<feature>.md if one exists. |
| Behavior change visible to operators | A note in CHANGELOG.md (committer usually handles), and a JIRA Release Notes entry (you write this). |
| New tunable or debug flag for operators | Mention in the Tez configuration reference page (commit to the tez-site/ directory or open a JIRA for the site update). |
When in doubt, ask in the JIRA: "Should I update the docs page for X as part of this, or as a follow-up JIRA?" Committers will tell you.
Validation / Self-check
Before advancing to Step 10:
- JIRA status is Patch Available with a comment summarizing the change and linking the PR.
- Assignee is you.
- Component is set to the right module.
- Affects Version is set to a real Tez version where the bug reproduces.
- Release Notes field is filled in (or explicitly blank with a one-line "internal only" justification in the PR description).
- PR is linked under Issue Links → Web Link.
- Any related JIRAs are cross-linked with the correct relation (is caused by / is related to / etc).
- Inline code comments cite
TEZ-NNNNwhere the change is non-obvious. - If a committer was specifically helpful (author of regressing commit, reviewer on related work), you @-mentioned them once, not repeatedly.