Skip to content

Commit 4c3e035

Browse files
authored
[RFC72] Spring Boot Upgrade (#10425)
RFC72 - Removal of core module - Squashing of all modules into a single module - Update of Java Version - Update of Libraries - Simplification development and deployment
1 parent 227ff81 commit 4c3e035

File tree

2,707 files changed

+34108
-308190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,707 files changed

+34108
-308190
lines changed

.circleci/config.yml

+7-12
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version: 2
66
jobs:
77
build_backend:
88
docker:
9-
- image: maven:3-openjdk-11
9+
- image: maven:3-eclipse-temurin-21
1010
working_directory: /tmp/repos/cbioportal
1111
steps:
1212
- checkout
@@ -18,10 +18,10 @@ jobs:
1818
- v1-mvn-dependencies-{{ checksum "poms_combined" }}
1919
- v1-mvn-dependencies-
2020
- run:
21-
name: Build and unzip war
21+
name: Build and unzip jar
2222
command: |
23-
mvn -DskipTests clean install && \
24-
unzip portal/target/cbioportal*.war -d portal/target/war-exploded
23+
cp src/main/resources/application.properties.EXAMPLE src/main/resources/application.properties && \
24+
mvn -DskipTests clean package
2525
- save_cache:
2626
paths:
2727
- ~/.m2
@@ -39,12 +39,12 @@ jobs:
3939
- run:
4040
name: Pull frontend code
4141
command: |
42-
export FRONTEND_VERSION=$(grep 'frontend\.version' pom.xml | sed 's/<frontend\.version>//g' | sed 's|</frontend\.version>||' | tr -d '[:blank:]') && \
42+
export FRONTEND_VERSION=$(grep '<frontend\.version>' pom.xml | sed 's/<frontend\.version>//g' | sed 's|</frontend\.version>||' | tr -d '[:blank:]') && \
4343
export FRONTEND_ORG=$(grep 'frontend\.groupId' pom.xml | sed 's/<frontend\.groupId>//g' | sed 's|</frontend\.groupId>||' | tr -d '[:blank:]' | cut -d. -f3) && \
4444
git clone https://github.com/$FRONTEND_ORG/cbioportal-frontend.git && \
4545
cd cbioportal-frontend && \
4646
git fetch --tags && \
47-
git checkout ${FRONTEND_VERSION}
47+
git checkout demo-rfc72
4848
- persist_to_workspace:
4949
root: /tmp/repos
5050
paths:
@@ -145,11 +145,6 @@ jobs:
145145
command: |
146146
$TEST_HOME/docker_compose/setup.sh
147147
no_output_timeout: 25m
148-
- run:
149-
name: Generate checksum of data that populates the test database
150-
command: |
151-
bash -x $TEST_HOME/runtime-config/db_content_fingerprint.sh | tee /tmp/db_data_md5key
152-
no_output_timeout: 25m
153148
- run:
154149
name: Create MySQL data directory
155150
command: |
@@ -219,7 +214,7 @@ jobs:
219214
- store_artifacts:
220215
path: /tmp/repos/cbioportal-frontend/end-to-end-test/local/junit/errors/
221216
destination: /errors
222-
217+
223218
environment:
224219
PORTAL_SOURCE_DIR: /tmp/repos/cbioportal-frontend/
225220
TEST_HOME: /tmp/repos/cbioportal-frontend/end-to-end-test/local

.github/workflows/core-test.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ jobs:
1717
uses: actions/checkout@v2
1818
with:
1919
path: ./cbioportal
20-
- name: 'Set up JDK 11'
21-
uses: actions/setup-java@v1
20+
- name: 'Set up JDK 21'
21+
uses: oracle-actions/setup-java@v1
2222
with:
23-
java-version: 11
23+
website: oracle.com
24+
release: 21
2425
- name: 'Cache Maven packages'
2526
uses: actions/cache@v1
2627
with:
@@ -40,6 +41,10 @@ jobs:
4041
run: |
4142
mkdir -p ~/.m2 && \
4243
cp .github/settings.xml ~/.m2
44+
- name: 'Create application.properties'
45+
working-directory: ./cbioportal
46+
run: |
47+
cp src/main/resources/application.properties.EXAMPLE src/main/resources/application.properties
4348
- name: 'Build cBioPortal once without tests'
4449
working-directory: ./cbioportal
4550
run: |

.github/workflows/dockerimage.yml

+22-18
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818
steps:
1919
- name: Checkout git repo
2020
uses: actions/checkout@v3
21-
21+
- name: 'Create application.properties'
22+
run: |
23+
cp src/main/resources/application.properties.EXAMPLE src/main/resources/application.properties
2224
- name: Extract metadata
2325
id: meta
2426
uses: docker/metadata-action@v4
@@ -30,19 +32,19 @@ jobs:
3032
type=ref,event=branch
3133
type=semver,pattern={{version}}
3234
33-
# The following two actions are required to build multi-platform images
34-
# buildx is an extension of docker build, QUEM is used to convert the binary to varies architecture
35-
- name: Set up QEMU
36-
uses: docker/setup-qemu-action@v2
37-
- name: Set up Docker Buildx
38-
uses: docker/setup-buildx-action@v2
39-
4035
- name: Login to DockerHub
41-
uses: docker/login-action@v2
36+
uses: docker/login-action@v3
4237
with:
4338
username: ${{ secrets.DOCKER_USERNAME }}
4439
password: ${{ secrets.DOCKER_PASSWORD }}
4540

41+
# The following two actions are required to build multi-platform images
42+
# buildx is an extension of docker build, QUEM is used to convert the binary to varies architecture
43+
- name: Set up QEMU
44+
uses: docker/setup-qemu-action@v3
45+
- name: Set up Docker Buildx
46+
uses: docker/setup-buildx-action@v3
47+
4648
- name: Publish Docker Image on Tag
4749
uses: docker/build-push-action@v3
4850
with:
@@ -60,7 +62,9 @@ jobs:
6062
steps:
6163
- name: Checkout git repo
6264
uses: actions/checkout@v3
63-
65+
- name: 'Create application.properties'
66+
run: |
67+
cp src/main/resources/application.properties.EXAMPLE src/main/resources/application.properties
6468
- name: Extract metadata
6569
id: meta
6670
uses: docker/metadata-action@v4
@@ -75,19 +79,19 @@ jobs:
7579
type=ref,event=branch
7680
type=semver,pattern={{version}}
7781
78-
# The following two actions are required to build multi-platform images
79-
# buildx is an extension of docker build, QUEM is used to convert the binary to varies architecture
80-
- name: Set up QEMU
81-
uses: docker/setup-qemu-action@v2
82-
- name: Set up Docker Buildx
83-
uses: docker/setup-buildx-action@v2
84-
8582
- name: Login to DockerHub
86-
uses: docker/login-action@v2
83+
uses: docker/login-action@v3
8784
with:
8885
username: ${{ secrets.DOCKER_USERNAME }}
8986
password: ${{ secrets.DOCKER_PASSWORD }}
9087

88+
# The following two actions are required to build multi-platform images
89+
# buildx is an extension of docker build, QUEM is used to convert the binary to varies architecture
90+
- name: Set up QEMU
91+
uses: docker/setup-qemu-action@v3
92+
- name: Set up Docker Buildx
93+
uses: docker/setup-buildx-action@v3
94+
9195
- name: Publish Docker Image on Tag
9296
uses: docker/build-push-action@v3
9397
with:

.github/workflows/integration-test.yml

+30-13
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,21 @@ jobs:
1919
sudo apt-get install python3-setuptools && \
2020
pip3 install -U wheel && \
2121
pip3 install -r ./requirements.txt
22-
- name: 'Set up JDK 11'
23-
uses: actions/setup-java@v1
22+
- name: 'Set up JDK 21'
23+
uses: oracle-actions/setup-java@v1
2424
with:
25-
java-version: 11
25+
website: oracle.com
26+
release: 21
2627
- name: 'Cache Maven packages'
2728
uses: actions/cache@v1
2829
with:
2930
path: ~/.m2
3031
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3132
restore-keys: ${{ runner.os }}-m2
33+
- name: 'Copy application.properties'
34+
working-directory: ./cbioportal
35+
run: |
36+
cp src/main/resources/application.properties.EXAMPLE src/main/resources/application.properties
3237
- name: 'Build cbioportal'
3338
working-directory: ./cbioportal
3439
run: |
@@ -37,21 +42,30 @@ jobs:
3742
uses: actions/checkout@master
3843
with:
3944
repository: cbioportal/cbioportal-docker-compose
45+
ref: demo-rfc72
4046
path: ./cbioportal-docker-compose
4147
- name: 'Initialize cbioportal-docker-compose'
4248
working-directory: ./cbioportal-docker-compose
4349
run: |
4450
cd ./data && ./init.sh && rm -rf ./studies/* && cd ../config && \
45-
cat $PORTAL_SOURCE_DIR/portal/target/classes/portal.properties | \
46-
sed 's|db.host=.*||' | \
47-
sed 's|db.portal_db_name=.*||' | \
48-
sed 's|db.use_ssl=.*||' | \
49-
sed 's|db.connection_string=.*|db.connection_string=jdbc:mysql://cbioportal-database:3306/cbioportal?useSSL=false\&allowPublicKeyRetrieval=true|' \
50-
> portal.properties && more portal.properties
51+
cat $PORTAL_SOURCE_DIR/src/main/resources/application.properties | \
52+
sed 's|spring.datasource.url=.*|spring.datasource.url=jdbc:mysql://cbioportal-database:3306/cbioportal?useSSL=false|' | \
53+
sed 's|spring.datasource.username=.*|spring.datasource.username=cbio_user|' | \
54+
sed 's|spring.datasource.password=.*|spring.datasource.password=somepassword|' \
55+
> application.properties && \
56+
echo "db.user=cbio_user" >> application.properties && \
57+
echo "db.password=somepassword" >> application.properties && \
58+
echo "db.connection_string=jdbc:mysql://cbioportal-database:3306/cbioportal?useSSL=false" >> application.properties && \
59+
echo "db.driver=com.mysql.jdbc.Driver" >> application.properties
60+
- name: 'Copy cgds.sql file into Docker Compose'
61+
run: cp ./cbioportal/src/main/resources/db-scripts/cgds.sql ./cbioportal-docker-compose/data/.
62+
- name: 'Dump Properties'
63+
working-directory: ./cbioportal-docker-compose
64+
run: cat config/application.properties
5165
- name: 'Start cbioportal-docker-compose'
5266
working-directory: ./cbioportal-docker-compose
5367
run: |
54-
docker-compose -f docker-compose.yml -f $PORTAL_SOURCE_DIR/test/integration/docker-compose-localbuild.yml up -d
68+
export DOCKER_IMAGE_CBIOPORTAL=cbioportal/cbioportal:demo-rfc72-squash && docker-compose -f docker-compose.yml -f $PORTAL_SOURCE_DIR/test/integration/docker-compose-localbuild.yml up -d
5569
- name: 'Wait for cbioportal to initialize ...'
5670
id: startup
5771
uses: nev7n/wait_for_response@v1
@@ -60,17 +74,20 @@ jobs:
6074
responseCode: 200
6175
timeout: 900000
6276
interval: 30000
77+
- name: Log cBioPortal Service
78+
if: ${{ failure() && steps.startup.conclusion == 'failure' }}
79+
working-directory: ./cbioportal-docker-compose
80+
run: docker-compose logs cbioportal
6381
- name: 'TEST - Validate and load study_es_0'
6482
if: steps.startup.conclusion == 'success'
6583
working-directory: ./cbioportal-docker-compose
6684
run: |
6785
$PORTAL_SOURCE_DIR/test/integration/test_load_study.sh
6886
- name: 'TEST - Add OncoKB annotations to study'
6987
if: steps.startup.conclusion == 'success'
70-
working-directory: ./cbioportal
88+
working-directory: ./cbioportal-docker-compose
7189
run: |
72-
export PYTHONPATH=$PORTAL_SOURCE_DIR/core/src/main/scripts && \
73-
$PORTAL_SOURCE_DIR/test/integration/integration_test_oncokb_import.sh
90+
$PORTAL_SOURCE_DIR/test/integration/test_integration_test_oncokb_import.sh
7491
- name: 'TEST - Update OncoKB annotations'
7592
if: steps.startup.conclusion == 'success'
7693
working-directory: ./cbioportal-docker-compose

.github/workflows/sonarcloud.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
- uses: actions/checkout@v2
1414
with:
1515
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
16-
- name: Set up JDK 11
16+
- name: Set up JDK 21
1717
uses: actions/setup-java@v1
1818
with:
19-
java-version: 11
19+
java-version: 21
2020
- name: Cache SonarCloud packages
2121
uses: actions/cache@v1
2222
with:
@@ -29,6 +29,9 @@ jobs:
2929
path: ~/.m2
3030
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3131
restore-keys: ${{ runner.os }}-m2
32+
- name: 'Create application.properties'
33+
run: |
34+
cp src/main/resources/application.properties.EXAMPLE src/main/resources/application.properties
3235
- name: Build and analyze
3336
env:
3437
SONAR_TOKEN: de1b5cc660cd210dde840f492c371da6cc801763

.github/workflows/validate-data.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@ jobs:
99
uses: actions/checkout@v2
1010
with:
1111
path: ./cbioportal
12+
- name: 'Checkout core module'
13+
uses: actions/checkout@v4
14+
with:
15+
path: ./cbioportal/core
16+
repository: cBioPortal/cbioportal-core
1217
- name: 'Validate tests'
1318
working-directory: ./cbioportal
1419
run: |
1520
docker run -v ${PWD}:/cbioportal python:3.6 /bin/sh -c '
1621
cd /cbioportal &&
1722
pip install -r requirements.txt &&
18-
export PYTHONPATH=/cbioportal/core/src/main/scripts &&
23+
export PYTHONPATH=/cbioportal/core/src/main/resources/scripts &&
1924
cd /cbioportal/core/src/test/scripts/ &&
2025
python unit_tests_validate_data.py &&
2126
python system_tests_validate_data.py &&

.gitignore

+23-21
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
liftover/target/*
2+
target/
3+
portal/target/*
4+
core/target/*
5+
annotator/target/*
6+
importer/target/*
7+
business/target/*
8+
model/target/*
9+
scripts/target
10+
persistence/persistence-api/target/*
11+
persistence/persistence-mybatis/target/*
12+
persistence/persistence-mybatis-test/target/*
13+
service/target/*
14+
mutation-assessor/target/*
15+
cbioportal-client/target/*
16+
mondrian-cy3-app/target/*
17+
utils/target/*
18+
web/target/*
119
nb-configuration.xml
220
nbactions-private.xml
321
oncotator/src/main/resources/db.properties
@@ -55,6 +73,7 @@ portal/src/main/webapp/WEB-INF/logback.xml
5573
!src/main/resource/*.EXAMPLE
5674
firehose-importer/reference_data/gene_info
5775
portal.properties
76+
application.properties
5877
importer.properties
5978
log4j.properties
6079
build.properties
@@ -64,21 +83,6 @@ syntax: glob
6483
*.swp
6584
importer/*.log
6685
firehose-importer/*.txt
67-
portal/target/*
68-
liftover/target/*
69-
core/target/*
70-
annotator/target/*
71-
importer/target/*
72-
business/target/*
73-
model/target/*
74-
persistence/persistence-api/target/*
75-
persistence/persistence-mybatis/target/*
76-
persistence/persistence-mybatis-test/target/*
77-
service/target/*
78-
web/target/*
79-
mutation-assessor/target/*
80-
cbioportal-client/target/*
81-
mondrian-cy3-app/target/*
8286
nbactions.xml
8387
*/*.iml
8488
*.iml
@@ -93,18 +97,16 @@ dependency-reduced-pom.xml
9397
/core/nbactions-private.xml
9498
.profile.d/
9599
Procfile
96-
scripts/target
97100
node_modules/
98-
target/
99-
portal/META-INF/*
100-
portal/reactapp/*
101101
package.json
102102
.vscode/
103103
*.tramp_history
104104
pom.version.*
105105
pom.xml.*
106-
db-scripts/src/main/resources/cgds-test.sql
107106
pom.xml.*
108107
Dockerfile.local
109108
.factorypath
110-
.retype
109+
.retype
110+
security.properties
111+
*.crt
112+
*.key

0 commit comments

Comments
 (0)