Opened 17 months ago

Closed 8 months ago

Last modified 8 months ago

#30899 closed enhancement (fixed)

Include the commit hash in the sbws version

Reported by: teor Owned by:
Priority: High Milestone: sbws: 1.1.x-final
Component: Core Tor/sbws Version:
Severity: Major Keywords: sbws-roadmap
Cc: juga Actual Points:
Parent ID: Points: 1
Reviewer: ahf Sponsor:

Description

When we put the sbws version in the bandwidth file, we should include the git commit hash.
That helps us tell dev versions apart.

Child Tickets

Change History (12)

comment:1 Changed 17 months ago by teor

See https://trac.torproject.org/projects/tor/ticket/30733#comment:21 for one time we wanted this feature.

comment:2 Changed 17 months ago by teor

Here's one way we could do this feature:

Add a software_commit key to the bandwidth file header.
If git is installed at runtime (or install time), make the header value "git-(commit hash)".
Here's how PrivCout does it in python:
https://github.com/privcount/privcount/blob/master/privcount/protocol.py#L33

We should also show the git commit hash when we print the sbws version in the log.

comment:3 Changed 8 months ago by teor

Milestone: sbws: 1.2.x-finalsbws: 1.1.x-final
Priority: MediumHigh
Severity: NormalMajor

We also wanted this change in this ticket:
https://trac.torproject.org/projects/tor/ticket/30733#comment:48

It's going to be hard to diagnose sbws bugs without the git commit hash, because some sbws operators upgrade sbws from source. So I'm going to suggest that we add this ticket to the roadmap.

comment:4 Changed 8 months ago by teor

Keywords: sbws-roadmap added

comment:5 Changed 8 months ago by juga

Reviewer: ahf
Status: newneeds_review

https://github.com/torproject/sbws/pull/370
(i already saw some typos after creating the PR, but well, if the code is fine i can fix them afterwards)

comment:6 Changed 8 months ago by juga

Thinking it better, i might use setuptools_scm or just my own function cause this already created some confusion.

comment:7 Changed 8 months ago by teor

I think the PEP440 format is great. It's really useful to be able to work out which sbws versions are earlier or later, even when you only have a commit hash.

But I don't mind how it's implemented.

comment:8 Changed 8 months ago by ahf

Status: needs_reviewneeds_information

I think overall this looks good, but I added two questions in there :-)

comment:9 Changed 8 months ago by juga

i replied to the questions and added documentation

comment:10 Changed 8 months ago by ahf

Status: needs_informationmerge_ready

Looks good!

comment:11 Changed 8 months ago by juga

Resolution: fixed
Status: merge_readyclosed

Merged

comment:12 Changed 8 months ago by teor

Thanks for this change, it's really helpful for diagnosing issues. Great work!

Note: See TracTickets for help on using tickets.