question

PrashastMauryaMindtreeLTD-3329 avatar image
0 Votes"
PrashastMauryaMindtreeLTD-3329 asked MartinJaffer-MSFT commented

Manually Cancel ADF Pipeline by it's RunID

We have a requirement where we need to manually cancel a pipeline when an activity fails or completes.

We did try the steps mentioned in MS Docs : Pipeline cancel run : https://docs.microsoft.com/en-us/rest/api/datafactory/pipelineruns/cancel; but this does not work because even when the RUN ID is correct it says incorrect RUN ID.

Pipeline run ID shown in ADF: 108941-p.png



Response Received:
{
"error": {
"code": "ReferencedPipelineRunNotFound",
"message": "Referenced pipeline run id bb157b3c-8d69-4eee-b606-9fd42ea100cc does not exist.",
"target": "pipelinerun",
"details": null
}
}


Can some one please advise us how to achieve this?




azure-data-factory
p.png (15.1 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MartinJaffer-MSFT: Would you mind having a look into above, please ?

0 Votes 0 ·
MartinJaffer-MSFT avatar image MartinJaffer-MSFT PrashastMauryaMindtreeLTD-3329 ·

Sure, I'll give it a try, @PrashastMauryaMindtreeLTD-3329 .

My plan is to make a pipeline full of wait activities, and try 2 cases:
- When I do a debug run
- When I do a trigger now run

0 Votes 0 ·

Hi Martin,

Thanks for your response.

It seems the issue has been resolved.

The runID: - bb157b3c-8d69-4eee-b606-9fd42ea100cc was a sandbox run/Debug run ID and the API used is for Pipeline Run hence it is throwing error “Not found” as the Pipeline run does not exist.

We had to provide a pipeline run id in order to make it work.

Although, post moving forward we are stuck on a different issue.

II have tried reaching out to you through a mail with subject "ADF: Cancel the Pipeline by RunId | ClientIPNotAuthorized", where you can have a look and guide me.

Thanks in Advance,
Prashast


0 Votes 0 ·
Show more comments

0 Answers