Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting a DatafactoryType with zero items blocks other DatafactoryTypes from being deleted #90

Open
Zarimax opened this issue Jun 9, 2022 · 2 comments
Labels

Comments

@Zarimax
Copy link

Zarimax commented Jun 9, 2022

We noticed a behavior in the "delete ADF items" task that seems a little odd.

We have an ADF resource with these contents:

- 0 Triggers
- 130 Pipelines
- 0 Data flows
- 30 Datasets
- 30 Linked Services

We tried running a "delete ADF items" task with these parameters:

- ServiceFilter: *
- DataflowFilter: *
- DatasetFilter: *
- PipelineFilter: *
- TriggerFilter: *
- Sorting: descending
- continue: false
- Throttle: 5
- detectDependancy: true

Our goal was to clear the ADF resource of all contents, regardless of the DatafactoryType. To accomplish this, we used * wildcards for all filters.

The odd behavior that we noticed is this: the task runs, but it reports that zero Triggers were found and it immediately finishes as successful. The expected deletions of the Pipeline, Dataset, and Linked Service items did not occur.

There was no error or warning - the task just finishes after finding zero Triggers to delete.

We can get around this issue by leaving the Trigger and Data Flow filters blank, but that would prevent us from globally applying this task to any ADF resource, (regardless of its contents). We would either need to be aware of the contents of the ADF resource first, (to set only the correct filters to the * wildcard), or we would need 5 separate copies of this task, (one for each * wildcard filter).

I don't know TypeScript, but maybe this behavior is caused by the combination of this Promise.all:

and this item map, when the array of items is empty?

items.map((item: ADFJson) => {

Would it make sense to treat (items.length === 0) like a resolved promise here, similar to this code?

if (items.length === 0) return Promise.resolve(true);

@liprec
Copy link
Owner

liprec commented Jun 14, 2022

Thanks for the feedback and I will look at your suggestion.

@liprec liprec added the bug label Jun 14, 2022
@shay2501
Copy link

I have noticed this behavior as well. Unfortunately it makes the extension unusable to me. I will try the extension again once this gets fixed. It works well otherwise!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants