{"action":"created","comment":{"url":"https://api.github.com/repos/Normation/rudder-techniques/pulls/comments/37729220","id":37729220,"diff_hunk":"@@ -143,13 +143,64 @@ bundle agent update_action\n   vars:\n \n       \"client_inputs\"        string => \"${sys.workdir}/inputs\";  #where to put the files on the client when downloaded\n-      \"file_to_check_update\" string => \"rudder_promises_generated\";\n-    nova_edition::\n-      \"server_inputs\"        string => \"${server_info.policy_files}/rules/cfengine-nova\"; #actual directory with promises\n-    community_edition::\n-      \"server_inputs\"        string => \"${server_info.policy_files}/rules/cfengine-community\"; #actual directory with promises\n+\n+       # The check is in two phase:\n+       # First copy rudder_promises_timestamp_tmp from the policy server, and check is it's newer\n+       # (based on the timestamp written in it) than rudder_promises_timestamp.\n+       # If so, copy all the promises\n+       \"rudder_promises_timestamp\"     string => \"rudder_promises_generated\";\n+       \"rudder_promises_timestamp_tmp\" string => \"rudder_promises_generated.tmp\";\n+\n+       # Same for rudder-tools\n+       \"rudder_tools_updated_tmp\"   string => \"${g.rudder_tools_updated_filename}.tmp\";\n+\n+     current_promise_timestamp_defined::\n+       \"current_promises_timestamp\" string => readfile(\"${client_inputs}/${rudder_promises_timestamp}\", 2048);\n+     current_tools_timestamp_defined::\n+       \"current_tools_timestamp\"   string => readfile(\"${g.rudder_tools_updated}\", 2048);\n+\n+     # File ought to be there only in second pass, but since classes are persistent, we need to \n+     # enforce the check on pass_2\n+     pass2.(rudder_promises_generated_tmp_file_kept|rudder_promises_generated_tmp_file_repaired)::\n+       \"target_promises_timestamp\" string => readfile(\"${client_inputs}/${rudder_promises_timestamp_tmp}\", 2048);\n+\n+     pass2.(rudder_tools_updated_repaired|rudder_tools_updated_kept)::","path":"techniques/system/common/1.0/update.st","position":30,"original_position":30,"commit_id":"8e0d5471efbf08b93571c170cf48a357e6c2bac4","original_commit_id":"8e0d5471efbf08b93571c170cf48a357e6c2bac4","user":{"login":"jooooooon","id":93237,"avatar_url":"https://avatars.githubusercontent.com/u/93237?v=3","gravatar_id":"","url":"https://api.github.com/users/jooooooon","html_url":"https://github.com/jooooooon","followers_url":"https://api.github.com/users/jooooooon/followers","following_url":"https://api.github.com/users/jooooooon/following{/other_user}","gists_url":"https://api.github.com/users/jooooooon/gists{/gist_id}","starred_url":"https://api.github.com/users/jooooooon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jooooooon/subscriptions","organizations_url":"https://api.github.com/users/jooooooon/orgs","repos_url":"https://api.github.com/users/jooooooon/repos","events_url":"https://api.github.com/users/jooooooon/events{/privacy}","received_events_url":"https://api.github.com/users/jooooooon/received_events","type":"User","site_admin":false},"body":"Same question here","created_at":"2015-08-24T08:34:02Z","updated_at":"2015-08-24T08:34:02Z","html_url":"https://github.com/Normation/rudder-techniques/pull/735#discussion_r37729220","pull_request_url":"https://api.github.com/repos/Normation/rudder-techniques/pulls/735","_links":{"self":{"href":"https://api.github.com/repos/Normation/rudder-techniques/pulls/comments/37729220"},"html":{"href":"https://github.com/Normation/rudder-techniques/pull/735#discussion_r37729220"},"pull_request":{"href":"https://api.github.com/repos/Normation/rudder-techniques/pulls/735"}}},"pull_request":{"url":"https://api.github.com/repos/Normation/rudder-techniques/pulls/735","id":43118154,"html_url":"https://github.com/Normation/rudder-techniques/pull/735","diff_url":"https://github.com/Normation/rudder-techniques/pull/735.diff","patch_url":"https://github.com/Normation/rudder-techniques/pull/735.patch","issue_url":"https://api.github.com/repos/Normation/rudder-techniques/issues/735","number":735,"state":"open","locked":false,"title":"Fixes #5580: check the monotony of timestamp when doing the upgrades","user":{"login":"ncharles","id":76947,"avatar_url":"https://avatars.githubusercontent.com/u/76947?v=3","gravatar_id":"","url":"https://api.github.com/users/ncharles","html_url":"https://github.com/ncharles","followers_url":"https://api.github.com/users/ncharles/followers","following_url":"https://api.github.com/users/ncharles/following{/other_user}","gists_url":"https://api.github.com/users/ncharles/gists{/gist_id}","starred_url":"https://api.github.com/users/ncharles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncharles/subscriptions","organizations_url":"https://api.github.com/users/ncharles/orgs","repos_url":"https://api.github.com/users/ncharles/repos","events_url":"https://api.github.com/users/ncharles/events{/privacy}","received_events_url":"https://api.github.com/users/ncharles/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-23T09:08:31Z","updated_at":"2015-08-24T08:34:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64e54960a024840710ad2574a937870f8d0f13a6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Normation/rudder-techniques/pulls/735/commits","review_comments_url":"https://api.github.com/repos/Normation/rudder-techniques/pulls/735/comments","review_comment_url":"https://api.github.com/repos/Normation/rudder-techniques/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Normation/rudder-techniques/issues/735/comments","statuses_url":"https://api.github.com/repos/Normation/rudder-techniques/statuses/8e0d5471efbf08b93571c170cf48a357e6c2bac4","head":{"label":"ncharles:bug_5580/check_monotony_of_timestamp","ref":"bug_5580/check_monotony_of_timestamp","sha":"8e0d5471efbf08b93571c170cf48a357e6c2bac4","user":{"login":"ncharles","id":76947,"avatar_url":"https://avatars.githubusercontent.com/u/76947?v=3","gravatar_id":"","url":"https://api.github.com/users/ncharles","html_url":"https://github.com/ncharles","followers_url":"https://api.github.com/users/ncharles/followers","following_url":"https://api.github.com/users/ncharles/following{/other_user}","gists_url":"https://api.github.com/users/ncharles/gists{/gist_id}","starred_url":"https://api.github.com/users/ncharles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncharles/subscriptions","organizations_url":"https://api.github.com/users/ncharles/orgs","repos_url":"https://api.github.com/users/ncharles/repos","events_url":"https://api.github.com/users/ncharles/events{/privacy}","received_events_url":"https://api.github.com/users/ncharles/received_events","type":"User","site_admin":false},"repo":{"id":6921453,"name":"rudder-techniques","full_name":"ncharles/rudder-techniques","owner":{"login":"ncharles","id":76947,"avatar_url":"https://avatars.githubusercontent.com/u/76947?v=3","gravatar_id":"","url":"https://api.github.com/users/ncharles","html_url":"https://github.com/ncharles","followers_url":"https://api.github.com/users/ncharles/followers","following_url":"https://api.github.com/users/ncharles/following{/other_user}","gists_url":"https://api.github.com/users/ncharles/gists{/gist_id}","starred_url":"https://api.github.com/users/ncharles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncharles/subscriptions","organizations_url":"https://api.github.com/users/ncharles/orgs","repos_url":"https://api.github.com/users/ncharles/repos","events_url":"https://api.github.com/users/ncharles/events{/privacy}","received_events_url":"https://api.github.com/users/ncharles/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ncharles/rudder-techniques","description":"","fork":true,"url":"https://api.github.com/repos/ncharles/rudder-techniques","forks_url":"https://api.github.com/repos/ncharles/rudder-techniques/forks","keys_url":"https://api.github.com/repos/ncharles/rudder-techniques/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ncharles/rudder-techniques/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ncharles/rudder-techniques/teams","hooks_url":"https://api.github.com/repos/ncharles/rudder-techniques/hooks","issue_events_url":"https://api.github.com/repos/ncharles/rudder-techniques/issues/events{/number}","events_url":"https://api.github.com/repos/ncharles/rudder-techniques/events","assignees_url":"https://api.github.com/repos/ncharles/rudder-techniques/assignees{/user}","branches_url":"https://api.github.com/repos/ncharles/rudder-techniques/branches{/branch}","tags_url":"https://api.github.com/repos/ncharles/rudder-techniques/tags","blobs_url":"https://api.github.com/repos/ncharles/rudder-techniques/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ncharles/rudder-techniques/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ncharles/rudder-techniques/git/refs{/sha}","trees_url":"https://api.github.com/repos/ncharles/rudder-techniques/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ncharles/rudder-techniques/statuses/{sha}","languages_url":"https://api.github.com/repos/ncharles/rudder-techniques/languages","stargazers_url":"https://api.github.com/repos/ncharles/rudder-techniques/stargazers","contributors_url":"https://api.github.com/repos/ncharles/rudder-techniques/contributors","subscribers_url":"https://api.github.com/repos/ncharles/rudder-techniques/subscribers","subscription_url":"https://api.github.com/repos/ncharles/rudder-techniques/subscription","commits_url":"https://api.github.com/repos/ncharles/rudder-techniques/commits{/sha}","git_commits_url":"https://api.github.com/repos/ncharles/rudder-techniques/git/commits{/sha}","comments_url":"https://api.github.com/repos/ncharles/rudder-techniques/comments{/number}","issue_comment_url":"https://api.github.com/repos/ncharles/rudder-techniques/issues/comments{/number}","contents_url":"https://api.github.com/repos/ncharles/rudder-techniques/contents/{+path}","compare_url":"https://api.github.com/repos/ncharles/rudder-techniques/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ncharles/rudder-techniques/merges","archive_url":"https://api.github.com/repos/ncharles/rudder-techniques/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ncharles/rudder-techniques/downloads","issues_url":"https://api.github.com/repos/ncharles/rudder-techniques/issues{/number}","pulls_url":"https://api.github.com/repos/ncharles/rudder-techniques/pulls{/number}","milestones_url":"https://api.github.com/repos/ncharles/rudder-techniques/milestones{/number}","notifications_url":"https://api.github.com/repos/ncharles/rudder-techniques/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ncharles/rudder-techniques/labels{/name}","releases_url":"https://api.github.com/repos/ncharles/rudder-techniques/releases{/id}","created_at":"2012-11-29T13:15:57Z","updated_at":"2014-06-25T08:56:01Z","pushed_at":"2015-08-23T09:08:10Z","git_url":"git://github.com/ncharles/rudder-techniques.git","ssh_url":"git@github.com:ncharles/rudder-techniques.git","clone_url":"https://github.com/ncharles/rudder-techniques.git","svn_url":"https://github.com/ncharles/rudder-techniques","homepage":"http://www.rudder-project.org/","size":47498,"stargazers_count":0,"watchers_count":0,"language":"Smalltalk","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Normation:master","ref":"master","sha":"c533b81fd31c3763e9948252c2a20fc70847a9fb","user":{"login":"Normation","id":695105,"avatar_url":"https://avatars.githubusercontent.com/u/695105?v=3","gravatar_id":"","url":"https://api.github.com/users/Normation","html_url":"https://github.com/Normation","followers_url":"https://api.github.com/users/Normation/followers","following_url":"https://api.github.com/users/Normation/following{/other_user}","gists_url":"https://api.github.com/users/Normation/gists{/gist_id}","starred_url":"https://api.github.com/users/Normation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Normation/subscriptions","organizations_url":"https://api.github.com/users/Normation/orgs","repos_url":"https://api.github.com/users/Normation/repos","events_url":"https://api.github.com/users/Normation/events{/privacy}","received_events_url":"https://api.github.com/users/Normation/received_events","type":"Organization","site_admin":false},"repo":{"id":2528259,"name":"rudder-techniques","full_name":"Normation/rudder-techniques","owner":{"login":"Normation","id":695105,"avatar_url":"https://avatars.githubusercontent.com/u/695105?v=3","gravatar_id":"","url":"https://api.github.com/users/Normation","html_url":"https://github.com/Normation","followers_url":"https://api.github.com/users/Normation/followers","following_url":"https://api.github.com/users/Normation/following{/other_user}","gists_url":"https://api.github.com/users/Normation/gists{/gist_id}","starred_url":"https://api.github.com/users/Normation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Normation/subscriptions","organizations_url":"https://api.github.com/users/Normation/orgs","repos_url":"https://api.github.com/users/Normation/repos","events_url":"https://api.github.com/users/Normation/events{/privacy}","received_events_url":"https://api.github.com/users/Normation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Normation/rudder-techniques","description":"","fork":false,"url":"https://api.github.com/repos/Normation/rudder-techniques","forks_url":"https://api.github.com/repos/Normation/rudder-techniques/forks","keys_url":"https://api.github.com/repos/Normation/rudder-techniques/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Normation/rudder-techniques/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Normation/rudder-techniques/teams","hooks_url":"https://api.github.com/repos/Normation/rudder-techniques/hooks","issue_events_url":"https://api.github.com/repos/Normation/rudder-techniques/issues/events{/number}","events_url":"https://api.github.com/repos/Normation/rudder-techniques/events","assignees_url":"https://api.github.com/repos/Normation/rudder-techniques/assignees{/user}","branches_url":"https://api.github.com/repos/Normation/rudder-techniques/branches{/branch}","tags_url":"https://api.github.com/repos/Normation/rudder-techniques/tags","blobs_url":"https://api.github.com/repos/Normation/rudder-techniques/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Normation/rudder-techniques/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Normation/rudder-techniques/git/refs{/sha}","trees_url":"https://api.github.com/repos/Normation/rudder-techniques/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Normation/rudder-techniques/statuses/{sha}","languages_url":"https://api.github.com/repos/Normation/rudder-techniques/languages","stargazers_url":"https://api.github.com/repos/Normation/rudder-techniques/stargazers","contributors_url":"https://api.github.com/repos/Normation/rudder-techniques/contributors","subscribers_url":"https://api.github.com/repos/Normation/rudder-techniques/subscribers","subscription_url":"https://api.github.com/repos/Normation/rudder-techniques/subscription","commits_url":"https://api.github.com/repos/Normation/rudder-techniques/commits{/sha}","git_commits_url":"https://api.github.com/repos/Normation/rudder-techniques/git/commits{/sha}","comments_url":"https://api.github.com/repos/Normation/rudder-techniques/comments{/number}","issue_comment_url":"https://api.github.com/repos/Normation/rudder-techniques/issues/comments{/number}","contents_url":"https://api.github.com/repos/Normation/rudder-techniques/contents/{+path}","compare_url":"https://api.github.com/repos/Normation/rudder-techniques/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Normation/rudder-techniques/merges","archive_url":"https://api.github.com/repos/Normation/rudder-techniques/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Normation/rudder-techniques/downloads","issues_url":"https://api.github.com/repos/Normation/rudder-techniques/issues{/number}","pulls_url":"https://api.github.com/repos/Normation/rudder-techniques/pulls{/number}","milestones_url":"https://api.github.com/repos/Normation/rudder-techniques/milestones{/number}","notifications_url":"https://api.github.com/repos/Normation/rudder-techniques/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Normation/rudder-techniques/labels{/name}","releases_url":"https://api.github.com/repos/Normation/rudder-techniques/releases{/id}","created_at":"2011-10-06T19:28:53Z","updated_at":"2015-06-02T21:37:04Z","pushed_at":"2015-08-24T08:33:17Z","git_url":"git://github.com/Normation/rudder-techniques.git","ssh_url":"git@github.com:Normation/rudder-techniques.git","clone_url":"https://github.com/Normation/rudder-techniques.git","svn_url":"https://github.com/Normation/rudder-techniques","homepage":"http://www.rudder-project.org/","size":50822,"stargazers_count":8,"watchers_count":8,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":11,"forks":12,"open_issues":11,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Normation/rudder-techniques/pulls/735"},"html":{"href":"https://github.com/Normation/rudder-techniques/pull/735"},"issue":{"href":"https://api.github.com/repos/Normation/rudder-techniques/issues/735"},"comments":{"href":"https://api.github.com/repos/Normation/rudder-techniques/issues/735/comments"},"review_comments":{"href":"https://api.github.com/repos/Normation/rudder-techniques/pulls/735/comments"},"review_comment":{"href":"https://api.github.com/repos/Normation/rudder-techniques/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Normation/rudder-techniques/pulls/735/commits"},"statuses":{"href":"https://api.github.com/repos/Normation/rudder-techniques/statuses/8e0d5471efbf08b93571c170cf48a357e6c2bac4"}}}}