Skip to content

Commit

Permalink
Add flank basic activity diagram with description
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-goral authored and pawelpasterz committed Feb 11, 2021
1 parent fa7a606 commit 04c196d
Show file tree
Hide file tree
Showing 4 changed files with 456 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/refactor/flank_run/flank_activity_diagram.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Flank Activity Diagram

![activity_diagram](http://www.plantuml.com/plantuml/proxy?cache=no&fmt=svg&src=https://raw.githubusercontent.com/Flank/flank/master/docs/refactor/flank_run/flank_activity_diagram.puml)

## Description

The diagram shows abstract view of all possible flank activities.

* The `#LightGreen` color relates to CLI commands.
* The `#LightBlue` color relates to domain scope.
* The default yellow color reserved for top-level functions that are not atomic and can be converted to `frame`.
* Frame can represent a package or rather the top-level function composed of other functions.
* The `#snow` color relates to low-level functions
* Low-level functions should be atomic ( can import only non-domain utils and third-party libraries? - consider ).
* Low-level functions cannot be converted to frame

The complete activity diagram will contain only low-level activities represented by `#snow` color.
All top-level functions represented by yellow activities contains hidden complexity and should be converted to frames.

# Layers
```
presentation (CLI) -> domain -> utils -> data
```
158 changes: 158 additions & 0 deletions docs/refactor/flank_run/flank_activity_diagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
@startuml
'https://plantuml.com/activity-diagram-beta

start
:main;
partition "cli command" #LightGreen {
split


:login;


split again
partition "new test run" #LightBlue {
partition "run tests" #LightBlue {

split
partition "run android" #LightBlue {
:before run tests;
:prepare data;
:upload files;
:create test contexts;
repeat
:dump shards;
:upload;
:create test config;
:build test matrix;
:execute with retry;
repeat while (for each context)
:before run message;
:after test run;
:test results>
}

split again
partition "run ios" #LightBlue {
:before run tests;
:prepare data;
:upload files;
:dump shards;
:before run message;
:create test contexts;
repeat
:upload;
:create test config;
:build test matrix;
:execute with retry;
repeat while (for each context)
:after test run;
:test results>
}

end split
}

partition "poll matrices" #LightBlue {
repeat
:print next not complete matrix status;
repeat while (any matrix is not complete)
:test matrices>
}
partition "generate report" #LightBlue {
:parse test suite;
:generate cost report;
:generate matrix results report;
:generate optional htmlErrorReport;
:generate junit report;
:refresh matrices and get executions;
:process junit results;
:createAndUploadPerformanceMetricsForAndroid;

}
:fetch artifacts;
:print matrices web links;
:validate matrices;
}



split again
partition "refresh last run" #LightBlue {
:get last matrices;
:get last args;
:refresh matrices;
:poll matrices;
:fetch artifacts;
:generate report;
:validate matrices;
}



split again
partition "cancel last run" #LightBlue {
:get last matrices;
:get last args;
:cancel matrices;
}



split again
partition "android / ios" #LightBlue {
split


partition "configuration" #LightBlue {
split
:print locales description;
split again
:print locales table;
split end
}

split again
partition "models" #LightBlue {
split
:print description;
split again
:print table;
split end
}

split again
partition "supported orientations" #LightBlue {
split
:print table;
split end
}

split again
partition "versions" #LightBlue {
split
:print description;
split again
:print table;
split end
}


split again
:print ip blocks list;

split again
:print network configurations;

split again
:print network profile description;

split again
:print provided software;

end split
}
end split
stop

@enduml
13 changes: 13 additions & 0 deletions docs/refactor/flank_run/flank_run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Flank run refactor

## References

* https://github.com/Flank/flank/issues/1317

# Insights

## Fix import dependencies

Only the cli commands can be aware of run package.
So any code inside the run package which is imported somewhere else then cli,
must be reorganized and moved outside the run package.
Loading

0 comments on commit 04c196d

Please sign in to comment.