Skip to content

Commit

Permalink
Migrate Elyra extensions to support JupyterLab 4.2.5 (#2)
Browse files Browse the repository at this point in the history
---------

Signed-off-by: Harshad Reddy Nalla <[email protected]>
Signed-off-by: shalberd <[email protected]>
Co-authored-by: Guilherme Caponetto <[email protected]>
Co-authored-by: Eder Ignatowicz <[email protected]>
Co-authored-by: Edson Tirelli <[email protected]>
Co-authored-by: Harshad Reddy Nalla <[email protected]>
Co-authored-by: Sven Thoms <[email protected]>
  • Loading branch information
6 people authored Dec 16, 2024
1 parent c46ec87 commit 9fcc9e3
Show file tree
Hide file tree
Showing 192 changed files with 9,683 additions and 11,988 deletions.
14 changes: 13 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,17 @@
"react": {
"version": "detect"
}
}
},
"ignorePatterns": [
"packages/pipeline-editor/elyra_pipeline_editor_extension/*",
"packages/theme/elyra_theme_extension/*",
"packages/script-debugger/elyra_script_debugger_extension/*",
"packages/script-editor/elyra_script_editor/*",
"packages/code-snippet/elyra_code_snippet_extension/*",
"packages/metadata/elyra_metadata_extension/*",
"packages/metadata-common/elyra_metadata_common/*",
"packages/python-editor/elyra_python_editor_extension/*",
"packages/services/elyra_services/*",
"packages/ui-components/elyra_ui_components/*"
]
}
129 changes: 92 additions & 37 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,43 @@ on:
pull_request: # all branches
schedule:
# once a day at 3 am (PST) (10 am (UTC))
- cron: '0 10 * * *'
- cron: '0 10 * * *'

env:
FORCE_COLOR: true
NODE_VERSION: 20.11.0
YARN_VERSION: 3.5.0
PYTHON_VERSION: 3.11

jobs:
prepare-yarn-cache:
name: Prepare Cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.11.0"
- run: npm install -g [email protected]
- uses: actions/cache@v3
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@v4
with:
path: |
node_modules
*/*/node_modules
/home/runner/.cache/Cypress
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install
- name: Install Yarn ${{ env.YARN_VERSION }}
run: |
corepack prepare yarn@${{ env.YARN_VERSION }} --activate
yarn set version ${{ env.YARN_VERSION }}
yarn --version
yarn install && tsc -v
# --frozen-lockfile
- name: Install dependencies
run: |
yarn install
lint-server:
name: Lint Server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Lint
run: make lint-server

Expand All @@ -59,18 +64,24 @@ jobs:
needs: prepare-yarn-cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "*"
- uses: actions/cache@v3
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@v4
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: make yarn-install
- name: Install Yarn ${{ env.YARN_VERSION }}
run: |
corepack prepare yarn@${{ env.YARN_VERSION }} --activate
yarn set version ${{ env.YARN_VERSION }}
yarn --version
- name: Install dependencies
run: |
make yarn-install
- name: Lint
run: make eslint-check-ui
- name: Check format
Expand All @@ -81,10 +92,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10"]
python-version: [3.8, 3.9, '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install
Expand All @@ -110,19 +121,24 @@ jobs:
needs: prepare-yarn-cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "*"
- uses: actions/setup-python@v4
node-version: ${{ env.NODE_VERSION }}
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: actions/cache@v3
python-version: ${{ env.PYTHON_VERSION }}
- uses: actions/cache@v4
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install Yarn ${{ env.YARN_VERSION }}
run: |
corepack prepare yarn@${{ env.YARN_VERSION }} --activate
yarn set version ${{ env.YARN_VERSION }}
yarn --version
- name: Build
run: |
make build-dependencies
Expand All @@ -138,20 +154,25 @@ jobs:
needs: prepare-yarn-cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "*"
- uses: actions/setup-python@v4
node-version: ${{ env.NODE_VERSION }}
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: actions/cache@v3
python-version: ${{ env.PYTHON_VERSION }}
- uses: actions/cache@v4
with:
path: |
node_modules
*/*/node_modules
/home/runner/.cache/Cypress
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install Yarn ${{ env.YARN_VERSION }}
run: |
corepack prepare yarn@${{ env.YARN_VERSION }} --activate
yarn set version ${{ env.YARN_VERSION }}
yarn --version
- name: Build
run: |
make build-dependencies
Expand All @@ -164,9 +185,10 @@ jobs:
- name: Cypress
run: make test-integration
- name: Collect logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: elyra_test_artifacts
path: |
${{ github.workspace }}/build/cypress-tests/*.log
${{ github.workspace }}/build/cypress-tests/screenshots//**/*
Expand All @@ -177,7 +199,7 @@ jobs:
name: Test documentation build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
run: make docs

