From bc8b54dea68481cebb9e73a25f412130e5d8dd6a Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Thu, 4 Feb 2021 16:24:20 -0800 Subject: [PATCH] Update default branch name to main (#567) * Update default branch name to main * Update README.md --- .github/ISSUE_TEMPLATE/instrumentation-request.md | 2 +- .github/workflows/build_and_test.yml | 1 - CHANGELOG.md | 4 ++++ CODEOWNERS | 2 +- CONTRIBUTING.md | 4 ++-- Makefile | 4 ++-- README.md | 2 +- RELEASING.md | 2 +- exporters/metric/cortex/README.md | 4 ++-- exporters/metric/cortex/cortex.go | 2 +- exporters/metric/cortex/example/cortexConfig.yml | 2 +- .../google.golang.org/grpc/otelgrpc/interceptor.go | 2 +- instrumentation/host/doc.go | 2 +- pre_release.sh | 6 +++--- tools/should_build.sh | 4 ++-- 15 files changed, 23 insertions(+), 20 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/instrumentation-request.md b/.github/ISSUE_TEMPLATE/instrumentation-request.md index cfc6549b618..3c3c0fecc70 100644 --- a/.github/ISSUE_TEMPLATE/instrumentation-request.md +++ b/.github/ISSUE_TEMPLATE/instrumentation-request.md @@ -52,7 +52,7 @@ Instruments - [ ] Added to the [OpenTelemetry Registry](https://opentelemetry.io/registry/) - [ ] README included for the module describing high-level purpose. - [ ] Complete documentation of all public API including package documentation. - - [ ] [Instrumentation documentation](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/master/instrumentation/README.md#instrumentation-packages) updated. + - [ ] [Instrumentation documentation](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/instrumentation/README.md#instrumentation-packages) updated. - Examples - [ ] `Dockerfile` file to build example application. - [ ] `docker-compose.yml` to run example in a docker environment to demonstrate instrumentation. diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 4f67af5e939..1dfc8ef6fd1 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -2,7 +2,6 @@ name: build_and_test on: push: branches: - - master - main pull_request: env: diff --git a/CHANGELOG.md b/CHANGELOG.md index 91b685de7d9..2a9bc608c74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +### Changed + +- Rename project default branch from `master` to `main`. + ## [0.16.0] - 2021-01-13 ### Fixed diff --git a/CODEOWNERS b/CODEOWNERS index 086072cb177..6c50189a46d 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -5,7 +5,7 @@ ##################################################### # # Learn about membership in OpenTelemetry community: -# https://github.com/open-telemetry/community/blob/master/community-membership.md +# https://github.com/open-telemetry/community/blob/main/community-membership.md # # # Learn about CODEOWNERS file format: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a996779706d..95998ebc75c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -91,7 +91,7 @@ Any Maintainer can merge the PR once it is **ready to merge**. * Make sure to run `make precommit` - this will find and fix the code formatting. -* Check [opentelemetry-go Style Guide](https://github.com/open-telemetry/opentelemetry-go/blob/master/CONTRIBUTING.md#style-guide) +* Check [opentelemetry-go Style Guide](https://github.com/open-telemetry/opentelemetry-go/blob/main/CONTRIBUTING.md#style-guide) ## Adding a new Contrib package @@ -126,4 +126,4 @@ Maintainers: ### Become an Approver or a Maintainer See the [community membership document in OpenTelemetry community -repo](https://github.com/open-telemetry/community/blob/master/community-membership.md). +repo](https://github.com/open-telemetry/community/blob/main/community-membership.md). diff --git a/Makefile b/Makefile index 9f7995ba332..4ad59562cc3 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,8 @@ ALL_GO_MOD_DIRS := $(filter-out $(TOOLS_MOD_DIR), $(shell find . -type f -name ' ALL_COVERAGE_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | egrep -v '^./example|^$(TOOLS_MOD_DIR)' | sort) # URLs to check if all contrib entries exist in the registry. -REGISTRY_BASE_URL = https://raw.githubusercontent.com/open-telemetry/opentelemetry.io/master/content/en/registry -CONTRIB_REPO_URL = https://github.com/open-telemetry/opentelemetry-go-contrib/tree/master +REGISTRY_BASE_URL = https://raw.githubusercontent.com/open-telemetry/opentelemetry.io/main/content/en/registry +CONTRIB_REPO_URL = https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main # Mac OS Catalina 10.5.x doesn't support 386. Hence skip 386 test SKIP_386_TEST = false diff --git a/README.md b/README.md index e0181f66185..724fcdacafe 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OpenTelemetry-Go Contrib -[![build_and_test](https://github.com/open-telemetry/opentelemetry-go-contrib/workflows/build_and_test/badge.svg)](https://github.com/open-telemetry/opentelemetry-go-contrib/actions?query=workflow%3Abuild_and_test+branch%3Amaster) +[![build_and_test](https://github.com/open-telemetry/opentelemetry-go-contrib/workflows/build_and_test/badge.svg)](https://github.com/open-telemetry/opentelemetry-go-contrib/actions?query=workflow%3Abuild_and_test+branch%3Amain) [![Docs](https://godoc.org/go.opentelemetry.io/contrib?status.svg)](https://pkg.go.dev/go.opentelemetry.io/contrib) [![Go Report Card](https://goreportcard.com/badge/go.opentelemetry.io/contrib)](https://goreportcard.com/report/go.opentelemetry.io/contrib) [![Gitter](https://badges.gitter.im/open-telemetry/opentelemetry-go.svg)](https://gitter.im/open-telemetry/opentelemetry-go?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) diff --git a/RELEASING.md b/RELEASING.md index 54f633567b5..f7fd359c477 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -58,7 +58,7 @@ In nearly all cases, `` should be the same as 4. Push the changes to upstream. ``` - git diff master + git diff main git push ``` diff --git a/exporters/metric/cortex/README.md b/exporters/metric/cortex/README.md index 2736539a804..72bd3a4b63b 100644 --- a/exporters/metric/cortex/README.md +++ b/exporters/metric/cortex/README.md @@ -6,7 +6,7 @@ it is aimed at Cortex, it should work with other backends that ingest data with API. This exporter is push-based and integrates with the OpenTelemetry Go SDK's [push -Controller](https://github.com/open-telemetry/opentelemetry-go/blob/master/sdk/metric/controller/push/push.go). +Controller](https://github.com/open-telemetry/opentelemetry-go/blob/main/sdk/metric/controller/push/push.go). The Controller periodically collects data and passes it to this exporter. The exporter then converts this data into [`TimeSeries`](https://prometheus.io/docs/concepts/data_model/), a format that Cortex @@ -310,7 +310,7 @@ The end result is the same since the aggregations are cumulative. ## Design Document -[Design Document](https://github.com/open-o11y/docs/blob/master/go-prometheus-remote-write/design-doc.md) +[Design Document](https://github.com/open-o11y/docs/blob/main/go-prometheus-remote-write/design-doc.md) The document is not in this module as it contains large images which will increase the size of the overall repo significantly. diff --git a/exporters/metric/cortex/cortex.go b/exporters/metric/cortex/cortex.go index 22a3e5a0722..5650a11457f 100644 --- a/exporters/metric/cortex/cortex.go +++ b/exporters/metric/cortex/cortex.go @@ -132,7 +132,7 @@ func (e *Exporter) ConvertToTimeSeries(checkpointSet export.CheckpointSet) ([]*p // checked first. // // See the Aggregator Kind for more information - // https://github.com/open-telemetry/opentelemetry-go/blob/master/sdk/export/metric/aggregation/aggregation.go#L123-L138 + // https://github.com/open-telemetry/opentelemetry-go/blob/main/sdk/export/metric/aggregation/aggregation.go#L123-L138 if histogram, ok := agg.(aggregation.Histogram); ok { tSeries, err := convertFromHistogram(record, histogram) if err != nil { diff --git a/exporters/metric/cortex/example/cortexConfig.yml b/exporters/metric/cortex/example/cortexConfig.yml index dfcb8fc3f59..6aa47fa7851 100644 --- a/exporters/metric/cortex/example/cortexConfig.yml +++ b/exporters/metric/cortex/example/cortexConfig.yml @@ -1,5 +1,5 @@ # This Cortex Config is copied from the Cortex Project documentation -# Source: https://github.com/cortexproject/cortex/blob/master/docs/configuration/single-process-config.yaml +# Source: https://github.com/cortexproject/cortex/blob/main/docs/configuration/single-process-config.yaml # Configuration for running Cortex in single-process mode. # This configuration should not be used in production. diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go b/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go index 9bdbbf607e7..c62da25a13a 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go @@ -15,7 +15,7 @@ package otelgrpc // gRPC tracing middleware -// https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/rpc.md +// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/rpc.md import ( "context" "io" diff --git a/instrumentation/host/doc.go b/instrumentation/host/doc.go index 580de9baa84..dde26c27052 100644 --- a/instrumentation/host/doc.go +++ b/instrumentation/host/doc.go @@ -29,6 +29,6 @@ // system.memory.utilization state=used|available // system.network.io direction=transmit|receive // -// See https://github.com/open-telemetry/oteps/blob/master/text/0119-standard-system-metrics.md +// See https://github.com/open-telemetry/oteps/blob/main/text/0119-standard-system-metrics.md // for the definition of these metric instruments. package host // import "go.opentelemetry.io/contrib/instrumentation/host" diff --git a/pre_release.sh b/pre_release.sh index 6aaebcbb5e6..971e86b4db2 100755 --- a/pre_release.sh +++ b/pre_release.sh @@ -123,8 +123,8 @@ patch_gomods() { done } -# branch off from existing master -git checkout -b "${BRANCH_NAME}" master +# branch off from existing main +git checkout -b "${BRANCH_NAME}" main # Update go.mods if [ -n "${OTEL_TAG}" ]; then @@ -154,5 +154,5 @@ fi COMMIT_MSG+=". Prepare for releasing ${CONTRIB_TAG}" git commit -m "${COMMIT_MSG}" -printf "Now run following to verify the changes.\ngit diff master\n" +printf "Now run following to verify the changes.\ngit diff main\n" printf "\nThen push the changes to upstream\n" diff --git a/tools/should_build.sh b/tools/should_build.sh index 1dadd0df45d..2bc7b51a12c 100755 --- a/tools/should_build.sh +++ b/tools/should_build.sh @@ -18,7 +18,7 @@ # target directory. TARGET should be a unique package name in the directory # structure. For example, for the gocql integration, set TARGET=gocql so that # a diff in any of the files in the instrumentation/gocql/gocql directory -# will be picked up by the grep. Diffs are compared against the master branch. +# will be picked up by the grep. Diffs are compared against the main branch. TARGET=$1 @@ -27,7 +27,7 @@ if [ -z "$TARGET" ]; then exit 1 fi -if git diff --name-only origin/master HEAD | grep -q "$TARGET"; then +if git diff --name-only origin/main HEAD | grep -q "$TARGET"; then exit 0 else echo "no changes found for $TARGET. skipping tests..."