Browse Source

Backport PR #10708 on branch 3.1.x (Add branch integrity handling) (#10723)

* Backport PR #10708: Add branch integrity handling

* Fix up integrity for 3.1.x

* Update ensure repo script

* Integrity changes

Co-authored-by: Afshin Taylor Darian <git@darian.af>
MeeseeksMachine 3 years ago
parent
commit
6b09ac27dc

+ 2 - 2
.github/ISSUE_TEMPLATE/bug_report.md

@@ -7,7 +7,7 @@ about: Create a report to help us improve
 Welcome! Before creating a new issue:
 * Search for relevant issues
 * Follow the issue reporting guidelines:
-https://jupyterlab.readthedocs.io/en/latest/getting_started/issue.html
+https://jupyterlab.readthedocs.io/en/stable/getting_started/issue.html
 -->
 
 ## Description
@@ -24,7 +24,7 @@ https://jupyterlab.readthedocs.io/en/latest/getting_started/issue.html
 4. See error '...'
 
 <!--Describe how you diagnosed the issue. See the guidelines at
- https://jupyterlab.readthedocs.io/en/latest/getting_started/issue.html -->
+ https://jupyterlab.readthedocs.io/en/stable/getting_started/issue.html -->
 
 ## Expected behavior
 

+ 1 - 1
.github/pull_request_template.md

@@ -2,7 +2,7 @@
 Thanks for contributing to JupyterLab!
 Please fill out the following items to submit a pull request.
 See the contributing guidelines for more information:
-https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md
+https://github.com/jupyterlab/jupyterlab/blob/3.1.x/CONTRIBUTING.md
 -->
 
 ## References

+ 8 - 2
.github/workflows/check-release.yml

@@ -1,6 +1,12 @@
 name: Check Release
 
-on: [push, pull_request]
+on:
+  push:
+    branches: [3.1.x]
+  pull_request:
+    branches: [3.1.x]
+  release:
+    types: [published]
 
 jobs:
 
@@ -50,7 +56,7 @@ jobs:
       - name: Check Release
         uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1
         env:
-          RH_VERSION_SPEC: build
+          RH_VERSION_SPEC: patch
         with:
           token: ${{ secrets.GITHUB_TOKEN }}
 

+ 2 - 2
.github/workflows/codeql-analysis.yml

@@ -7,10 +7,10 @@ name: "CodeQL"
 
 on:
   push:
-    branches: [master]
+    branches: [3.1.x]
   pull_request:
     # The branches below must be a subset of the branches above
-    branches: [master]
+    branches: [3.1.x]
   schedule:
     - cron: '0 8 * * 3'
 

+ 7 - 1
.github/workflows/linuxjs-flaky-tests.yml

@@ -1,6 +1,12 @@
 name: Linux JS Flaky Tests
 
-on: [push, pull_request]
+on:
+  push:
+    branches: [3.1.x]
+  pull_request:
+    branches: [3.1.x]
+  release:
+    types: [published]
 
 jobs:
   linuxjs:

+ 7 - 1
.github/workflows/linuxjs-tests.yml

@@ -1,6 +1,12 @@
 name: Linux JS Tests
 
-on: [push, pull_request]
+on:
+  push:
+    branches: [3.1.x]
+  pull_request:
+    branches: [3.1.x]
+  release:
+    types: [published]
 
 jobs:
   linuxjs:

+ 7 - 1
.github/workflows/linuxtests.yml

@@ -1,6 +1,12 @@
 name: Linux Tests
 
-on: [push, pull_request]
+on:
+  push:
+    branches: [3.1.x]
+  pull_request:
+    branches: [3.1.x]
+  release:
+    types: [published]
 
 jobs:
   linuxtests:

+ 7 - 1
.github/workflows/macostests.yml

@@ -1,6 +1,12 @@
 name: macOS Tests
 
-on: [push, pull_request]
+on:
+  push:
+    branches: [3.1.x]
+  pull_request:
+    branches: [3.1.x]
+  release:
+    types: [published]
 
 jobs:
   macostests:

+ 8 - 2
.github/workflows/ui-tests.yml

@@ -1,6 +1,12 @@
 name: UI Tests
 
-on: [push, pull_request]
+on:
+  push:
+    branches: [3.1.x]
+  pull_request:
+    branches: [3.1.x]
+  release:
+    types: [published]
 
 jobs:
   ui-tests:
@@ -32,7 +38,7 @@ jobs:
           # Print jupyterlab logs before removing the containers using the container name set in docker-compose file
           docker logs jupyterlab
           docker-compose -f "./ui-tests/docker/docker-compose.yml" down