Expand All @@ -186,17 +208,50 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10"]
python-version: [3.8, 3.9, '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Validate image environment
run: make PYTHON_VERSION=${{ matrix.python-version }} elyra-image-env


validate-images:
name: Validate Images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Validate runtime images
run: make REMOVE_RUNTIME_IMAGE=1 validate-runtime-images

upload-artifacts:
name: Upload Artifacts
needs: prepare-yarn-cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: actions/cache@v4
with:
path: |
node_modules
*/*/node_modules
/home/runner/.cache/Cypress
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install Yarn ${{ env.YARN_VERSION }}
run: |
corepack prepare yarn@${{ env.YARN_VERSION }} --activate
yarn set version ${{ env.YARN_VERSION }}
yarn --version
- name: Build
run: |
make clean install
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: elyra_build_artifacts
path: |
${{ github.workspace }}/dist
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ htmlcov/
nosetests.xml
coverage.xml
*,cover
**/coverage/

# Translations
*.mo
Expand Down Expand Up @@ -92,3 +93,5 @@ node_modules
.vscode/

.yarn/

labextensions/**/labextension/*
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"singleQuote": true
"singleQuote": true,
"trailingComma" : "none"
}
2 changes: 0 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
enableImmutableInstalls: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.5.0.cjs
27 changes: 5 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

.PHONY: help purge uninstall-src uninstall clean
.PHONY: help purge uninstall clean
.PHONY: lint-dependencies lint-server black-format prettier-check-ui eslint-check-ui prettier-ui eslint-ui lint-ui lint
.PHONY: dev-link dev-unlink
.PHONY: build-dependencies dev-dependencies yarn-install build-ui package-ui package-ui-dev
Expand All @@ -35,7 +35,7 @@ CONTAINER_OUTPUT_OPTION?=--output=type=docker
# Python execs
PYTHON?=python3
PYTHON_PIP=$(PYTHON) -m pip
PYTHON_VERSION?=3.9
PYTHON_VERSION?=3.11

CONDA_ACTIVATE = source $$(conda info --base)/etc/profile.d/conda.sh ; conda activate

Expand Down Expand Up @@ -75,24 +75,7 @@ purge:
rm -rf $$(find . -name .pytest_cache)
rm -rf $(yarn cache dir)

uninstall-src: # Uninstalls source extensions if they're still installed
- jupyter labextension unlink --no-build @elyra/services
- jupyter labextension unlink --no-build @elyra/ui-components
- jupyter labextension unlink --no-build @elyra/metadata-common
- jupyter labextension unlink --no-build @elyra/script-editor
- jupyter labextension uninstall --no-build @elyra/theme-extension
- jupyter labextension uninstall --no-build @elyra/code-snippet-extension
- jupyter labextension uninstall --no-build @elyra/metadata-extension
- jupyter labextension uninstall --no-build @elyra/pipeline-editor-extension
- jupyter labextension uninstall --no-build @elyra/python-editor-extension
- jupyter labextension uninstall --no-build @elyra/r-editor-extension
- jupyter labextension uninstall --no-build @elyra/scala-editor-extension
- jupyter labextension uninstall --no-build @elyra/code-viewer-extension
- jupyter labextension uninstall --no-build @elyra/script-debugger-extension
- jupyter labextension unlink --no-build @elyra/pipeline-services
- jupyter labextension unlink --no-build @elyra/pipeline-editor

uninstall: uninstall-src
uninstall:
$(PYTHON_PIP) uninstall -y jupyterlab-git
$(PYTHON_PIP) uninstall -y nbdime
$(PYTHON_PIP) uninstall -y jupyter-lsp
Expand Down Expand Up @@ -179,7 +162,7 @@ uninstall-server-package:
@$(PYTHON_PIP) uninstall elyra -y

install-server-package: uninstall-server-package
$(PYTHON_PIP) install --upgrade --upgrade-strategy $(UPGRADE_STRATEGY) "$(shell find dist -name "elyra-*-py3-none-any.whl")[kfp-tekton]"
$(PYTHON_PIP) install --upgrade --upgrade-strategy $(UPGRADE_STRATEGY) "$(shell find dist -name "elyra-*-py3-none-any.whl")"

install-server: build-dependencies lint-server build-server install-server-package ## Build and install backend

Expand All @@ -189,7 +172,7 @@ install-all: package-ui install-server install-examples install-gitlab-dependenc

install-dev: package-ui-dev install-server install-examples install-gitlab-dependency check-install

install-examples: ## Install example pipeline components
install-examples: ## Install example pipeline components
# install Kubeflow Pipelines example components
# -> https://github.com/elyra-ai/examples/tree/main/component-catalog-connectors/kfp-example-components-connector
- $(PYTHON_PIP) install --upgrade elyra-examples-kfp-catalog
Expand Down
2 changes: 1 addition & 1 deletion build_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
jupyterlab>=4.0,<4.1
jupyterlab==4.2.5
jupyter-packaging>=0.10
build
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sphinx>=1.8
sphinx_rtd_theme
sphinx_rtd_theme==2.0.0
recommonmark>=0.6.0
sphinx-markdown-tables>=0.0.16
sphinx-version-warning
Expand Down
8 changes: 4 additions & 4 deletions elyra/metadata/schemas/airflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"description": "Token that has permission to push to the DAG repository",
"type": "string",
"uihints": {
"ui:field": "password",
"ui:field": "@elyra/metadata-extension:plugin.password",
"category": "Apache Airflow"
}
},
Expand Down Expand Up @@ -161,7 +161,7 @@
"description": "Kubernetes secret that's defined in the specified user namespace, containing the Cloud Object Storage username and password. This property is required for authentication type KUBERNETES_SECRET.",
"type": "string",
"uihints": {
"ui:field": "password",
"ui:field": "@elyra/metadata-extension:plugin.password",
"category": "Cloud Object Storage"
}
},
Expand All @@ -179,7 +179,7 @@
"type": "string",
"minLength": 8,
"uihints": {
"ui:field": "password",
"ui:field": "@elyra/metadata-extension:plugin.password",
"category": "Cloud Object Storage"
}
},
Expand All @@ -193,7 +193,7 @@
"pattern": "^[^ \t]+([ \t]+[^ \t]+)*$"
},
"uihints": {
"ui:field": "tags"
"ui:field": "@elyra/metadata-extension:plugin.tags"
}
}
},
Expand Down
Loading

0 comments on commit 9fcc9e3

Please sign in to comment.