Skip to content

fix(postprocessing): ignore UploadReady events without an upload - #3966

Open
dschmidt wants to merge 1 commit into
mainfrom
fix/postprocessing-uploadready-without-upload
Open

dschmidt wants to merge 1 commit into
mainfrom
fix/postprocessing-uploadready-without-upload

Conversation

@dschmidt

@dschmidt dschmidt commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

The posix storage publishes UploadReady with an empty UploadID when it assimilates a file it found on disk. Postprocessing looks that ID up in its upload store, which fails and logs two errors per file:

reading from store: upload store read error  error="Failed to get object from bucket: nats: invalid key" uploadID=""
cannot get upload                            error="Failed to get object from bucket: nats: invalid key" uploadID=""

There is no upload session behind such an event, so this skips it, the same way PostprocessingStepFinished already skips an empty UploadID for on demand scans. Nothing else changes: the event was dropped after the failed lookup before, too.

Tested with two new unit specs (empty ID is ignored, unknown non-empty ID still returns ErrEvent). Not tested against a running instance.

AI usage: the cause was found while debugging an installation with Claude Code (claude-fable-5-2), which also wrote the patch and the tests.

The posix storage publishes UploadReady with an empty UploadID when it
assimilates a file it found on disk. There is no upload session behind
such an event, so the lookup in the upload store failed with
"nats: invalid key" and logged two errors per file.

Skip these events, like PostprocessingStepFinished already does for
on demand scans.
@codacy-production

codacy-production Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 5 complexity

Metric Results
Complexity 5

View in Codacy

🟢 Coverage 100.00% diff coverage · +0.02% coverage variation

Metric Results
Coverage variation ✅ +0.02% coverage variation (-1.00%)
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (9347da7) 93680 27017 28.84%
Head commit (ade9daa) 93682 (+2) 27034 (+17) 28.86% (+0.02%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3966) 3 3 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@dschmidt
dschmidt force-pushed the fix/postprocessing-uploadready-without-upload branch 2 times, most recently from bb655a6 to ade9daa Compare November 11, 2026 23:57
@dschmidt
dschmidt marked this pull request as ready for review November 11, 2026 23:58
@dschmidt
dschmidt requested review from aduffeck and fschade November 11, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant