{"action":"created","issue":{"url":"https://api.github.com/repos/cylc/cylc/issues/2628","repository_url":"https://api.github.com/repos/cylc/cylc","labels_url":"https://api.github.com/repos/cylc/cylc/issues/2628/labels{/name}","comments_url":"https://api.github.com/repos/cylc/cylc/issues/2628/comments","events_url":"https://api.github.com/repos/cylc/cylc/issues/2628/events","html_url":"https://github.com/cylc/cylc/pull/2628","id":315343960,"number":2628,"title":"WIP: Fix space in graph line string merge bug","user":{"login":"ColemanTom","id":15375218,"avatar_url":"https://avatars2.githubusercontent.com/u/15375218?v=4","gravatar_id":"","url":"https://api.github.com/users/ColemanTom","html_url":"https://github.com/ColemanTom","followers_url":"https://api.github.com/users/ColemanTom/followers","following_url":"https://api.github.com/users/ColemanTom/following{/other_user}","gists_url":"https://api.github.com/users/ColemanTom/gists{/gist_id}","starred_url":"https://api.github.com/users/ColemanTom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColemanTom/subscriptions","organizations_url":"https://api.github.com/users/ColemanTom/orgs","repos_url":"https://api.github.com/users/ColemanTom/repos","events_url":"https://api.github.com/users/ColemanTom/events{/privacy}","received_events_url":"https://api.github.com/users/ColemanTom/received_events","type":"User","site_admin":false},"labels":[{"id":120950,"url":"https://api.github.com/repos/cylc/cylc/labels/bug","name":"bug","color":"e10c02","default":true}],"state":"open","locked":false,"assignee":{"login":"ColemanTom","id":15375218,"avatar_url":"https://avatars2.githubusercontent.com/u/15375218?v=4","gravatar_id":"","url":"https://api.github.com/users/ColemanTom","html_url":"https://github.com/ColemanTom","followers_url":"https://api.github.com/users/ColemanTom/followers","following_url":"https://api.github.com/users/ColemanTom/following{/other_user}","gists_url":"https://api.github.com/users/ColemanTom/gists{/gist_id}","starred_url":"https://api.github.com/users/ColemanTom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColemanTom/subscriptions","organizations_url":"https://api.github.com/users/ColemanTom/orgs","repos_url":"https://api.github.com/users/ColemanTom/repos","events_url":"https://api.github.com/users/ColemanTom/events{/privacy}","received_events_url":"https://api.github.com/users/ColemanTom/received_events","type":"User","site_admin":false},"assignees":[{"login":"ColemanTom","id":15375218,"avatar_url":"https://avatars2.githubusercontent.com/u/15375218?v=4","gravatar_id":"","url":"https://api.github.com/users/ColemanTom","html_url":"https://github.com/ColemanTom","followers_url":"https://api.github.com/users/ColemanTom/followers","following_url":"https://api.github.com/users/ColemanTom/following{/other_user}","gists_url":"https://api.github.com/users/ColemanTom/gists{/gist_id}","starred_url":"https://api.github.com/users/ColemanTom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColemanTom/subscriptions","organizations_url":"https://api.github.com/users/ColemanTom/orgs","repos_url":"https://api.github.com/users/ColemanTom/repos","events_url":"https://api.github.com/users/ColemanTom/events{/privacy}","received_events_url":"https://api.github.com/users/ColemanTom/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/cylc/cylc/milestones/68","html_url":"https://github.com/cylc/cylc/milestone/68","labels_url":"https://api.github.com/repos/cylc/cylc/milestones/68/labels","id":3096004,"number":68,"title":"next release","description":"cylc-7.7.0\r\n","creator":{"login":"hjoliver","id":2362137,"avatar_url":"https://avatars0.githubusercontent.com/u/2362137?v=4","gravatar_id":"","url":"https://api.github.com/users/hjoliver","html_url":"https://github.com/hjoliver","followers_url":"https://api.github.com/users/hjoliver/followers","following_url":"https://api.github.com/users/hjoliver/following{/other_user}","gists_url":"https://api.github.com/users/hjoliver/gists{/gist_id}","starred_url":"https://api.github.com/users/hjoliver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hjoliver/subscriptions","organizations_url":"https://api.github.com/users/hjoliver/orgs","repos_url":"https://api.github.com/users/hjoliver/repos","events_url":"https://api.github.com/users/hjoliver/events{/privacy}","received_events_url":"https://api.github.com/users/hjoliver/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":39,"state":"open","created_at":"2018-02-07T08:37:49Z","updated_at":"2018-04-18T07:42:13Z","due_on":"2018-04-30T07:00:00Z","closed_at":null},"comments":2,"created_at":"2018-04-18T06:13:43Z","updated_at":"2018-04-18T07:46:12Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/cylc/cylc/pulls/2628","html_url":"https://github.com/cylc/cylc/pull/2628","diff_url":"https://github.com/cylc/cylc/pull/2628.diff","patch_url":"https://github.com/cylc/cylc/pull/2628.patch"},"body":"I haven't finished writing formal tests for this change, but I thought I should actually show it and get feedback. Work on it has been very much in little steps as it isn't a high priority for me. It essentially puts in a more strict line regex pattern that the graph has to parse. It has run on a fake suite.rc and also some real ones from our suites here.\r\n\r\nSee my main commit (the first one) for a longer explanation of the change. I think I stumbled across some other things (other than the space issue) which according to docs should not have validated but appeared to - although that could have been on 7.5.0 and not the latest 7.6.1 build.\r\n\r\nMy main concern with my approach is that it puts more stuff in another regex area, such that if an update was done for example in https://github.com/cylc/cylc/pull/2596/files it would also require an update here (maybe). I wonder if there would be a way to pull regex for parameters, triggers, remote triggers, task/family status into a single spot?\r\n\r\nFrom my speed comparisons against big and small suite graphs, there is negligible impact on speed (I can't comment on cpu/memory usage as I have not checked that).\r\n\r\nIn the dummy suite.rc, the results are below. The bad ones I've listed why they would have been rejected.\r\n\r\n```shell\r\nbad:    => =>  # two arrows with nothing in between\r\nbad:    foo => !  # bad symbol on RHS\r\nbad:    foo => @  # bad symbol on RHS\r\nbad:    foo => +  # bad symbol on RHS\r\nbad:    foo => %  # bad symbol on RHS\r\nbad:    foo => @b  # bad symbol on RHS\r\nbad:    foo => +b  # bad symbol on RHS\r\nbad:    foo => %b  # bad symbol on RHS\r\nbad:    foo => bar baz  # space in between two task nodes (i.e. this Issue)\r\nbad:    get<run pets> => feed<run,pets>  # space between parameters on the LHS\r\nbad:    get<run,pets> => feed<run pets>  # space between parameters on the RHS\r\nbad:    OBS_PROC<>  # nothing in between <>\r\nbad:    OBS_GET<run>: => OBS_PROC<run>  # nothing after :\r\nbad:    OBS_GET<run>:succeed-all => OBS_PROC<>  # nothing within the <>\r\nbad:    foo[] => foo  # nothing inside the []\r\nbad:    OBS_GET<run>:succeed - all&foo => OBS_PROC<run> => hello => test | boo => hello<a,b,c-1> => a b  # spaces within the 'succeed-all' statement, spaces between task nodes at the end\r\nbad:    FOO<cc:dd:fail>:hello  # remote trigger, but only one colon in between 'cc' and 'dd'\r\nbad:    az =>=>  # two arrows with nothing in between\r\nbad:    foo<other_suite :: task>  # spaces around the ::\r\nbad:    foo<a,b><other_suite::task : fail>  # parameter and remote trigger on same task, spaces around colon in remote trigger\r\nbad:    foo<a><bb::cc>  # parameter and remote trigger on same task\r\nbad:    foo[PT6H]<cc::dd:fail>  # time offset and remote trigger on same task\r\nbad:    foo<other_suite::task : fail>  # spaces around the :\r\nbad:    foo<other_suite::task :succeed> => testing  # space after task\r\nbad:    get <run,pets> => feed<run,pets>  # spce between 'get' and '<'\r\nbad:    get < run = 1 , pets = dogs > => boo  # space between 'get' and '<'\r\nbad:    OBS_GET<run> :succeed-all => OBS_PROC<run>  # space before :\r\nbad:    OBS_GET<run>: succeed-all => OBS_PROC<run>  # space after :\r\nbad:    OBS_GET<run> : succeed-all => OBS_PROC<run>  # spaces around :\r\nbad:    OBS_GET<run>:succeed -all => OBS_PROC<run>  # space before -\r\nbad:    OBS_GET<run>:succeed- all => OBS_PROC<run>  # space after -\r\nbad:    OBS_GET<run> : succeed - all => OBS_PROC<run>  # spaces around : and -\r\nbad:    model[- P1M] => model  # space between - and P1M\r\nbad:    model [ -P1M ] => model  # space between 'model' and '['\r\nbad:    Analysis[+ PT12H] => ObSensitivity  # space between + and PT12H\r\nbad:    Analysis[ + PT12H ] => ObSensitivity  # space between + and PT12H\r\nbad:    foo[ - P2M ] : out2 => baz  # space in between - and P2M, space around :\r\nbad:    foo[- P2M]:out2 => baz  # space in between - and P2M\r\nbad:    foo[-P2M] :out2 => baz  # space before :\r\nbad:    foo[-P2M]: out2 => baz  # space after :\r\nbad:    OBS_GET<run>:succeed - all&foo => OBS_PROC<run> => hello => test | boo  # spaces within the 'succeed-all' statement\r\n```\r\n\r\n```shell\r\ngood:     <lang=c++> => <lang = fortran-2008>\r\ngood:     <lang=c++>\r\ngood:     <lang = fortran-2008>\r\ngood:    <lang=c-1> => test\r\ngood:    OBS_GET<run>:succeed-all\r\ngood:    abc\r\ngood:    =>\r\ngood:    def\r\ngood:    az =>\r\ngood:    => hello => bar\r\ngood:    FOO<cc::dd:fail>:hello\r\ngood:    foo<other_suite::task>\r\ngood:    pre => init<run>\r\ngood:    pre => init< run>\r\ngood:    pre => init<run >\r\ngood:    get<run,pets> => feed<run,pets>\r\ngood:    get< run,pets> => feed<run,pets>\r\ngood:    get<run, pets> => feed<run,pets>\r\ngood:    get<run,pets > => feed<run,pets>\r\ngood:    get<run , pets> => feed<run,pets>\r\ngood:    get<run,pets-1> => get<run,pets>\r\ngood:    get<run,pets -1> => get<run,pets>\r\ngood:    get<run,pets- 1> => get<run,pets>\r\ngood:    get<run,pets - 1> => get<run,pets>\r\ngood:    get<run =1,pets=dogs> => boo\r\ngood:    get<run= 1,pets=dogs> => boo\r\ngood:    get<run = 1,pets=dogs> => boo\r\ngood:    get<run=1,pets=dogs>=>boo\r\ngood:    OBS_GET<run>:succeed-all => OBS_PROC<run>\r\ngood:    foo => bar\r\ngood:    foo => b-\r\ngood:    foo => b@\r\ngood:    foo => b+\r\ngood:    foo => b%\r\ngood:    foo => bar& baz\r\ngood:    foo => bar &baz\r\ngood:    foo => bar & baz\r\ngood:    foo => bar| baz\r\ngood:    foo => bar |baz\r\ngood:    foo => bar | baz\r\ngood:    model[-P1M] => model\r\ngood:    model[-P1M ] => model\r\ngood:    Analysis[+PT12H] => ObSensitivity\r\ngood:    Analysis[ +PT12H] => ObSensitivity\r\ngood:    copy:expired => !proc\r\ngood:    copy:expired => ! proc\r\ngood:    foo\r\ngood:    foo => bar => test\r\ngood:    foo => _\r\ngood:    foo => bar_baz\r\ngood:    foo[-P2M]:out2 => baz\r\ngood:    foo[ -P2M]:out2 => baz\r\ngood:    foo[ -P2M ]:out2 => baz\r\ngood:    sim<r,m,c=2>[-P1Y] => sim<r,m,c=0> | bar<g,h,i=3>\r\n```"},"comment":{"url":"https://api.github.com/repos/cylc/cylc/issues/comments/382295679","html_url":"https://github.com/cylc/cylc/pull/2628#issuecomment-382295679","issue_url":"https://api.github.com/repos/cylc/cylc/issues/2628","id":382295679,"user":{"login":"matthewrmshin","id":908613,"avatar_url":"https://avatars3.githubusercontent.com/u/908613?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewrmshin","html_url":"https://github.com/matthewrmshin","followers_url":"https://api.github.com/users/matthewrmshin/followers","following_url":"https://api.github.com/users/matthewrmshin/following{/other_user}","gists_url":"https://api.github.com/users/matthewrmshin/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewrmshin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewrmshin/subscriptions","organizations_url":"https://api.github.com/users/matthewrmshin/orgs","repos_url":"https://api.github.com/users/matthewrmshin/repos","events_url":"https://api.github.com/users/matthewrmshin/events{/privacy}","received_events_url":"https://api.github.com/users/matthewrmshin/received_events","type":"User","site_admin":false},"created_at":"2018-04-18T07:46:12Z","updated_at":"2018-04-18T07:46:12Z","author_association":"MEMBER","body":"I guess this is to close #2534?"}}
{"actor":{"display_login":"matthewrmshin"}}