{"push_id":825512281,"size":17,"distinct_size":1,"ref":"refs/heads/pr/travisbranch","head":"c410d03cce3478de07b36051f8f6740a64ee1edf","before":"46c3d41942c41c4be9deb78d0e3d090268fd43e1","commits":[{"sha":"e28dc2a3d08a85ae16e3366f482369181c59c912","author":{"email":"b6b9c760cb451ae1d4607a4e6e226c82288cfa72@bloomberg.net","name":"Chandan Singh"},"message":"phlsys_conduit: Rename make_phab_test_conduit\n\nRename the function make_phab_test_conduit() to\nmake_phab_example_conduit() because any function which has a 'test' in\nits name is considered as a test by Nose. So, Nose considered this\nfunction when it was actually just a helper function which would cause\nthe tests to fail in some cases. So, rename this function to avoid any\nconfusion.\n\nTest plan:\n$ ./precommit.sh\n\n$ git grep make_phab_test_conduit\nEnsure output of grep is empty to make sure that the old function name\nis not used in any place.","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/e28dc2a3d08a85ae16e3366f482369181c59c912"},{"sha":"9440f9548b0bfc9656633cc42691d604a3350c00","author":{"email":"a2d3806e34708fe5c634e19c305512c40585eaf9@gmail.com","name":"Angelos Evripiotis"},"message":"Arcyd-tester: Add snoop_url property to tester\n\nAdd snoop_url property to Arcyd tester to be consumed in later commits.\nTo provide this property, a simple web server is added to the Arcyd\ninstance which is used by the tester. In order to do that, add\nSimpleWebServer class and a helper function pick_free_port().\n\nTest plan:\n$ ./precommit.sh\n\n$ PYTHONPATH=py/phl:py/abd:testbed/plugins:py/ate python\n    >>> import atecmd_arcydtester\n    >>> import socket\n\n    >>> def check_port_free(port):\n    ...     try:\n    ...         sock = socket.socket()\n    ...         sock.bind(('', port))\n    ...         sock.close()\n    ...         return True\n    ...     except Exception:\n    ...         return False\n\n    >>> port = atecmd_arcydtester.pick_free_port()\n    >>> print check_port_free(port)\n    True # Ensure that check_port_free() returns an available port.\n\n    >>> dirpath = tempfile.mkdtemp()\n    >>> filepath = os.path.join(dirpath, 'index.html')\n    >>> phlsys_fs.write_text_file(filepath, 'Hello World')\n    >>> server = atecmd_arcydtester.SimpleWebServer(dirpath, port)\n    Serving HTTP on 0.0.0.0 port 52660 ... # Port number may vary\n\n    >>> while check_port_free(port):\n    ...     time.sleep(1)\n    >>> print check_port_free(port)\n    False # Ensure port is busy while server is up on that port.\n    >>> response = urllib2.urlopen(\"http://localhost:{}\".format(port))\n    >>> print response.read()\n    Hello World # Ensure correct response is served by the server.\n\n    >>> server.close()","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/9440f9548b0bfc9656633cc42691d604a3350c00"},{"sha":"dea08a248536b10e02f93c6fae741039f384e61f","author":{"email":"a2d3806e34708fe5c634e19c305512c40585eaf9@gmail.com","name":"Angelos Evripiotis"},"message":"Arcyd-tester: Add info_log property\n\nRefactor debug_log() function by moving all the logic to a helper\nfunction _read_log(). Introduce a new function info_log() to return\ninfo log. The generic _read_log() function can be used to read any\nstream of logs.\n\nTest plan:\n$ ./precommit.sh\n\nIn function _do_tests() of py/ate/atecmd_arcydtester.py, add the\nfollowing lines at the start of try block:\n    debug_log_path = '{}/var/log/debug'.format(fixture.arcyds[0]._root_dir)\n    phlsys_fs.write_text_file(debug_log_path, 'Hello from debug log')\n    info_log_path = '{}/var/log/info'.format(fixture.arcyds[0]._root_dir)\n    phlsys_fs.write_text_file(info_log_path, 'Hello from info log')\n    raise Exception\n\nIn the except block just below that, add the following lines at\ntop:\n    print(fixture.arcyds[0].info_log())\n\nNow, run following command:\n\n$ ./proto/arcyd-tester\nServing HTTP on 0.0.0.0 port 41070 ... # Port number may vary\nHello from info log\nHello from debug log\nTraceback ...","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/dea08a248536b10e02f93c6fae741039f384e61f"},{"sha":"33f50af4d281542960feaf062c20e88f68a8759f","author":{"email":"a2d3806e34708fe5c634e19c305512c40585eaf9@gmail.com","name":"Angelos Evripiotis"},"message":"Arcyd-tester: Allow tester to start/stop daemon\n\nAdd the ability of starting and stopping daemons to Arcyd tester.\nProvide an easy-to-use context manager - daemon_context() to allow\nthis as well.\n\nTest plan:\n$ ./precommit.sh\n\nIn function _do_tests() of py/ate/atecmd_arcydtester.py, add the\nfollowing lines at the start of try block:\n    instance = fixture.arcyds[0]\n    print(instance._has_started_daemon)\n    with instance.daemon_context():\n        print(instance._has_started_daemon)\n    print(instance._has_started_daemon)\n\nNow, run the following command:\n$ ./proto/arcyd-tester\nServing HTTP on 0.0.0.0 port 52917 ...\nFalse\nTrue\nFalse\n...","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/33f50af4d281542960feaf062c20e88f68a8759f"},{"sha":"e1c2a7dbbc107957429fa807e73884173e401398","author":{"email":"a2d3806e34708fe5c634e19c305512c40585eaf9@gmail.com","name":"Angelos Evripiotis"},"message":"Arcyd-tester: Allow tester to set overrun secs\n\nAdd a new proprety _has_set_overrun_secs to keep track of whether\noverrun seconds are set or not. Add a function set_overrun_secs() to\neasily set the property. Save this property in the configuration file.\n\nTest plan:\n$ ./precommit.sh\n\nIn function _do_tests() of py/ate/atecmd_arcydtester.py, add the\nfollowing lines at the start of try block:\n    instance = fixture.arcyds[0]\n    print(instance._has_set_overrun_secs)\n    instance.set_overrun_secs(42)\n    print(instance._has_set_overrun_secs)\n    print(phlsys_fs.read_text_file(os.path.join(instance._root_dir, 'configfile')))\n\nNow, run the following command:\n\n$ ./proto/arcyd-tester\nServing HTTP on 0.0.0.0 port 36071 ...\nFalse # _has_set_overrun_secs is not set by default.\nTrue # _has_set_overrun_secs set correctly by function.\n--arcyd-email\n...\n...\n--overrun-secs\n42 # set_overrun_secs() writes correct value to config\n...","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/e1c2a7dbbc107957429fa807e73884173e401398"},{"sha":"24540a9f0b43d0de3a71053f68b89ae8c1e3c72c","author":{"email":"a2d3806e34708fe5c634e19c305512c40585eaf9@gmail.com","name":"Angelos Evripiotis"},"message":"Arcyd-tester: Tester can wait one or more cycles\n\nAdd a new property - _has_enabled_count_cycles to the test Arcyd\ninstance which is not set by default but if set, Arcyd will wait for\none or more cycles (of one second each). The number of cycles is\ncontrolled by an external report command count_cycles.sh which in turn\nmaintains the count in the file count_cycles.\n\nTest plan:\n$ ./precommit.sh\n\nIn function _do_tests() of py/ate/atecmd_arcydtester.py, add the\nfollowing lines at the start of try block:\n    instance = fixture.arcyds[0]\n    print(instance._has_enabled_count_cycles)\n    instance.enable_count_cycles_script()\n    print(instance._has_enabled_count_cycles)\n    print(phlsys_fs.read_text_file(os.path.join(instance._root_dir, 'configfile')))\n    phlsys_fs.write_text_file(os.path.join(instance._root_dir, 'cycle_counter'), '2')\n    with phlsys_fs.chdir_context(instance._root_dir):\n        os.system(\"./count_cycles.sh\")\n    print(instance.count_cycles())\n\nNow, run the following command:\n\n$ ./proto/arcyd-tester\nServing HTTP on 0.0.0.0 port 40606 ... # port number may vary\nFalse # count_cycles disabled by deafult\nTrue # count_cycles enabled by enable_count_cycles_script()\n--arcyd-email\n...\n...\n--external-report-command\ncount_cycles.sh # Correct script added as external report command\n3 # Correct number of cycles counted (2 + 1).","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/24540a9f0b43d0de3a71053f68b89ae8c1e3c72c"},{"sha":"39fc2172828bbacad1436d7ff8fc7c9cd1281afe","author":{"email":"a2d3806e34708fe5c634e19c305512c40585eaf9@gmail.com","name":"Angelos Evripiotis"},"message":"Arcyd-tester: Tester can hold dev/arcyd refs\n\nAllow tester to hold (and release) dev/arcyd refs. Add a pre-recieve\nhook which can hold the dev/arcyd refs when required.\n\nTest plan:\n$ ./precommit.sh\n\nIn function _do_tests() of py/ate/atecmd_arcydtester.py, add the\nfollowing lines at the start of try block:\n    repo = fixture.repos[0]\n    print(os.path.isfile(repo._command_hold_path))\n    repo.hold_dev_arcyd_refs()\n    print(os.path.isfile(repo._command_hold_path))\n    repo.release_dev_arcyd_refs()\n    print(os.path.isfile(repo._command_hold_path))\n\nNow, run the following command:\n\n$ ./proto/arcyd-tester\nServing HTTP on 0.0.0.0 port 53907 ... # port number may vary\nFalse # do not hold dev/arcyd refs by default\nTrue # hold dev/arcyd when hold_dev_arcyd_refs() is called\nFalse # release the refs when release_dev_arcyd_refs() is called\n...","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/39fc2172828bbacad1436d7ff8fc7c9cd1281afe"},{"sha":"2f4005b9a704ee51bd3649a069044952a272f6ac","author":{"email":"a2d3806e34708fe5c634e19c305512c40585eaf9@gmail.com","name":"Angelos Evripiotis"},"message":"Arcyd-tester: Test pushing during overrun\n\nAdd  _test_push_during_overrun() to test pushing during overrun. This\ncommit just adds the test for this functionality to point out that there\nis some issue with existing code. So the test is expected to fail at\nthis stage. The fix for this issue will be added in a later commit which\nwill fix the issue as well as the tests.\n\nTest plan:\n$ ./precommit.sh\n(./proto/arcyd-tester should fail at this point of time because just the\ntest is introduced in this commit and the actual fix will be added as a\nseparate commit.)","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/2f4005b9a704ee51bd3649a069044952a272f6ac"},{"sha":"088b82f29c19042741dc95476db945f4fa99803c","author":{"email":"a2d3806e34708fe5c634e19c305512c40585eaf9@gmail.com","name":"Angelos Evripiotis"},"message":"phlurl_watcher: add ability to merge watchers\n\nIn the case where we have one process forked from another to do work,\nit's useful to be able to 'consume the newness' from the forked watcher\nwhen joining / finishing the worker process.\n\nThe main process and the worker process may have diverged in their view\nof the watcher urls. In this case we will only want to 'consume the\nnewness' for urls where the hash of the content matches. In cases where\nthe hashes don't match, we can't be sure which newness is newer.\n\nAdd get_data_for_merging() and merge_data_consume_only() to facilitate\nthis data flow.\n\nAdd tests for this new functionality.\n\nTest Plan:\n$ ./precommit.sh","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/088b82f29c19042741dc95476db945f4fa99803c"},{"sha":"19361bc9d1cca14f531da3a2131b153f854346cc","author":{"email":"a2d3806e34708fe5c634e19c305512c40585eaf9@gmail.com","name":"Angelos Evripiotis"},"message":"Arcyd: Fix cache race condition when overrunning\n\nArcyd worker processes which overran could incorrectly consume the\n'newness' of a repository which had been updated while it was\noverrunning. This is because it would happen unconditionally, whether or\nnot the repository snoop url now pointed to different content.\n\nFix this by using function 'watcher.merge_data_consume_only()' which\nmerges the data for URLs and also consumes the 'newness' of the URL only\nif the content hashes match.\n\nThis commit also fixes the fail in Arcyd tester which was introduced in\na previous commit.\n\nTest plan:\n$ ./precommit.sh","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/19361bc9d1cca14f531da3a2131b153f854346cc"},{"sha":"ab968d2440a004c4af619f5343e3ef9d1bcb9a56","author":{"email":"b6b9c760cb451ae1d4607a4e6e226c82288cfa72@bloomberg.net","name":"Chandan Singh"},"message":"Arcyd-tester: Add test for number of fetches\n\nAdd tests to ensure that Arcyd fetches from the repository exactly as\nmany times as is absolutely required. We need to ensure that Arcyd does\nnot makes any extra fetches in order to not over-burden git server.\nCounting the number of pushes is achieved by monkey patching the\nbase-level git clone to update the count in a file on every fetch.\n\nTest plan:\n$ ./precommit.sh","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/ab968d2440a004c4af619f5343e3ef9d1bcb9a56"},{"sha":"097225ea3de8640ab6062a0485c5b187f60365e1","author":{"email":"b6b9c760cb451ae1d4607a4e6e226c82288cfa72@bloomberg.net","name":"Chandan Singh"},"message":"Meta: Remove integration doc test\n\nThere's a doctest which in phlsys_conduit.py which is in fact an\nintegration test and requires a local Phabricator instance to be running\nin order to pass successfully. Since we plan to keep unit tests separate\nfrom integration tests, we do not allow doc tests to be dependent on a\nPhabricator instance.\n\nSince this is a valuable usage example, keep it as an example but do not\nrun it as a doc test.\n\nTest plan:\n$ ./precommit.sh\n\nRun the following command without a Phabricator instance.\n$ nosetests py/phl/phlsys_conduit.py --with-doctest\nRan 1 test in 0.002s\nOK","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/097225ea3de8640ab6062a0485c5b187f60365e1"},{"sha":"446c2d59b46cbae073432184c82b6e007db10f61","author":{"email":"b6b9c760cb451ae1d4607a4e6e226c82288cfa72@bloomberg.net","name":"Chandan Singh"},"message":"Meta: Change suffix of integrations tests to __it\n\nAs a first step twoards separating unit tests from integration tests,\nchange the suffix of integration tests to \"__it\". Previously, all tests\nhad a suffix \"__t\" but now only unit tests have the suffix \"__t\" and\nintegration tests have the suffix \"__it\".\n\nAlso, scripts gen_doc.sh and check_no_dead_files.sh assume that test\ndrivers will have a suffix to \"__it\" so add \"__it\" as tests to those\nscripts as well.\n\nTest plan:\n$ ./precommit.sh\n\nTry running all the tests with \"__it\" without a phabricator instance.\nThey should pass.","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/446c2d59b46cbae073432184c82b6e007db10f61"},{"sha":"d141c8f49172b341e3b4d27eab2f6580597bf349","author":{"email":"b6b9c760cb451ae1d4607a4e6e226c82288cfa72@bloomberg.net","name":"Chandan Singh"},"message":"Meta: Add script to run integration tests\n\nAdd a script integration_tests.sh which will run only integration tests,\ni.e. the test drivers ending in \"__it.py\". Since this a new script, add\noptions to run this script from precommit.sh as well.\n\nTest plan:\n$ ./precommit.sh\n\n$ ./integration_tests.sh\nEnsure that only those files are ran which have a suffix \"__it\".","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/d141c8f49172b341e3b4d27eab2f6580597bf349"},{"sha":"328b1cb6295ea4b79ee4af98ef038478a185e93d","author":{"email":"b6b9c760cb451ae1d4607a4e6e226c82288cfa72@bloomberg.net","name":"Chandan Singh"},"message":"Meta: Allow unit tests to run on Travis CI\n\nSince inetgration tests are now executed by another script,\nunit_tests.sh should now execute only unit tests. With this change, we\ncould allow unit tests to run Travis CI as well since they no longer\nrequire a Phabricator instance.\n\nPackage \"time\" is required by our tests so add that as a \"apt\"\ndependency.\n\nAlso, since our tests require a valid git configuration in order to\ncomplete so add that to .travis.yml as well.\n\nTest plan:\n$ ./precommit.sh\n\nEnsure unit tests run on Travis CI and the build passes.","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/328b1cb6295ea4b79ee4af98ef038478a185e93d"},{"sha":"132b82f0102b8cbf51da1a445f44f41274d054d2","author":{"email":"a2d3806e34708fe5c634e19c305512c40585eaf9@gmail.com","name":"Angelos Evripiotis"},"message":"readme: add link to the glossy documentation page\n\nThere's a more appealing introductory page for Arcyon, link there as\nwell as to the raw documentation pages.","distinct":false,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/132b82f0102b8cbf51da1a445f44f41274d054d2"},{"sha":"c410d03cce3478de07b36051f8f6740a64ee1edf","author":{"email":"a2d3806e34708fe5c634e19c305512c40585eaf9@gmail.com","name":"Angelos Evripiotis"},"message":"travis.yml: fetch origin/master for branch builds\n\nWhen Travis is building a particular branch as opposed to a\npull-request, it will clone only that branch for efficiency. This\ndoes not play well with autofix.py, which needs origin/master.\n\nTest Plan:\nChecked the status of the personal branch this PR is based on.","distinct":true,"url":"https://api.github.com/repos/aevri/phabricator-tools/commits/c410d03cce3478de07b36051f8f6740a64ee1edf"}]}