cppcheck icon indicating copy to clipboard operation
cppcheck copied to clipboard

donate-cpu-server.py: added preliminary "/packages" path to request a list of certain packages via "report" query parameter

Open firewave opened this issue 3 years ago • 4 comments

firewave avatar Jan 22 '22 17:01 firewave

This is a first stab at https://trac.cppcheck.net/ticket/10700.

The result can be used with the new --packages parameter in the client added in #3742.

firewave avatar Jan 22 '22 17:01 firewave

A better way to implement it would probably via a path named /packages which takes query parameters like type, version etc. or even more specific queries like querying into the complete available data.

firewave avatar Jan 22 '22 18:01 firewave

hmm it does sound pretty reasonable to be able to fetch a certain list of packages and feed that to the client.

danmar avatar Jan 24 '22 20:01 danmar

I demoted it to draft since I would like to implement the other approach since crashes are fine now and we probably might need it for the time_gt report next (if we actually get fixes for those regressions).

firewave avatar Jan 24 '22 20:01 firewave

I chose a different approach to avoid duplicated code. The report will now be generated as usual but if the pkgs query parameter is provided it will return the list of affected packages instead.

Example: http://cppcheck1.osuosl.org:8000/crash.html?pkgs=1

This allows us to easily add this functionality to most of the reports.

firewave avatar Sep 21 '22 16:09 firewave

I have already tested these changes with a local server and client and there were no issues with the new request parsing.

The two reports I extended are possibly the most interesting ones during a dev cycle and I would leave it at those for this PR and do the other ones in a follow-up.

firewave avatar Sep 22 '22 21:09 firewave

This is finally ready for review.

firewave avatar Sep 26 '22 14:09 firewave