google / gvisor

Application Kernel for Containers

Home Page:https://gvisor.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nightly releases surface misleading version information

markusthoemmes opened this issue · comments

Description

I wanted to confirm that the nightly from last night (2024-02-21) contains a certain commit, and so I checked it's version information:

root@2d2c77e56b88:/# curl -fLo ./runsc https://storage.googleapis.com/gvisor/releases/nightly/2024-02-21/x86_64/runsc
root@2d2c77e56b88:/# chmod +x runsc
root@2d2c77e56b88:/# ./runsc --version
runsc version release-20240212.0-20-gbfd27a1e43cb
spec: 1.1.0-rc.1

Unexpectedly, the date says 2024-02-12 and what looks like a commit SHA doesn't seem to correspond with anything in the repo.

To look for a pattern, I did the same with the 2024-02-20 nightly with similarly unexpected results.

root@2d2c77e56b88:/# curl -fLo ./runsc https://storage.googleapis.com/gvisor/releases/nightly/2024-02-20/x86_64/runsc
root@2d2c77e56b88:/# chmod +x runsc
root@2d2c77e56b88:/# ./runsc --version
runsc version release-20240212.0-17-g53d2b511e78e
spec: 1.1.0-rc.1

Could you shed some light into this? Is there a way to correlate nightlies with the state they're supposed to represent?

Steps to reproduce

No response

runsc version

No response

docker version (if using docker)

No response

uname

No response

kubectl (if using Kubernetes)

No response

repo state (if built from source)

No response

runsc debug logs (if available)

No response

While we're on this specific version too, it'd be neat if you could confirm that 2024-02-21 contains bfd27a1 😅

It contains this commit:

$ git show release-20240212.0-20-gbfd27a1e43cb | head
commit bfd27a1e43cbcf7155638539f1fd7a309eb76df1
Author: Andrei Vagin
Date:   Tue Feb 20 11:31:39 2024 -0800

    systrap: track the spinning queue length in a separate counter
    
    The current implementation has a race condition resulting in the skipping of
    one element in the queue array. When retrieving objects from the queue, the
    stub code can get stuck in an infinite loop due to unexpected unused elements.

We generate that version string using this genrule. The STABLE_VERSION string is generated here using git describe.

git describe "finds the most recent tag that is reachable from a commit. If the tag points to the commit, then only the tag is shown. Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object and the abbreviated object name of the most recent commit." Further it also suffixes "-g" + the latest commit SHA.

So release-20240212.0-20-gbfd27a1e43cb stands for 20 commits on top of the release-20240212.0 tag. And the latest commit SHA is bfd27a1e43cb (note you have to remove the g, which stands for "git").

Thanks for the quick response, that was super helpful!