flyteplugins-jira
Receive Jira webhooks in Flyte.
pip install "flyteplugins-jira[app]"
Using it
Hand a JiraProvider() to a WebhookAppEnvironment and register handlers with the
typed constants in events:
import flyte
from flyte.extras.webhooks import WebhookAppEnvironment, run_once
from flyteplugins.jira import JiraProvider, events
# JiraProvider.default_secret_env is mounted for you.
app_env = WebhookAppEnvironment(name="jira-webhooks", providers=[JiraProvider()])
@app_env.on_event(events.Issue.CREATED)
async def handle(event):
import flyte.remote as remote
task = remote.Task.get(name="my-env.my_task", auto_version="latest")
result = await run_once.aio(task, key=event.dedupe_key(), resource=event.resource_id)
if not result.created:
return {"skipped": result.run.name, "url": result.run.url}
return {"run": result.run.name}
flyte.serve(app_env)
Handlers must await run_once.aio(...). The blocking form stalls the
app's event loop, and Jira times deliveries out in seconds.
One app can serve several products at once — hand it one provider per product.
Try it
examples/jira_webhooks.py runs two ways. The first needs no Jira account:
python examples/jira_webhooks.py --local # replay a real sample delivery in-process
python examples/jira_webhooks.py # deploy the receiver to Flyte
--local posts this plugin's SAMPLE_DELIVERY through the app with FastAPI's
test client, so you see a delivery verified, normalized, and dispatched — plus
an unsigned one refused with a 401, and the same delivery replayed to show the
dedupe key is stable.
Setup
- Store the secret and mount it on the app:
flyte create secret JIRA_WEBHOOK_TOKEN --value <secret>
- Point Jira at
<app-url>/webhook/jira, from Jira Settings → System → Webhooks.
Verification: None. Jira Cloud does not sign its webhooks.
Because there is no signature, this plugin authenticates with a shared token in X-Webhook-Token — which something in front of the app has to inject, since Jira cannot send custom headers. JiraProvider reports signed=False, so the dashboard says the product does not sign rather than implying a guarantee that is absent. A shared token also cannot detect body tampering, only that the sender knew the token.
Event constants
events spells every event this plugin can dispatch, as str enums grouped by
event type, so a typo fails at import rather than by silently never matching.
Raw strings still work, for events the constants do not cover yet.
What this plugin does not do
Call the Jira API. Use the jira package directly from your tasks — see
examples/external_saas_integrations. This plugin owns only the part that is
Flyte's: authenticating an inbound delivery and turning it into a run.
Release files for flyteplugins-jira 2.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flyteplugins_jira-2.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / flyteplugins_jira-2.9.0-py3-none-any.whl
| Download URL | flyteplugins_jira-2.9.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2310ee4e2ac30d41d2cb20c89f8f016902fc4e933d634ec75dd57fe8be64ec69
|
|
BLAKE2b-256 checksum How to use checksums |
08d05810b36b8996317f60b53061efdbfb24ee4f13e6ac6ea3a77c08c5cd9de5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|