571aecdf42c832e61ee921e977589ca386467d13 max Fri Sep 4 12:24:17 2026 -0700 hubCheck: report a bigDataUrl that cannot be opened instead of dropping the track, refs #38260 hubCheckGenome() called trackDbPolishAfterLinkup(), whose pruneEmpties() step hands each track to addTrackIfDataAccessible(), which frees any track whose data cannot be reached. That is right for the browser, which should degrade gracefully rather than draw a broken track, and wrong for hubCheck, whose main job is to say that the file is unreachable. The track was gone before the file check ran, so hubCheck printed nothing and exited 0: cd hubCheck/tests/input sed 's|test6field.bb|noSuchFile.bb|' fieldCountMismatch.txt > tmp.txt hubCheck tmp.txt # only the descriptionUrl warning, missing file not mentioned Split the non-pruning part of trackDbPolishAfterLinkup() into trackDbPolishAfterLinkupKeepAll() and call that from hubCheck. Every other caller still goes through trackDbPolishAfterLinkup() and still prunes, so browser behaviour is unchanged. Added a tests/ case whose bigDataUrl does not exist. Before this change it produced no output and exit 0; now it reports "Couldn't open input/relPath/data/noSuchFile.bb". Of the existing tests, only badType changes, and it gains a real error that the prune had been hiding: 'unrecognized type "wig" for track "invalidType"'. badType was already failing before this commit and still is, for an unrelated reason: seven tests carry expected output with per-track "missing description page" warnings that no longer appear, because those hubs point at remote URLs that no longer resolve and hubCheckTrack aborts at the file check before reaching the description check. That is stale test data, not addressed here. diff --git src/hg/utils/hubCheck/tests/makefile src/hg/utils/hubCheck/tests/makefile index 3b125708415..6e251d6b7a4 100644 --- src/hg/utils/hubCheck/tests/makefile +++ src/hg/utils/hubCheck/tests/makefile @@ -1,93 +1,99 @@ kentSrc = ../../../.. include ../../../../inc/common.mk hubCheck = ${DESTBINDIR}/hubCheck -test:: one two errors supertrackChild genomesErrors badType badSubgroups autoScale noLongLabel badGroups goodGroups noCompositeGroup allowWarnings seqNameCheck noSeqNameCheck selfParent dotInName fieldCountMismatch relPath +test:: one two errors supertrackChild genomesErrors badType badSubgroups autoScale noLongLabel badGroups goodGroups noCompositeGroup allowWarnings seqNameCheck noSeqNameCheck selfParent dotInName fieldCountMismatch relPath missingFile one: mkout -${hubCheck} input/hub1.txt > output/output1.txt diff expected/output1.txt output/output1.txt two: mkout -${hubCheck} input/hub2.txt > output/output2.txt 2> /dev/null diff expected/output2.txt output/output2.txt supertrackChild: mkout -${hubCheck} input/supertrackChild.txt > output/supertrackChild.txt 2> /dev/null diff expected/supertrackChild.txt output/supertrackChild.txt errors: mkout -${hubCheck} input/manyErrorsHub.txt > output/manyErrors.output.txt 2>/dev/null diff expected/manyErrors.output.txt output/manyErrors.output.txt genomesErrors: mkout -${hubCheck} input/genomesConfigErrorsHub.txt > output/genomesConfigErrors.output.txt 2>/dev/null diff expected/genomesConfigErrors.output.txt output/genomesConfigErrors.output.txt badType: mkout -${hubCheck} input/badType.txt > output/badType.output.txt 2>/dev/null diff expected/badType.output.txt output/badType.output.txt badSubgroups: mkout -${hubCheck} input/badSubGroups.txt > output/badSubGroups.output.txt 2>/dev/null diff expected/badSubGroups.output.txt output/badSubGroups.output.txt autoScale: mkout -${hubCheck} input/autoScaleHub.txt > output/autoScaleHub.output.txt 2>/dev/null diff expected/autoScaleHub.txt output/autoScaleHub.output.txt noLongLabel: mkout -${hubCheck} input/noLongLabel.txt > output/noLongLabel.txt diff expected/noLongLabel.txt output/noLongLabel.txt badGroups: mkout -${hubCheck} input/badGroups.txt > output/badGroups.output.txt 2>/dev/null diff expected/badGroups.output.txt output/badGroups.output.txt goodGroups: mkout -${hubCheck} input/goodGroups.txt > output/goodGroups.output.txt diff expected/goodGroups.output.txt output/goodGroups.output.txt noCompositeGroup: mkout -${hubCheck} input/noCompositeGroup.txt > output/noCompositeGroup.output.txt 2>/dev/null diff expected/noCompositeGroup.output.txt output/noCompositeGroup.output.txt allowWarnings: mkout ${hubCheck} -allowWarnings input/supertrackChild.txt > output/allowWarnings.output.txt 2> /dev/null diff expected/allowWarnings.output.txt output/allowWarnings.output.txt seqNameCheck: mkout -${hubCheck} input/seqNameHub.txt > output/seqNameCheck.output.txt 2>/dev/null diff expected/seqNameCheck.output.txt output/seqNameCheck.output.txt noSeqNameCheck: mkout -${hubCheck} -noSeqNameCheck input/seqNameHub.txt > output/noSeqNameCheck.output.txt 2>/dev/null diff expected/noSeqNameCheck.output.txt output/noSeqNameCheck.output.txt selfParent: mkout -${hubCheck} input/selfParent.txt > output/selfParent.output.txt 2>/dev/null diff expected/selfParent.output.txt output/selfParent.output.txt dotInName: mkout -${hubCheck} input/dotInName.txt > output/dotInName.output.txt 2>/dev/null diff expected/dotInName.output.txt output/dotInName.output.txt fieldCountMismatch: mkout -cd input && ${hubCheck} fieldCountMismatch.txt > ../output/fieldCountMismatch.output.txt 2>/dev/null diff expected/fieldCountMismatch.output.txt output/fieldCountMismatch.output.txt # A hub reached by a relative path, with its data file in a subdirectory below # hub.txt. Deliberately NOT run from inside input/, because the point is to check # that the hub directory is prepended to bigDataUrl once and not twice. The # expected output is a field count mismatch, which hubCheck can only report if it # found and opened the file. relPath: mkout -${hubCheck} input/relPath/hub.txt > output/relPath.output.txt 2>/dev/null diff expected/relPath.output.txt output/relPath.output.txt +# A bigDataUrl that does not exist has to be reported. hubCheck used to prune such a +# track out of the list before it ever got checked, and then exited 0 saying nothing. +missingFile: mkout + -${hubCheck} input/relPath/missingFile.txt > output/missingFile.output.txt 2>/dev/null + diff expected/missingFile.output.txt output/missingFile.output.txt + mkout:: @mkdir -p output clean:: rm -rf output