-          
+
       - name: Run UI Tests
         if: ${{ failure() }}
         run: |

+ 7 - 1
.github/workflows/windowstests.yml

@@ -1,6 +1,12 @@
 name: Windows Tests
 
-on: [push, pull_request]
+on:
+  push:
+    branches: [3.1.x]
+  pull_request:
+    branches: [3.1.x]
+  release:
+    types: [published]
 
 jobs:
   windowstests:

+ 11 - 11
CHANGELOG.md

@@ -1,5 +1,5 @@
 ---
-github_url: 'https://github.com/jupyterlab/jupyterlab/blob/master/CHANGELOG.md'
+github_url: 'https://github.com/jupyterlab/jupyterlab/blob/3.1.x/CHANGELOG.md'
 ---
 
 # JupyterLab Changelog
@@ -15,7 +15,7 @@ github_url: 'https://github.com/jupyterlab/jupyterlab/blob/master/CHANGELOG.md'
 From JupyterLab 3.1, file documents and notebooks have collaborative
 editing using the `Yjs shared editing framework <https://github.com/yjs/yjs>`\_.
 Editors are not collaborative by default; to activate it, start JupyterLab
-with the `--collaborative` flag. See full documentation on [collaboration](https://jupyterlab.readthedocs.io/en/latest/user/rtc.html).
+with the `--collaborative` flag. See full documentation on [collaboration](https://jupyterlab.readthedocs.io/en/stable/user/rtc.html).
 
 ### New features added
 
@@ -635,21 +635,21 @@ extensions does not require rebuilding JupyterLab and does not require
 having NodeJS installed. The previous way of distributing extensions as
 npm packages requiring rebuilding JupyterLab is still available as well.
 See the
-[documentation](https://jupyterlab.readthedocs.io/en/latest/user/extensions.html#extensions)
+[documentation](https://jupyterlab.readthedocs.io/en/stable/user/extensions.html#extensions)
 for more details.
 
 #### The JupyterLab interface supports multiple languages
 
 JupyterLab now provides the ability to set the display language of the
 user interface. See the
-[documentation](https://jupyterlab.readthedocs.io/en/latest/user/language.html)
+[documentation](https://jupyterlab.readthedocs.io/en/stable/user/language.html)
 for more details.
 
 #### A new visual debugger
 
 JupyterLab now ships with a debugger front-end by default, available for
 kernels that support the new debugging protocol. See the
-[documentation](https://jupyterlab.readthedocs.io/en/latest/user/debugger.html)
+[documentation](https://jupyterlab.readthedocs.io/en/stable/user/debugger.html)
 for more details.
 
 #### Improvements to Simple Interface mode and Mobile
@@ -1599,7 +1599,7 @@ closed.
   notebook toolbar
   ([#8024](https://github.com/jupyterlab/jupyterlab/pull/8024))
 
-<img alt="The main JupyterLab toolbar with focus on the Restart Kernel and Run All Cells button." src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/master/docs/source/getting_started/changelog_restartrunallbutton.png" class="jp-screenshot">
+<img alt="The main JupyterLab toolbar with focus on the Restart Kernel and Run All Cells button." src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/3.1.x/docs/source/getting_started/changelog_restartrunallbutton.png" class="jp-screenshot">
 
 - Added a context menu item for opening a Markdown editor from the
   Markdown preview
@@ -1723,18 +1723,18 @@ closed.
   ([#7407](https://github.com/jupyterlab/jupyterlab/pull/7407),
   [#7786](https://github.com/jupyterlab/jupyterlab/pull/7786))
 
-<img alt="Notebook cell tags in the left sidebar next to an open notebook." src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/master/docs/source/getting_started/changelog_celltags.png" class="jp-screenshot">
+<img alt="Notebook cell tags in the left sidebar next to an open notebook." src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/3.1.x/docs/source/getting_started/changelog_celltags.png" class="jp-screenshot">
 
 - File info display when hovering on a file in the file browser
   ([#7485](https://github.com/jupyterlab/jupyterlab/pull/7485),
   [#7352](https://github.com/jupyterlab/jupyterlab/issues/7352))
 
-<img alt="The file browser with a tooltip describing a notebook's info like the name, size, and kernel." src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/master/docs/source/getting_started/changelog_fileinfo.png" class="jp-screenshot">
+<img alt="The file browser with a tooltip describing a notebook's info like the name, size, and kernel." src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/3.1.x/docs/source/getting_started/changelog_fileinfo.png" class="jp-screenshot">
 
 - Support for searching outputs in notebooks
   ([#7258](https://github.com/jupyterlab/jupyterlab/pull/7258))
 
-<img alt="A notebook with multiple cells and the cell output searching in the upper right." src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/master/docs/source/getting_started/changelog_searchoutput.png" class="jp-screenshot">
+<img alt="A notebook with multiple cells and the cell output searching in the upper right." src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/3.1.x/docs/source/getting_started/changelog_searchoutput.png" class="jp-screenshot">
 
 - `Ctrl Shift .` and `Ctrl Shift ,` shortcuts move focus to the next
   and previous tab bar in the main area, respectively
@@ -2268,7 +2268,7 @@ in 1.0.0, and other 1.0.x milestones for bugs fixed in patch releases.
 
 ### Find and Replace
 
-<img alt="A notebook with multiple cells and the find and replace interface in the upper right." src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/master/docs/source/getting_started/find.png" class="jp-screenshot">
+<img alt="A notebook with multiple cells and the find and replace interface in the upper right." src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/3.1.x/docs/source/getting_started/find.png" class="jp-screenshot">
 
 We have added first class support for find and replace across
 JupyterLab. It is currently supported in notebooks and text files and is
@@ -2291,7 +2291,7 @@ extensible for other widgets who wish to support it.
 
 ### Status Bar
 
-<img alt= "A screenshot of the updated JupyterLab status bar." src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/master/docs/source/getting_started/statusbar.png" class="jp-screenshot">
+<img alt= "A screenshot of the updated JupyterLab status bar." src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/3.1.x/docs/source/getting_started/statusbar.png" class="jp-screenshot">
 
 We have integrated the [JupyterLab Status Bar
 package](https://github.com/jupyterlab/jupyterlab-statusbar) package

+ 1 - 1
CONTRIBUTING.md

@@ -4,5 +4,5 @@ If you're reading this section, you're probably interested in contributing to
 JupyterLab. Welcome and thanks for your interest in contributing!
 
 Please take a look at Contributing to Jupyterlab on
-[Read the Docs](https://jupyterlab.readthedocs.io/en/latest/developer/contributing.html) or
+[Read the Docs](https://jupyterlab.readthedocs.io/en/stable/developer/contributing.html) or
 [Repo docs](docs/source/developer/contributing.rst) (for the latest).

+ 1 - 1
Dockerfile

@@ -1,7 +1,7 @@
 FROM mambaorg/micromamba:0.14.0 as build
 
 # Install basic tools
-RUN micromamba install -qy -c conda-forge python nodejs yarn=1.21 build \
+RUN micromamba install -qy -c conda-forge python nodejs yarn \
     && useradd --shell /bin/bash jovyan \
     && chown jovyan $HOME
 

+ 2 - 2
README.md

@@ -133,14 +133,14 @@ To start developing an extension for JupyterLab, see the [developer documentatio
 
 ### Contributing
 
-To contribute code or documentation to JupyterLab itself, please read the [contributor documentation](https://jupyterlab.readthedocs.io/en/latest/developer/contributing.html).
+To contribute code or documentation to JupyterLab itself, please read the [contributor documentation](https://jupyterlab.readthedocs.io/en/stable/developer/contributing.html).
 
 JupyterLab follows the Jupyter [Community Guides](https://jupyter.readthedocs.io/en/latest/community/content-community.html).
 
 ### License
 
 JupyterLab uses a shared copyright model that enables all contributors to maintain the
-copyright on their contributions. All code is licensed under the terms of the revised [BSD license](https://github.com/jupyterlab/jupyterlab/blob/master/LICENSE).
+copyright on their contributions. All code is licensed under the terms of the revised [BSD license](https://github.com/jupyterlab/jupyterlab/blob/3.1.x/LICENSE).
 
 ### Team
 

+ 4 - 4
RELEASE.md

@@ -138,8 +138,8 @@ These lines:
   - [ ] https://github.com/jupyterlab/jupyter-renderers
 - [ ] Add a tag to [ts cookiecutter](https://github.com/jupyterlab/extension-cookiecutter-ts) with the new JupyterLab version
 - [ ] Update the extension examples:
-  - [ ] [Notebook toolbar button](https://github.com/jupyterlab/jupyterlab/blob/master/docs/source/extension/notebook.rst#adding-a-button-to-the-toolbar)
-- [ ] Update the [extension tutorial](https://github.com/jupyterlab/jupyterlab/blob/master/RELEASE.md#updating-the-extension-tutorial)
+  - [ ] [Notebook toolbar button](https://github.com/jupyterlab/jupyterlab/blob/3.1.x/docs/source/extension/notebook.rst#adding-a-button-to-the-toolbar)
+- [ ] Update the [extension tutorial](https://github.com/jupyterlab/jupyterlab/blob/3.1.x/RELEASE.md#updating-the-extension-tutorial)
 - [ ] At this point, there may have been some more commits merged. Run `python scripts/milestone_check.py` to check the issues assigned to this milestone one more time. Update changelog if necessary.
 
 Now do the actual final release:
@@ -151,7 +151,7 @@ Now do the actual final release:
 - [ ] Update the API [docs](#updating-api-docs)
 - [ ] Merge the PRs on the other repos and set the default branch of the
       xckd repo
-- [ ] Publish to [conda-forge](https://github.com/jupyterlab/jupyterlab/blob/master/RELEASE.md#publishing-to-conda-forge).
+- [ ] Publish to [conda-forge](https://github.com/jupyterlab/jupyterlab/blob/3.1.x/RELEASE.md#publishing-to-conda-forge).
 
 After a few days (to allow for possible patch releases), set up development for
 the next release:
@@ -160,7 +160,7 @@ the next release:
 - [ ] Put the commit and tags to master
 - [ ] Run `npm run publish:all` to publish the packages
 - [ ] Release the other repos as appropriate
-- [ ] Update version for [binder](https://github.com/jupyterlab/jupyterlab/blob/master/RELEASE.md#update-version-for-binder)
+- [ ] Update version for [binder](https://github.com/jupyterlab/jupyterlab/blob/3.1.x/RELEASE.md#update-version-for-binder)
 
 ### Updating the extension tutorial
 

+ 118 - 0
buildutils/src/ensure-repo.ts

@@ -11,6 +11,8 @@
  * Ensure a consistent version of all packages.
  * Manage the metapackage meta package.
  */
+import { execSync } from 'child_process';
+import * as glob from 'glob';
 import * as path from 'path';
 import * as fs from 'fs-extra';
 import * as utils from './utils';
@@ -22,6 +24,20 @@ import {
 
 type Dict<T> = { [key: string]: T };
 
+// URL config for this branch
+// Source and target branches
+// Target RTD version name
+// For master these will be the same, for other branches the source
+// branch is whichever branch it was created from
+// The current release branch should target RTD stable
+// Master should target latest
+// All other release branches should target a specific named version
+const URL_CONFIG = {
+  source: 'master',
+  target: '3.1.x',
+  rtdVersion: 'stable'
+};
+
 // Data to ignore.
 const MISSING: Dict<string[]> = {
   '@jupyterlab/coreutils': ['path'],
@@ -234,6 +250,97 @@ const pkgNames: Dict<string> = {};
 const depCache: Dict<string> = {};
 const locals: Dict<string> = {};
 
+/**
+ * Ensure branch integrity - GitHub and RTD urls, and workflow target branches
+ *
+ * @returns An array of messages for changes.
+ */
+function ensureBranch(): string[] {
+  const messages: string[] = [];
+
+  const { source, target, rtdVersion } = URL_CONFIG;
+
+  // Handle the github_version in conf.py
+  const confPath = 'docs/source/conf.py';
+  const oldConfData = fs.readFileSync(confPath, 'utf-8');
+  const confTest = new RegExp('"github_version": "(.*)"');
+  const newConfData = oldConfData.replace(
+    confTest,
+    `"github_version": "${target}"`
+  );
+  if (newConfData !== oldConfData) {
+    messages.push(`Overwriting ${confPath}`);
+    fs.writeFileSync(confPath, newConfData, 'utf-8');
+  }
+
+  // Handle urls in files
+  // Get all files matching the desired file types
+  const fileTypes = ['.json', '.md', '.rst', '.yml', '.ts', '.tsx', '.py'];
+  let files = execSync('git ls-tree -r HEAD --name-only')
+    .toString()
+    .trim()
+    .split(/\r?\n/);
+  files = files.filter(filePath => {
+    return fileTypes.indexOf(path.extname(filePath)) !== -1;
+  });
+
+  // Set up string replacements
+  const base = '/jupyterlab/jupyterlab';
+  const rtdString = `jupyterlab.readthedocs.io/en/${rtdVersion}/`;
+  const urlMap = [
+    [`\/jupyterlab\/jupyterlab\/${source}\/`, `${base}/${target}/`],
+    [`\/jupyterlab\/jupyterlab\/blob\/${source}\/`, `${base}/blob/${target}/`],
+    [`\/jupyterlab\/jupyterlab\/tree\/${source}\/`, `${base}/tree/${target}/`],
+    [`jupyterlab.readthedocs.io\/en\/.*?\/`, rtdString]
+  ];
+
+  // Make the string replacements
+  files.forEach(filePath => {
+    if (path.basename(filePath) === 'ensure-repo.ts') {
+      return;
+    }
+    const oldData = fs.readFileSync(filePath, 'utf-8');
+    let newData = oldData;
+    urlMap.forEach(section => {
+      const test = new RegExp(section[0], 'g');
+      const replacer = section[1];
+      if (newData.match(test)) {
+        newData = newData.replace(test, replacer);
+      }
+    });
+
+    // Make sure the root RTD links point to stable
+    const badgeLink = '(http://jupyterlab.readthedocs.io/en/stable/)';
+    const toReplace = badgeLink.replace('stable', rtdVersion);
+    if (badgeLink !== toReplace) {
+      while (newData.indexOf(toReplace) !== -1) {
+        newData = newData.replace(toReplace, badgeLink);
+      }
+    }
+
+    if (newData !== oldData) {
+      messages.push(`Overwriting ${filePath}`);
+      fs.writeFileSync(filePath, newData, 'utf-8');
+    }
+  });
+
+  // Handle workflow file target branches
+  const workflows = glob.sync(path.join('.github', 'workflows', '*.yml'));
+  workflows.forEach(filePath => {
+    let workflowData = fs.readFileSync(filePath, 'utf-8');
+    const test = new RegExp(`\\[${source}\\]`, 'g');
+    if (workflowData.match(test)) {
+      if (workflowData.match(test)![1] !== `[${target}]`) {
+        messages.push(`Overwriting ${filePath}`);
+        workflowData = workflowData.replace(test, `[${target}]`);
+        fs.writeFileSync(filePath, workflowData, 'utf-8');
+      }
+    }
+  });
+
+  return messages;
+}
+
 /**
  * Ensure the metapackage package.
  *
@@ -451,6 +558,17 @@ function ensureBuildUtils() {
 export async function ensureIntegrity(): Promise<boolean> {
   const messages: Dict<string[]> = {};
 
+  if (process.env.SKIP_INTEGRITY_CHECK === 'true') {
+    console.log('Skipping integrity check');
+    return true;
+  }
+
+  // Handle branch integrity
+  const branchMessages = ensureBranch();
+  if (branchMessages.length > 0) {
+    messages['branch'] = branchMessages;
+  }
+
   // Pick up all the package versions.
   const paths = utils.getLernaPaths();
 

+ 3 - 0
docker/jupyter_server_config.json

@@ -8,5 +8,8 @@
   },
   "LabApp": {
     "dev_mode": true
+  },
+  "Application": {
+    "log_level": "DEBUG"
   }
 }

+ 1 - 1
docs/source/conf.py

@@ -184,7 +184,7 @@ html_context = {
     "display_github": True,  # Integrate GitHub
     "github_user": "jupyterlab",  # Username
     "github_repo": "jupyterlab",  # Repo name
-    "github_version": "master",  # Version
+    "github_version": "3.1.x",  # Version
     "conf_py_path": "/docs/source/",  # Path in the checkout to the docs root
 }
 

+ 1 - 1
docs/source/developer/components.rst

@@ -8,7 +8,7 @@ IDE-like experience. However, developers are encouraged to use these to bring
 to life their own visions of what a computational environment should look
 like.
 
-The JupyterLab repository has `many examples <https://github.com/jupyterlab/jupyterlab/tree/master/examples>`_
+The JupyterLab repository has `many examples <https://github.com/jupyterlab/jupyterlab/tree/3.1.x/examples>`_
 to get you started.
 
 The ``examples`` directory contains:

+ 3 - 3
docs/source/developer/contributing.rst

@@ -111,7 +111,7 @@ Installing Node.js and jlpm
 Building JupyterLab from its GitHub source code requires Node.js. The
 development version requires Node.js version 12+, as defined in the
 ``engines`` specification in
-`dev_mode/package.json <https://github.com/jupyterlab/jupyterlab/blob/master/dev_mode/package.json>`__.
+`dev_mode/package.json <https://github.com/jupyterlab/jupyterlab/blob/3.1.x/dev_mode/package.json>`__.
 
 If you use ``conda``, you can get it with:
 
@@ -537,13 +537,13 @@ Main reasons for UI test failures are:
 
 1. **A visual regression caused by code changes**:
 
-   Sometimes unintentional UI changes are introduced by modifications to project source code. Goal of visual regression testing is to detect this kind of UI changes. If your PR / commit is causing visual regression, then debug and fix the regression caused. You can locally run and debug the UI tests to fix the visual regression. Follow the instructions in steps 5-7 of ``Adding a new UI test suite guide`` in `UI Testing documentation <https://github.com/jupyterlab/jupyterlab/blob/master/ui-tests/README.md#adding-a-new-ui-test-suite>`__ to locally debug and fix UI tests. Once you have a fix, you can push the change to your GitHub branch and test with GitHub actions.
+   Sometimes unintentional UI changes are introduced by modifications to project source code. Goal of visual regression testing is to detect this kind of UI changes. If your PR / commit is causing visual regression, then debug and fix the regression caused. You can locally run and debug the UI tests to fix the visual regression. Follow the instructions in steps 5-7 of ``Adding a new UI test suite guide`` in `UI Testing documentation <https://github.com/jupyterlab/jupyterlab/blob/3.1.x/ui-tests/README.md#adding-a-new-ui-test-suite>`__ to locally debug and fix UI tests. Once you have a fix, you can push the change to your GitHub branch and test with GitHub actions.
 
 2. **An intended update to user interface**:
 
    If your code change is introducing an update to UI which causes existing UI Tests to fail, then you will need to update reference image(s) for the failing tests. In order to do that, simply go to GitHub Actions page for the failed test and download test artifacts. It will contain test captures in directory ``test/screenshots``. You can copy the capture for the failed test and paste into reference screenshots directory in JupyterLab source code, replacing the failing test's reference capture. Reference captures are located in ``ui-tests/reference-output/screenshots`` in JupyterLab source code.
 
-For more information on UI Testing, please read the `UI Testing developer documentation <.https://github.com/jupyterlab/jupyterlab/blob/master/ui-tests/README.md>`__ and `Galata documentation <https://github.com/jupyterlab/galata/blob/main/README.md>`__.
+For more information on UI Testing, please read the `UI Testing developer documentation <.https://github.com/jupyterlab/jupyterlab/blob/3.1.x/ui-tests/README.md>`__ and `Galata documentation <https://github.com/jupyterlab/galata/blob/main/README.md>`__.
 
 Good Practices for Integration tests
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

+ 1 - 1
docs/source/developer/css.rst

@@ -70,7 +70,7 @@ CSS variable usage
 ^^^^^^^^^^^^^^^^^^
 
 JupyterLab includes a default set of CSS variables in the file
-`packages/theme-light-extension/style/variables.css <https://github.com/jupyterlab/jupyterlab/blob/master/packages/theme-light-extension/style/variables.css>`_.
+`packages/theme-light-extension/style/variables.css <https://github.com/jupyterlab/jupyterlab/blob/3.1.x/packages/theme-light-extension/style/variables.css>`_.
 
 To ensure consistent design in JupyterLab, all built-in and third party
 extensions should use these variables in their styles if at all

+ 1 - 1
docs/source/developer/repo.rst

@@ -10,7 +10,7 @@ In particular, there are many TypeScript packages and a single Python package.
 The Python package contains server-side code, and also distributes
 the bundled-and-compiled TypeScript code.
 
-See the `Contributing Guidelines <https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md>`__
+See the `Contributing Guidelines <https://github.com/jupyterlab/jupyterlab/blob/3.1.x/CONTRIBUTING.md>`__
 for detailed developer installation instructions.
 
 Directories

+ 6 - 6
docs/source/extension/extension_dev.rst

@@ -157,7 +157,7 @@ A mime renderer plugin is an object with the fields listed in the
 `rendermime-interfaces IExtension <../api/interfaces/rendermime_interfaces.irendermime.iextension.html>`__
 object.
 
-JupyterLab has a `pdf mime renderer extension <https://github.com/jupyterlab/jupyterlab/tree/master/packages/pdf-extension>`__, for example. In core JupyterLab, this is used to view pdf files and view pdf data mime data in a notebook.
+JupyterLab has a `pdf mime renderer extension <https://github.com/jupyterlab/jupyterlab/tree/3.1.x/packages/pdf-extension>`__, for example. In core JupyterLab, this is used to view pdf files and view pdf data mime data in a notebook.
 
 We have a `mime renderer tutorial <https://github.com/jupyterlab/jupyterlab-mp4>`__  walking through creating a mime renderer extension which adds mp4 video rendering to JupyterLab. We also have a `cookiecutter for mime renderer extensions <https://github.com/jupyterlab/mimerender-cookiecutter-ts>`__  in TypeScript.
 
@@ -176,7 +176,7 @@ A theme is a special application plugin that registers a theme with the ``ThemeM
 
 The extension package containing the theme plugin must include all static assets that are referenced by ``@import`` in its theme CSS files. Local URLs can be used to reference files relative to the location of the referring sibling CSS files. For example ``url('images/foo.png')`` or ``url('../foo/bar.css')`` can be used to refer local files in the theme. Absolute URLs (starting with a ``/``) or external URLs (e.g. ``https:``) can be used to refer to external assets.
 
-See the `JupyterLab Light Theme <https://github.com/jupyterlab/jupyterlab/tree/master/packages/theme-light-extension>`__ for an example.
+See the `JupyterLab Light Theme <https://github.com/jupyterlab/jupyterlab/tree/3.1.x/packages/theme-light-extension>`__ for an example.
 
 See the `TypeScript theme cookiecutter <https://github.com/jupyterlab/theme-cookiecutter>`__ for a quick start to developing a theme plugin.
 
@@ -187,7 +187,7 @@ Source Extensions
 
 A source extension is a JavaScript (npm) package that exports one or more plugins. All JupyterLab extensions are developed as source extensions (for example, prebuilt extensions are built from source extensions).
 
-A source extension has metadata in the ``jupyterlab`` field of its ``package.json`` file. The `JSON schema <https://github.com/jupyterlab/jupyterlab/blob/master/builder/metadata_schema.json>`__ for the metadata is distributed in the ``@jupyterlab/builder`` package.
+A source extension has metadata in the ``jupyterlab`` field of its ``package.json`` file. The `JSON schema <https://github.com/jupyterlab/jupyterlab/blob/3.1.x/builder/metadata_schema.json>`__ for the metadata is distributed in the ``@jupyterlab/builder`` package.
 
 If you would like publish your source extension to npm and want users to be able to install your source extension, we recommend including the npm keyword ``jupyterlab-extension`` in ``package.json``. This enables JupyterLab's extension manager to find your extension and display it for users in its graphical interface::
 
@@ -258,10 +258,10 @@ For example, the JupyterLab ``filebrowser-extension`` package exports the ``@jup
           "schemaDir": "schema",
         }
 
-The file browser setting schema file (which specifies some default keyboard shortcuts and other settings for the filebrowser) is located in ``schema/browser.json`` (see `here <https://github.com/jupyterlab/jupyterlab/blob/master/packages/filebrowser-extension/schema/browser.json>`__).
+The file browser setting schema file (which specifies some default keyboard shortcuts and other settings for the filebrowser) is located in ``schema/browser.json`` (see `here <https://github.com/jupyterlab/jupyterlab/blob/3.1.x/packages/filebrowser-extension/schema/browser.json>`__).
 
 See the
-`fileeditor-extension <https://github.com/jupyterlab/jupyterlab/tree/master/packages/fileeditor-extension>`__
+`fileeditor-extension <https://github.com/jupyterlab/jupyterlab/tree/3.1.x/packages/fileeditor-extension>`__
 for another example of an extension that uses settings.
 
 Please ensure that the schema files are included in the ``files`` metadata in ``package.json``.
@@ -504,7 +504,7 @@ Custom webpack configuration can be used to enable webpack features, configure a
       }
     };
 
-This custom config will be merged with the `prebuilt extension config <https://github.com/jupyterlab/jupyterlab/blob/master/builder/src/extensionConfig.ts>`_
+This custom config will be merged with the `prebuilt extension config <https://github.com/jupyterlab/jupyterlab/blob/3.1.x/builder/src/extensionConfig.ts>`_
 when building the prebuilt extension.
 
 .. _prebuilt_dev_workflow:

+ 3 - 3
docs/source/extension/extension_migration.rst

@@ -192,7 +192,7 @@ Upgrading library versions
 The ``@phosphor/*`` libraries that JupyterLab 1.x uses have been renamed to
 ``@lumino/*``. Updating your ``package.json`` is straightforward. The easiest
 way to do this is to look in the
-`JupyterLab core packages code base <https://github.com/jupyterlab/jupyterlab/tree/master/packages>`__
+`JupyterLab core packages code base <https://github.com/jupyterlab/jupyterlab/tree/3.1.x/packages>`__
 and to simply adopt the versions of the relevant libraries that are used
 there.
 
@@ -313,7 +313,7 @@ Using ``Session`` and ``SessionContext`` to manage kernel sessions
 
   For full API documentation and examples of how to use
   ``@jupyterlab/services``,
-  `consult the repository <https://github.com/jupyterlab/jupyterlab/tree/master/packages/services#readme>`__.
+  `consult the repository <https://github.com/jupyterlab/jupyterlab/tree/3.1.x/packages/services#readme>`__.
 
 ``ConsolePanel`` and ``NotebookPanel`` now expose a
 ``sessionContext: ISessionContext`` attribute that allows for a uniform way to
@@ -348,6 +348,6 @@ Using the new icon system and ``LabIcon``
 
   For full API documentation and examples of how to use
   the new icon support based on ``LabIcon`` from ``@jupyterlab/ui-components``,
-  `consult the repository <https://github.com/jupyterlab/jupyterlab/tree/master/packages/ui-components#readme>`__.
+  `consult the repository <https://github.com/jupyterlab/jupyterlab/tree/3.1.x/packages/ui-components#readme>`__.
 
 

+ 1 - 1
docs/source/extension/extension_tutorial.rst

@@ -203,7 +203,7 @@ After you reload the page with the console open, you should see a message that s
 ``JupyterLab extension jupyterlab_apod is activated!`` in the console.
 If you do, congratulations, you're ready to start modifying the extension!
 If not, go back make sure you didn't miss a step, and `reach
-out <https://github.com/jupyterlab/jupyterlab/blob/master/README.md#getting-help>`__ if you're stuck.
+out <https://github.com/jupyterlab/jupyterlab/blob/3.1.x/README.md#getting-help>`__ if you're stuck.
 
 Note: Leave the terminal running the ``jupyter lab`` command open and running
 JupyterLab to see the effects of changes below.

+ 1 - 1
docs/source/getting_started/faq.rst

@@ -20,7 +20,7 @@ Development
 
   
 -  `How can you
-   contribute? <https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md>`__
+   contribute? <https://github.com/jupyterlab/jupyterlab/blob/3.1.x/CONTRIBUTING.md>`__
 -  :ref:`How can you extend or customize JupyterLab? <user_extensions>`
 -  In the classic Notebook, `I could use custom Javascript outputted by a cell to programmatically
    control the Notebook <https://stackoverflow.com/a/32769976/907060>`__. Can I do the same thing in JupyterLab?

+ 1 - 1
packages/javascript-extension/README.md

@@ -18,4 +18,4 @@ Javascript('console.log("hello world");')
 
 ## Development
 
-See the [JupyterLab Contributor Documentation](https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md).
+See the [JupyterLab Contributor Documentation](https://github.com/jupyterlab/jupyterlab/blob/3.1.x/CONTRIBUTING.md).

+ 1 - 1
packages/json-extension/README.md

@@ -42,4 +42,4 @@ To render a `.json` file, simply open it:
 
 ## Development
 
-See the [JupyterLab Contributor Documentation](https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md).
+See the [JupyterLab Contributor Documentation](https://github.com/jupyterlab/jupyterlab/blob/3.1.x/CONTRIBUTING.md).

+ 1 - 1
packages/vdom-extension/README.md

@@ -75,4 +75,4 @@ To render a `.vdom` or `.vdom.json` file, simply open it:
 
 ## Development
 
-See the [JupyterLab Contributor Documentation](https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md).
+See the [JupyterLab Contributor Documentation](https://github.com/jupyterlab/jupyterlab/blob/3.1.x/CONTRIBUTING.md).

+ 1 - 1
packages/vdom/README.md

@@ -75,4 +75,4 @@ To render a `.vdom` or `.vdom.json` file, simply open it:
 
 ## Development
 
-See the [JupyterLab Contributor Documentation](https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md).
+See the [JupyterLab Contributor Documentation](https://github.com/jupyterlab/jupyterlab/blob/3.1.x/CONTRIBUTING.md).

+ 1 - 1
packages/vega5-extension/README.md

@@ -104,4 +104,4 @@ To render a `.vl`, `.vg`, `vl.json` or `.vg.json` file, simply open it:
 
 ## Development
 
-See the [JupyterLab Contributor Documentation](https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md).
+See the [JupyterLab Contributor Documentation](https://github.com/jupyterlab/jupyterlab/blob/3.1.x/CONTRIBUTING.md).

+ 1 - 1
setup.cfg

@@ -39,7 +39,7 @@ install_requires =
 
 [options.extras_require]
 test = coverage; pytest>=6.0; pytest-cov; pytest-console-scripts; pytest-check-links>=0.5; jupyterlab_server[test]~=2.2; requests; requests_cache; virtualenv; check-manifest
-ui-tests = ipykernel>=6.0
+ui-tests = build
 
 [options.entry_points]
 console_scripts =

+ 2 - 0
ui-tests/docker/docker-compose.yml

@@ -12,6 +12,8 @@ services:
         '--ServerApp.disable_check_xsrf=True',
         '--LabApp.expose_app_in_browser=True',
       ]
+    environment:
+      - SKIP_INTEGRITY_CHECK=true
     networks:
       - frontend
     ports: