{"action":"created","issue":{"url":"https://api.github.com/repos/artefactual/archivematica/issues/1225","repository_url":"https://api.github.com/repos/artefactual/archivematica","labels_url":"https://api.github.com/repos/artefactual/archivematica/issues/1225/labels{/name}","comments_url":"https://api.github.com/repos/artefactual/archivematica/issues/1225/comments","events_url":"https://api.github.com/repos/artefactual/archivematica/issues/1225/events","html_url":"https://github.com/artefactual/archivematica/pull/1225","id":345057473,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MzA2NTA3","number":1225,"title":"Standardise global state in create_mets_v2","user":{"login":"marktriggs","id":149123,"node_id":"MDQ6VXNlcjE0OTEyMw==","avatar_url":"https://avatars1.githubusercontent.com/u/149123?v=4","gravatar_id":"","url":"https://api.github.com/users/marktriggs","html_url":"https://github.com/marktriggs","followers_url":"https://api.github.com/users/marktriggs/followers","following_url":"https://api.github.com/users/marktriggs/following{/other_user}","gists_url":"https://api.github.com/users/marktriggs/gists{/gist_id}","starred_url":"https://api.github.com/users/marktriggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marktriggs/subscriptions","organizations_url":"https://api.github.com/users/marktriggs/orgs","repos_url":"https://api.github.com/users/marktriggs/repos","events_url":"https://api.github.com/users/marktriggs/events{/privacy}","received_events_url":"https://api.github.com/users/marktriggs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-27T01:17:37Z","updated_at":"2018-07-27T03:32:19Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/artefactual/archivematica/pulls/1225","html_url":"https://github.com/artefactual/archivematica/pull/1225","diff_url":"https://github.com/artefactual/archivematica/pull/1225.diff","patch_url":"https://github.com/artefactual/archivematica/pull/1225.patch"},"body":"The `create_mets_v2` client script uses a bunch of global state for things like counters and file IDs.  The original implementation could rely on these globals being reset between runs (by virtue of running the script in a new subprocess each time) but, after the batching changes, this is no longer the case.\r\n\r\nTo make things more manageable, we pull all of this global stuff into a single top-level object which gets replaced at the beginning of each job run.  Where other modules call the functions of create_mets_v2, they reset the global state as appropriate as well.\r\n\r\nA secondary piece of shared state is the `sharedVariablesAcrossModules` module, used by `create_mets_v2` and a handful of other scripts.  Handling for this needed to be updated for the batching changes in a small number of places.\r\n\r\nFixes https://github.com/archivematica/Issues/issues/43 and https://github.com/archivematica/Issues/issues/42"},"comment":{"url":"https://api.github.com/repos/artefactual/archivematica/issues/comments/408301307","html_url":"https://github.com/artefactual/archivematica/pull/1225#issuecomment-408301307","issue_url":"https://api.github.com/repos/artefactual/archivematica/issues/1225","id":408301307,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODMwMTMwNw==","user":{"login":"marktriggs","id":149123,"node_id":"MDQ6VXNlcjE0OTEyMw==","avatar_url":"https://avatars1.githubusercontent.com/u/149123?v=4","gravatar_id":"","url":"https://api.github.com/users/marktriggs","html_url":"https://github.com/marktriggs","followers_url":"https://api.github.com/users/marktriggs/followers","following_url":"https://api.github.com/users/marktriggs/following{/other_user}","gists_url":"https://api.github.com/users/marktriggs/gists{/gist_id}","starred_url":"https://api.github.com/users/marktriggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marktriggs/subscriptions","organizations_url":"https://api.github.com/users/marktriggs/orgs","repos_url":"https://api.github.com/users/marktriggs/repos","events_url":"https://api.github.com/users/marktriggs/events{/privacy}","received_events_url":"https://api.github.com/users/marktriggs/received_events","type":"User","site_admin":false},"created_at":"2018-07-27T03:32:19Z","updated_at":"2018-07-27T03:32:19Z","author_association":"CONTRIBUTOR","body":"OK!  Tests are happy again.  Ready for review."}}
{"actor":{"display_login":"marktriggs"}}