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

Migrate to 6.1 with retro compatibility #123

Merged
merged 14 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
114 changes: 2 additions & 112 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ parameters:
base_ref:
type: string
default: NONE
run_compatibility:
type: boolean
default: false
executors:
jdk11-docker:
docker:
- image: cimg/openjdk:17.0.13
- image: cimg/openjdk:21.0.5
environment:
LANG: C.UTF-8
LC_ALL: C.UTF-8
Expand Down Expand Up @@ -46,122 +43,15 @@ jobs:
-v "$HOME/.m2/repository:/tmp/repository" \
-v "$PWD:/home/circleci/mac" \
-w /home/circleci/mac -u root \
cimg/openjdk:17.0.13 \
cimg/openjdk:21.0.5 \
mvn package --settings .circleci/circleci-settings.xml -Dmaven.repo.local=/tmp/repository
- save_cache:
paths: [ ~/.m2/repository ]
key: mac-java-{{ .Branch }}-{{ checksum "pom.xml" }}

launch_compatibility_checks:
executor: vm
resource_class: medium
steps:
- unless:
condition: <<pipeline.parameters.run_compatibility>>
steps:
- run:
name: Fail if no compatibility enabled
command: exit 1
- when:
condition: <<pipeline.parameters.run_compatibility>>
steps:
- checkout
# Somehow fails on ubuntu 20.04 (https://askubuntu.com/questions/1240056/unable-to-install-libxml2-utils-on-ubuntu-20-04-wsl)
# - run:
# name: Try downloading xmllint
# command: sudo apt-get install libxml2-utils
- run:
name: Compatibility enabled, fetch matching releases using artifacts.activeviam.com
command: bash ./scripts/get_compatible_ap_releases.sh
compatibility_check:
executor: vm
resource_class: large
working_directory: ~/mac
parameters:
ap-version:
type: string
steps:
- checkout
- restore_cache:
keys:
- mac-java-{{ .Branch }}-{{ checksum "pom.xml" }}
- mac-java-{{ .Branch }}-
- mac-java-
- mac-export-<< parameters.ap-version >>-{{ checksum "pom.xml" }}
- run:
name: "Run sandbox memory export"
command: |
sudo sysctl -w vm.overcommit_memory=1 && \
# using cached exports if available
if [[ ! -d ${PWD}/target/exported_statistics || -z $(ls -A ${PWD}/target/exported_statistics) ]]; then
echo "No available export cache : Run sandbox export script."
bash ./scripts/sandbox_export_generator.sh << parameters.ap-version >> "${ARTIFACTS_READER}:${ARTIFACTS_PWD}"
else
echo "Use available export cache."
fi
- run:
name: "Run checks on export"
command: bash ./scripts/mac_export_load.sh $(cat ./logs/jmxterm.log | tail -1) << parameters.ap-version >>
- store_artifacts:
path: ./logs
- save_cache:
paths: [ target/exported_statistics ]
key: mac-export-<< parameters.ap-version >>-{{ checksum "pom.xml" }}
workflows:
version: 2
check:
jobs:
- build_and_test:
context: rnd-server
- launch_compatibility_checks:
context: rnd-server
requires:
- build_and_test
- compatibility_check:
matrix:
parameters:
ap-version: [
"5.9.0",
"5.9.1",
"5.9.2",
# The following two versions have their export broken (NPE on export)
# "5.9.3",
# "5.9.4",
"5.9.5",
"5.9.6",
"5.9.7",
"5.9.8",
"5.9.9",
"5.9.10",
"5.9.11",
"5.9.12",
"5.9.13",
# Early releases of the 5.10 sandbox have a dependency on a now removed Atoti UI snapshot : activeui:jar:5.0.0-beta-20210224125715-19abcee
# "5.10.0",
# "5.10.1",
# "5.10.2",
"5.10.3",
"5.10.4",
"5.10.5",
"5.10.6",
"5.10.7",
"5.10.8",
"5.10.9",
"5.10.10",
"5.10.11",
"5.10.12",
"5.10.13",
# Early releases of the 5.11 sandbox have a dependency on a now removed Atoti UI snapshot : activeui:jar:5.0.4-20211117104705-da07c29
# "5.11.0",
"5.11.1",
"5.11.2",
"5.11.3",
"5.11.4",
"5.11.5",
"6.0.0",
"6.0.1",
"6.0.2"
]
context: rnd-server
requires:
- launch_compatibility_checks
5 changes: 0 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

