Hi, All
Currently, the Project/DORA feature is only available for Normal Mode,
I think it should be supported in Advanced Mode as well.
Why
DORA is no doubt one of the most important features of our system
judged by the feedback from our new users, many of them joined the
community because of it.
In our current design (v0.15), to calculate DORA metrics, we need
project_mapping to be populated before the DORA plugin gets
executed. However, this operation happens during blueprint.settings
to blueprint.plan conversion which is only available in Normal Mode.
In other words, Advanced Mode accepts blueprint.plan directly
without conversion, thus no DORA for Advanced Mode. It poses a
couple of problems:
Not all our plugins support Normal Mode, especially those in
WIP/Beta stage like BitBucket/TaPD/Zentao. It is a blocker for users
who are using these Data Sources and are willing to help with
testing. Some users might want to arrange their
collection/computation in a particular way. i.e. to collect data in
one blueprint but compute the DORA metric in another one. However,
Normal Mode has a different agenda(guiding new users), which makes
Advanced Mode the only suitable way to support this kind of
customization. In conclusion, Advanced Mode must support
Project/DORA.
What
The DORA plugin itself merely depends on the project_mapping table
which is OK, however, the table is managed by the framework and
omitted from the bp.plan which is the root cause of the problem. I
hereby proposed the following solution to fix it without too much
hassle:
Let the plugin maintains the project_mapping instead of the
framework so it can be described in the bp.plan field, for example,
the org plugin:
Pipeline task json example:
{
"plugin": "org",
"subtasks": [ "setProjectMapping" ],
"options": {
"projectMappings": [{
"projectName": "myproject",
"scopes": [
{ "table": "cicd_scope", "row_id":
"gitlab:GitlabProject:1:11876178" },
{ "table": "boards", "row_id":
"gitlab:GitlabProject:1:11876178" }
]
}]
}
}
Meanwhile, the Normal Mode logic must be updated to produce the task
instead of writing the table directly.
How
With this solution, the Project relationship can be fully described
in the bp.plan field, it offers more freedom to users to do whatever
they see fit.
One might test/use the Beta/WIP plugins in Advanced Mode. To that
end, we must provide thorough documentation to guide users. a.
Documents to describe scopes management for WIP/Beta plugins. b. Add
a section to the Project Doc to describe how the plan works and
where the org task should be. c. Offer a workable example plan with
related docs linked. For those who want collection/computation in
separate blueprints, we shall offer a document with examples to
guide them through the process.
Feel free to discuss in this thread of comment on
https://github.com/apache/incubator-devlake/issues/4534
Best
Klesh Wong