Skip to content

Commit 3dd92da

Browse files
authored
0.3.x: Fix OpenSSL issue (#1337)
* Fix OpenSSL issue * OpenSSL issue in labextension * Remove openssl pinning * Iterate * Wut * Fix ui-test env * Linter * Iterate
1 parent c736653 commit 3dd92da

File tree

6 files changed

+30
-3
lines changed

6 files changed

+30
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
- name: Create the conda environment
3030
shell: bash -l {0}
31-
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs==16.19.0 yarn==1 flake8 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"
31+
run: mamba install -q python=3.9 pip jupyterlab_pygments=0.1.0 pytest-cov pytest-rerunfailures nodejs=16.19.0 yarn=1 flake8 ipywidgets matplotlib xeus-cling traitlets=5
3232

3333
- name: Install Dependencies
3434
shell: bash -l {0}

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- name: Create the conda environment
3434
shell: bash -l {0}
35-
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs==16.19.0 yarn==1 flake8 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"
35+
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments=0.1.0 pytest-cov pytest-rerunfailures nodejs=16 yarn=1 flake8 ipywidgets matplotlib xeus-cling traitlets=5
3636

3737
- name: Install dependencies
3838
shell: bash -l {0}
@@ -82,7 +82,7 @@ jobs:
8282

8383
- name: Create the conda environment
8484
shell: bash -l {0}
85-
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn flake8 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"
85+
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments=0.1.0 pytest-cov pytest-rerunfailures nodejs=16 yarn=1 flake8 ipywidgets matplotlib xeus-cling traitlets=5
8686

8787
- name: Install dependencies
8888
shell: bash -l {0}

.github/workflows/ui-tests.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: UI Tests
22

33
on: [push, pull_request]
44

5+
defaults:
6+
run:
7+
shell: bash -l {0}
8+
59
jobs:
610
ui-tests:
711
name: Visual Regression
@@ -17,6 +21,15 @@ jobs:
1721
- name: Base Setup
1822
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
1923

24+
- name: Setup mamba
25+
uses: conda-incubator/setup-miniconda@v2
26+
with:
27+
mamba-version: "*"
28+
channels: conda-forge
29+
30+
- name: Create the conda environment
31+
run: mamba install -q python=3.9 pip jupyterlab_pygments=0.1.0 pytest-cov pytest-rerunfailures nodejs=16.19.0 yarn=1 flake8 ipywidgets matplotlib xeus-cling traitlets=5
32+
2033
- name: Install dependencies
2134
run: |
2235
python -m pip install --upgrade ".[test,visual_test]"

packages/jupyterlab-preview/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
},
7373
"jupyterlab": {
7474
"extension": true,
75+
"webpackConfig": "webpack.lab.config.js",
7576
"schemaDir": "schema",
7677
"outputDir": "../../voila/labextension",
7778
"discovery": {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const crypto = require('crypto');
2+
3+
// Workaround for loaders using "md4" by default, which is not supported in FIPS-compliant OpenSSL
4+
const cryptoOrigCreateHash = crypto.createHash;
5+
crypto.createHash = algorithm =>
6+
cryptoOrigCreateHash(algorithm === 'md4' ? 'sha256' : algorithm);

packages/voila/webpack.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
var path = require('path');
22

3+
const crypto = require('crypto');
4+
5+
// Workaround for loaders using "md4" by default, which is not supported in FIPS-compliant OpenSSL
6+
const cryptoOrigCreateHash = crypto.createHash;
7+
crypto.createHash = algorithm =>
8+
cryptoOrigCreateHash(algorithm === 'md4' ? 'sha256' : algorithm);
9+
310
var rules = [
411
{ test: /\.css$/, use: ['style-loader', 'css-loader'] },
512
// required to load font-awesome

0 commit comments

Comments
 (0)