Skip to content

prserv: add support for an "upstream" server

[email protected] bitbake-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 6 repliesIn review

Changes in V3 from the cover letter

- Revert the commit removing the so far unused "hist" mode, which we wish to keep for binary reproducibility sake.

- Simplification of get_value() function to take both "hist" and "nohist" modes with the same shared code.

- Add "history" parameter to the "getPR" request, so that the client can ask for the mode of its choice. This will also make it possible to implement tests for both modes.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12prserv: simplify the PRServerClient() interfacelib/prserv/serv.py+12 -120 replies
2/12prserv: use double quotes by defaultbin/bitbake-prserv lib/prserv/__init__.py lib/prserv/client.py +2 more+62 -620 replies
3/12bitbake-prserv: replace deprecated optparse by argparsebin/bitbake-prserv+55 -270 replies
4/12prserv: use self.logger instead of logger directlylib/prserv/serv.py+4 -40 replies
5/12asyncrpc: include parse_address from hashservlib/bb/asyncrpc/client.py lib/hashserv/__init__.py+24 -260 replies
6/12prserv: capitalization and spacing improvementslib/prserv/__init__.py lib/prserv/db.py lib/prserv/serv.py+34 -340 replies
7/12prserv: add extra requestslib/prserv/client.py lib/prserv/db.py lib/prserv/serv.py+96 -11 reply
8/12prserv: remove redundant exception handlerlib/prserv/serv.py+0 -20 replies
9/12prserv: correct error messagelib/prserv/serv.py+1 -10 replies
10/12prserv: remove unnecessary codelib/prserv/db.py+1 -50 replies
11/12prserv: add "upstream" server supportbin/bitbake-prserv lib/prserv/__init__.py lib/prserv/client.py +2 more+174 -772 replies
12/12prserv: add "history" argument to "get-pr" requestlib/prserv/client.py lib/prserv/db.py lib/prserv/serv.py+13 -122 replies

Reviews trailers per patch

1 of 12 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchBruce Ashfield
SeriesR-b
1/12
2/12
3/12
4/12
5/12
6/12
7/12R-b
8/12
9/12
10/12
11/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/12] prserv: add support for an "upstream" server

From: Michael Opdenacker <[email protected]>

This makes it possible to customize an "upstream" distribution by modifying local packages. If the "upstream" package bears revision "x", the local one will have revision "x.y", this having priority over the upstream one.

Multiple levels of upstream servers are supported, so "x.y.z" revisions are possible too.

Take advantage of this work to clean-up and update the prserv code too.

Manual "sanity" tests have been run so far but automated tests (based on Python unittest, as for the hash server tests) are being prepared for the next iteration. They will also to test also supported scenarios.

Code reviews are welcome, especially for more Pythonic ways of implementing some details.

---

Changes in V3:

- Revert the commit removing the so far unused "hist" mode, which we wish to keep for binary reproducibility sake.

- Simplification of get_value() function to take both "hist" and "nohist" modes with the same shared code.

- Add "history" parameter to the "getPR" request, so that the client can ask for the mode of its choice. This will also make it possible to implement tests for both modes.

Note that more requests ("export", "import"...) will also need a "history" parameter, in a future version, after the first tests are implemented.

- Several fixes to bugs either present in V2 or introduced by the V3 code changes.

- Put all the new features at the tip of the branch, to make the cleanup commits easier to merged.

Changes in V2:

- Add this new commit:
prserv: remove unused "hist" mode in the database backend

- Squash commit "prserv: fix read_only test" into commit "prserv: simplify the PRServerClient() interface" (Reported by Richard Purdie)

- Fix the code to support increasing "x.y.z" values, thus supporting several levels of upstream servers.

- db.py: remove duplicate definition of find_max_value() function in db.py

- prserv.py: remove tabs before comments (Python didn't complain)

- db.py: now stores the revision ("value") as TEXT. This way we can store "1.0" without having it transformed to "1" when the default type was INTEGER.

- This allows to fix a regression when the first packages were created with 'r0.1' instead of 'r0.0' initially.

- find_max_value: now returns None instead of '0' when no value is found Before we couldn't tell the difference between a '0'
max value and the absence of such a value.

Michael Opdenacker (12):
prserv: simplify the PRServerClient() interface
prserv: use double quotes by default
bitbake-prserv: replace deprecated optparse by argparse
prserv: use self.logger instead of logger directly
asyncrpc: include parse_address from hashserv
prserv: capitalization and spacing improvements
prserv: add extra requests
prserv: remove redundant exception handler
prserv: correct error message
prserv: remove unnecessary code
prserv: add "upstream" server support
prserv: add "history" argument to "get-pr" request

 bin/bitbake-prserv        |  99 ++++++++++++-----
 lib/bb/asyncrpc/client.py |  23 ++++
 lib/hashserv/__init__.py  |  27 +----
 lib/prserv/__init__.py    |  21 +++-
 lib/prserv/client.py      |  44 ++++++--
 lib/prserv/db.py          | 225 ++++++++++++++++++++++----------------
 lib/prserv/serv.py        | 220 ++++++++++++++++++++++++++-----------
 7 files changed, 436 insertions(+), 223 deletions(-)
Signature · 1 line
2.34.1