1 change: 0 additions & 1 deletion .github/actions/circle-ci/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ runs:
steps:
- run : |
echo "PARAMETER_DATA=\"parameters\":{\
\"run_compatibility\":${{ env.compatibility-check }},\
\"head_ref\":\"${{ github.head_ref }}\",\
\"base_ref\":\"${{ github.base_ref }}\"\
}" >> $GITHUB_ENV
Expand Down
9 changes: 0 additions & 9 deletions .github/actions/parser.bash

This file was deleted.

6 changes: 1 addition & 5 deletions .github/workflows/pr-steps-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ jobs:
- name: Checkout Repository to run local actions
uses: actions/[email protected] # Necessary to access local actions & files

- name: parse the PR description for the Test execution
run: . ./.github/actions/parser.bash && parsePR compatibility-check

# LAUNCH CIRCLECI MAIN WORKFLOW
# Reuse the existing "check" workflow of CircleCI but add the parameters to the payload
- name: start Checks CI Pipeline
Expand All @@ -92,8 +89,7 @@ jobs:
# RUN BLOCKER STEP
- name: Parse the PR description for all mandatory steps
run: echo "Run blocker parser"
- if: ${{ contains(fromJson('["main"]'), github.event.pull_request.base.ref)
&& !( env.compatibility-check == 'true' ) }}
- if: ${{ contains(fromJson('["main"]'), github.event.pull_request.base.ref) }}
# Failing step
name: Block merge due to missing mandatory steps
run: exit 1
Expand Down
122 changes: 67 additions & 55 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.18</version>
<version>3.2.10</version>
<relativePath/>
</parent>

<groupId>com.activeviam.tools</groupId>
<artifactId>mac</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
<name>Atoti Server Memory Analysis Cube</name>

<licenses>
Expand All @@ -23,12 +23,11 @@
</licenses>

<properties>
<jdk.version>11</jdk.version>
<jdk.version>21</jdk.version>

<atoti-server.version>6.0.10</atoti-server.version>
<atoti-ui.version>5.1.13</atoti-ui.version>
<atoti-server.version>6.1.3</atoti-server.version>

<tomcat.version>9.0.31</tomcat.version>
<tomcat.version>10.1.30</tomcat.version>

<spring.boot.mainclass>com.activeviam.mac.app.MacSpringBootApp</spring.boot.mainclass>

Expand All @@ -46,49 +45,41 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-json</artifactId>
<version>3.2.10</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>

<!-- ActivePivot Dependencies -->
<dependency>
<groupId>com.activeviam.activepivot</groupId>
<artifactId>activepivot-server-spring</artifactId>
</dependency>

<!-- Composer dependencies are provided in QFS artifacts -->
<!-- And must be explicitly declared in application projects -->
<dependency>
<groupId>com.activeviam.tech</groupId>
<artifactId>composer-intf</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.activeviam.tech</groupId>
<artifactId>composer-impl</artifactId>
<scope>compile</scope>
<groupId>com.activeviam.springboot</groupId>
<artifactId>atoti-server-starter</artifactId>
<version>${atoti-server.version}</version>
</dependency>
<!-- The following artifact allows to expose the Rest API of the content
service -->
<dependency>
<groupId>com.activeviam.tech</groupId>
<artifactId>content-server-spring</artifactId>
<groupId>com.activeviam.springboot</groupId>
<artifactId>atoti-ui-starter</artifactId>
<version>${atoti-server.version}</version>
</dependency>
<dependency>
<groupId>com.activeviam.web</groupId>
<artifactId>activeviam-web-spring</artifactId>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>

<!-- Dependencies for the content service persistence -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>6.4.10.Final</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
Expand All @@ -97,14 +88,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
</dependency>

<!-- Atoti UI dependency -->
<dependency>
<groupId>com.activeviam.activeui</groupId>
<artifactId>activeui</artifactId>
<version>${atoti-ui.version}</version>
<scope>runtime</scope>
<version>6.4.10.Final</version>
</dependency>

<!-- SpringBoot dependencies -->
Expand Down Expand Up @@ -138,22 +122,11 @@
<version>${atoti-server.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.activeviam.activepivot</groupId>
<artifactId>activepivot-server-test</artifactId>
<version>${atoti-server.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand All @@ -170,6 +143,45 @@
<version>32.1.3-jre</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.activeviam.source</groupId>
<artifactId>csv-source</artifactId>
<version>${atoti-server.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.27.1</version>
</dependency>
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<version>${jakarta-persistence.version}</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>${jakarta-ws-rs.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring-framework.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -237,9 +249,9 @@
</plugin>

<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.9</version>
<version>2.24</version>
<executions>
<execution>
<phase>none</phase>
Expand Down
14 changes: 0 additions & 14 deletions scripts/get_compatible_ap_releases.sh

This file was deleted.

Loading
Loading