Skip to content

fix: Prevent parser startup before scanner job is visible - #3795

Open
mvanhorn wants to merge 1 commit into
secureCodeBox:mainfrom
mvanhorn:fix/3139-prevent-early-parser-start
Open

mvanhorn wants to merge 1 commit into
secureCodeBox:mainfrom
mvanhorn:fix/3139-prevent-early-parser-start

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Sep 3, 2026

Copy link
Copy Markdown

Description

Change checkIfAllJobsCompleted so that a list containing no Jobs is explicitly incomplete; completion must require at least one observed Job and successful status for every observed Job. Keep the existing precedence in which any BackoffLimitExceeded Job reports failure and any non-succeeded Job reports incomplete, so all three production callers—the scanner, parser, and hook reconciliation paths—remain conservative during cache-observation gaps. Extend the existing table of focused helper tests with the empty-list case, while retaining coverage for all-succeeded, mixed/incomplete, and failed lists.

The scan reconciler decides whether scanner, parser, and hook Jobs have finished through checkIfAllJobsCompleted. That helper initializes its aggregate result as completed, so an empty Job list is interpreted as successful even though no Job has reported success. During the short interval in which the controller cache has not yet observed a newly created scanner Job, this can advance the Scan to ScanCompleted and start the parser before the scanner uploads its raw result, producing an intermittent MinIO NoSuchKey error. The maintainer reproduced the rare behavior and identified this helper as the relevant decision point.

Closes #3139

Checklist

  • Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration tests.
  • Make sure that all your commits are signed-off and that you are added to the Contributors file.
  • Make sure that all CI finish successfully.
  • Optional (but appreciated): Make sure that all commits are Verified.

@netlify

netlify Bot commented Sep 3, 2026

Copy link
Copy Markdown

Deploy Preview for docs-securecodebox canceled.

Name Link
🔨 Latest commit 6265550
🔍 Latest deploy log https://app.netlify.com/projects/docs-securecodebox/deploys/6a99a984b132180008ddd0a2

@Weltraumschaf Weltraumschaf moved this from Triage to To Review in secureCodeBox Sep 3, 2026
@mvanhorn
mvanhorn force-pushed the fix/3139-prevent-early-parser-start branch from 4b936d9 to 6265550 Compare September 3, 2026 17:08
@sonarqubecloud

sonarqubecloud Bot commented Sep 3, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Review

Development

Successfully merging this pull request may close these issues.

Parser occasionally fails with "The specified key does not exist" due to early startup

2 participants