feat(contract-toolkit): default run-failure notification node (ARUN-619)#1988
feat(contract-toolkit): default run-failure notification node (ARUN-619)#1988BichitraCodesAtlan wants to merge 2 commits into
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
cmgrote
left a comment
There was a problem hiding this comment.
Whatever version of main you based this on appears to be ancient — suggest getting a fresh branch from main and then applying the changes you're after there, as the conflicts, etc will probably be more noisy to solve for than just starting fresh.
d978695 to
7f1d414
Compare
…fests
Append a finalizer node ("notify-on-failure") to the generated AE manifest that
runs only when the workflow run fails and dispatches a NotificationWorkflow to
the notification app (which fans the alert out to the tenant's enabled
integrations — Teams, etc.). Self-contained: it templates the failure payload
from AE's $.workflow.* / $.failure.* input context, and depends_on
{tag: workflow_failure} so AE runs it last, only on run failure. See ARUN-619.
Modeled as a typed system-app node (NotificationNode extends DAGNode), like
PublishNode, so it renders through renderNode and stays consistent with the
other pre-built nodes (correct app_name "notification-app" at both top level and
inputs, auto task_queue). Added to App.pkl (the v0.10.0+ canonical template all
apps amend), not the legacy NativeApp.pkl.
- notifyOnFailure (default true) gates the node; utility/internal apps set it
false, or override via extraNodes["notify-on-failure"].
- DependencyCondition now permits the reserved run-level "workflow_failure" tag
with no nodeId (the finalizer trigger); all other tags still require a nodeId.
- Documented NotificationNode + notifyOnFailure in README.md and docs/reference.md.
- Regenerated example manifests; added notify_on_failure_test + fixture.
7f1d414 to
b351ec8
Compare
…from branch Temporary, revert before final merge (ARUN-619). Bumps the toolkit version to a pre-release and lets the publish workflow fire from this branch (push trigger + relaxed if-guard + checkout this branch's commit) so the Athena app can resolve a toolkit version carrying the notifyOnFailure node for the Rung-4 E2E, ahead of the real 0.11.0 release. Revert the version bump + these workflow changes once 0.11.0 ships and Athena is repinned.
📜 Docstring Coverage ReportRESULT: PASSED (minimum: 30.0%, actual: 77.6%) Detailed Coverage Report |
📦 Trivy Vulnerability Scan Results
Report SummaryCould not generate summary table (data length mismatch: 9 vs 8). Scan Result Detailsrequirements.txtuv.lock |
📦 Trivy Secret Scan Results
Report SummaryCould not generate summary table (data length mismatch: 9 vs 8). Scan Result Detailsrequirements.txtuv.lock |
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
|
🛠 Full Test Coverage Report: https://k.atlan.dev/coverage/application-sdk/pr/1988 |
🧪 Connector Tests — atlan-mysql-appStatus: Passed ✅
|
🧪 Connector Tests — atlan-openapi-appStatus: Passed ✅
|
What & why
Connector workflows had no failure alerting after the Argo→AE migration (ARUN-619). This appends a self-contained failure-notification node to the generated AE manifest, so every connector built on the toolkit alerts on a failed run — no per-connector wiring, no flag/typedef heuristic.
Pairs with:
atlanhq/atlan-automation-engine-app#870— adds theworkflow_failurefinalizer trigger +$.workflow.*/$.failure.*input context this node templates from.atlanhq/atlan-notification-app#6— receives the alert and fans it out to the tenant's enabled integrations (Teams, etc.).(Originally drafted against the now-archived
atlanhq/app-contract-toolkit; re-homed here since the toolkit moved intoapplication-sdk/contract-toolkit.)Change —
contract-toolkit/src/NativeApp.pklnotifyOnFailure: Boolean = true. When set,generateDAG()appends anotify-on-failurenode:depends_on: {tag: "workflow_failure"}→ AE runs it last, only when the run fails (any node failed).execute_workflow → NotificationWorkflowonatlan-notification-app-{deployment_name}.args.metadatatemplated from$.workflow.*/$.failure.*— AE resolves the failure context at runtime, so the node is self-contained.extraNodes["notify-on-failure"]; disable for utility/internal apps (incl. the notification app) withnotifyOnFailure = false.notify_on_failure_test.pkl+fixtures/notify_disabled.pkl.Tests
pkl test tests/*.pkl→ 42 passed / 183 asserts.scripts/check-invariants.shgreen. Changes confined tocontract-toolkit/.Rollout
Cut a new contract-toolkit release; connectors pick it up on their next
PklProjectbump (regenerated manifest gains the node). Apps that shouldn't self-notify setnotifyOnFailure = false.🤖 Generated with Claude Code