Repository navigation
Conversation
1fanwang
requested review from
dheerajturaga,
jscheffl and
shubhamraj-git
as code owners
September 10, 2026 23:01
1fanwang
force-pushed
the
1fannnw/edge-worker-logs-404-metric-fix
branch
from
September 11, 2026 17:47
76bc292 to
a908fd1
Compare
Member
|
Thanks for the fix. Could you please address these before merging?
Drafted-by: Codex (GPT-5); reviewed by @dheerajturaga before posting |
This was referenced Sep 25, 2026
This was referenced Sep 25, 2026
When querying logs for a nonexistent task instance, _logfile_path dereferenced None in FileTaskHandler._render_filename, raising AttributeError and returning an unhandled 500 error instead of 404. In the state endpoint, fix a list comparison condition that prevented edge_worker.ti.finish metrics from being emitted when jobs reached the FAILED state. Signed-off-by: 1fanwang <1fannnw@gmail.com>
Generated clients must see the same missing-task response that workers receive. Signed-off-by: 1fanwang <1fannnw@gmail.com>
1fanwang
force-pushed
the
1fannnw/edge-worker-logs-404-metric-fix
branch
from
September 25, 2026 20:55
a908fd1 to
275c232
Compare
Signed-off-by: 1fanwang <1fannnw@gmail.com>
This was referenced Sep 26, 2026
…-logs-404-metric-fix Signed-off-by: 1fanwang <1fannnw@gmail.com> # Conflicts: # providers/edge3/src/airflow/providers/edge3/worker_api/routes/jobs.py
Signed-off-by: 1fanwang <1fannnw@gmail.com>
Contributor
Author
@dheerajturaga done in e6633fb. Both log routes document 404, the generated OpenAPI spec includes both responses, and authenticated regression tests cover GET and POST. The current documentation build, spellcheck and publication checks all pass. |
Signed-off-by: 1fanwang <1fannnw@gmail.com>
The logfile_path and push routes resolve the task instance by id when the worker sends one or the edge job stores one. A missing id reached _render_filename(None) and returned 500, which the worker retries. Return the same 404 the key lookup already returns. Signed-off-by: 1fanwang <1fannnw@gmail.com>
Cores before 3.4 store an empty task instance id, so an Edge worker never sends one there. Main already gates its other task instance id tests on Airflow 3.4 the same way. Signed-off-by: 1fanwang <1fannnw@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When either Edge log route referenced a missing task instance, the API returned HTTP 500 instead of treating it as a missing resource. Both routes use the same path lookup, so the failure affected log-path reads and log uploads.
The shared lookup now returns HTTP 404. Both route contracts document that response, and authenticated route tests cover the GET and POST paths.
Testing Done
Against current main before this change:
With this branch:
Reproducer source: dev/pr72908_log_routes_repro.py
Was generative AI tooling used to co-author this PR?
Generated-by: GitHub Copilot CLI (GPT-6 Astra and GPT-5.6 Sol) following the guidelines