Opened 2 months ago

Last modified 4 days ago

#29792 new defect

practracker problems and CI broken on master

Reported by: asn Owned by:
Priority: High Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: practracker tech-debt tor-ci
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor: Sponsor31-can


CI is broken on master because of the following practracker issues:

python3 ./scripts/maint/practracker/ .
problem function-size /src/feature/nodelist/nodelist.c:compute_frac_paths_available() 193
problem file-size /src/core/or/circuituse.c 3150

These were caused by #28656 and #29665.
They were not detected during the PR-check phase, because the PR was for 035 and 040 which dont include the practracker check. How should we avoid this issue in the future?

Child Tickets

#29880newWrite a script to update practracker on multiple branchesCore Tor/Tor
#29881newCreate a GitHub bot that makes sure there is a pull request on master for every branchCore Tor/Tor
#30033closedThe pre-push hook should call the pre-commit hook on the final pushed commitCore Tor/Tor
#30050newDisable practracker in CI, when a release becomes a release candidateCore Tor/Tor
#30051closedrl1987Add practracker as a pre-commit and pre-push git hook for frequent codersCore Tor/Tor

Change History (8)

comment:1 Changed 2 months ago by asn

Keywords: tor-ci added

comment:2 Changed 2 months ago by asn

Status: newneeds_review

Fix for the issues can be found here:

We should also figure out what to do about the greater problem mentioned in the top post, otherwise this is gonna come up again and again.

comment:3 Changed 2 months ago by nickm

I've merged the PR, but we should still think about good solutions here.

comment:4 Changed 2 months ago by asn

Status: needs_reviewnew

Potential solutions to the issue where practracker can break master, when we merge-forward bad commits from earlier releases (and the PR was on those earlier releases which don't contain practracker):

a) Add inline comments to denote practracker exceptions. Negative: Ugly.
b) Add practracker to all the active releases. Negative: This will still not solve the problem, since we would need to open PRs for all releases everytime we merge-forward to somewhere.
c) Add practracker as a post-commit git hook. Negative: Might be annoying. Not all volunteers will know about that thing.
d) Disable practracker in CI. Negative: We lose all the positive aspects of practracker that will probably be ignored.

comment:5 Changed 2 months ago by catalyst

Maybe if we can get metric diffs from practracker, we can see if an increase in badness exceeds some threshold before failing the build? and use the GitHub APIs to post a comment otherwise? (like Coveralls does)

comment:6 in reply to:  4 Changed 2 months ago by teor

Here's my suggested combination of fixes:

e) Disable practracker in CI, when a release becomes a release candidate:

  • we get practracker on master, where it is most useful
  • we keep practracker in alphas, where we still get some large code changes
  • we don't have to worry about practracker for backports:
    • we rely on the existing backport triage process to maintain code quality in backport branches
    • we don't need practracker for backport branches, because we (usually) don't make large changes to backport branches

f) Add practracker as a post-commit git hook for frequent coders

  • it might still be annoying, but it's less annoying than having CI fail
  • we can fix issues for infrequent coders at the CI or merge stage
  • reviewers can see the practracker diff and decide if it's reasonable

g) Add practracker as a pre-push git hook for merges

  • all mergers know about practracker anyway
  • it might still be annoying, but it's less annoying than having CI fail
  • we can fix practracker issues at merge time, in a separate commit, without another review

h) Add a "tolerance" argument to practracker, which makes it create an exceptions file with N% higher allowances

  • at the start of every new release, regenerate the file with a 10% tolerance
  • it would be nicer if we could review practice violations on a commit-by-commit basis

comment:7 Changed 7 weeks ago by teor

I opened child tickets for e) and f).
f) and #30033 will give us g).
I don't like h) any more.

comment:8 Changed 4 days ago by teor

Sponsor: Sponsor31-can
Note: See TracTickets for help on using tickets.