filter 'baseline' builds
Not all builds in a project should be considered 'baselines'. Project should have a setting that allows to apply additional filter for matching the valid baseline builds.
Could that be applied to this line? https://github.com/Linaro/squad/blob/master/squad/core/models.py#L834
One feature Dan mentioned on https://github.com/Linaro/squad/issues/276 is that some builds could be marked as baselines, instead of baseline always being the previous build of a project.
Should we mark baseline builds manually or should we have a setting that automatically marks a baseline?
Yes, this is the line it should apply to. However 'how to mark a baseline' remains an unanswered question.
Just to keep record: https://github.com/Linaro/lkft-tools/blob/master/bin/generate_lts_report.py#L34
The idea we came up with is:
- add 'can be baseline' flag to the Build object
- flag is automatically added to all new Builds
- flag can be set manually with API call (maybe we should also allow changing it with metadata at submission time?)
- when flag is removed (build is no longer a baseline) re-calculate all ProjectStatus objects of the builds that used is as a baseline
- when flag is added, don't do anything for current data (should we allow to manually re-trigger ProjectStatus re-calculation?)
I agree with the above.
maybe we should also allow changing it with metadata at submission time?
Yeah, that and also by /createbuild endpoint
should we allow to manually re-trigger ProjectStatus re-calculation?
I don't see a reason why not to, perhaps something like /api/builds/<id>/status/?refresh=true
Now we have an initial baseline structure https://github.com/Linaro/squad/commit/296c6f9adab85e227c8004c55c395d2c22dc3acd
Maybe we can move one with implementing these steps Milosz proposed.