Skip to content

New model (for unified score and more) #1352

Closed
@isoos

Description

@isoos

The discussion around the dartdoc score identified the need for a new model on how we store the score(s). Until now we have stored it in PackageVersionAnalysis, which is tightly-coupled with storing the result and serialization of pana.

The model also introduced some operational complexity, as we built the UI around the internals of pana, and changes to it require consideration on how we roll out a release. We've also developed a few things to cache the quick summary of the analysis (AnalysisExtract) in order to display it along the various UI places.

Considering the experiences on how we use the data, and a few things that are in the pipeline, I'd suggest the following:

  • Let's introduce a Datastore entity for storing the high-level analysis data (essentially AnalysisExtract + the new dartdoc score), but decoupled from the pana-related work.

  • Let's introduce a Datastore entity and a pub-site-only data model for the output of pana and dartdoc analysis. This should contain the information on the analysis tab, plus the collected suggestions from both pana and dartdoc. For each new serialization change of pana we shall transform it to the pub site internals. This would add a bit of work when there is a breaking change in pana, but it would reduce the deploy worries and complexities.

  • If/when we'll have a facility for runtime analysis, it would be easy to adapt its result into the above items.

As far as I can tell, this should be possible in an incremental way, and we may do a full migration in a couple of deploys.

/cc @sortie @kevmoo @mit-mit

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions