Skip to content

fix(scheduler): guard missing builder job in sync tasks (#732) - #624

Open
simongu wants to merge 1 commit into
OpenSPG:masterfrom
simongu:simon
Open

simongu wants to merge 1 commit into
OpenSPG:masterfrom
simongu:simon

Conversation

@simongu

@simongu simongu commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes a NullPointerException observed when running eval (see #732): reader/retrieval sync tasks dereference a BuilderJob that no longer exists, causing a bare NPE at execution time.

  • RetrievalSyncTask — null-check builderJob at entry and retrieval inside the loop (both could be null).
  • KagReaderSyncTask — null-check builderJob before readSource, so a null job is never passed down.
  • common/util CommonUtils#getScannerReaderConfig / getKagBuilderInput — guard job == null (defense in depth for the read bridge path).
  • BuilderController#delete — governance fix: when a BuilderJob is deleted, also tear down its linked SchedulerJob (schedulerService.deleteJob(taskId)), so its DAG instances do not keep running sync tasks against a BuilderJob that no longer exists.

Files changed

  • server/core/.../task/sync/builder/RetrievalSyncTask.java
  • server/core/.../task/sync/builder/KagReaderSyncTask.java
  • common/util/.../CommonUtils.java
  • server/api/http-server/.../openapi/BuilderController.java

Test plan

  • Local Maven build not possible in the authoring sandbox (no JDK/Maven). Please run:
    mvn -pl common/util,server/core/scheduler/service -am compile
  • Runtime repro: run eval that triggers reader/retrieval after the BuilderJob has been removed.

Closes #732

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant