From 5c611ad90b553bc73d47c00bd920c30a0c1c8239 Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 7 Dec 2022 11:33:02 +0100 Subject: [PATCH] prepare to rename default branch to main --- .github/workflows/cd.yml | 16 +++++++-------- .github/workflows/watch-dependencies.yaml | 24 +++++++++++----------- README.md | 2 +- docs/source/analytics/events-archive.rst | 14 ++++++------- docs/source/components/cloud.md | 2 +- docs/source/components/ingress.md | 6 +++--- docs/source/components/metrics.md | 6 +++--- docs/source/conf.py | 2 +- docs/source/deployment/how.md | 12 +++++------ docs/source/deployment/what.md | 2 +- docs/source/operation_guide/federation.rst | 2 +- images/analytics-publisher/index.html | 2 +- scripts/list_new_commits.py | 12 +++++------ scripts/load-test.py | 6 +++--- 14 files changed, 54 insertions(+), 54 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 7ecaa28c0..d73fb427f 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -12,12 +12,12 @@ name: Continuous Deployment # ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency concurrency: deploy -# Only trigger the workflow when pushing to master or a label is applied to a +# Only trigger the workflow when pushing to main or a label is applied to a # Pull Request on: push: branches: - - master + - main - test-this-pr/** pull_request: types: [labeled] @@ -63,10 +63,10 @@ jobs: # images that the jobs to deploy to the production environments depend on. staging-deploy: # Only run the job if the 'test-staging' label is present OR if the event - # is a push to master + # is a push to main if: | (github.event.label.name == 'test-staging') || - ((github.event_name == 'push') && (github.ref == 'refs/heads/master')) || + ((github.event_name == 'push') && (github.ref == 'refs/heads/main')) || ((github.event_name == 'push') && contains(github.ref, 'test-this-pr')) runs-on: ubuntu-20.04 # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-preventing-a-specific-failing-matrix-job-from-failing-a-workflow-run @@ -144,7 +144,7 @@ jobs: - name: "Stage 1: Install and setup helm ${{ env.HELM_VERSION }}" run: | - curl -sf https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | DESIRED_VERSION=${HELM_VERSION} bash + curl -sf https://raw.githubusercontent.com/helm/helm/HEAD/scripts/get-helm-3 | DESIRED_VERSION=${HELM_VERSION} bash helm dependency update ./mybinder # Action Repo: https://github.com/sliteteam/github-action-git-crypt-unlock @@ -195,8 +195,8 @@ jobs: # - https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds needs: staging-deploy - # Only run job if the event is a push to master - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + # Only run job if the event is a push to main + if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-20.04 @@ -285,7 +285,7 @@ jobs: - name: "Stage 1: Install and setup helm ${{ env.HELM_VERSION }}" run: | - curl -sf https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | DESIRED_VERSION=${HELM_VERSION} bash + curl -sf https://raw.githubusercontent.com/helm/helm/HEAD/scripts/get-helm-3 | DESIRED_VERSION=${HELM_VERSION} bash helm dependency update ./mybinder - name: "Stage 2: Unlock git-crypt secrets" diff --git a/.github/workflows/watch-dependencies.yaml b/.github/workflows/watch-dependencies.yaml index 703b986af..630fe1839 100644 --- a/.github/workflows/watch-dependencies.yaml +++ b/.github/workflows/watch-dependencies.yaml @@ -94,7 +94,7 @@ jobs: uses: peter-evans/create-pull-request@v4.2.3 # Don't try open PRs in forks or when the job is triggered by a push to # a branch other than the default branch. - if: github.repository == 'jupyterhub/mybinder.org-deploy' && (github.event_name != 'push' || github.ref == 'refs/heads/master') + if: github.repository == 'jupyterhub/mybinder.org-deploy' && (github.event_name != 'push' || github.ref == 'refs/heads/main') with: token: "${{ secrets.jupyterhub_bot_pat }}" author: JupterHub Bot Account <105740858+jupyterhub-bot@users.noreply.github.com> @@ -131,29 +131,29 @@ jobs: # - chart_dep_name: binderhub chart_dep_chart_changelog_url: "" - chart_dep_app_changelog_url: "https://github.com/jupyterhub/binderhub/blob/master/CHANGES.md" - chart_dep_source_url: "https://github.com/jupyterhub/binderhub/tree/master/helm-chart" + chart_dep_app_changelog_url: "https://github.com/jupyterhub/binderhub/blob/HEAD/CHANGES.md" + chart_dep_source_url: "https://github.com/jupyterhub/binderhub/tree/HEAD/helm-chart" chart_dep_devel_flag: "--devel" github_repo: jupyterhub/binderhub - chart_dep_name: ingress-nginx - chart_dep_chart_changelog_url: "https://github.com/kubernetes/ingress-nginx/tree/main/charts/ingress-nginx#upgrading-chart" - chart_dep_app_changelog_url: "https://github.com/kubernetes/ingress-nginx/blob/master/Changelog.md" - chart_dep_source_url: "https://github.com/kubernetes/ingress-nginx/tree/master/charts/ingress-nginx" + chart_dep_chart_changelog_url: "https://github.com/kubernetes/ingress-nginx/tree/HEAD/charts/ingress-nginx#upgrading-chart" + chart_dep_app_changelog_url: "https://github.com/kubernetes/ingress-nginx/blob/HEAD/Changelog.md" + chart_dep_source_url: "https://github.com/kubernetes/ingress-nginx/tree/HEAD/charts/ingress-nginx" chart_dep_devel_flag: "" github_repo: "" - chart_dep_name: prometheus - chart_dep_chart_changelog_url: "https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus#upgrading-chart" - chart_dep_app_changelog_url: "https://github.com/prometheus/prometheus/blob/master/CHANGELOG.md" - chart_dep_source_url: https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus + chart_dep_chart_changelog_url: "https://github.com/prometheus-community/helm-charts/tree/HEAD/charts/prometheus#upgrading-chart" + chart_dep_app_changelog_url: "https://github.com/prometheus/prometheus/blob/HEAD/CHANGELOG.md" + chart_dep_source_url: https://github.com/prometheus-community/helm-charts/tree/HEAD/charts/prometheus chart_dep_devel_flag: "" github_repo: "" - chart_dep_name: grafana chart_dep_chart_changelog_url: "https://github.com/grafana/helm-charts/tree/main/charts/grafana#upgrading-an-existing-release-to-a-new-major-version" - chart_dep_app_changelog_url: "https://github.com/grafana/grafana/blob/master/CHANGELOG.md" - chart_dep_source_url: "https://github.com/grafana/helm-charts/tree/main/charts/grafana" + chart_dep_app_changelog_url: "https://github.com/grafana/grafana/blob/HEAD/CHANGELOG.md" + chart_dep_source_url: "https://github.com/grafana/helm-charts/tree/HEAD/charts/grafana" chart_dep_devel_flag: "" github_repo: "" @@ -223,7 +223,7 @@ jobs: uses: peter-evans/create-pull-request@v4.2.3 # Don't try open PRs in forks or when the job is triggered by a push to # a branch other than the default branch. - if: github.repository == 'jupyterhub/mybinder.org-deploy' && (github.event_name != 'push' || github.ref == 'refs/heads/master') + if: github.repository == 'jupyterhub/mybinder.org-deploy' && (github.event_name != 'push' || github.ref == 'refs/heads/main') with: token: "${{ secrets.jupyterhub_bot_pat }}" author: JupterHub Bot Account <105740858+jupyterhub-bot@users.noreply.github.com> diff --git a/README.md b/README.md index ce328874d..422786c0d 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Amongst other things the guide contains: - [How to do a deployment](https://mybinder-sre.readthedocs.io/en/latest/deployment/how.html) - [What happens during a deployment?](https://mybinder-sre.readthedocs.io/en/latest/deployment/what.html) - [Incident reports for past incidents](https://mybinder-sre.readthedocs.io/en/latest/incident-reports/incident_reports_toc.html) -- [Incident report template](https://github.com/jupyterhub/mybinder.org-deploy/blob/master/docs/source/incident-reports/template-incident-report.md) +- [Incident report template](https://github.com/jupyterhub/mybinder.org-deploy/blob/HEAD/docs/source/incident-reports/template-incident-report.md) ## Key Links diff --git a/docs/source/analytics/events-archive.rst b/docs/source/analytics/events-archive.rst index fd5bfc69c..27d003607 100644 --- a/docs/source/analytics/events-archive.rst +++ b/docs/source/analytics/events-archive.rst @@ -27,8 +27,8 @@ file named ``events---
.jsonl`` that contains data for all the launches performed by mybinder.org on that date. All timestamps and dates are in `UTC `_. -Each line is a JSON object that conforms to `this JSON Schema -`_. +Each line is a JSON object that conforms to `this JSON Schema +`_. A description of these fields is provided below. #. **schema** and **version** @@ -54,14 +54,14 @@ A description of these fields is provided below. #. **provider** Where the launched repository was hosted. Current options are ``GitHub``, - ``GitLab`` and ``Git``. + ``GitLab`` and ``Git``. #. **spec** Specification identifying the repository / commit immutably & uniquely in the provider. - For GitHub, it is ``/``. Example would be ``yuvipanda/example-requirements/master``. + For GitHub, it is ``/``. Example would be ``yuvipanda/example-requirements/HEAD``. For GitLab, it is ``/``, except ``repo`` is URL escaped. For raw Git repositories, it is ``/``. ``repo-url`` is full URL escaped to the repo and ``commit-spec`` is a full commit hash. @@ -75,7 +75,7 @@ Example code ------------ Some popular ways of reading this event data into a useful data structure are -provided here. +provided here. ``pandas`` ~~~~~~~~~~ @@ -83,14 +83,14 @@ provided here. .. code-block:: python import pandas as pd - df = pd.read_json("https://archive.analytics.mybinder.org/events-2018-11-05.jsonl", lines=True) + df = pd.read_json("https://archive.analytics.mybinder.org/events-2018-11-05.jsonl", lines=True) df Plain Python ~~~~~~~~~~~~ .. code-block:: python - + import requests import json diff --git a/docs/source/components/cloud.md b/docs/source/components/cloud.md index cb2244cdb..c559dadc4 100644 --- a/docs/source/components/cloud.md +++ b/docs/source/components/cloud.md @@ -168,7 +168,7 @@ the name of the repository + the commit hash. This lets us check if the image has already been built, and if so, we can skip the building step. The code for generating the image name from repository information is -in [binderhub's builder.py](https://github.com/jupyterhub/binderhub/blob/master/binderhub/builder.py), +in [binderhub's builder.py](https://github.com/jupyterhub/binderhub/blob/HEAD/binderhub/builder.py), under `_generate_build_name`. Sometimes, we _do_ want to invalidate all previously built images - for example, diff --git a/docs/source/components/ingress.md b/docs/source/components/ingress.md index 611769a50..9887681f5 100644 --- a/docs/source/components/ingress.md +++ b/docs/source/components/ingress.md @@ -29,7 +29,7 @@ we decided to use nginx instead for the following reasons: ### Installation -nginx-ingress is installed using the [nginx-ingress helm chart](https://github.com/helm/charts/tree/master/stable/nginx-ingress). +nginx-ingress is installed using the [nginx-ingress helm chart](https://github.com/kubernetes/ingress-nginx/tree/main/charts/ingress-nginx). This installs the following components: 1. `nginx-ingress-controller` - keeps the HTTPS rules in sync with `Ingress` @@ -55,7 +55,7 @@ The following ingress objects currently exist: - `jupyterhub` - Directs traffic to `hub.mybinder.org`. The zero-to-jupyterhub guide has more [documentation](https://zero-to-jupyterhub.readthedocs.io/en/latest/administrator/advanced.html#ingress). - `binderhub` - Directs traffic to `mybinder.org`. You can find more details - about this in the [binderhub helm chart](https://github.com/jupyterhub/binderhub/tree/master/helm-chart). + about this in the [binderhub helm chart](https://github.com/jupyterhub/binderhub/tree/HEAD/helm-chart). - `redirector` - Directs traffic to the HTTP redirector we run for `mybinder.org`. This helps do redirects such as `docs.mybinder.org` or `beta.mybinder.org`. The list of redirects is configured in `mybinder/values.yaml`. The code @@ -84,7 +84,7 @@ Kube-lego is deprecated, and we should move to ### Installation -kube-lego is installed using the [kube-lego](https://github.com/helm/charts/tree/master/stable/kube-lego). +kube-lego is installed using the [kube-lego](https://github.com/helm/charts/tree/HEAD/stable/kube-lego). ### Configuration diff --git a/docs/source/components/metrics.md b/docs/source/components/metrics.md index 350c15a15..f349af64a 100644 --- a/docs/source/components/metrics.md +++ b/docs/source/components/metrics.md @@ -87,7 +87,7 @@ these containers using right now', etc. These are usually prefixed with #### HTTP request information -We use the [nginx-ingress helm chart](https://github.com/helm/charts/tree/master/stable/nginx-ingress) +We use the [nginx-ingress helm chart](https://github.com/kubernetes/ingress-nginx/tree/main/charts/ingress-nginx) to let all HTTP traffic into our cluster. This allows us to use the [nginx VTS exporter](https://hnlq715.github.io/nginx-vts-exporter/) to collect information in prometheus about requests / responses. @@ -103,7 +103,7 @@ These are currently somewhat limited, and prefixed with `binderhub_` ### Configuration Prometheus is installed using the -[prometheus helm chart](https://github.com/helm/charts/tree/master/stable/prometheus). +[prometheus helm chart](https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus). This installs the following components: 1. Prometheus server (storage + querying) @@ -115,6 +115,6 @@ kubernetes component), and the prometheus helm chart has configuration that adds those as targets. You can see the available options for configuring the prometheus -helm chart in its [values.yaml](https://github.com/helm/charts/blob/master/stable/prometheus/values.yaml) +helm chart in its [values.yaml](https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus/values.yaml) file. You can see the current configuration we have under the `prometheus` section of `mybinder/values.yaml`, `config/prod.yaml` and `config/staging.yaml`. diff --git a/docs/source/conf.py b/docs/source/conf.py index 73e60e95e..28f10ec75 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -46,7 +46,7 @@ html_context = { "github_user": "jupyterhub", "github_repo": "mybinder.org-deploy", - "github_version": "master", + "github_version": "HEAD", "doc_path": "docs/source", } diff --git a/docs/source/deployment/how.md b/docs/source/deployment/how.md index cf2b8c1ad..2581d33f6 100644 --- a/docs/source/deployment/how.md +++ b/docs/source/deployment/how.md @@ -29,7 +29,7 @@ Deployments to mybinder.org should be: not require specific sysadmin knowledge. 3. **Timely**. We deploy changes to repo2docker and BinderHub within a few days of - them being merged into master. + them being merged into main. These are all **aspirational** - we strive for hitting the above points, but recognize that work and life may get in the way of doing this perfectly. @@ -98,7 +98,7 @@ The following lines describe how to point mybinder.org to the new repo2docker im 1. Merge changes to repo2docker. 2. Open the [branches page for repo2docker](https://travis-ci.org/jupyter/repo2docker/branches). - And click on the number for the latest build on "Master". + And click on the number for the latest build on "main". 3. Wait for the build for your PR merge to pass (it will say "#NNN passed"). If it does, then continue to step 4. If it doesn't, take a look at the error message, and debug as needed until they pass. @@ -144,7 +144,7 @@ The following lines describe how to point mybinder.org to the new repo2docker im ### Deploying to _both_ `staging` then `prod` Deploying a change involves making a PR with your desired change and merging it to -master. +main. 1. Make the changes as described above [on your fork of this repo](https://github.com/jupyterhub/mybinder.org-deploy). 2. Keep track of the **hashes** that were updated. You should have both the _old_ hash that @@ -152,7 +152,7 @@ master. 3. If you haven't already, run the `list_new_commits.py` script in the `scripts/` folder. This will print out a URL that describes the changes made to both BinderHub and repo2docker. -4. Make a PR to the `master` branch with the changes you want. +4. Make a PR to the `main` branch with the changes you want. - Name the PR like so: `: ...` - In the description of the PR, paste the full URL that you printed out @@ -197,10 +197,10 @@ In this scenario, a user with `OWNER`, `COLLABORATOR` or `MEMBER` association wi The final option to deploy to staging only is by editing `staging`-only config files. To deploy to staging only, follow these steps: -1. Make changes to [`config/staging.yaml`](https://github.com/jupyterhub/mybinder.org-deploy/blob/master/config/staging.yaml) +1. Make changes to [`config/staging.yaml`](https://github.com/jupyterhub/mybinder.org-deploy/blob/HEAD/config/staging.yaml) on your fork. This file contains configuration for Helm that will **override** whatever is in `mybinder/values.yaml`. -2. Make a PR to the `master` branch, and review, accept, and merge this PR. +2. Make a PR to the `main` branch, and review, accept, and merge this PR. **In this case, you can merge your own PR**. This will make GitHub Actions deploy the changes to [staging.mybinder.org](https://staging.mybinder.org), and run tests in the `tests/` diff --git a/docs/source/deployment/what.md b/docs/source/deployment/what.md index b6ff6b3e7..ae3195343 100644 --- a/docs/source/deployment/what.md +++ b/docs/source/deployment/what.md @@ -248,7 +248,7 @@ We run the tests in `tests/` with `pytest` to validate that the deployment succe These try to be as thorough as possible, simulating the tests a human would do to ensure that the site works as required. -Look at the docstrings in the files under [`tests/`](https://github.com/jupyterhub/mybinder.org-deploy/tree/master/tests) +Look at the docstrings in the files under [`tests/`](https://github.com/jupyterhub/mybinder.org-deploy/tree/HEAD/tests) to see what are the tests being run. If all the tests succeed, we can consider the staging deployment success! diff --git a/docs/source/operation_guide/federation.rst b/docs/source/operation_guide/federation.rst index 5be9b65c7..cf2885857 100644 --- a/docs/source/operation_guide/federation.rst +++ b/docs/source/operation_guide/federation.rst @@ -100,7 +100,7 @@ There are 3 main files you may wish to edit in order to remove a cluster from the Federation: #. *Required.* Set the ``binderhub.config.BinderHub.pod_quota`` key to ``0`` in the - cluster's config file under the `config `_ + cluster's config file under the `config `_ directory #. *Recommended.* Set the ``weight`` key for the cluster to ``0`` in the `helm chart values file `_ diff --git a/images/analytics-publisher/index.html b/images/analytics-publisher/index.html index 5c24dbdc1..8bdbdb6be 100644 --- a/images/analytics-publisher/index.html +++ b/images/analytics-publisher/index.html @@ -47,7 +47,7 @@

MyBinder.org Events Archive