Skip to content

Test-AdfCode: warn about enabled trigger without pipeline references #435 #507

Closed

Description

@NowinskiK

Part of #435.

Problem

Test-AdfCode does not validate triggers. A trigger with runtimeState: Started but no pipeline reference passes the build/test step silently. The deployment then fails when ADF rejects the start with only Missing or invalid pipeline references for trigger <name>. ADF Studio blocks publishing in this case.

The build/test step is the right place to catch this, because only there can we tell the user exactly what is wrong. At deployment time we can only pass on the Azure API error.

Expected

Test-AdfCode writes a warning (and counts it in WarningCount) for every trigger that:

  • has runtimeState = Started, and
  • has no pipeline reference: empty or missing pipelines list (Schedule, BlobEvents, CustomEvents triggers), or missing pipeline object (TumblingWindowTrigger).

Stopped triggers without pipelines are valid and must not produce a warning.

Tests

  • test/adf2/trigger/TR_without_pipeline.json (fixture from b97a69c): Test-AdfCode on adf2 returns 0 errors and 1 warning naming the trigger.
  • Cases per trigger type and state, built in TestDrive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions