Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: python3.10/11, opensearch, invenio upgrades #2901

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7383e6f
global: update deps, update for opensearch 2
Jan 13, 2023
25234ba
global: updates forked packages from upstream
pamfilos Apr 4, 2023
7834150
devops: update workflows for branch next
ParthS007 Apr 11, 2023
064601e
global: various fixes
pamfilos Oct 1, 2024
26571d2
oauth: adds contrib CERN openid
pamfilos Oct 16, 2024
45b7e2e
oauth: update fork with openid for CERN
pamfilos Oct 16, 2024
1a03321
search: update 'ssl_show_warn' setting for OS
pamfilos Nov 19, 2024
d9b1428
tests: fixes tests after package updates
pamfilos Mar 3, 2025
9730e73
ui: remove form builder components
miguelgrc Oct 17, 2023
e27cad6
ui: use formule from npm
miguelgrc Feb 23, 2024
7038872
devops: fix harbor build action
miguelgrc Feb 23, 2024
6deb95a
ui: bump react-formule to 1.0.0
miguelgrc May 15, 2024
9d7d9e4
ui: remove codemirror and use formule's instead
miguelgrc Aug 14, 2024
f5dc01e
ui: pass transformErrors to FormuleForm
miguelgrc Aug 14, 2024
02aa54a
ui: simplify local setup
miguelgrc Aug 14, 2024
6f39972
ui: bump formule to v1.1.1
miguelgrc Aug 14, 2024
40ac663
ui: small style tweaks
miguelgrc Aug 14, 2024
5b8e2da
ui: add back transformMixedEsModules
miguelgrc Aug 27, 2024
4674313
ui: bump node to v20 for actions
miguelgrc Aug 27, 2024
81dc646
ui: bump formule to 1.2
miguelgrc Oct 2, 2024
c6cb47e
ui: fix redirection after saving in editor
miguelgrc Oct 2, 2024
8cc1a03
ui: oauth - update login with CERN
pamfilos Oct 24, 2024
9f00b74
ui: config sentry
miguelgrc Nov 6, 2024
f008925
ui: bump formule to 1.2.1 and pass ErrorBoundary
miguelgrc Nov 15, 2024
3b48eeb
ui: formule to 1.3.0, update schema saving/loading
miguelgrc Dec 9, 2024
3843827
ui: bump react-formule 1.4.0
pamfilos Mar 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e-workflow-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: E2E - Server changes with python package installations

on:
pull_request:
branches: [master, ant, faser]
branches: [master, next]
paths:
- "setup.py"
- "requirements.txt"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-workflow-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches: uitest
pull_request:
branches: [master, ant, faser]
branches: [master, next]
paths:
- "ui/**"
- ".github/workflows/ui-test.yml"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ on:
- master
- qa
- production
- next
pull_request:
branches:
- qa
- production
- faser
- next
jobs:
Cypress:
name: Cypress
Expand All @@ -25,7 +26,7 @@ jobs:
run: docker-compose -f docker-compose.e2e.yml run web-api sh scripts/clean-and-init.sh

- name: Update save folder
run: docker-compose -f docker-compose.e2e.yml run web-api cap files location local var/data --default
run: docker-compose -f docker-compose.e2e.yml run web-api cap files location local var/data --default

- name: Sleep for 180 seconds
run: sleep 180s
Expand Down
61 changes: 13 additions & 48 deletions .github/workflows/harbour-build-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ name: Build and export CAP UI image

on:
push:
branches: ['master', 'dev', 'qa', 'test']
paths:
- "ui/**"
- ".github/workflows/ui-test.yml"
branches: ["master", "dev", "qa", "test", "with-formule"]
# paths:
# - "ui/**"
# - ".github/workflows/ui-test.yml"

jobs:
build-image:
needs: UITest
name: Build and export ui image
runs-on: ubuntu-20.04
outputs:
Expand All @@ -23,6 +22,10 @@ jobs:
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: get_branch

- name: Extract short commit SHA
id: get_short_sha
run: echo "SENTRY_RELEASE=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_OUTPUT

- id: build-ui
name: Build and export
uses: cern-sis/gh-workflows/.github/actions/[email protected]
Expand All @@ -36,46 +39,8 @@ jobs:
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
build-args: |
BRANCH_NAME=${{ steps.get_branch.outputs.BRANCH_NAME }}
PIWIK_ENV=${{ steps.get_branch.outputs.BRANCH_NAME }}
CAP_PIWIK_URL=${{ secrets.CAP_PIWIK_URL }}
CAP_PIWIK_SITEID_DEV=${{ secrets.CAP_PIWIK_SITEID_DEV }}
CAP_PIWIK_SITEID_PROD=${{ secrets.CAP_PIWIK_SITEID_PROD }}
CAP_PIWIK_SITEID_QA=${{ secrets.CAP_PIWIK_SITEID_QA }}
CAP_PIWIK_SITEID_TEST=${{ secrets.CAP_PIWIK_SITEID_TEST }}

- id: build-ui-e2e
name: Build and export for end to end image
uses: cern-sis/gh-workflows/.github/actions/[email protected]
if: ${{ steps.get_branch.outputs.BRANCH_NAME }} == 'qa'
with:
dockerfile: ./docker/harbour/ui/Dockerfile
platforms: linux/amd64,linux/arm64
image: cern-sis/cap-ui
registry: registry.cern.ch
cache: false
tags: qa-e2e
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
build-args: |
BRANCH_NAME=${{ steps.get_branch.outputs.BRANCH_NAME }}
ENABLE_E2E=True
PIWIK_ENV=${{ steps.get_branch.outputs.BRANCH_NAME }}
CAP_PIWIK_URL=${{ secrets.CAP_PIWIK_URL }}
CAP_PIWIK_SITEID_QA=${{ secrets.CAP_PIWIK_SITEID_QA }}

