Bug #54054
closeddencoder: missing lots of rgw and cls_rgw types in src/tools/ceph-dencoder/rgw_types.h
0%
Description
the ceph-dencoder and ceph-object-corpus give us regression test coverage of the encodings listed in rgw_types.h, so we should take advantage of them
Updated by Matt Benjamin about 4 years ago
we'll consider this as an intern project ;)
Updated by Casey Bodley about 4 years ago
example commit that added cls_rgw_lc_get_entry_ret in https://github.com/ceph/ceph/pull/44743/commits/c8291d9662a8dcaccdad0c1c93265c4b89d49c8a
in src/tools/ceph-dencoder/rgw_types.h, the types are organized by their header:
#include "cls/rgw/cls_rgw_types.h" TYPE(rgw_bucket_pending_info) TYPE(rgw_bucket_dir_entry_meta) ...
each type needs 5 member functions:
struct rgw_bucket_dir_entry_meta {
...
void encode(ceph::buffer::list &bl) const;
void decode(ceph::buffer::list::const_iterator &bl);
void dump(ceph::Formatter *f) const;
void decode_json(JSONObj *obj);
static void generate_test_instances(std::list<rgw_bucket_dir_entry_meta*>& o);
};
WRITE_CLASS_ENCODER(rgw_bucket_dir_entry_meta)
the encode/decode/WRITE_CLASS_ENCODER bits should already be there - if they aren't, then the class doesn't need to be listed in rgw_types.h
for dump/decode_json/generate_test_instances, see existing types for examples
start with cls_rgw_ops.h and cls_rgw_types.h
Updated by ping zheng almost 4 years ago
Casey Bodley wrote:
example commit that added cls_rgw_lc_get_entry_ret in https://github.com/ceph/ceph/pull/44743/commits/c8291d9662a8dcaccdad0c1c93265c4b89d49c8a
in src/tools/ceph-dencoder/rgw_types.h, the types are organized by their header:
[...]each type needs 5 member functions:
[...]
the encode/decode/WRITE_CLASS_ENCODER bits should already be there - if they aren't, then the class doesn't need to be listed in rgw_types.h
for dump/decode_json/generate_test_instances, see existing types for examples
start with cls_rgw_ops.h and cls_rgw_types.h
I am working on v14.2.22, I don't find rgw_types.h here, but types.h exists in the tool. Then I only add 5 types from cls_rgw_ops.h for test, when this is acknowledged , I will add the left types.
My pr is here:https://github.com/ceph/ceph/pull/45836, there are some errors here, who can help me go through this.
Updated by ping zheng almost 4 years ago
with the Signed-off-by I recreate the pr here , is there something wrong in the code?
Updated by ping zheng almost 4 years ago
ping zheng wrote:
with the Signed-off-by I recreate the pr here , is there something wrong in the code?
Sorry, the pr url is https://github.com/ceph/ceph/pull/45841
Updated by Casey Bodley almost 4 years ago
- Status changed from New to Fix Under Review
- Pull request ID set to 45841
Updated by Iqbal Khan almost 4 years ago
Added missing functions and types of *cls_rgw_types.h* class.
Updated by ping zheng almost 4 years ago
Casey Bodley wrote:
example commit that added cls_rgw_lc_get_entry_ret in https://github.com/ceph/ceph/pull/44743/commits/c8291d9662a8dcaccdad0c1c93265c4b89d49c8a
in src/tools/ceph-dencoder/rgw_types.h, the types are organized by their header:
[...]each type needs 5 member functions:
[...]
the encode/decode/WRITE_CLASS_ENCODER bits should already be there - if they aren't, then the class doesn't need to be listed in rgw_types.h
for dump/decode_json/generate_test_instances, see existing types for examples
start with cls_rgw_ops.h and cls_rgw_types.h
Pr of 45841 is closed, as I am not working from branch of master. I have to rebase it, then I recommit a new pr below:
Added missing functions and types of cls_rgw_ops.h class.
PR: https://github.com/ceph/ceph/pull/46316
Updated by Casey Bodley almost 4 years ago
- Pull request ID changed from 45841 to 46316
Updated by Casey Bodley almost 3 years ago
- Status changed from Fix Under Review to Resolved
Updated by Upkeep Bot 8 months ago
- Tags (freeform) set to upkeep-failed
Redmine Upkeep failure¶
The redmine-upkeep.py script failed to update this issue. I have added the tag "upkeep-failed" to avoid looking at this issue again.
Please manually fix the issue and remove "upkeep-failed" tag to allow future upkeep operations.
Transformation¶
The script was in the merged transformation.
Error¶
Issue #54054 with status Resolved references PR #46316 which is closed but not merged.
Possible resolutions:
- If the PR id is wrong, please update it.
- If the issue was fixed through other means (e.g. in the kernel or Rook), please remove the PR id.
- If the PR is already merged through other means (erroneous backport), mark the issue state as "Rejected".
- Do nothing. This script will ignore this issue while the upkeep-failed tag is applied.