Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-9590 chk: Refactor checker messages #8683

Merged
merged 1 commit into from
Apr 19, 2022
Merged

Conversation

mjmac
Copy link
Contributor

@mjmac mjmac commented Apr 11, 2022

  • Move CheckReport to chk package
    • Separate report request from payload
    • Add Actions and Details lists to allow the checker to
      specify defined actions that could be taken in response
      to the inconsistency report.
    • Rename chk/check -> chk/chk to ensure unique namespaces.
  • Adjust srv/mgmt messages to use chk types directly

Signed-off-by: Michael MacDonald [email protected]

@mjmac mjmac requested a review from a team as a code owner April 11, 2022 23:03
@mjmac mjmac requested a review from Nasf-Fan April 11, 2022 23:05
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style warning(s) for job https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-8683/1/
Please review https://wiki.hpdd.intel.com/display/DC/Coding+Rules

Note: Error annotation limited to the first 31 errors. Remaining unannotated errors:

src/chk/chk.pb-c.c:139:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:151:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:163:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:175:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:187:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:199:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:211:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:223:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:235:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:256:
(style) that open brace { should be on the previous line

src/chk/chk.pb-c.c:261:
(style) that open brace { should be on the previous line

src/chk/chk.pb-c.c:273:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.h:18:
(style) do not add new typedefs

src/chk/chk.pb-c.h:354:
(style) open brace '{' following struct go on the same line

src/chk/chk.pb-c.h:420:
(style) space prohibited between function name and open parenthesis '('

src/chk/chk.pb-c.h:421:
(style) line over 100 characters
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.h:426:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:428:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:430:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:431:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:433:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:434:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:437:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:438:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:439:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:441:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:442:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:445:
(style) do not add new typedefs

src/chk/chk.pb-c.h:446:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:447:
(style) code indent should use tabs where possible

FYI: Errors found in lines not modified in the patch:

src/engine/tests/SConscript:3:
(pylint-unused-import) Unused import compiler_setup

src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
@daosbuild1
Copy link
Collaborator

@mjmac
Copy link
Contributor Author

mjmac commented Apr 11, 2022

@Nasf-Fan: This PR is a prerequisite for #8684 and #8685. I will clean up #8684 tomorrow to get it ready for landing, but I wanted to push it as a draft so that you could see how I am planning to use the changes made in this PR.

@mjmac mjmac dismissed daosbuild1’s stale review April 11, 2022 23:25

Generated code.

  * Move CheckReport to chk package
    - Separate report request from payload
    - Add Actions and Details lists to allow the checker to
      specify defined actions that could be taken in response
      to the inconsistency report.
    - Rename chk/check -> chk/chk to ensure unique namespaces.
  * Adjust srv/mgmt messages to use chk types directly

Signed-off-by: Michael MacDonald <[email protected]>
@mjmac mjmac force-pushed the mjmac/DAOS-9590 branch from 719e472 to a81b51d Compare April 14, 2022 16:16
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style warning(s) for job https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-8683/3/
Please review https://wiki.hpdd.intel.com/display/DC/Coding+Rules

Note: Error annotation limited to the first 31 errors. Remaining unannotated errors:

src/chk/chk.pb-c.c:139:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:151:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:163:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:175:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:187:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:199:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:211:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:223:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:235:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:256:
(style) that open brace { should be on the previous line

src/chk/chk.pb-c.c:261:
(style) that open brace { should be on the previous line

src/chk/chk.pb-c.c:273:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.h:18:
(style) do not add new typedefs

src/chk/chk.pb-c.h:354:
(style) open brace '{' following struct go on the same line

src/chk/chk.pb-c.h:420:
(style) space prohibited between function name and open parenthesis '('

src/chk/chk.pb-c.h:421:
(style) line over 100 characters
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.h:426:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:428:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:430:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:431:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:433:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:434:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:437:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:438:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:439:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:441:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:442:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:445:
(style) do not add new typedefs

src/chk/chk.pb-c.h:446:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:447:
(style) code indent should use tabs where possible

FYI: Errors found in lines not modified in the patch:

src/engine/tests/SConscript:3:
(pylint-unused-import) Unused import compiler_setup

src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
src/chk/chk.pb-c.c Show resolved Hide resolved
@daosbuild1
Copy link
Collaborator

@mjmac mjmac dismissed daosbuild1’s stale review April 14, 2022 16:20

Generated code.

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on Leap 15 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-8683/3/execution/node/372/log

@daosbuild1
Copy link
Collaborator

Test stage Build DEB on Ubuntu 20.04 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-8683/3/execution/node/318/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on CentOS 7 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-8683/3/execution/node/357/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-8683/3/execution/node/392/log

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style warning(s) for job https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-8683/4/
Please review https://wiki.hpdd.intel.com/display/DC/Coding+Rules

Note: Error annotation limited to the first 31 errors. Remaining unannotated errors:

src/chk/chk.pb-c.c:139:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:151:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:163:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:175:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:187:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:199:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:211:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:223:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:235:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.c:256:
(style) that open brace { should be on the previous line

src/chk/chk.pb-c.c:261:
(style) that open brace { should be on the previous line

src/chk/chk.pb-c.c:273:
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.h:18:
(style) do not add new typedefs

src/chk/chk.pb-c.h:354:
(style) open brace '{' following struct go on the same line

src/chk/chk.pb-c.h:420:
(style) space prohibited between function name and open parenthesis '('

src/chk/chk.pb-c.h:421:
(style) line over 100 characters
(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

src/chk/chk.pb-c.h:426:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:428:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:430:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:431:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:433:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:434:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:437:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:438:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:439:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:441:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:442:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:445:
(style) do not add new typedefs

src/chk/chk.pb-c.h:446:
(style) code indent should use tabs where possible

src/chk/chk.pb-c.h:447:
(style) code indent should use tabs where possible

FYI: Errors found in lines not modified in the patch:

src/engine/tests/SConscript:3:
(pylint-unused-import) Unused import compiler_setup


/* Do not generate deprecated warnings for self */
#ifndef PROTOBUF_C__NO_DEPRECATED
#define PROTOBUF_C__NO_DEPRECATED
#endif

#include "check.pb-c.h"
#include "chk.pb-c.h"
void chk__check_report__init
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(style) arguments for function declarations should follow identifier

#include "check.pb-c.h"
#include "chk.pb-c.h"
void chk__check_report__init
(Chk__CheckReport *message)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(style) code indent should use tabs where possible

static const Chk__CheckReport init_value = CHK__CHECK_REPORT__INIT;
*message = init_value;
}
size_t chk__check_report__get_packed_size
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(style) arguments for function declarations should follow identifier

*message = init_value;
}
size_t chk__check_report__get_packed_size
(const Chk__CheckReport *message)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(style) code indent should use tabs where possible

(const Chk__CheckReport *message)
{
assert(message->base.descriptor == &chk__check_report__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(style) space prohibited between function name and open parenthesis '('

&chk__check_inconsist_class__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

&chk__check_inconsist_action__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(style) space required after that ',' (ctx:VxV)
(style) space required after that ',' (ctx:VxV)

@daosbuild1
Copy link
Collaborator

@mjmac mjmac dismissed daosbuild1’s stale review April 15, 2022 12:23

Generated code.

@mjmac
Copy link
Contributor Author

mjmac commented Apr 15, 2022

Hi @Nasf-Fan. Are you OK with landing this? I am hoping to get it into the branch as soon as possible so that we are all on the same page with regard to the protobuf messages.

Copy link
Contributor

@Nasf-Fan Nasf-Fan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjmac , sorry for the delay because of some 2.2 blockers trouble last week.

@mjmac mjmac merged commit 9952114 into feature/cat_recovery Apr 19, 2022
@mjmac mjmac deleted the mjmac/DAOS-9590 branch April 19, 2022 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants