Repository navigation
Add runtime DagRun note updates - #69403
Conversation
7f961c1 to
9b948ff
Compare
dcc6b33 to
f88aa4d
Compare
pierrejeambrun
left a comment
There was a problem hiding this comment.
LGTM, this just needs conflict solving.
f88aa4d to
58b99f7
Compare
|
@hkc-8010 can you resolve conflicts here |
58b99f7 to
765c589
Compare
|
Rebased on main. The only conflict was in I also added The rest is docstrings. The route, client method and runtime helper now spell out that an empty note removes the note while a null note leaves it alone, since |
01ebfe1 to
93bf5c0
Compare
Runtime code needs a supported Task SDK path for updating the current Dag run note without writing directly to the metadata database. Keeping the write scoped to the authenticated task instance preserves the Execution API isolation boundary while supporting callback use cases.
The triggerer message-type guard needs to record worker-only runtime operations explicitly. Dag run note updates require a task execution context and should not become part of the triggerer supervisor protocol.
The runtime note endpoint reimplemented the set/update/clear logic from patch_dag_run_note and diverged on clearing: a runtime clear left a dag_run_note row with NULL content, while the UI/public API deletes it. Make patch_dag_run_note's user attribution optional (user_id) and reuse it from the execution API so both paths behave the same, including removing the note row on clear. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The endpoint was registered under Version("2026-06-30"), which was the
in-progress execution API version when this branch was cut. That version has
since been released and 2026-10-30 is the in-progress one now, so the released
2026-06-30 spec was advertising an endpoint that release never shipped.
Move the VersionChange to v2026_10_30.py and add the previous-version test the
versioning guide asks for, which fails if the change sits on a released
version. Also document that a null note leaves an existing note untouched
while an empty note removes it, since the signature alone reads the other way.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Skip the supervisor round-trip when the note is None, log when a runtime write replaces an attributed note, and rename the attribution test to say what it proves.
93bf5c0 to
890658f
Compare
run.py now takes a scenario: its own Airflow base commit, bundle scope, AGENTS.md pointer and tasks. The metrics scenario is unchanged. The new dagrun-note scenario is Airflow at the parent of apache/airflow#69403 (runtime DagRun note updates). The change crosses the Task SDK runtime, the supervisor protocol and its versioned schema, the SDK HTTP client and generated models, the core Execution API with a Cadwyn version, and the generated TypeScript SDK. The task is to write an implementation plan from issue #64890. The plan is graded on the 11 parts of the real change it covers, a checklist written from the upstream diff before any trial ran. Upstream's file list scores 11/11, the issue text 0/11 and upstream's PR description 1/11. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run 5 in EXPERIMENTS.md. Haiku 5.5 built a 17-concept bundle of the Execution API and Task SDK runtime (verify 0 findings), then planned apache/airflow#69403 three times with the bundle and three times without. Plan score was 0.79 vs 0.76, inside the spread of each arm, and input tokens were 652k vs 642k. The bundle documents the parts the plans missed, the agent cited it, and still explored as much as without it. Two checklist items were widened after the first scoring (route and runtime-helper files), for both arms; every plan used valid files that upstream did not. Before widening the means were 0.64 vs 0.61. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a Task SDK helper for runtime code to update the current Dag run note without writing directly to the metadata database.
The Execution API endpoint is scoped to the authenticated task instance and derives the target DagRun server-side. Runtime-authored notes are stored without a user attribution, while UI/public API edits continue to use the current user.
closes: #64890
Was generative AI tooling used to co-author this PR?
Generated-by: Codex (GPT-5) following the guidelines