apache/dolphinscheduler · error · ServiceException

backfillTime: ${backfillTime} is invalid

Error message

backfillTime: ${backfillTime} is invalid

What it means

BackfillWorkflowRequestTransformer.parseBackfillDateList converts the backfillTime section into a list of ZonedDateTime. If the complementScheduleDateList string is empty or null (StringUtils.isNotEmpty fails), it cannot derive any dates and throws ServiceException("backfillTime: " + backfillTime + " is invalid").

Source

Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/validator/workflow/BackfillWorkflowRequestTransformer.java:120

        final WorkflowBackFillRequest.BackfillTime backfillTime = workflowBackFillRequest.getBackfillTime();
        List<Schedule> schedules = processService.queryReleaseSchedulerListByWorkflowDefinitionCode(
                workflowBackFillRequest.getWorkflowDefinitionCode());

        if (StringUtils.isNotEmpty(backfillTime.getComplementStartDate())
                && StringUtils.isNotEmpty(backfillTime.getComplementEndDate())) {
            // todo: why we need to filter the schedules here?
            return CronUtils.getSelfFireDateList(
                    DateUtils.stringToZoneDateTime(backfillTime.getComplementStartDate()),
                    DateUtils.stringToZoneDateTime(backfillTime.getComplementEndDate()),
                    schedules);
        }
        if (StringUtils.isNotEmpty(backfillTime.getComplementScheduleDateList())) {
            return Arrays.stream(backfillTime.getComplementScheduleDateList().split(","))
                    .distinct()
                    .map(DateUtils::stringToZoneDateTime)
                    .collect(Collectors.toList());
        }
        throw new ServiceException("backfillTime: " + backfillTime + " is invalid");
    }
}

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Provide a non-empty, comma-separated complementScheduleDateList (e.g. "2026-01-01 00:00:00,2026-01-02 00:00:00").
  2. Fix the client so it omits backfillTime entirely when there are no dates, or surfaces a UI error first.
  3. Check field naming/schema: ensure the dates land in complementScheduleDateList, not a renamed field.
  4. Wrap the call in try-catch for ServiceException and prompt the user to re-enter the backfill time range.

Example fix

// before
{"backfillTime": {"complementScheduleDateList": ""}}
// after
{"backfillTime": {"complementScheduleDateList": "2026-01-01 00:00:00,2026-01-02 00:00:00"}}
Defensive patterns

Strategy: try-catch

Validate before calling

const dates = backfillTime?.complementScheduleDateList;
if (!dates || dates.trim() === '') {
  throw new Error('complementScheduleDateList is required, comma-separated');
}

Type guard

function hasBackfillTime(bt) {
  return typeof bt?.complementScheduleDateList === 'string' && bt.complementScheduleDateList.trim() !== '';
}

Try / catch

try {
  backfill(request);
} catch (ServiceException e) {
  if (e.getMessage().startsWith("backfillTime:")) {
    // re-prompt for a valid backfill time / date list
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling the backfill API where the BackfillTime/complement section has a null or empty complementScheduleDateList and no other usable date field, e.g. backfillTime supplied without complementScheduleDateList populated.

Common situations: Client sending backfillTime object but leaving the date list blank; dates stripped by serialization; an empty string after the UI cleared a date range; mismatched API schema where the field was renamed so the transformer reads nothing.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/f0010a30f83a3d8b. Report an issue: GitHub.