{"action":"created","comment":{"url":"https://api.github.com/repos/HubSpot/Baragon/pulls/comments/27249743","id":27249743,"diff_hunk":"@@ -63,13 +63,22 @@ public void checkAndReload() throws InvalidConfigException, LbAdapterExecuteExce\n     final BaragonService service = context.getService();\n     final boolean previousConfigsExist = configsExist(service);\n     Collection<BaragonConfigFile> newConfigs = configGenerator.generateConfigsForProject(context);\n-    if (previousConfigsExist && newConfigs.equals(readConfigs(service))) {\n+    if (previousConfigsExist && configsMatch(newConfigs, readConfigs(service))) {\n       return Optional.absent();\n     } else {\n       return Optional.of(newConfigs);\n     }\n   }\n \n+  public boolean configsMatch(Collection<BaragonConfigFile> newConfigs, Collection<BaragonConfigFile> currentConfigs) {\n+    for (BaragonConfigFile file : newConfigs) {\n+      if (!currentConfigs.contains(file)) {\n+        return false;\n+      }\n+    }\n+    return true;","path":"BaragonAgentService/src/main/java/com/hubspot/baragon/agent/lbs/FilesystemConfigHelper.java","position":18,"original_position":18,"commit_id":"11f899960c8dadbc3a498baf2effe4fb89490a39","original_commit_id":"11f899960c8dadbc3a498baf2effe4fb89490a39","user":{"login":"ssalinas","id":6034439,"avatar_url":"https://avatars.githubusercontent.com/u/6034439?v=3","gravatar_id":"","url":"https://api.github.com/users/ssalinas","html_url":"https://github.com/ssalinas","followers_url":"https://api.github.com/users/ssalinas/followers","following_url":"https://api.github.com/users/ssalinas/following{/other_user}","gists_url":"https://api.github.com/users/ssalinas/gists{/gist_id}","starred_url":"https://api.github.com/users/ssalinas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssalinas/subscriptions","organizations_url":"https://api.github.com/users/ssalinas/orgs","repos_url":"https://api.github.com/users/ssalinas/repos","events_url":"https://api.github.com/users/ssalinas/events{/privacy}","received_events_url":"https://api.github.com/users/ssalinas/received_events","type":"User","site_admin":false},"body":"The purpose of the check is to determine if the specified config in newConfigs needs to be applied or if it already exists in the filesystem (currentConfigs). Currently we don't remove extra configs that might be in the filesystem so the check should be fine","created_at":"2015-03-26T19:56:54Z","updated_at":"2015-03-26T19:56:54Z","html_url":"https://github.com/HubSpot/Baragon/pull/57#discussion_r27249743","pull_request_url":"https://api.github.com/repos/HubSpot/Baragon/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/HubSpot/Baragon/pulls/comments/27249743"},"html":{"href":"https://github.com/HubSpot/Baragon/pull/57#discussion_r27249743"},"pull_request":{"href":"https://api.github.com/repos/HubSpot/Baragon/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/HubSpot/Baragon/pulls/57","id":32052901,"html_url":"https://github.com/HubSpot/Baragon/pull/57","diff_url":"https://github.com/HubSpot/Baragon/pull/57.diff","patch_url":"https://github.com/HubSpot/Baragon/pull/57.patch","issue_url":"https://api.github.com/repos/HubSpot/Baragon/issues/57","number":57,"state":"open","locked":false,"title":"better comparison of applied configs","user":{"login":"ssalinas","id":6034439,"avatar_url":"https://avatars.githubusercontent.com/u/6034439?v=3","gravatar_id":"","url":"https://api.github.com/users/ssalinas","html_url":"https://github.com/ssalinas","followers_url":"https://api.github.com/users/ssalinas/followers","following_url":"https://api.github.com/users/ssalinas/following{/other_user}","gists_url":"https://api.github.com/users/ssalinas/gists{/gist_id}","starred_url":"https://api.github.com/users/ssalinas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssalinas/subscriptions","organizations_url":"https://api.github.com/users/ssalinas/orgs","repos_url":"https://api.github.com/users/ssalinas/repos","events_url":"https://api.github.com/users/ssalinas/events{/privacy}","received_events_url":"https://api.github.com/users/ssalinas/received_events","type":"User","site_admin":false},"body":"make sure order of the collection is not a factor in determining if configs are already applied","created_at":"2015-03-26T19:39:32Z","updated_at":"2015-03-26T19:56:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a76e417816e1006d69434c36de9e14d7026a1621","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HubSpot/Baragon/pulls/57/commits","review_comments_url":"https://api.github.com/repos/HubSpot/Baragon/pulls/57/comments","review_comment_url":"https://api.github.com/repos/HubSpot/Baragon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HubSpot/Baragon/issues/57/comments","statuses_url":"https://api.github.com/repos/HubSpot/Baragon/statuses/11f899960c8dadbc3a498baf2effe4fb89490a39","head":{"label":"HubSpot:agent_startup_matching","ref":"agent_startup_matching","sha":"11f899960c8dadbc3a498baf2effe4fb89490a39","user":{"login":"HubSpot","id":326419,"avatar_url":"https://avatars.githubusercontent.com/u/326419?v=3","gravatar_id":"","url":"https://api.github.com/users/HubSpot","html_url":"https://github.com/HubSpot","followers_url":"https://api.github.com/users/HubSpot/followers","following_url":"https://api.github.com/users/HubSpot/following{/other_user}","gists_url":"https://api.github.com/users/HubSpot/gists{/gist_id}","starred_url":"https://api.github.com/users/HubSpot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubSpot/subscriptions","organizations_url":"https://api.github.com/users/HubSpot/orgs","repos_url":"https://api.github.com/users/HubSpot/repos","events_url":"https://api.github.com/users/HubSpot/events{/privacy}","received_events_url":"https://api.github.com/users/HubSpot/received_events","type":"Organization","site_admin":false},"repo":{"id":14145875,"name":"Baragon","full_name":"HubSpot/Baragon","owner":{"login":"HubSpot","id":326419,"avatar_url":"https://avatars.githubusercontent.com/u/326419?v=3","gravatar_id":"","url":"https://api.github.com/users/HubSpot","html_url":"https://github.com/HubSpot","followers_url":"https://api.github.com/users/HubSpot/followers","following_url":"https://api.github.com/users/HubSpot/following{/other_user}","gists_url":"https://api.github.com/users/HubSpot/gists{/gist_id}","starred_url":"https://api.github.com/users/HubSpot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubSpot/subscriptions","organizations_url":"https://api.github.com/users/HubSpot/orgs","repos_url":"https://api.github.com/users/HubSpot/repos","events_url":"https://api.github.com/users/HubSpot/events{/privacy}","received_events_url":"https://api.github.com/users/HubSpot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HubSpot/Baragon","description":"Load balancer API","fork":false,"url":"https://api.github.com/repos/HubSpot/Baragon","forks_url":"https://api.github.com/repos/HubSpot/Baragon/forks","keys_url":"https://api.github.com/repos/HubSpot/Baragon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HubSpot/Baragon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HubSpot/Baragon/teams","hooks_url":"https://api.github.com/repos/HubSpot/Baragon/hooks","issue_events_url":"https://api.github.com/repos/HubSpot/Baragon/issues/events{/number}","events_url":"https://api.github.com/repos/HubSpot/Baragon/events","assignees_url":"https://api.github.com/repos/HubSpot/Baragon/assignees{/user}","branches_url":"https://api.github.com/repos/HubSpot/Baragon/branches{/branch}","tags_url":"https://api.github.com/repos/HubSpot/Baragon/tags","blobs_url":"https://api.github.com/repos/HubSpot/Baragon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HubSpot/Baragon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HubSpot/Baragon/git/refs{/sha}","trees_url":"https://api.github.com/repos/HubSpot/Baragon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HubSpot/Baragon/statuses/{sha}","languages_url":"https://api.github.com/repos/HubSpot/Baragon/languages","stargazers_url":"https://api.github.com/repos/HubSpot/Baragon/stargazers","contributors_url":"https://api.github.com/repos/HubSpot/Baragon/contributors","subscribers_url":"https://api.github.com/repos/HubSpot/Baragon/subscribers","subscription_url":"https://api.github.com/repos/HubSpot/Baragon/subscription","commits_url":"https://api.github.com/repos/HubSpot/Baragon/commits{/sha}","git_commits_url":"https://api.github.com/repos/HubSpot/Baragon/git/commits{/sha}","comments_url":"https://api.github.com/repos/HubSpot/Baragon/comments{/number}","issue_comment_url":"https://api.github.com/repos/HubSpot/Baragon/issues/comments{/number}","contents_url":"https://api.github.com/repos/HubSpot/Baragon/contents/{+path}","compare_url":"https://api.github.com/repos/HubSpot/Baragon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HubSpot/Baragon/merges","archive_url":"https://api.github.com/repos/HubSpot/Baragon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HubSpot/Baragon/downloads","issues_url":"https://api.github.com/repos/HubSpot/Baragon/issues{/number}","pulls_url":"https://api.github.com/repos/HubSpot/Baragon/pulls{/number}","milestones_url":"https://api.github.com/repos/HubSpot/Baragon/milestones{/number}","notifications_url":"https://api.github.com/repos/HubSpot/Baragon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HubSpot/Baragon/labels{/name}","releases_url":"https://api.github.com/repos/HubSpot/Baragon/releases{/id}","created_at":"2013-11-05T15:51:09Z","updated_at":"2015-03-26T18:15:33Z","pushed_at":"2015-03-26T19:54:07Z","git_url":"git://github.com/HubSpot/Baragon.git","ssh_url":"git@github.com:HubSpot/Baragon.git","clone_url":"https://github.com/HubSpot/Baragon.git","svn_url":"https://github.com/HubSpot/Baragon","homepage":null,"size":9021,"stargazers_count":26,"watchers_count":26,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":26,"default_branch":"master"}},"base":{"label":"HubSpot:master","ref":"master","sha":"b9f11b643c7bff45ed16e126dcf1481d7f72710d","user":{"login":"HubSpot","id":326419,"avatar_url":"https://avatars.githubusercontent.com/u/326419?v=3","gravatar_id":"","url":"https://api.github.com/users/HubSpot","html_url":"https://github.com/HubSpot","followers_url":"https://api.github.com/users/HubSpot/followers","following_url":"https://api.github.com/users/HubSpot/following{/other_user}","gists_url":"https://api.github.com/users/HubSpot/gists{/gist_id}","starred_url":"https://api.github.com/users/HubSpot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubSpot/subscriptions","organizations_url":"https://api.github.com/users/HubSpot/orgs","repos_url":"https://api.github.com/users/HubSpot/repos","events_url":"https://api.github.com/users/HubSpot/events{/privacy}","received_events_url":"https://api.github.com/users/HubSpot/received_events","type":"Organization","site_admin":false},"repo":{"id":14145875,"name":"Baragon","full_name":"HubSpot/Baragon","owner":{"login":"HubSpot","id":326419,"avatar_url":"https://avatars.githubusercontent.com/u/326419?v=3","gravatar_id":"","url":"https://api.github.com/users/HubSpot","html_url":"https://github.com/HubSpot","followers_url":"https://api.github.com/users/HubSpot/followers","following_url":"https://api.github.com/users/HubSpot/following{/other_user}","gists_url":"https://api.github.com/users/HubSpot/gists{/gist_id}","starred_url":"https://api.github.com/users/HubSpot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubSpot/subscriptions","organizations_url":"https://api.github.com/users/HubSpot/orgs","repos_url":"https://api.github.com/users/HubSpot/repos","events_url":"https://api.github.com/users/HubSpot/events{/privacy}","received_events_url":"https://api.github.com/users/HubSpot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HubSpot/Baragon","description":"Load balancer API","fork":false,"url":"https://api.github.com/repos/HubSpot/Baragon","forks_url":"https://api.github.com/repos/HubSpot/Baragon/forks","keys_url":"https://api.github.com/repos/HubSpot/Baragon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HubSpot/Baragon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HubSpot/Baragon/teams","hooks_url":"https://api.github.com/repos/HubSpot/Baragon/hooks","issue_events_url":"https://api.github.com/repos/HubSpot/Baragon/issues/events{/number}","events_url":"https://api.github.com/repos/HubSpot/Baragon/events","assignees_url":"https://api.github.com/repos/HubSpot/Baragon/assignees{/user}","branches_url":"https://api.github.com/repos/HubSpot/Baragon/branches{/branch}","tags_url":"https://api.github.com/repos/HubSpot/Baragon/tags","blobs_url":"https://api.github.com/repos/HubSpot/Baragon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HubSpot/Baragon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HubSpot/Baragon/git/refs{/sha}","trees_url":"https://api.github.com/repos/HubSpot/Baragon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HubSpot/Baragon/statuses/{sha}","languages_url":"https://api.github.com/repos/HubSpot/Baragon/languages","stargazers_url":"https://api.github.com/repos/HubSpot/Baragon/stargazers","contributors_url":"https://api.github.com/repos/HubSpot/Baragon/contributors","subscribers_url":"https://api.github.com/repos/HubSpot/Baragon/subscribers","subscription_url":"https://api.github.com/repos/HubSpot/Baragon/subscription","commits_url":"https://api.github.com/repos/HubSpot/Baragon/commits{/sha}","git_commits_url":"https://api.github.com/repos/HubSpot/Baragon/git/commits{/sha}","comments_url":"https://api.github.com/repos/HubSpot/Baragon/comments{/number}","issue_comment_url":"https://api.github.com/repos/HubSpot/Baragon/issues/comments{/number}","contents_url":"https://api.github.com/repos/HubSpot/Baragon/contents/{+path}","compare_url":"https://api.github.com/repos/HubSpot/Baragon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HubSpot/Baragon/merges","archive_url":"https://api.github.com/repos/HubSpot/Baragon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HubSpot/Baragon/downloads","issues_url":"https://api.github.com/repos/HubSpot/Baragon/issues{/number}","pulls_url":"https://api.github.com/repos/HubSpot/Baragon/pulls{/number}","milestones_url":"https://api.github.com/repos/HubSpot/Baragon/milestones{/number}","notifications_url":"https://api.github.com/repos/HubSpot/Baragon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HubSpot/Baragon/labels{/name}","releases_url":"https://api.github.com/repos/HubSpot/Baragon/releases{/id}","created_at":"2013-11-05T15:51:09Z","updated_at":"2015-03-26T18:15:33Z","pushed_at":"2015-03-26T19:54:07Z","git_url":"git://github.com/HubSpot/Baragon.git","ssh_url":"git@github.com:HubSpot/Baragon.git","clone_url":"https://github.com/HubSpot/Baragon.git","svn_url":"https://github.com/HubSpot/Baragon","homepage":null,"size":9021,"stargazers_count":26,"watchers_count":26,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HubSpot/Baragon/pulls/57"},"html":{"href":"https://github.com/HubSpot/Baragon/pull/57"},"issue":{"href":"https://api.github.com/repos/HubSpot/Baragon/issues/57"},"comments":{"href":"https://api.github.com/repos/HubSpot/Baragon/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/HubSpot/Baragon/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/HubSpot/Baragon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HubSpot/Baragon/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/HubSpot/Baragon/statuses/11f899960c8dadbc3a498baf2effe4fb89490a39"}}}}