Closed Bug 1475666 Opened 7 years ago Closed 7 years ago

libmozdata making failing requests referencing the "tip" changeset

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gps, Assigned: calixte)

References

Details

There is an automated agent making requests to hg.mozilla.org with URLs like the following: https://hg.mozilla.org/mozilla-central/json-filelog?revcount=4096&file=media%2Flibcubeb%2Fmingw-ucrt.patch&node=tip https://hg.mozilla.org/mozilla-central/json-filelog?revcount=4096&file=build%2Fbuild-clang%2Fclang-7-pre-mingw.json&node=tip https://hg.mozilla.org/mozilla-central/json-filelog?revcount=4096&file=testing%2Fmozharness%2Fconfigs%2Fbuilds%2Freleng_sub_windows_configs%2F64_mingwclang_debug.py&node=tip The agent is logically buggy because the "tip" changeset is ambiguous and refers to the most recent changeset in storage. Mercurial discourages the use of "tip" because it is strongly tied to Mercurial's current storage semantics (which can change). There has been talk of "deprecating" "tip" to a certain extent. Anyway, I noticed this because these requests are now intermittently giving an HTTP 500. Likely as fallout from bug 1470606. This regression /might/ be worth fixing. But since use of "tip" is discouraged, I'd prefer to see this agent change how it consumes the repositories. For repositories with a single head, the "default" revision can be used to refer to the head of the "default" branch. For other repositories, an appropriate branch or bookmark name can be used to find the "latest" changeset. For repositories with multiple heads on the same branch, you can query the pushlog to get the most recent changes and then use a revision hash to access data for a particular changeset. Using a specific revision hash is preferred for most access anyway, as results should be deterministic. If you issue N requests for symbolic revisions like "default," you can get results from multiple changesets. That doesn't happen if you pin the revision. Filing this in hg.mozilla.org for now because I'm not sure who operates the agent. https://github.com/mozilla/libmozdata references release-mgmt@, so I'll ping them.
I fixed the bug in libmozdata: https://github.com/mozilla/libmozdata/commit/066f500b7296706d9371ab635eb3cd1e58b0f0ba so it should be fixed now.
Assignee: nobody → cdenizet
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.