Skip to content

Commit c6acdbd

Browse files
tamassolteszSattviksattvikc
authored
feat: gha java upgrade merge (#1145)
* fix: remove unnecessary process start and stop in tests * fix: usermetadata and userroles * fix: delete app in kill * fix: email password tests * fix: email verification tests * fix: dashboard tests * fix: account linking tests * fix: passwordless tests * fix: passwordless tests * fix: thirdparty tests * fix: jwt tests * fix: mfa tests * fix: oauth tests * fix: webauthn tests * fix: useridmapping tests * fix: totp tests * fix: session tests * fix: auth recipe tests * fix: refactor testing process and fix all tests * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: unit test gha * fix: mongo tests * fix: mongo tests * fix: gha * fix: flaky * fix: compile error * fix: tests * fix: for mongo * fix: tests * fix: tests * fix: tests * fix: tests * fix: tests * fix: tests * fix: tests * fix: tests * fix: disable speed test * fix: one million users test * fix: test update * fix: sqlite test * fix: tests * fix: working test parallelisation for in-memory * fix: more parallelism * fix: trying arm * fix: ubuntu * fix: ee tests * fix: increase retry * fix: ee tests * fix: parallelised postgres tests * fix: tests * fix: tests * fix: workflow * fix: tests * fix: tests * fix: tests * fix: mysql for test * fix: tests * fix: tests * fix: add mongo service * fix: add mongo service * fix: services * fix: changelog and version * fix: docker build * fix: docker build * fix: docker build * fix: docker build * fix: docker build * fix: release workflow * feat: update gradle * fix: release workflow * fix: release workflow * fix: release workflow * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: stress tests * fix: release workflow * fix: compile error * fix: compile error * fix: release * fix: release * feat: update java and tomcat and gradle * fix: gha refactor * fix: gha refactor * fix: gha refactor * fix: gha refactor * fix: gha refactor * fix: change jdk/jre versions * fix: change java version in GHA test * fix: upgrade java version in GHA * fix: change root branch * fix: oauth tests * fix: workflows * fix: add dev tag * fix: dev docker image * fix: build versions * fix: disable circle ci and fix release workflows --------- Co-authored-by: Sattvik <sattvik@Sattviks-MacBook-Pro.local> Co-authored-by: Sattvik Chakravarthy <sattvik@gmail.com> Co-authored-by: Sattvik Chakravarthy <sattvik@supertokens.com>
1 parent c189651 commit c6acdbd

File tree

390 files changed

+6630
-4040
lines changed

Some content is hidden

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

390 files changed

+6630
-4040
lines changed

.circleci/Dockerfile

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:22.04
22

3-
RUN apt-get update && apt-get upgrade -y
3+
RUN apt-get update -y
4+
#&& apt-get upgrade -y
45

5-
RUN apt-get install build-essential -y
6+
RUN apt-get install build-essential -y --fix-missing
67

78
RUN echo "mysql-server mysql-server/root_password password root" | debconf-set-selections
89

@@ -12,7 +13,7 @@ RUN apt install mysql-server -y
1213

1314
RUN usermod -d /var/lib/mysql/ mysql
1415

15-
RUN mkdir /var/run/mysqld
16+
RUN [ -d /var/run/mysqld ] || mkdir -p /var/run/mysqld
1617

1718
ADD ./runMySQL.sh /runMySQL.sh
1819

@@ -22,36 +23,42 @@ RUN apt-get install -y git-core
2223

2324
RUN apt-get install -y wget
2425

25-
# Install OpenJDK 12
26-
RUN wget https://download.java.net/java/GA/jdk12.0.2/e482c34c86bd4bf8b56c0b35558996b9/10/GPL/openjdk-12.0.2_linux-x64_bin.tar.gz
27-
2826
RUN mkdir /usr/java
2927

30-
RUN mv openjdk-12.0.2_linux-x64_bin.tar.gz /usr/java
31-
32-
RUN cd /usr/java && tar -xzvf openjdk-12.0.2_linux-x64_bin.tar.gz
33-
34-
RUN echo 'JAVA_HOME=/usr/java/jdk-12.0.2' >> /etc/profile
35-
RUN echo 'PATH=$PATH:$HOME/bin:$JAVA_HOME/bin' >> /etc/profile
36-
3728
RUN apt-get install jq -y
3829

3930
RUN apt-get install curl -y
4031

4132
RUN apt-get install unzip -y
4233

43-
# Install OpenJDK 15.0.1
44-
RUN wget https://download.java.net/java/GA/jdk15.0.1/51f4f36ad4ef43e39d0dfdbaf6549e32/9/GPL/openjdk-15.0.1_linux-x64_bin.tar.gz
45-
46-
RUN mv openjdk-15.0.1_linux-x64_bin.tar.gz /usr/java
47-
48-
RUN cd /usr/java && tar -xzvf openjdk-15.0.1_linux-x64_bin.tar.gz
34+
# Install OpenJDK 21.0.7
35+
RUN wget https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.7%2B6/OpenJDK21U-jdk_x64_linux_hotspot_21.0.7_6.tar.gz
4936

50-
RUN echo 'JAVA_HOME=/usr/java/jdk-15.0.1' >> /etc/profile
37+
RUN mv OpenJDK21U-jdk_x64_linux_hotspot_21.0.7_6.tar.gz /usr/java
38+
RUN cd /usr/java && tar -xzvf OpenJDK21U-jdk_x64_linux_hotspot_21.0.7_6.tar.gz -C /usr/java/
39+
RUN mv /usr/java/jdk-21.0.7+6 /usr/java/jdk-21.0.7
40+
RUN echo 'JAVA_HOME=/usr/java/jdk-21.0.7' >> /etc/profile
41+
RUN echo 'JRE_HOME=/usr/java/jdk-21.0.7' >> /etc/profile
5142
RUN echo 'PATH=$PATH:$HOME/bin:$JAVA_HOME/bin' >> /etc/profile
5243
RUN echo 'export JAVA_HOME' >> /etc/profile
5344
RUN echo 'export JRE_HOME' >> /etc/profile
5445
RUN echo 'export PATH' >> /etc/profile
5546

56-
RUN update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-12.0.2/bin/java" 1
57-
RUN update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-12.0.2/bin/javac" 1
47+
RUN update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-21.0.7/bin/java" 1
48+
RUN update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-21.0.7/bin/javac" 1
49+
50+
#install postgres 13
51+
# Import Repository Signing Key
52+
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
53+
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
54+
RUN apt install curl gpg gnupg2 software-properties-common apt-transport-https lsb-release ca-certificates sudo -y
55+
# Add PostgreSQL repository
56+
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
57+
# Update again
58+
RUN apt update
59+
# Install PostgreSQL 13
60+
RUN apt install -y postgresql-13
61+
# Verify PostgreSQL 13 Installation on Ubuntu 22.04|20.04|18.04
62+
RUN psql --version
63+
# Manage PostgreSQL 13 service
64+
#you can manage with `service postgresql start`

.circleci/Dockerfile-original

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get upgrade -y
4+
5+
RUN apt-get install build-essential -y
6+
7+
RUN echo "mysql-server mysql-server/root_password password root" | debconf-set-selections
8+
9+
RUN echo "mysql-server mysql-server/root_password_again password root" | debconf-set-selections
10+
11+
RUN apt install mysql-server -y
12+
13+
RUN usermod -d /var/lib/mysql/ mysql
14+
15+
RUN mkdir /var/run/mysqld
16+
17+
ADD ./runMySQL.sh /runMySQL.sh
18+
19+
RUN chmod +x /runMySQL.sh
20+
21+
RUN apt-get install -y git-core
22+
23+
RUN apt-get install -y wget
24+
25+
# Install OpenJDK 12
26+
RUN wget https://download.java.net/java/GA/jdk12.0.2/e482c34c86bd4bf8b56c0b35558996b9/10/GPL/openjdk-12.0.2_linux-x64_bin.tar.gz
27+
28+
RUN mkdir /usr/java
29+
30+
RUN mv openjdk-12.0.2_linux-x64_bin.tar.gz /usr/java
31+
32+
RUN cd /usr/java && tar -xzvf openjdk-12.0.2_linux-x64_bin.tar.gz
33+
34+
RUN echo 'JAVA_HOME=/usr/java/jdk-12.0.2' >> /etc/profile
35+
RUN echo 'PATH=$PATH:$HOME/bin:$JAVA_HOME/bin' >> /etc/profile
36+
37+
RUN apt-get install jq -y
38+
39+
RUN apt-get install curl -y
40+
41+
RUN apt-get install unzip -y
42+
43+
# Install OpenJDK 21.0.7
44+
RUN wget https://download.java.net/java/GA/jdk21.0.7/51f4f36ad4ef43e39d0dfdbaf6549e32/9/GPL/openjdk-21.0.7_linux-x64_bin.tar.gz
45+
46+
RUN mv openjdk-21.0.7_linux-x64_bin.tar.gz /usr/java
47+
48+
RUN cd /usr/java && tar -xzvf openjdk-21.0.7_linux-x64_bin.tar.gz
49+
50+
RUN echo 'JAVA_HOME=/usr/java/jdk-21.0.7' >> /etc/profile
51+
RUN echo 'PATH=$PATH:$HOME/bin:$JAVA_HOME/bin' >> /etc/profile
52+
RUN echo 'export JAVA_HOME' >> /etc/profile
53+
RUN echo 'export JRE_HOME' >> /etc/profile
54+
RUN echo 'export PATH' >> /etc/profile
55+
56+
RUN update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-12.0.2/bin/java" 1
57+
RUN update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-12.0.2/bin/javac" 1

.circleci/Dockerfile-ubuntu22

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,39 +22,29 @@ RUN apt-get install -y git-core
2222

2323
RUN apt-get install -y wget
2424

25-
# Install OpenJDK 12
26-
RUN wget https://download.java.net/java/GA/jdk12.0.2/e482c34c86bd4bf8b56c0b35558996b9/10/GPL/openjdk-12.0.2_linux-x64_bin.tar.gz
27-
2825
RUN mkdir /usr/java
2926

30-
RUN mv openjdk-12.0.2_linux-x64_bin.tar.gz /usr/java
31-
32-
RUN cd /usr/java && tar -xzvf openjdk-12.0.2_linux-x64_bin.tar.gz
33-
34-
RUN echo 'JAVA_HOME=/usr/java/jdk-12.0.2' >> /etc/profile
35-
RUN echo 'PATH=$PATH:$HOME/bin:$JAVA_HOME/bin' >> /etc/profile
36-
3727
RUN apt-get install jq -y
3828

3929
RUN apt-get install curl -y
4030

4131
RUN apt-get install unzip -y
4232

43-
# Install OpenJDK 15.0.1
44-
RUN wget https://download.java.net/java/GA/jdk15.0.1/51f4f36ad4ef43e39d0dfdbaf6549e32/9/GPL/openjdk-15.0.1_linux-x64_bin.tar.gz
45-
46-
RUN mv openjdk-15.0.1_linux-x64_bin.tar.gz /usr/java
33+
# Install OpenJDK 21.0.7
34+
RUN wget https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.7%2B6/OpenJDK21U-jdk_x64_linux_hotspot_21.0.7_6.tar.gz
4735

48-
RUN cd /usr/java && tar -xzvf openjdk-15.0.1_linux-x64_bin.tar.gz
36+
RUN mv OpenJDK21U-jdk_x64_linux_hotspot_21.0.7_6.tar.gz /usr/java
37+
RUN mkdir -p /usr/java/jdk-21.0.7
38+
RUN cd /usr/java && tar -xzvf OpenJDK21U-jdk_x64_linux_hotspot_21.0.7_6.tar.gz -C /usr/java/jdk-21.0.7
4939

50-
RUN echo 'JAVA_HOME=/usr/java/jdk-15.0.1' >> /etc/profile
40+
RUN echo 'JAVA_HOME=/usr/java/jdk-21.0.7' >> /etc/profile
5141
RUN echo 'PATH=$PATH:$HOME/bin:$JAVA_HOME/bin' >> /etc/profile
5242
RUN echo 'export JAVA_HOME' >> /etc/profile
5343
RUN echo 'export JRE_HOME' >> /etc/profile
5444
RUN echo 'export PATH' >> /etc/profile
5545

56-
RUN update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-12.0.2/bin/java" 1
57-
RUN update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-12.0.2/bin/javac" 1
46+
RUN update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-21.0.7/bin/java" 1
47+
RUN update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-21.0.7/bin/javac" 1
5848

5949
#install postgres 13
6050
# Import Repository Signing Key
File renamed without changes.

.circleci/doTests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ do
138138
cd supertokens-root
139139
rm gradle.properties
140140

141-
update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-15.0.1/bin/java" 2
142-
update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-15.0.1/bin/javac" 2
141+
update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-21.0.7/bin/java" 2
142+
update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-21.0.7/bin/javac" 2
143143

144144
coreX=$(cut -d'.' -f1 <<<"$coreVersion")
145145
coreY=$(cut -d'.' -f2 <<<"$coreVersion")

.github/helpers/Dockerfile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,22 @@ RUN apt-get update && apt-get upgrade -y
44
RUN apt-get install build-essential -y
55
RUN apt-get install -y git-core wget unzip jq curl
66

7-
# Install OpenJDK 15.0.1
8-
RUN wget https://download.java.net/java/GA/jdk15.0.1/51f4f36ad4ef43e39d0dfdbaf6549e32/9/GPL/openjdk-15.0.1_linux-x64_bin.tar.gz
9-
RUN mkdir -p /usr/java
10-
RUN mv openjdk-15.0.1_linux-x64_bin.tar.gz /usr/java
11-
RUN cd /usr/java && tar -xzvf openjdk-15.0.1_linux-x64_bin.tar.gz
7+
# Install OpenJDK 21.0.7
8+
RUN wget https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.7%2B6/OpenJDK21U-jdk_x64_linux_hotspot_21.0.7_6.tar.gz
129

13-
RUN echo 'JAVA_HOME=/usr/java/jdk-15.0.1' >> /etc/profile
10+
RUN mv OpenJDK21U-jdk_x64_linux_hotspot_21.0.7_6.tar.gz /usr/java
11+
RUN mkdir -p /usr/java/
12+
RUN cd /usr/java && tar -xzvf OpenJDK21U-jdk_x64_linux_hotspot_21.0.7_6.tar.gz
13+
RUN mv /usr/java/jdk-21.0.7+6 /usr/java/jdk-21.0.7
14+
15+
RUN echo 'JAVA_HOME=/usr/java/jdk-21.0.7' >> /etc/profile
1416
RUN echo 'PATH=$PATH:$HOME/bin:$JAVA_HOME/bin' >> /etc/profile
1517
RUN echo 'export JAVA_HOME' >> /etc/profile
1618
RUN echo 'export JRE_HOME' >> /etc/profile
1719
RUN echo 'export PATH' >> /etc/profile
1820

19-
RUN update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-15.0.1/bin/java" 1
20-
RUN update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-15.0.1/bin/javac" 1
21+
RUN update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-21.0.7/bin/java" 1
22+
RUN update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-21.0.7/bin/javac" 1
2123

2224
RUN wget -O docker-entrypoint.sh https://raw.githubusercontent.com/supertokens/supertokens-docker-postgresql/master/docker-entrypoint.sh
2325

@@ -51,7 +53,7 @@ RUN set -x \
5153
&& gpgconf --kill all \
5254
&& rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \
5355
&& chmod +x /usr/local/bin/gosu \
54-
&& wget -O jre.zip "https://raw.githubusercontent.com/supertokens/jre/master/jre-15.0.1-linux.zip" \
56+
&& wget -O jre.zip "https://raw.githubusercontent.com/supertokens/jre/master/jre-21.0.7-linux.zip" \
5557
&& mkdir -p /usr/lib/supertokens/jre \
5658
&& unzip jre.zip \
5759
&& mv jre-*/* /usr/lib/supertokens/jre \

.github/workflows/add-dev-tag.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Add dev tags for release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
core-version:
7+
description: 'Core version'
8+
required: true
9+
type: string
10+
plugin-interface-version:
11+
description: 'Plugin interface version'
12+
required: true
13+
type: string
14+
new-release-for-plugin-interface:
15+
description: 'New release for plugin interface'
16+
required: true
17+
type: boolean
18+
postgresql-plugin-version:
19+
description: 'Postgres plugin version'
20+
required: true
21+
new-release-for-postgresql-plugin:
22+
description: 'New release for postgres plugin'
23+
required: true
24+
type: boolean
25+
26+
jobs:
27+
dependency-branches:
28+
name: Dependency Branches
29+
runs-on: ubuntu-latest
30+
outputs:
31+
branches: ${{ steps.result.outputs.branches }}
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: supertokens/get-core-dependencies-action@main
36+
id: result
37+
with:
38+
run-for: add-dev-tag
39+
core-version: ${{ github.event.inputs.core-version }}
40+
plugin-interface-version: ${{ github.event.inputs.plugin-interface-version }}
41+
postgresql-plugin-version: ${{ github.event.inputs.postgresql-plugin-version }}
42+
add-dev-tag:
43+
runs-on: ubuntu-latest
44+
needs: dependency-branches
45+
steps:
46+
- name: Set up JDK 21.0.7
47+
uses: actions/setup-java@v2
48+
with:
49+
java-version: 21.0.7
50+
distribution: zulu
51+
- uses: actions/checkout@v2
52+
with:
53+
repository: supertokens/supertokens-root
54+
path: ./supertokens-root
55+
ref: feat/java_gradle_upgrade
56+
- uses: actions/checkout@v2
57+
with:
58+
repository: supertokens/supertokens-core
59+
path: ./supertokens-root/supertokens-core
60+
ref: ${{ fromJson(needs.dependency-branches.outputs.branches)['core'] }}
61+
- uses: actions/checkout@v2
62+
with:
63+
repository: supertokens/supertokens-plugin-interface
64+
path: ./supertokens-root/supertokens-plugin-interface
65+
ref: ${{ fromJson(needs.dependency-branches.outputs.branches)['plugin-interface'] }}
66+
- uses: actions/checkout@v2
67+
with:
68+
repository: supertokens/supertokens-postgresql-plugin
69+
path: ./supertokens-root/supertokens-postgresql-plugin
70+
ref: ${{ fromJson(needs.dependency-branches.outputs.branches)['postgresql'] }}
71+
- name: Load Modules
72+
run: |
73+
cd supertokens-root
74+
echo "core,master
75+
plugin-interface,master
76+
postgresql-plugin,master
77+
" > modules.txt
78+
cat modules.txt
79+
./loadModules
80+
- name: Setup test env
81+
run: cd supertokens-root && ./utils/setupTestEnv --local
82+
- name: Git config
83+
run: |
84+
git config --global user.name "Supertokens Bot"
85+
git config --global user.email <>"
86+
- name: Add dev tag to plugin interface
87+
if: ${{ github.event.inputs.new-release-for-plugin-interface == 'true' }}
88+
run: |
89+
echo "Adding dev tag to plugin interface"
90+
cd supertokens-root/supertokens-plugin-interface
91+
./addDevTag
92+
- name: Add dev tag to postgres plugin
93+
if: ${{ github.event.inputs.new-release-for-postgresql-plugin == 'true' }}
94+
run: |
95+
echo "Adding dev tag to postgres plugin"
96+
cd supertokens-root/supertokens-postgresql-plugin
97+
./addDevTag
98+
- name: Add dev tag to core
99+
run: |
100+
echo "Adding dev tag to core"
101+
cd supertokens-root/supertokens-core
102+
./addDevTag

0 commit comments

Comments
 (0)