Share via

ADF: Pipeline Cancel Request with 'isRecursive' being set as True, but sub pipeline is not cancelled

Yeliang Yang 26 Reputation points Microsoft Employee
Aug 1, 2022, 5:57 AM

226616-microsoftteams-image.png

226538-microsoftteams-image-1.png

226642-microsoftteams-image-2.png

I define two pipelines: pipeline 1 and pipeline 2.
There are two activities in pipeline 1. The first activity is an ExecutePipeline activity with 'waitOnComplete' being set as False. It will invoke pipeline 2. The second activity is a wait activity. It lasts 1min.
There is one activity in pipeline 2. It is a wait activity. It lasts 5min.

I run pipeline 1, and 30 seconds later, I cancel pipeline 1 with 'isRecursive' being set as True.
But pipeline 2 is not being cancelled as expected.

Is this behavior normal?

Thx.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,119 questions
{count} votes

Accepted answer
  1. AnnuKumari-MSFT 33,986 Reputation points Microsoft Employee
    Aug 1, 2022, 9:27 AM

    Hi @Yeliang Yang ,

    Welcome to Microsoft Q&A platform and thanks for posting your question.

    As I understand your query, you are trying to cancel a pipeline run which is invoking another pipeline , even when you are setting isRecursive as True, the child pipeline is not getting cancelled. Please let me know if my understanding is incorrect.

    In what way , you are trying to cancel the pipeline, are you manually hitting cancel recursive option and facing this problem or are you invoking web activity to cancel the pipeline by sending a request via REST API as mentioned in this document: Pipeline Runs - Cancel

    I tried to reproduce your scenario in both ways. However, I didn't face any problem.

    One thing I would like to mention is cancel pipeline request will not work if the pipeline you are trying to cancel is getting executed via debug run . You need to trigger the pipeline which you want to cancel recursively.

    Sharing the video for your reference:

    1. When hitting cancel recursively manually:

    226628-cancel-manually.gif

    2. When invoking Web activity to cancel the pipeline:

    226725-cancel-api.gif

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Subashri Vasudevan 11,206 Reputation points
    Aug 1, 2022, 9:18 AM

    Hi @Yeliang Yang ,

    Thanks for the ask and using Microsoft Q&A portal.

    In your case it's an expected scenario as the sub pipeline starts waiting once kicked off. It means, the pipeline goes to pause mode.

    You can troubleshoot this by changing to wait time period to 2seconds in sub pipeline, and then try to do recursive cancel from main pipeline. In this case the sub pipeline should be cancelled quick.

    Request you to try this and let us know for questions

    Thanks

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.