This is an archive of the discontinued Mercurial Phabricator instance.

rage: add info useful for infinitepushbackup debug
ClosedPublic

Authored by mbthomas on Oct 30 2017, 11:16 AM.
Tags
None
Subscribers
None

Details

Reviewers
stash
Group Reviewers
Restricted Project
Commits
rFBHGX65ac896fa2a8: rage: add info useful for infinitepushbackup debug
Summary

Adds information that is useful for debugging infinitepush backup to the rage
output. In particular:

  • Full node hashes in the unfiltered smartlog, so that they can be looked up in infinitepush.
  • The contents of infinitepushbackupstate.
  • The last 100 lines of the infinitepush backup logs for this repo.
Test Plan

Run hg rage and confirm output contains infinitepush information.

Excerpts from sample rage outputs:

hg sl (filtered):
---------------------------
...
| @  cef39429a243bc6433ab1a5d9db91b68d3245c8f
|/   4155:cef394  mbthomas  D1264
|    rage: add info useful for infinitepushbackup debug
|
| x  21593d9631c2f3f71769778f1b08a5020f33710b
|/   4154:21593d (hidden)  mbthomas
|    rage: add info useful for infinitepushbackup debug
|
| x  225dae77dbbab3e94f332cbf991538df0b90b8d3
|/   4153:225dae (hidden)  mbthomas
|    rage: add info useful for infinitepushbackup debug
|
...
infinitepush backup state:
---------------------------
{"bookmarks": {"tmp": "2ed25c96dc27000c0d00e1a86ad354205715f260", "arcpatch-D698-1": "0ad49fb97fa44dda2e6d0725615342a195489c79", "arcpatch-D698": "ee2d7b5d8dc193620a294faf0505ec25fb1a8f78", "pt-revlog": "ccb2668182bdd628bcc5efd8fb8a3ea186f85a08"}, "heads": ["34fa638f6387e81b5039d29ce50a755131479870", "3a5be2d8d5705302f7a754a69cabac884e17d34d", "ee2d7b5d8dc193620a294faf0505ec25fb1a8f78", "a904118ae039bd0ee7639753b6f194f21bfa7c64", "ccb2668182bdd628bcc5efd8fb8a3ea186f85a08", "0ad49fb97fa44dda2e6d0725615342a195489c79", "d1f7bc030c734c5ca2b9f3db2f52759a113db3c9"]}
...
infinitepush backup logs:
---------------------------
infinitepushbackup.logdir not set
...
infinitepush backup logs:
---------------------------
testrepo20170816 (first 12 lines omitted):
  remote:     3dc5cc214efc  [...]
  remote:     03095008ba11  [...]
  finished in 17.108702 seconds

testrepo20170818:
  starting backup 06:10:40 18 Aug 2017 PDT
  nothing to backup
  finished in 2.110974 seconds
  starting backup 06:11:30 18 Aug 2017 PDT
  nothing to backup
  finished in 1.479330 seconds

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mbthomas created this revision.Oct 30 2017, 11:16 AM
Herald added a reviewer: Restricted Project. · View Herald TranscriptOct 30 2017, 11:16 AM
stash requested changes to this revision.Oct 30 2017, 4:48 PM

Can you also write the test plan?

hgext3rd/rage.py
182–187

Why do you join with ' '? Why not '/n'?

I actually don't think that it makes sense to return lines for all logfiles. Just the last one should be enough

This revision now requires changes to proceed.Oct 30 2017, 4:48 PM
mbthomas added inline comments.Nov 1 2017, 6:51 AM
hgext3rd/rage.py
182–187

The log lines already have '\n' at the end from readlines(). The ' ' in the join is just to indent the lines to give a visual output like:

filename:
  log lines

I've included more than the most recent file, as it might be the case that the day has just changed and the problem was from the previous day (I think we've seen that at least once).

mbthomas edited the test plan for this revision. (Show Details)Nov 1 2017, 7:04 AM
stash accepted this revision.Nov 2 2017, 4:22 PM
This revision is now accepted and ready to land.Nov 2 2017, 4:22 PM
This revision was automatically updated to reflect the committed changes.