Closed Bug 1234890 Opened 10 years ago Closed 10 years ago

taskcluster-proxy should make its version obvious

Categories

(Taskcluster :: Workers, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dustin, Assigned: pmoore)

References

Details

Attachments

(2 external files)

dustin@dustin-tc-devel ~ $ docker run -ti --rm taskcluster/taskcluster-proxy --help Taskcluster authentication proxy. By default this pulls all scopes from a particular task but additional scopes may be added by specifying them after the task id. Usage: ./proxy [options] <taskId> [<scope>...] ./proxy --help Options: -h --help Show this help screen. -p --port <port> Port to bind the proxy server to [default: 8080]. --client-id <clientId> Use a specific auth.taskcluster hawk client id [default: ]. --access-token <accessToken> Use a specific auth.taskcluster hawk access token. [default: ] ..no version information.. Once we've done that, make sure that :latest always matches the latest tag.
Would also be nice if it added a tc-proxy version header in the returned http response headers.
Note, this is just for adding a http response header with the taskcluster proxy version number, it doesn't show the version number in the help text.
Attachment #8702619 - Flags: review?(dustin)
Note, the --version option already existed, but it wasn't documented. Therefore this is just a documentation fix.
Assignee: nobody → pmoore
Status: NEW → ASSIGNED
Attachment #8702621 - Flags: review?(dustin)
Attachment #8702619 - Flags: review?(dustin) → review+
Attachment #8702621 - Flags: review?(dustin) → review+
What do you think about setting the version with the -X option to the go linker? https://golang.org/cmd/link/
Is the idea that we'd pass through this property in a release script, e.g. so we'd do something like `git tag | <some sort operation> | head -1` to get the version, and then pass this into the linker? I think if we want to not have the version hard coded in the source code (which does seem kinda dodgy) we could use `go generate` to generate the version number in the source code from some other data source, to "burn it in" to the executable. This has the advantage that the version is also tracked in the source code rather than just in the binary during linking. I certainly like the idea that the process of setting version is as automatic as possible, and that we don't have to manually ensure that the latest version on any docker registry matches the git tag and also the version number in the source code...
You use 'git describe' to get the tag info (and probably fail if the current rev isn't a tag), then, yes, put that in a release script. You don't really want to put version numbers in the source, since then you're left making a commit and not just a tag for each release.
(In reply to Dustin J. Mitchell [:dustin] from comment #6) > You use 'git describe' to get the tag info (and probably fail if the current > rev isn't a tag), then, yes, put that in a release script. > > You don't really want to put version numbers in the source, since then > you're left making a commit and not just a tag for each release. It is a neat idea, could you raise a separate bug for it? I'll close this one as we now have the version via command line and in response headers.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
See Also: → 1204891
Whoops, wrong bug! :)
See Also: 1204891 → 1248578
Component: Docker-Worker → Workers
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: