ceph-dencoder: RGW - Add missing types#52198
Conversation
|
jenkins test make check |
888de97 to
c48707b
Compare
c48707b to
84dc3a0
Compare
|
jenkins retest this please |
84dc3a0 to
b230bba
Compare
cbodley
left a comment
There was a problem hiding this comment.
thanks! we were working on some of this in https://tracker.ceph.com/issues/54054 but didn't cover anything
src/cls/rgw/cls_rgw_ops.h
Outdated
| f->open_array_section("keep_attr_prefixes_list"); | ||
| for (auto iter = keep_attr_prefixes.begin(); iter != keep_attr_prefixes.end(); ++iter) { | ||
| f->dump_string("keep_attr_prefix", *iter); | ||
| } | ||
| f->close_section(); |
There was a problem hiding this comment.
the helpers in src/common/ceph_json.h support std::list<T> already:
encode_json("keep_attr_prefixes", keep_attr_prefixes, f);There was a problem hiding this comment.
ok, missed that encode_json.. Changing it
src/cls/rgw/cls_rgw_ops.h
Outdated
| f->open_array_section("entries"); | ||
| for (std::list<rgw_cls_bi_entry>::const_iterator iter = entries.begin(); iter != entries.end(); ++iter) { | ||
| f->open_object_section("entry"); | ||
| iter->dump(f); | ||
| f->close_section(); | ||
| } | ||
| f->close_section(); |
There was a problem hiding this comment.
encode_json("entries", entries, f);
src/rgw/driver/rados/rgw_zone.h
Outdated
|
|
||
| void dump(Formatter *f) const; | ||
| void decode_json(JSONObj *obj); | ||
| //static void generate_test_instances(std::list<RGWSystemMetaObj*>& o); |
src/rgw/rgw_cors.cc
Outdated
| f->open_array_section("AllowedOrigin"); | ||
| for (auto& origin : allowed_origins) { | ||
| f->dump_string("Origin", origin); | ||
| } | ||
| f->close_section(); |
There was a problem hiding this comment.
does encode_json work for these lists too?
src/tools/ceph-dencoder/rgw_types.h
Outdated
| //#include "rgw/driver/rados/rgw_zone.h" | ||
| //TYPE_FEATUREFUL_NONDETERMINISTIC(RGWSystemMetaObj) |
There was a problem hiding this comment.
Abstract class, need to remove
|
a 'make check' failure |
b230bba to
f4d65da
Compare
f4d65da to
ceade3f
Compare
|
jenkins test make check |
ceade3f to
35dd76c
Compare
**** reencode of /home/jenkins-build/build/workspace/ceph-pull-requests/ceph-object-corpus/archive/15.0.0-539-g191ab33faf/objects/rgw_placement_rule/276cee7e7a31943b9d27987b75241f8d resulted in a different dump ****
|
|
@NitzanMordhai -- this PR is different than others I've worked with in that your branch is not on your own fork of ceph/ceph but within ceph/ceph itself. I don't know if that's proper. @cbodley -- what are your thoughts? |
Yes, I made a mistake with those PRs, and it won't happen again, I talked to @rzarzynski, and it looks like there is no easy way to change the base repository without closing and reopening new pr, which means losing all the comments. |
35dd76c to
d7c7b00
Compare
…code-decode comparison Currently, ceph-dencoder lacks certain rgw types, preventing us from accurately checking the ceph corpus for encode-decode mismatches. This pull request aims to address this issue by adding the missing types to ceph-dencoder. To successfully incorporate these types into ceph-dencoder, we need to introduce the necessary `dump` and `generate_test_instances` functions that was missing in some types. These functions are essential for proper encode and decode of the added types. This PR will enhance the functionality of ceph-dencoder by including the missing types, enabling a comprehensive analysis of encode-decode consistency. With the addition of these types, we can ensure the robustness and correctness of the ceph corpus. This update will significantly contribute to improving the overall reliability and accuracy of ceph-dencoder. It allows for a more comprehensive assessment of the encode-decode behavior, leading to enhanced data integrity and stability within the ceph ecosystem. Fixes: https://tracker.ceph.com/issues/61788 Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
82f23e9 to
94021bb
Compare
Currently, ceph-dencoder lacks certain rgw types, preventing us from accurately checking the ceph corpus for encode-decode mismatches. This pull request aims to address this issue by adding the missing types to ceph-dencoder.
To successfully incorporate these types into ceph-dencoder, we need to introduce the necessary
dumpandgenerate_test_instancesfunctions that was missing in some types. These functions are essential for proper encode and decode of the added types.This PR will enhance the functionality of ceph-dencoder by including the missing types, enabling a comprehensive analysis of encode-decode consistency. With the addition of these types, we can ensure the robustness and correctness of the ceph corpus.
This update will significantly contribute to improving the overall reliability and accuracy of ceph-dencoder. It allows for a more comprehensive assessment of the encode-decode behavior, leading to enhanced data integrity and stability within the ceph ecosystem.
Fixes: https://tracker.ceph.com/issues/61788
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows