Default argument object_types was not properly declared in StorageInterface
and concrete implmentations PostgreSQL and Cassandra.
Reverted unnecessary fix in storage tests.
Related to D4033
Differential D4066
Fix buffer interface protocol and impls tenma on Sep 28 2020, 4:15 PM. Authored by
Details
Default argument object_types was not properly declared in StorageInterface Related to D4033
Diff Detail
Event TimelineComment Actions Build is green Patch application report for D4066 (id=14358)Rebasing onto e37c8f7ccc... Current branch diff-target is up to date. Changes applied before testcommit 7fe76e217133e3f3ba0f3ab86961c41f51a2944f Author: tenma <tenma+swh@mailbox.org> Date: Mon Sep 28 15:59:39 2020 +0200 Fix buffer interface protocol and impls Default argument object_types was not properly declared in StorageInterface and concrete implmentations PostgreSQL and Cassandra. Reverted unnecessary fix in storage tests. See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/986/ for more details. Comment Actions What happens when we have the following layering:
and the top level swh.storage RPC client calls storage.flush()? What are the arguments actually received by the RPC server? How does this behavior translate? The earlier implementation, with a single default argument None, was at least crystal clear on what happened when the default argument fell through. Here I'm not sure at all that a call to flush with the default argument will do the right thing. Comment Actions (I'll note that the buffer storage usually comes *before* the RPC client, so the actual concern is probably moot. But the apparent mismatch in default arguments between different implems might lead to surprising behavior in the future.) Comment Actions If whatever component before BPS has its flush called with no object_types, it depends on the impl of this component how it chains well. As is, it should either chain down the arg unprocessed (from *args/**kwargs for example, what I have done for all proxies before I understood the getattr hooks), call it without this arg or give it a valid value like OBJECT_TYPES (which could be shared). In short intermediate should not have an invalid default passed down verbatim. Comment Actions And the first line of the commit message should be changed; it should say what was changed, not just what components were changed Comment Actions If my last comment was unclear:
Does this answers your question? Comment Actions Build was aborted Patch application report for D4066 (id=14440)Rebasing onto 40997c0506... Current branch diff-target is up to date. Changes applied before testcommit bef08d6316c8534d52a946ae49f9bb11b39b6b73 Author: tenma <tenma+swh@mailbox.org> Date: Mon Sep 28 15:59:39 2020 +0200 Fix object_types default in buffer interface protocol and impls Default argument object_types was not properly declared in StorageInterface and concrete implmentations PostgreSQL and Cassandra. Reverted unnecessary fix in storage tests. Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/989/ Comment Actions Build is green Patch application report for D4066 (id=14440)Rebasing onto 40997c0506... Current branch diff-target is up to date. Changes applied before testcommit bef08d6316c8534d52a946ae49f9bb11b39b6b73 Author: tenma <tenma+swh@mailbox.org> Date: Mon Sep 28 15:59:39 2020 +0200 Fix object_types default in buffer interface protocol and impls Default argument object_types was not properly declared in StorageInterface and concrete implmentations PostgreSQL and Cassandra. Reverted unnecessary fix in storage tests. See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/991/ for more details. |