fix(gateway): log skipped missing kanban artifacts - #40841
Closed
Dusk1e wants to merge 1 commit into
Closed
Conversation
Explicit kanban artifacts (event_payload['artifacts']) are fed straight into _deliver_kanban_artifacts._add(), which dropped any path missing on disk via 'if not os.path.isfile(...): return' with no log line. When a worker reports a deliverable it never wrote, the file silently never arrives and gateway.log shows nothing. extract_local_files() already logs this case (commit 947e21b), but the summary/result sources route through it while the explicit artifacts list bypasses it -- so this was the one remaining silent drop. Add a matching INFO log (path sanitized via _log_safe_path) so the gap is visible. Behavior is unchanged; only observability. Updated the existing regression test to assert the drop is logged.
Contributor
|
Superseded by consolidated artifact fix #63619, which preserves scratch deliverables as durable task attachments, validates declared files, records attachment rows, keeps missing claims in flight, and supports strict gateway delivery. Thank you for the artifact-lifecycle work; the final implementation consolidated this cluster onto the existing attachment system. |
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.
What & why
_deliver_kanban_artifacts._add()dropped any artifact path missing ondisk via
if not os.path.isfile(...): returnwith no log line. When akanban worker reports a deliverable in
event_payload['artifacts']butnever actually writes the file, the upload is silently skipped and
gateway.logshows nothing — there is no way to learn why the promisedfile never arrived.
Commit 947e21b (#39767) already fixed exactly this for
extract_local_files. Thesummaryandtask.resultsources routethrough that function, but the explicit
artifactslist is fed straightinto
_add()and bypasses it — leaving this as the one remaining silentdrop, on the most reliable artifact source.
Fix
Add a matching
INFOlog at the drop point (path sanitized via_log_safe_path, same as the source commit). Behavior is unchanged —observability only, low risk. The now-inaccurate docstring is updated.
Tests
Extended the existing regression test
test_notifier_artifact_delivery_skips_missing_filesto assert themissing artifact is logged exactly once and the real file is still
delivered (and not logged as missing).
Confirmed the new assertion catches the regression: with the log line
removed the test fails (0 matching records); restored → passes.