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

Fixes #5689: Rewrite system techniques to use rudder_common_report #566

Conversation

peckpeck
Copy link
Member

Replaces #546

# 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
Copy link
Member

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

Copy link
Member

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:" ?

Copy link
Member Author

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

@jooooooon
Copy link
Member

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&]");
Copy link
Member

Choose a reason for hiding this comment

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

Same here

@peckpeck peckpeck force-pushed the dev_5689/rewrite_system_techniques_to_use_rudder_common_report branch from fce25e3 to 52d4fd2 Compare November 27, 2014 15:09
peckpeck added a commit that referenced this pull request Nov 27, 2014
…ues_to_use_rudder_common_report

Fixes #5689: Rewrite system techniques to use rudder_common_report
@peckpeck peckpeck merged commit 0069383 into Normation:branches/rudder/3.0 Nov 27, 2014
@@ -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&]";
Copy link
Member

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!

@peckpeck peckpeck deleted the dev_5689/rewrite_system_techniques_to_use_rudder_common_report branch February 20, 2015 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants