diff --git a/.circleci/config.yml b/.circleci/config.yml index 552fa884c..9e40ef36e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 orbs: - prometheus: prometheus/prometheus@0.4.0 + prometheus: prometheus/prometheus@0.9.0 go: circleci/go@0.2.0 win: circleci/windows@2.3.0 @@ -124,14 +124,14 @@ workflows: filters: tags: only: /.*/ - - prometheus/publish_master: + - prometheus/publish_main: context: org-context requires: - test - build filters: branches: - only: master + only: main image: circleci/golang:1-node - prometheus/publish_release: context: org-context @@ -151,7 +151,7 @@ workflows: filters: branches: only: - - master + - main jobs: - repo_sync: context: org-context diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1bb056905..3f1337d92 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,10 +13,10 @@ name: "CodeQL" on: push: - branches: [ master, release-* ] + branches: [ main, release-* ] pull_request: # The branches below must be a subset of the branches above - branches: [ master ] + branches: [ main ] schedule: - cron: '26 14 * * 1' diff --git a/NOTICE b/NOTICE index 5e4f50989..7c0e4c102 100644 --- a/NOTICE +++ b/NOTICE @@ -92,7 +92,7 @@ Copyright (c) 2015,2016 Damian Gryski See https://github.com/dgryski/go-tsz/blob/master/LICENSE for license details. We also use code from a large number of npm packages. For details, see: -- https://github.com/prometheus/prometheus/blob/master/web/ui/react-app/package.json -- https://github.com/prometheus/prometheus/blob/master/web/ui/react-app/package-lock.json +- https://github.com/prometheus/prometheus/blob/main/web/ui/react-app/package.json +- https://github.com/prometheus/prometheus/blob/main/web/ui/react-app/package-lock.json - The individual package licenses as copied from the node_modules directory can be found in the npm_licenses.tar.bz2 archive in release tarballs and Docker images. diff --git a/README.md b/README.md index c84dffb7b..309050296 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Prometheus -[![CircleCI](https://circleci.com/gh/prometheus/prometheus/tree/master.svg?style=shield)][circleci] +[![CircleCI](https://circleci.com/gh/prometheus/prometheus/tree/main.svg?style=shield)][circleci] [![Docker Repository on Quay](https://quay.io/repository/prometheus/prometheus/status)][quay] [![Docker Pulls](https://img.shields.io/docker/pulls/prom/prometheus.svg?maxAge=604800)][hub] [![Go Report Card](https://goreportcard.com/badge/github.com/prometheus/prometheus)](https://goreportcard.com/report/github.com/prometheus/prometheus) @@ -72,7 +72,7 @@ read its web assets from local filesystem directories under `web/ui/static` and from the root of the cloned repository. Note also that these directories do not include the new experimental React UI unless it has been built explicitly using `make assets` or `make build`. -An example of the above configuration file can be found [here.](https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus.yml) +An example of the above configuration file can be found [here.](https://github.com/prometheus/prometheus/blob/main/documentation/examples/prometheus.yml) You can also clone the repository yourself and build using `make build`, which will compile in the web assets so that Prometheus can be run from anywhere: @@ -106,7 +106,7 @@ You can build a docker image locally with the following commands: ## React UI Development -For more information on building, running, and developing on the new React-based UI, see the React app's [README.md](https://github.com/prometheus/prometheus/blob/master/web/ui/react-app/README.md). +For more information on building, running, and developing on the new React-based UI, see the React app's [README.md](web/ui/react-app/README.md). ## More information @@ -116,11 +116,11 @@ For more information on building, running, and developing on the new React-based ## Contributing -Refer to [CONTRIBUTING.md](https://github.com/prometheus/prometheus/blob/master/CONTRIBUTING.md) +Refer to [CONTRIBUTING.md](https://github.com/prometheus/prometheus/blob/main/CONTRIBUTING.md) ## License -Apache License 2.0, see [LICENSE](https://github.com/prometheus/prometheus/blob/master/LICENSE). +Apache License 2.0, see [LICENSE](https://github.com/prometheus/prometheus/blob/main/LICENSE). [hub]: https://hub.docker.com/r/prom/prometheus/ diff --git a/RELEASE.md b/RELEASE.md index fb53c6ead..cf0f7340a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -39,7 +39,7 @@ If you are interested in volunteering please create a pull request against the [ The release shepherd is responsible for the entire release series of a minor release, meaning all pre- and patch releases of a minor release. The process formally starts with the initial pre-release, but some preparations should be done a few days in advance. -* We aim to keep the master branch in a working state at all times. In principle, it should be possible to cut a release from master at any time. In practice, things might not work out as nicely. A few days before the pre-release is scheduled, the shepherd should check the state of master. Following their best judgement, the shepherd should try to expedite bug fixes that are still in progress but should make it into the release. On the other hand, the shepherd may hold back merging last-minute invasive and risky changes that are better suited for the next minor release. +* We aim to keep the main branch in a working state at all times. In principle, it should be possible to cut a release from main at any time. In practice, things might not work out as nicely. A few days before the pre-release is scheduled, the shepherd should check the state of main. Following their best judgement, the shepherd should try to expedite bug fixes that are still in progress but should make it into the release. On the other hand, the shepherd may hold back merging last-minute invasive and risky changes that are better suited for the next minor release. * On the date listed in the table above, the release shepherd cuts the first pre-release (using the suffix `-rc.0`) and creates a new branch called `release-.` starting at the commit tagged for the pre-release. In general, a pre-release is considered a release candidate (that's what `rc` stands for) and should therefore not contain any known bugs that are planned to be fixed in the final release. * With the pre-release, the release shepherd is responsible for running and monitoring a benchmark run of the pre-release for 3 days, after which, if successful, the pre-release is promoted to a stable release. * If regressions or critical bugs are detected, they need to get fixed before cutting a new pre-release (called `-rc.1`, `-rc.2`, etc.). @@ -58,9 +58,9 @@ We maintain a separate branch for each minor release, named `release-..` branch. Do not create `release-` for patch or release candidate releases. +At the start of a new major or minor release cycle create the corresponding release branch based on the main branch. For example if we're releasing `2.17.0` and the previous stable release is `2.16.0` we need to create a `release-2.17` branch. Note that all releases are handled in protected release branches, see the above `Branch management and versioning` section. Release candidates and patch releases for any given major or minor release happen in the same `release-.` branch. Do not create `release-` for patch or release candidate releases. Changes for a patch release or release candidate should be merged into the previously mentioned release branch via pull request. @@ -154,6 +154,6 @@ Finally, wait for the build step for the tag to finish. The point here is to wai For release candidate versions (`v2.16.0-rc.0`), run the benchmark for 3 days using the `/prombench vX.Y.Z` command, `vX.Y.Z` being the latest stable patch release's tag of the previous minor release series, such as `v2.15.2`. -If the release has happened in the latest release branch, merge the changes into master. +If the release has happened in the latest release branch, merge the changes into main. Once the binaries have been uploaded, announce the release on `prometheus-announce@googlegroups.com`. (Please do not use `prometheus-users@googlegroups.com` for announcements anymore.) Check out previous announcement mails for inspiration. diff --git a/docs/disabled_features.md b/docs/disabled_features.md index ec6363451..431d7b536 100644 --- a/docs/disabled_features.md +++ b/docs/disabled_features.md @@ -6,7 +6,7 @@ sort_rank: 10 # Disabled Features Here is a list of features that are disabled by default since they are breaking changes or are considered experimental. -Their behaviour can change in future releases which will be communicated via the [release changelog](https://github.com/prometheus/prometheus/blob/master/CHANGELOG.md). +Their behaviour can change in future releases which will be communicated via the [release changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md). You can enable them using the `--enable-feature` flag with a comma separated list of features. They may be enabled by default in future versions. diff --git a/docs/storage.md b/docs/storage.md index 6e395724e..bc989b158 100644 --- a/docs/storage.md +++ b/docs/storage.md @@ -125,7 +125,7 @@ For details on configuring remote storage integrations in Prometheus, see the [r The built-in remote write receiver can be enabled by setting the `--enable-feature=remote-write-receiver` command line flag. When enabled, the remote write receiver endpoint is `/api/v1/write`. -For details on the request and response messages, see the [remote storage protocol buffer definitions](https://github.com/prometheus/prometheus/blob/master/prompb/remote.proto). +For details on the request and response messages, see the [remote storage protocol buffer definitions](https://github.com/prometheus/prometheus/blob/main/prompb/remote.proto). Note that on the read path, Prometheus only fetches raw series data for a set of label selectors and time ranges from the remote end. All PromQL evaluation on the raw data still happens in Prometheus itself. This means that remote read queries have some scalability limit, since all necessary data needs to be loaded into the querying Prometheus server first and then processed there. However, supporting fully distributed evaluation of PromQL was deemed infeasible for the time being. diff --git a/documentation/internal_architecture.md b/documentation/internal_architecture.md index d14f65b9b..1bbd8931a 100644 --- a/documentation/internal_architecture.md +++ b/documentation/internal_architecture.md @@ -44,7 +44,7 @@ Internally, the scrape discovery manager runs an instance of each configuration- When a configuration change is applied, the discovery manager stops all currently running discovery mechanisms and restarts new ones as defined in the new configuration file. -For more details, see the more extensive [documentation about service discovery internals](https://github.com/prometheus/prometheus/blob/master/discovery/README.md). +For more details, see the more extensive [documentation about service discovery internals](https://github.com/prometheus/prometheus/blob/main/discovery/README.md). ## Scrape manager @@ -93,7 +93,7 @@ Currently rules still read and write directly from/to the fanout storage, but th ### Local storage -About Prometheus's local on-disk time series database, please refer to [`github.com/prometheus/prometheus/tsdb.DB`](https://github.com/prometheus/prometheus/blob/master/tsdb/db.go). You can find more details about the TSDB's on-disk layout in the [local storage documentation](https://prometheus.io/docs/prometheus/latest/storage/). +About Prometheus's local on-disk time series database, please refer to [`github.com/prometheus/prometheus/tsdb.DB`](https://github.com/prometheus/prometheus/blob/main/tsdb/db.go). You can find more details about the TSDB's on-disk layout in the [local storage documentation](https://prometheus.io/docs/prometheus/latest/storage/). ### Remote storage diff --git a/scripts/sync_repo_files.sh b/scripts/sync_repo_files.sh index 64af78b12..e48084856 100755 --- a/scripts/sync_repo_files.sh +++ b/scripts/sync_repo_files.sh @@ -30,6 +30,11 @@ source_dir="$(pwd)" tmp_dir="$(mktemp -d)" trap 'rm -rf "${tmp_dir}"' EXIT +get_default_branch(){ + local url="https://api.github.com/repos/${1}" + curl --retry 5 --silent -u "${git_user}:${GITHUB_TOKEN}" "${url}" 2>/dev/null | jq -r .default_branch +} + fetch_repos() { local url="https://api.github.com/users/${1}/repos?per_page=100" curl --retry 5 --silent -u "${git_user}:${GITHUB_TOKEN}" "${url}" 2>/dev/null | @@ -47,9 +52,9 @@ push_branch() { --set-upstream "${branch}" 1>/dev/null 2>&1 } -post_template='{"title":"%s","base":"master","head":"%s","body":"%s"}' -post_json="$(printf "${post_template}" "${pr_title}" "${branch}" "${pr_msg}")" post_pull_request() { + post_template='{"title":"%s","base":"%s","head":"%s","body":"%s"}' + post_json="$(printf "${post_template}" "${pr_title}" "${2}" "${branch}" "${pr_msg}")" curl --show-error --silent --fail \ -u "${git_user}:${GITHUB_TOKEN}" \ -d "${post_json}" \ @@ -65,11 +70,17 @@ process_repo() { local org_repo="$1" echo -e "\e[32mAnalyzing '${org_repo}'\e[0m" + default_branch="$(get_default_branch ${1})" + if [[ -z "${target_file}" ]]; then + echo "Can't get the default branch." + return + fi + local needs_update=() for source_file in ${SYNC_FILES}; do source_checksum="$(sha256sum "${source_dir}/${source_file}" | cut -d' ' -f1)" - target_file="$(curl -s --fail "https://raw.githubusercontent.com/${org_repo}/master/${source_file}")" + target_file="$(curl -s --fail "https://raw.githubusercontent.com/${org_repo}/${default_branch}/${source_file}")" if [[ "${source_file}" == 'LICENSE' ]] && ! check_license "${target_file}" ; then echo "LICENSE in ${org_repo} is not apache, skipping." continue @@ -113,7 +124,7 @@ process_repo() { git add . git commit -s -m "${commit_msg}" if push_branch "${org_repo}"; then - post_pull_request "${org_repo}" + post_pull_request "${org_repo}" "${default_branch}" fi fi } diff --git a/tsdb/CHANGELOG.md b/tsdb/CHANGELOG.md index 66d07bf3c..71a67d3b1 100644 --- a/tsdb/CHANGELOG.md +++ b/tsdb/CHANGELOG.md @@ -1,5 +1,3 @@ -## master / unreleased - ## 0.10.0 - [FEATURE] Added `DBReadOnly` to allow opening a database in read only mode.