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
Fixes #5689: Rewrite system techniques to use rudder_common_report #566
Fixes #5689: Rewrite system techniques to use rudder_common_report #566
Conversation
# check that techniques do not use reports: | ||
${REPOSITORY_PATH}/scripts/technique-files -l -f '*.cf' -f '*.st' "${REPOSITORY_PATH}" | grep -v initial-promises | egrep -v "techniques/system/common/1.0/(rudder_stdlib.st|update.st|promises.st|process_matching.st)|techniques/system/distributePolicy/1.0/rsyslogConf.st" | grep -v cfengine_stdlib | while read filename | ||
do | ||
if egrep '^[[:space:]]*reports:[[:space:]]*$' "${filename}" >/dev/null; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this regex is a bit too strict. It won't match a line like this, for example:
reports: #Send messages about stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just remove everything after "reports:" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that would be better
Aside from the comments above, this all looks good. However, this PR also needs rebasing. Can you address these and self-merge please? |
"@@Common@@log_info@@&TRACKINGKEY&@@common@@EndRun@@${g.execRun}##${g.uuid}@#End execution with config [&RUDDER_NODE_CONFIG_ID&]"; | ||
methods: | ||
any:: | ||
"any" usebundle => rudder_common_report("Common", "log_info", "&TRACKINGKEY&", "common", "EndRun", "End execution with config [&RUDDER_NODE_CONFIG_ID&]"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
fce25e3
to
52d4fd2
Compare
…ues_to_use_rudder_common_report Fixes #5689: Rewrite system techniques to use rudder_common_report
@@ -198,8 +199,12 @@ bundle agent endExecution | |||
start_run_message_sent:: | |||
"@@Common@@log_info@@&TRACKINGKEY&@@common@@EndRun@@${g.execRun}##${g.uuid}@#End execution with config [&RUDDER_NODE_CONFIG_ID&]"; | |||
|
|||
reports: | |||
cfengine_3:: | |||
"@@Common@@log_info@@&TRACKINGKEY&@@common@@EndRun@@${g.execRun}##${g.uuid}@#End execution with config [&RUDDER_NODE_CONFIG_ID&]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a duplicate, from just above, and should never have been committed!
Replaces #546