deploy:
needs: build-image
name: update-image
runs-on: ubuntu-20.04

steps:
- name: send event
uses: cern-sis/gh-workflows/.github/actions/[email protected]
with:
event-type: update
token: ${{ secrets.PAT_FIRE_EVENTS_ON_CERN_SIS_KUBERNETES_CAP }}
repo: cern-sis/kubernetes-cap
images: |
cern-sis/cap-ui@{{ needs.build-image.outputs.image-id }}

SENTRY_URL=${{ secrets.CAP_SENTRY_URL }}
SENTRY_ORG=${{ secrets.CAP_SENTRY_ORG }}
SENTRY_PROJECT=${{ secrets.CAP_SENTRY_PROJECT }}
SENTRY_AUTH_TOKEN=${{ secrets.CAP_SENTRY_AUTH_TOKEN }}
SENTRY_RELEASE=${{ steps.get_short_sha.outputs.SENTRY_RELEASE }}
8 changes: 4 additions & 4 deletions .github/workflows/lint-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Lint Commit

on:
pull_request:
branches: [ master ]
branches: [ master, next ]

jobs:
lint-shellcheck:
Expand All @@ -28,7 +28,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.6.9
python-version: '3.10'

- name: Checking commit quality (messages, signatures, spelling checks, etc)
env:
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.6.9
python-version: '3.10'

- name: Check Python manifest completeness
run: |
Expand All @@ -59,7 +59,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.6.9
python-version: '3.10'

- name: Check compliance with Python docstring conventions
run: |
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/lint-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Lint Source

on:
push:
branches: [ master ]
branches: [master, next]

jobs:
lint-shellcheck:
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.6.9
python-version: "3.10"

- name: Check compliance with Python docstring conventions
run: |
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.6.9
python-version: "3.10"

- name: Check compliance with pep8, pyflakes and circular complexity
run: |
Expand All @@ -55,7 +55,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.6.9
python-version: "3.10"

- name: Run black linter for python
run: |
Expand All @@ -70,7 +70,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.6.9
python-version: "3.10"

- name: isort your imports, so you don't have to.
run: |
Expand All @@ -85,7 +85,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2-beta
with:
node-version: "10"
node-version: "20"

- name: Run prettier
run: |
Expand All @@ -100,7 +100,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.6.9
python-version: "3.10"

- name: Check Python manifest completeness
run: |
Expand All @@ -120,7 +120,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.6.9
python-version: "3.10"

- name: Checking commit quality (messages, signatures, spelling checks, etc)
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ui-test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: UI test
on:
push:
branches: [master, ant]
branches: [master, next]
paths:
- "ui/**"
- ".github/workflows/ui-test.yml"
pull_request:
branches: [master, ant, faser]
branches: [master, next]
paths:
- "ui/**"
- ".github/workflows/ui-test.yml"
Expand All @@ -20,7 +20,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2-beta
with:
node-version: "14"
node-version: "20"

- name: Build
working-directory: ./ui
Expand Down
37 changes: 21 additions & 16 deletions .github/workflows/web-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: Backend tests

on:
push:
branches: [ master, ant ]
branches: [master, next]
paths-ignore:
- 'ui/**'
- "ui/**"
pull_request:
branches: [ master, ant, faser ]
branches: [master, next]
paths-ignore:
- 'ui/**'
- "ui/**"

jobs:
lint-python-changes:
Expand All @@ -19,10 +19,11 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.6.9
python-version: "3.10"

- name: Run darker
run: |
pip install flake8
pip install darker[isort]
darker . --check -i -L flake8

Expand All @@ -40,40 +41,44 @@ jobs:
POSTGRES_PASSWORD: cap
POSTGRES_DB: cap
ports:
- 5432:5432
- 5432:5432
rabbitmq:
image: rabbitmq:3-management
ports:
- 5672:5672
elasticsearchd:
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.4
search:
image: opensearchproject/opensearch:2.2.0
env:
node.name: search
bootstrap.memory_lock: true
ES_JAVA_OPTS: -Xms1024m -Xmx1024m
OPENSEARCH_JAVA_OPTS: -Xms1024m -Xmx1024m
discovery.type: single-node
xpack.security.enabled: false
discovery.seed_hosts: search
DISABLE_SECURITY_PLUGIN: true
ports:
- 9200:9200
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10

steps:
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.6.9
python-version: "3.10"

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev libkrb5-dev
sudo apt-get install libsasl2-dev python3-dev libldap2-dev libssl-dev libkrb5-dev

- name: Install dependencies
run: |
pip install --upgrade pip==20.2.4
pip install -r requirements.txt
pip install -e .[all,docs,tests,ldap]
pip install -r requirements-local-forks.txt
pip install .

- name: Run integration and unit tests
run: ./run-tests.sh --check-pytest
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
args: ["--config=.flake8"]

- repo: https://github.com/pycqa/isort
rev: "5.10.1"
rev: "5.12.0"
hooks:
- id: isort

Expand Down
Loading
Loading