From 9171287df02f79e4e5f2a5ac65ae62928a1c9e62 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Tue, 6 Sep 2022 15:11:46 -0400 Subject: [PATCH] vcs-test/vcweb: add a reminder to delete vcs-test when no longer needed After CL 427914 is merged, the tests for cmd/go will no longer depend on the server hosted at vcs-test.golang.org. The release branch for Go 1.19 will continue to need that server until Go 1.19 is no longer supported, but after that point the server can be permanently turned down and its code deleted. The test in this CL will remind us to do that deletion by failing on the -longtest builders when the Go version in the main repo is updated for the Go 1.22 development cycle. The Go 1.22 cycle will begin after Go 1.21 is released, and (assuming our current release policy remains in effect) that coincides with the end of support for Go 1.19. Updates golang/go#27494. Change-Id: I1e98b88060e303ae75e2f3fb86d6f34bd7765326 Reviewed-on: https://go-review.googlesource.com/c/build/+/428835 Reviewed-by: Heschi Kreinick Auto-Submit: Bryan Mills Run-TryBot: Bryan Mills TryBot-Result: Gopher Robot --- vcs-test/vcweb/deathclock_go121_test.go | 13 ++++++++++++ vcs-test/vcweb/deathclock_test.go | 27 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 vcs-test/vcweb/deathclock_go121_test.go create mode 100644 vcs-test/vcweb/deathclock_test.go diff --git a/vcs-test/vcweb/deathclock_go121_test.go b/vcs-test/vcweb/deathclock_go121_test.go new file mode 100644 index 00000000..5ab45c86 --- /dev/null +++ b/vcs-test/vcweb/deathclock_go121_test.go @@ -0,0 +1,13 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build go1.22 + +package main_test + +func init() { + // When development begins for the Go 1.22 cycle, the supported Go + // releases will be Go 1.20 and 1.21. + go119Unsupported = true +} diff --git a/vcs-test/vcweb/deathclock_test.go b/vcs-test/vcweb/deathclock_test.go new file mode 100644 index 00000000..ab833c19 --- /dev/null +++ b/vcs-test/vcweb/deathclock_test.go @@ -0,0 +1,27 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main_test + +import "testing" + +var go119Unsupported = false + +var turndownMsg = ` +Since Go 1.19 is not longer supported, vcs-test.golang.org is no +longer needed for testing any release branch and should be turned +down, and x/build/vcs-test/... should be deleted. +(See https://go.dev/issue/27494.)` + +func TestTurnDownVCSTest(t *testing.T) { + if !go119Unsupported { + return + } + + if testing.Short() { + t.Log(turndownMsg) + } else { + t.Fatal(turndownMsg) + } +}