{"action":"created","comment":{"url":"https://api.github.com/repos/codice/ddf/pulls/comments/85138836","pull_request_review_id":5871131,"id":85138836,"diff_hunk":"@@ -61,7 +61,7 @@\n \n \n     <!-- Register in the OSGi Service Registry -->\n-    <service ref=\"pre-ingest-plugin\" interface=\"ddf.catalog.plugin.PreIngestPlugin\"/>\n+    <service ref=\"pre-ingest-plugin\" interface=\"ddf.catalog.plugin.PreIngestPlugin\" ranking=\"-1\"/>","path":"catalog/plugin/catalog-plugin-metacard-validation/src/main/resources/OSGI-INF/blueprint/blueprint.xml","position":5,"original_position":5,"commit_id":"ae8a631ce98b9125c361e76089f548bb356a1fbe","original_commit_id":"ae8a631ce98b9125c361e76089f548bb356a1fbe","user":{"login":"brjeter","id":8130140,"avatar_url":"https://avatars.githubusercontent.com/u/8130140?v=3","gravatar_id":"","url":"https://api.github.com/users/brjeter","html_url":"https://github.com/brjeter","followers_url":"https://api.github.com/users/brjeter/followers","following_url":"https://api.github.com/users/brjeter/following{/other_user}","gists_url":"https://api.github.com/users/brjeter/gists{/gist_id}","starred_url":"https://api.github.com/users/brjeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brjeter/subscriptions","organizations_url":"https://api.github.com/users/brjeter/orgs","repos_url":"https://api.github.com/users/brjeter/repos","events_url":"https://api.github.com/users/brjeter/events{/privacy}","received_events_url":"https://api.github.com/users/brjeter/received_events","type":"User","site_admin":false},"body":"Talked with Keith about this. We wanted the `MetacardValidityMarkerPlugin` to be the last pre-ingest plugin to process just in case any pre-ingest plugins modify/add attributes to the metacard. In fact, part of the reason for this PR was because the GeoCoder plugin was added as a pre-ingest plugin that adds the `location.country-code` attribute to the metacard but this was happening after validation which defeated the purpose.","created_at":"2016-10-26T14:44:16Z","updated_at":"2016-10-26T14:44:16Z","html_url":"https://github.com/codice/ddf/pull/1342#discussion_r85138836","pull_request_url":"https://api.github.com/repos/codice/ddf/pulls/1342","_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments/85138836"},"html":{"href":"https://github.com/codice/ddf/pull/1342#discussion_r85138836"},"pull_request":{"href":"https://api.github.com/repos/codice/ddf/pulls/1342"}}},"pull_request":{"url":"https://api.github.com/repos/codice/ddf/pulls/1342","id":88861995,"html_url":"https://github.com/codice/ddf/pull/1342","diff_url":"https://github.com/codice/ddf/pull/1342.diff","patch_url":"https://github.com/codice/ddf/pull/1342.patch","issue_url":"https://api.github.com/repos/codice/ddf/issues/1342","number":1342,"state":"open","locked":false,"title":"DDF-2528: Adding AttributeValidator for Location.COUNTRY_CODE","user":{"login":"brjeter","id":8130140,"avatar_url":"https://avatars.githubusercontent.com/u/8130140?v=3","gravatar_id":"","url":"https://api.github.com/users/brjeter","html_url":"https://github.com/brjeter","followers_url":"https://api.github.com/users/brjeter/followers","following_url":"https://api.github.com/users/brjeter/following{/other_user}","gists_url":"https://api.github.com/users/brjeter/gists{/gist_id}","starred_url":"https://api.github.com/users/brjeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brjeter/subscriptions","organizations_url":"https://api.github.com/users/brjeter/orgs","repos_url":"https://api.github.com/users/brjeter/repos","events_url":"https://api.github.com/users/brjeter/events{/privacy}","received_events_url":"https://api.github.com/users/brjeter/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nThis PR adds an attribute validator to verify that the Location.COUNTRY_CODE attribute is a valid ISO 3166-1 alpha-3 country code.\r\n#### Who is reviewing it (please choose AT LEAST two reviewers that need to approve the PR before it can get merged; if a component team is listed, at least one of its members needs to approve)?\r\n@glenhein @jrnorth @peterhuffer \r\n#### Choose 2 committers to review/merge the PR (please choose ONLY two committers from below, delete the rest).\r\n@kcwire \r\n@millerw8\r\n#### How should this be tested?\r\n- Run a full build.\r\n- Verify all tests pass (specifically the ValidationParserSpecTest and CountryCodeValidatorTest)\r\n- Test ingestion of a record with an invalid location.country-code:\r\n  - Run local DDF instance.\r\n  - Configure `Metacard Validation Filter Plugin` to not filter metacards with errors/warnings.\r\n  - Configure `Catalog Federation Strategy` to show validation errors.\r\n  - Ingest a record with an invalid `location.country-code` attribute value.\r\n  - Search for the record and verify there is an error message under `Validation Errors` under the `Details` tab.\r\n- Test ingestion of a record with a valid location.country-code:\r\n  - See above, but verify there are no error messages under `Validation Errors` on the metacard.\r\n\r\n#### Any background context you want to provide?\r\nThe Location.COUNTRY_CODE attribute is now populated by the GeoCoderPlugin. This validation has been added to verify the attribute is populated correctly. See https://github.com/codice/ddf/pull/1171\r\n\r\n#### What are the relevant tickets?\r\nhttps://codice.atlassian.net/browse/DDF-2528\r\n#### Screenshots (if appropriate)\r\n#### Checklist:\r\n- [x] Documentation Updated\r\n\t- [ ] Change log Updated\r\n- [X] Update / Add Unit Tests\r\n- [ ] Update / Add Integration Tests\r\n","created_at":"2016-10-11T16:05:21Z","updated_at":"2016-10-26T14:44:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25d97e9d82d975e4915c1ac932a5bf51aabb6347","assignee":{"login":"millerw8","id":4419422,"avatar_url":"https://avatars.githubusercontent.com/u/4419422?v=3","gravatar_id":"","url":"https://api.github.com/users/millerw8","html_url":"https://github.com/millerw8","followers_url":"https://api.github.com/users/millerw8/followers","following_url":"https://api.github.com/users/millerw8/following{/other_user}","gists_url":"https://api.github.com/users/millerw8/gists{/gist_id}","starred_url":"https://api.github.com/users/millerw8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/millerw8/subscriptions","organizations_url":"https://api.github.com/users/millerw8/orgs","repos_url":"https://api.github.com/users/millerw8/repos","events_url":"https://api.github.com/users/millerw8/events{/privacy}","received_events_url":"https://api.github.com/users/millerw8/received_events","type":"User","site_admin":false},"assignees":[{"login":"millerw8","id":4419422,"avatar_url":"https://avatars.githubusercontent.com/u/4419422?v=3","gravatar_id":"","url":"https://api.github.com/users/millerw8","html_url":"https://github.com/millerw8","followers_url":"https://api.github.com/users/millerw8/followers","following_url":"https://api.github.com/users/millerw8/following{/other_user}","gists_url":"https://api.github.com/users/millerw8/gists{/gist_id}","starred_url":"https://api.github.com/users/millerw8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/millerw8/subscriptions","organizations_url":"https://api.github.com/users/millerw8/orgs","repos_url":"https://api.github.com/users/millerw8/repos","events_url":"https://api.github.com/users/millerw8/events{/privacy}","received_events_url":"https://api.github.com/users/millerw8/received_events","type":"User","site_admin":false},{"login":"kcwire","id":4631300,"avatar_url":"https://avatars.githubusercontent.com/u/4631300?v=3","gravatar_id":"","url":"https://api.github.com/users/kcwire","html_url":"https://github.com/kcwire","followers_url":"https://api.github.com/users/kcwire/followers","following_url":"https://api.github.com/users/kcwire/following{/other_user}","gists_url":"https://api.github.com/users/kcwire/gists{/gist_id}","starred_url":"https://api.github.com/users/kcwire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcwire/subscriptions","organizations_url":"https://api.github.com/users/kcwire/orgs","repos_url":"https://api.github.com/users/kcwire/repos","events_url":"https://api.github.com/users/kcwire/events{/privacy}","received_events_url":"https://api.github.com/users/kcwire/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/codice/ddf/pulls/1342/commits","review_comments_url":"https://api.github.com/repos/codice/ddf/pulls/1342/comments","review_comment_url":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codice/ddf/issues/1342/comments","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/ae8a631ce98b9125c361e76089f548bb356a1fbe","head":{"label":"brjeter:DDF-2528","ref":"DDF-2528","sha":"ae8a631ce98b9125c361e76089f548bb356a1fbe","user":{"login":"brjeter","id":8130140,"avatar_url":"https://avatars.githubusercontent.com/u/8130140?v=3","gravatar_id":"","url":"https://api.github.com/users/brjeter","html_url":"https://github.com/brjeter","followers_url":"https://api.github.com/users/brjeter/followers","following_url":"https://api.github.com/users/brjeter/following{/other_user}","gists_url":"https://api.github.com/users/brjeter/gists{/gist_id}","starred_url":"https://api.github.com/users/brjeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brjeter/subscriptions","organizations_url":"https://api.github.com/users/brjeter/orgs","repos_url":"https://api.github.com/users/brjeter/repos","events_url":"https://api.github.com/users/brjeter/events{/privacy}","received_events_url":"https://api.github.com/users/brjeter/received_events","type":"User","site_admin":false},"repo":{"id":70073166,"name":"ddf","full_name":"brjeter/ddf","owner":{"login":"brjeter","id":8130140,"avatar_url":"https://avatars.githubusercontent.com/u/8130140?v=3","gravatar_id":"","url":"https://api.github.com/users/brjeter","html_url":"https://github.com/brjeter","followers_url":"https://api.github.com/users/brjeter/followers","following_url":"https://api.github.com/users/brjeter/following{/other_user}","gists_url":"https://api.github.com/users/brjeter/gists{/gist_id}","starred_url":"https://api.github.com/users/brjeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brjeter/subscriptions","organizations_url":"https://api.github.com/users/brjeter/orgs","repos_url":"https://api.github.com/users/brjeter/repos","events_url":"https://api.github.com/users/brjeter/events{/privacy}","received_events_url":"https://api.github.com/users/brjeter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brjeter/ddf","description":"Distributed Data Framework - an open source, modular integration framework.","fork":true,"url":"https://api.github.com/repos/brjeter/ddf","forks_url":"https://api.github.com/repos/brjeter/ddf/forks","keys_url":"https://api.github.com/repos/brjeter/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brjeter/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brjeter/ddf/teams","hooks_url":"https://api.github.com/repos/brjeter/ddf/hooks","issue_events_url":"https://api.github.com/repos/brjeter/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/brjeter/ddf/events","assignees_url":"https://api.github.com/repos/brjeter/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/brjeter/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/brjeter/ddf/tags","blobs_url":"https://api.github.com/repos/brjeter/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brjeter/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brjeter/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/brjeter/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brjeter/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/brjeter/ddf/languages","stargazers_url":"https://api.github.com/repos/brjeter/ddf/stargazers","contributors_url":"https://api.github.com/repos/brjeter/ddf/contributors","subscribers_url":"https://api.github.com/repos/brjeter/ddf/subscribers","subscription_url":"https://api.github.com/repos/brjeter/ddf/subscription","commits_url":"https://api.github.com/repos/brjeter/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/brjeter/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/brjeter/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/brjeter/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/brjeter/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/brjeter/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brjeter/ddf/merges","archive_url":"https://api.github.com/repos/brjeter/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brjeter/ddf/downloads","issues_url":"https://api.github.com/repos/brjeter/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/brjeter/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/brjeter/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/brjeter/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brjeter/ddf/labels{/name}","releases_url":"https://api.github.com/repos/brjeter/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/brjeter/ddf/deployments","created_at":"2016-10-05T15:24:28Z","updated_at":"2016-10-05T15:24:46Z","pushed_at":"2016-10-24T17:51:05Z","git_url":"git://github.com/brjeter/ddf.git","ssh_url":"git@github.com:brjeter/ddf.git","clone_url":"https://github.com/brjeter/ddf.git","svn_url":"https://github.com/brjeter/ddf","homepage":"http://ddf.codice.org","size":278909,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"codice:master","ref":"master","sha":"dd3e5992aac913a486d0f85b8fc99b87006e6dd8","user":{"login":"codice","id":2386734,"avatar_url":"https://avatars.githubusercontent.com/u/2386734?v=3","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"repo":{"id":15173563,"name":"ddf","full_name":"codice/ddf","owner":{"login":"codice","id":2386734,"avatar_url":"https://avatars.githubusercontent.com/u/2386734?v=3","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codice/ddf","description":"Distributed Data Framework - an open source, modular integration framework.","fork":false,"url":"https://api.github.com/repos/codice/ddf","forks_url":"https://api.github.com/repos/codice/ddf/forks","keys_url":"https://api.github.com/repos/codice/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codice/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codice/ddf/teams","hooks_url":"https://api.github.com/repos/codice/ddf/hooks","issue_events_url":"https://api.github.com/repos/codice/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/codice/ddf/events","assignees_url":"https://api.github.com/repos/codice/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/codice/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/codice/ddf/tags","blobs_url":"https://api.github.com/repos/codice/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codice/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codice/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/codice/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/codice/ddf/languages","stargazers_url":"https://api.github.com/repos/codice/ddf/stargazers","contributors_url":"https://api.github.com/repos/codice/ddf/contributors","subscribers_url":"https://api.github.com/repos/codice/ddf/subscribers","subscription_url":"https://api.github.com/repos/codice/ddf/subscription","commits_url":"https://api.github.com/repos/codice/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/codice/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/codice/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/codice/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/codice/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/codice/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codice/ddf/merges","archive_url":"https://api.github.com/repos/codice/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codice/ddf/downloads","issues_url":"https://api.github.com/repos/codice/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/codice/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/codice/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/codice/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codice/ddf/labels{/name}","releases_url":"https://api.github.com/repos/codice/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/codice/ddf/deployments","created_at":"2013-12-13T20:38:28Z","updated_at":"2016-10-24T13:15:51Z","pushed_at":"2016-10-26T00:19:06Z","git_url":"git://github.com/codice/ddf.git","ssh_url":"git@github.com:codice/ddf.git","clone_url":"https://github.com/codice/ddf.git","svn_url":"https://github.com/codice/ddf","homepage":"http://ddf.codice.org","size":288235,"stargazers_count":48,"watchers_count":48,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":96,"mirror_url":null,"open_issues_count":26,"forks":96,"open_issues":26,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/1342"},"html":{"href":"https://github.com/codice/ddf/pull/1342"},"issue":{"href":"https://api.github.com/repos/codice/ddf/issues/1342"},"comments":{"href":"https://api.github.com/repos/codice/ddf/issues/1342/comments"},"review_comments":{"href":"https://api.github.com/repos/codice/ddf/pulls/1342/comments"},"review_comment":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codice/ddf/pulls/1342/commits"},"statuses":{"href":"https://api.github.com/repos/codice/ddf/statuses/ae8a631ce98b9125c361e76089f548bb356a1fbe"}}}}
{"actor":{"display_login":"brjeter"}}