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

mgmt, appservice redegisn #14890

Merged
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
15f039f
bump netty version
weidongxu-microsoft Sep 8, 2020
2d4b7b3
add WebSiteBase
weidongxu-microsoft Sep 8, 2020
978d0f3
redesign WebApps.List
weidongxu-microsoft Sep 8, 2020
728dc01
fix
weidongxu-microsoft Sep 8, 2020
4b8ab5f
fix
weidongxu-microsoft Sep 8, 2020
12a469d
remove inProgressOperationId
weidongxu-microsoft Sep 8, 2020
0bc97f6
FunctionAppBasic
weidongxu-microsoft Sep 8, 2020
2d9f3e4
fix tests
weidongxu-microsoft Sep 8, 2020
afa1567
add test case for WebAppBasic
weidongxu-microsoft Sep 8, 2020
6b0b723
use flatMapDelayError
weidongxu-microsoft Sep 8, 2020
4a846c1
let WebApp extends WebAppBasic
weidongxu-microsoft Sep 8, 2020
f377149
Merge branch 'master' into mgmt_appservice-redegisn
weidongxu-microsoft Sep 8, 2020
59b8165
remove unused code
weidongxu-microsoft Sep 8, 2020
3d48a59
add WebDeploymentSlotBasic and FunctionDeploymentSlotBasic
weidongxu-microsoft Sep 8, 2020
2488cd4
test and fix
weidongxu-microsoft Sep 8, 2020
c84ece9
simplify FunctionRuntimeStack
weidongxu-microsoft Sep 8, 2020
e09197f
redact
weidongxu-microsoft Sep 8, 2020
4d419ac
changelog
weidongxu-microsoft Sep 8, 2020
b9960e9
spotbugs
weidongxu-microsoft Sep 8, 2020
5e0aec5
rename lambda function
weidongxu-microsoft Sep 9, 2020
95a4853
code reuse
weidongxu-microsoft Sep 9, 2020
2db7e1b
javadoc
weidongxu-microsoft Sep 9, 2020
0e80c25
add test for batch flux
weidongxu-microsoft Sep 9, 2020
2de39f3
delete ReactorMapper
weidongxu-microsoft Sep 9, 2020
92507c8
refresh also refresh self
weidongxu-microsoft Sep 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.util.ArrayList;
import java.util.Collection;
import java.util.function.BiFunction;

Expand All @@ -17,21 +16,17 @@
*/
public class BatchDeletionImpl {

@SuppressWarnings({"unchecked", "rawtypes"})
public static Flux<String> deleteByIdsAsync(Collection<String> ids,
BiFunction<String, String, Mono<Void>> deleteByIdAsync) {
if (ids == null || ids.isEmpty()) {
return Flux.empty();
} else {
return Flux.fromIterable(ids)
.flatMapDelayError(id -> {
final String resourceGroupName = ResourceUtils.groupFromResourceId(id);
final String name = ResourceUtils.nameFromResourceId(id);
return ReactorMapper.map(deleteByIdAsync.apply(resourceGroupName, name), id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the deleteByIdAsync should take one string id rather than two strings (some resource will need more).

Copy link
Member Author

@weidongxu-microsoft weidongxu-microsoft Sep 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can easily overload it with same name, and take Function<String, Mono<Void>> for this case (I actually wrote this signature first, then changed it since most case it is resourceGroupName+name).

}, 32, 32);
}

Collection<Mono<String>> observables = new ArrayList<>();
for (String id : ids) {
final String resourceGroupName = ResourceUtils.groupFromResourceId(id);
final String name = ResourceUtils.nameFromResourceId(id);
Mono<String> o = ReactorMapper.map(deleteByIdAsync.apply(resourceGroupName, name), id);
observables.add(o);
}

return Flux.mergeDelayError(32, observables.toArray(new Mono[0]));
}
}