Implementation:Apache Airflow Send Email Vote
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Release_Engineering, Communication |
| Last Updated | 2026-02-08 00:00 GMT |
Overview
Concrete tool for sending release vote and result emails provided by send_email.py.
Description
The send_email.py CLI tool sends formatted emails to Apache mailing lists for release voting. It provides three subcommands: vote (initiate voting), result (announce vote outcome), and announce (release announcement). Emails are sent via SMTP through the Apache mail relay using Jinja2 templates.
Usage
Run send_email.py with the appropriate subcommand and Apache credentials.
Code Reference
Source Location
- Repository: Apache Airflow
- File: dev/send_email.py
- Lines: L1-340
Signature
SMTP_SERVER = "mail-relay.apache.org"
SMTP_PORT = 587
MAILING_LIST = {
"dev": "dev@airflow.apache.org",
"users": "users@airflow.apache.org",
}
@cli.command("vote")
def vote(base_parameters, receiver_email: str) -> None:
"""Send vote initiation email."""
...
@cli.command("result")
def result(
base_parameters,
receiver_email: str,
vote_bindings: str,
vote_nonbindings: str,
vote_negatives: str,
) -> None:
"""Send vote result email."""
...
@cli.command("announce")
def announce(base_parameters, receiver_email: str) -> None:
"""Send release announcement email."""
...
def send_email(
smtp_server: str,
smtp_port: int,
username: str,
password: str,
sender_email: str,
receiver_email: str | list,
message: str,
) -> None:
"""Send email via SMTP."""
...
Import
# Send vote email
python dev/send_email.py vote \
--apache-id myid \
--apache-password mypass \
--version 3.1.0 \
--rc 1
# Send result email
python dev/send_email.py result \
--apache-id myid \
--apache-password mypass \
--version 3.1.0 \
--rc 1 \
--vote-bindings "Alice, Bob, Charlie"
# Send announcement
python dev/send_email.py announce \
--apache-id myid \
--apache-password mypass \
--version 3.1.0
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| apache-id | str | Yes | Apache LDAP username |
| apache-password | str | Yes | Apache LDAP password |
| version | str | Yes | Release version |
| rc | int | Conditional | Release candidate number (for vote/result) |
| vote_bindings | str | Conditional | Binding +1 voters (for result) |
Outputs
| Name | Type | Description |
|---|---|---|
| Vote email | Sent to dev@airflow.apache.org | |
| Result email | Vote result summary | |
| Announcement | Release announcement to dev@ and users@ |
Usage Examples
Complete Voting Cycle
# 1. Initiate vote
python dev/send_email.py vote \
--apache-id releasemanager \
--apache-password "$APACHE_PASS" \
--version 3.1.0 --rc 1
# 2. After 72 hours, send result
python dev/send_email.py result \
--apache-id releasemanager \
--apache-password "$APACHE_PASS" \
--version 3.1.0 --rc 1 \
--vote-bindings "Alice, Bob, Charlie" \
--vote-nonbindings "Dave" \
--vote-negatives ""
Related Pages
Implements Principle
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment