mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
Rename default branch to main
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
parent
8c8de46003
commit
432d5ebc6c
|
@ -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
|
||||
|
|
4
.github/workflows/codeql-analysis.yml
vendored
4
.github/workflows/codeql-analysis.yml
vendored
|
@ -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'
|
||||
|
||||
|
|
4
NOTICE
4
NOTICE
|
@ -92,7 +92,7 @@ Copyright (c) 2015,2016 Damian Gryski <damian@gryski.com>
|
|||
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.
|
||||
|
|
10
README.md
10
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/
|
||||
|
|
12
RELEASE.md
12
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-<major>.<minor>` 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-<major>.<mi
|
|||
|
||||
Note that branch protection kicks in automatically for any branches whose name starts with `release-`. Never use names starting with `release-` for branches that are not release branches.
|
||||
|
||||
The usual flow is to merge new features and changes into the master branch and to merge bug fixes into the latest release branch. Bug fixes are then merged into master from the latest release branch. The master branch should always contain all commits from the latest release branch. As long as master hasn't deviated from the release branch, new commits can also go to master, followed by merging master back into the release branch.
|
||||
The usual flow is to merge new features and changes into the main branch and to merge bug fixes into the latest release branch. Bug fixes are then merged into main from the latest release branch. The main branch should always contain all commits from the latest release branch. As long as main hasn't deviated from the release branch, new commits can also go to main, followed by merging main back into the release branch.
|
||||
|
||||
If a bug fix got accidentally merged into master after non-bug-fix changes in master, the bug-fix commits have to be cherry-picked into the release branch, which then have to be merged back into master. Try to avoid that situation.
|
||||
If a bug fix got accidentally merged into main after non-bug-fix changes in main, the bug-fix commits have to be cherry-picked into the release branch, which then have to be merged back into main. Try to avoid that situation.
|
||||
|
||||
Maintaining the release branches for older minor releases happens on a best effort basis.
|
||||
|
||||
|
@ -68,7 +68,7 @@ Maintaining the release branches for older minor releases happens on a best effo
|
|||
|
||||
A few days before a major or minor release, consider updating the dependencies.
|
||||
|
||||
Then create a pull request against the master branch.
|
||||
Then create a pull request against the main branch.
|
||||
|
||||
Note that after a dependency update, you should look out for any weirdness that
|
||||
might have happened. Such weirdnesses include but are not limited to: flaky
|
||||
|
@ -107,7 +107,7 @@ git add package.json yarn.lock
|
|||
|
||||
### 1. Prepare your release
|
||||
|
||||
At the start of a new major or minor release cycle create the corresponding release branch based on the master 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-<major>.<minor>` branch. Do not create `release-<version>` 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-<major>.<minor>` branch. Do not create `release-<version>` 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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
## master / unreleased
|
||||
|
||||
## 0.10.0
|
||||
|
||||
- [FEATURE] Added `DBReadOnly` to allow opening a database in read only mode.
|
||||
|
|
Loading…
Reference in a new issue