Skip to content

Commit

Permalink
build: address util.log.logcrash package rename
Browse files Browse the repository at this point in the history
After `util.log` was renamed to `util.log.logcrash`, the build system
stopped updating the Sentry environment variable properly. Instead of
setting it to the release version, it was falling back to the default
"development" value. As a result, all Sentry reports went to the
development environment bucket.

This patch addresses the name change.

Release note: None
  • Loading branch information
rail committed Feb 2, 2022
1 parent 39ca6ac commit 235f9d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ $(go-targets): override LINKFLAGS += \
-X "github.com/cockroachdb/cockroach/pkg/build.rev=$(shell cat .buildinfo/rev)" \
-X "github.com/cockroachdb/cockroach/pkg/build.cgoTargetTriple=$(TARGET_TRIPLE)" \
$(if $(BUILDCHANNEL),-X "github.com/cockroachdb/cockroach/pkg/build.channel=$(BUILDCHANNEL)") \
$(if $(BUILD_TAGGED_RELEASE),-X "github.com/cockroachdb/cockroach/pkg/util/log.crashReportEnv=$(if $(BUILDINFO_TAG),$(BUILDINFO_TAG),$(shell cat .buildinfo/tag))")
$(if $(BUILD_TAGGED_RELEASE),-X "github.com/cockroachdb/cockroach/pkg/util/log/logcrash.crashReportEnv=$(if $(BUILDINFO_TAG),$(BUILDINFO_TAG),$(shell cat .buildinfo/tag))")

# The build.utcTime format must remain in sync with TimeFormat in
# pkg/build/info.go. It is not installed in tests or in `buildshort` to avoid
Expand Down
2 changes: 1 addition & 1 deletion build/bazelutil/stamp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fi

# TODO(ricky): Also provide a way to stamp the following variables:
# - github.com/cockroachdb/cockroach/pkg/build.channel
# - github.com/cockroachdb/cockroach/pkg/util/log.crashReportEnv
# - github.com/cockroachdb/cockroach/pkg/util/log/logcrash.crashReportEnv

# Variables beginning with "STABLE" will be written to stable-status.txt, and
# others will be written to volatile-status.txt.
Expand Down

0 comments on commit 235f9d0

Please sign in to comment.