Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go/internal/vcweb/vcstest: TestScripts/bzr failure with Unable to determine your name #62620

Closed
lacombar opened this issue Sep 13, 2023 · 5 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@lacombar
Copy link
Contributor

lacombar commented Sep 13, 2023

What version of Go are you using (go version)?

go version go1.18.2 linux/amd64 building v1.21.1

Does this issue reproduce with the latest release?

this is the latest release

What operating system and processor architecture are you using (go env)?

go env Output
% go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE=
GOENV=
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE=
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH=
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/al/opt/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR=
GOVCS=""
GOVERSION="go1.18.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build4266833550=/tmp/go-build -gno-record-gcc-switches"

What did you do?

build v1.21.1 via src/all.bash

What did you expect to see?

ok cmd/go/internal/vcweb/vcstest

What did you see instead?

2023/09/13 13:13:05 serving /
2023/09/13 13:13:07 serving /
--- FAIL: TestScripts (0.04s)
    --- FAIL: TestScripts/bzr/hello.txt (2.22s)
        vcstest_test.go:155: 2023/09/13 13:13:07 hello.txt:
            > handle bzr
            > env BZR_EMAIL='Russ Cox <rsc@google.com>'
            > bzr init-repo .
            [stdout]
            Shared repository with trees (format: 2a)
            Location:
              shared repository: .
            > bzr init b
            [stdout]
            Created a repository tree (format: 2a)
            Using shared repository: /tmp/TestScripts3796191388/001/bzr/hello/
            > cd b
            > cp ../hello.go .
            > bzr add hello.go
            [stdout]
            adding hello.go
            > bzr commit --commit-time='2017-09-21 21:20:12 -0400' -m 'hello world'
            [stderr]
            brz: ERROR: Unable to determine your name.
            Please, set your name with the 'whoami' command.
            E.g. brz whoami "Your Name <name@example.com>"


        vcstest_test.go:161: hello.txt:11: bzr commit '--commit-time=2017-09-21 21:20:12 -0400' -m 'hello world': exit status 3
FAIL
FAIL    cmd/go/internal/vcweb/vcstest   2.516s
@lacombar lacombar changed the title affected/package: cmd/go/internal/vcweb/vcstest test failure Sep 13, 2023
@bcmills bcmills self-assigned this Sep 13, 2023
@bcmills bcmills added Testing An issue that has been verified to require only test changes, not just a test failure. NeedsFix The path to resolution is known, but the work has not been done. labels Sep 13, 2023
@bcmills bcmills added this to the Go1.22 milestone Sep 13, 2023
@bcmills bcmills modified the milestones: Go1.22, Backlog Sep 14, 2023
@bcmills bcmills removed their assignment Sep 14, 2023
@bcmills
Copy link
Contributor

bcmills commented Sep 14, 2023

@lacombar, we need more detail in order to reproduce this.

The BZR_EMAIL environment variable in the test is supposed to prevent exactly this failure mode:
https://github.com/breezy-team/breezy/blob/9d812602812df574beb63ee13005f56f600aecb8/breezy/config.py#L544-L560

It isn't clear to me why that isn't having the intended effect for you. What version of the bzr command are you using? What relevant configuration do you have on your machine and/or in your environment?

@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Sep 14, 2023
@gopherbot gopherbot removed the NeedsFix The path to resolution is known, but the work has not been done. label Sep 14, 2023
@bcmills bcmills changed the title cmd/go/internal/vcweb/vcstest test failure cmd/go/internal/vcweb/vcstest: TestScripts/bzr failure with Unable to determine your name Sep 14, 2023
@lacombar
Copy link
Contributor Author

lacombar commented Sep 14, 2023

This is stock bzr from Ubuntu 2020 LTS

% lsb_release -a 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

% bzr --version                                            
Breezy (brz) 3.0.2
  Python interpreter: /usr/bin/python3 3.8.10
  Python standard library: /usr/lib/python3.8
  Platform: Linux-5.15.5-76051505-generic-x86_64-with-glibc2.29
  breezy: /usr/lib/python3/dist-packages/breezy
  Breezy configuration: /home/al/.config/breezy
  Breezy log file: <redacted>

Copyright 2005-2012 Canonical Ltd.
https://www.breezy-vcs.org/

brz comes with ABSOLUTELY NO WARRANTY.  brz is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.```

@lacombar
Copy link
Contributor Author

d1c783e fixes the issue locally. Do you want me to open a PR ?

@bcmills
Copy link
Contributor

bcmills commented Sep 14, 2023

FWIW, it looks like this was fixed in brz in their 3.1.0 release:
breezy-team/breezy@3014386

So you could also consider upgrading to that. (But setting EMAIL seems fine too.) You're welcome to open a PR.

@gopherbot
Copy link

Change https://go.dev/cl/528437 mentions this issue: testdata/vcstest/bzr: fix unit test with Ubuntu 2020 LTS bzr 3.0.2

@bcmills bcmills removed the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Sep 15, 2023
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Sep 15, 2023
@dmitshur dmitshur modified the milestones: Backlog, Go1.22 Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
4 participants