Skip to content

Commit

Permalink
Merge branch 'release/2023.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
PenghaiZhang committed Aug 24, 2023
2 parents 6d4f4e3 + 4599400 commit 448a8ab
Show file tree
Hide file tree
Showing 693 changed files with 75,359 additions and 56,201 deletions.
2 changes: 1 addition & 1 deletion .github/stale.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 120
daysUntilStale: 90
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 14
# Issues with these labels will never be considered stale
Expand Down
82 changes: 42 additions & 40 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,26 @@ jobs:
restore-keys: |
${{ runner.os }}-ivy-
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
node-version-file: '.nvmrc'

- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 8
java-version: 11

- name: Install node dependencies (oeq-rest-api)
working-directory: oeq-ts-rest-api
run: |
npm ci
- name: Build oEQ REST module (oeq-rest-api)
working-directory: oeq-ts-rest-api
run: |
npm run build
- name: Install node dependencies (core)
working-directory: react-front-end
Expand Down Expand Up @@ -117,7 +123,7 @@ jobs:
target/*.zip
- name: Save primary artefacts
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
name: Artefacts
path: artefacts.tar
Expand All @@ -137,14 +143,20 @@ jobs:
restore-keys: |
${{ runner.os }}-npm.storybook-
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
node-version-file: '.nvmrc'

- name: Install node dependencies (oeq-rest-api)
working-directory: oeq-ts-rest-api
run: |
npm ci
- name: Build oEQ REST module (oeq-rest-api)
working-directory: oeq-ts-rest-api
run: |
npm run build
- name: Install node dependencies (core)
working-directory: react-front-end
Expand All @@ -162,7 +174,7 @@ jobs:
tar cvf storybook.tar storybook-static
- name: Save Static Storybook instance
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
name: Storybook
path: react-front-end/storybook.tar
Expand All @@ -172,19 +184,19 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 8
java-version: 11

- name: Build
working-directory: import-export-tool
run: |
./gradlew build
- name: Save primary artefacts
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
name: ImportExportTools
path: import-export-tool/build/libs/
Expand All @@ -197,7 +209,7 @@ jobs:
strategy:
matrix:
newui: [true, false]
pgsql-image: [latest, 10]
pgsql-image: [latest, 12]
exclude:
- newui: false
pgsql-image: latest
Expand Down Expand Up @@ -232,22 +244,18 @@ jobs:
ffmpeg \
libimage-exiftool-perl
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 8
java-version: 11

- uses: actions/checkout@v3

- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
node-version-file: '.nvmrc'

- name: Download Artefacts
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -278,7 +286,7 @@ jobs:
- name: Save Scalacheck results
if: matrix.newui && failure()
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
name: ScalacheckReports
path: autotest/Tests/target/test-reports
Expand All @@ -290,21 +298,21 @@ jobs:
- name: Save TestNG Reports
if: failure()
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
name: TestNGReports-new-${{ matrix.newui }}
path: autotest/OldTests/target/testng

- name: Save oEQ Logs
if: failure()
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
name: oEQLogs-new-${{ matrix.newui }}
path: autotest/equella-install/logs

- name: Save Screenshots
if: failure()
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
name: Screenshots-new-${{ matrix.newui }}
path: autotest/Tests/target/test-reports/screenshots
Expand All @@ -322,7 +330,7 @@ jobs:
tar cvf coverage_report.tar autotest/target/coverage-report/
- name: Save Coverage Report
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
name: CoverageReport-newui-${{ matrix.newui }}
path: coverage_report.tar
Expand Down Expand Up @@ -361,20 +369,16 @@ jobs:
ffmpeg \
libimage-exiftool-perl
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 8

- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
java-version: 11

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
node-version-file: '.nvmrc'

- name: Download installer
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -409,9 +413,7 @@ jobs:
- name: Save oEQ logs for REST Module
if: failure()
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
name: oEQ-logs-rest-module
path: autotest/equella-install/logs


2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include:
project: edalex-group/development/oeq/openequella-ci
file: build/main.yml
ref: bf787e4b64dbdd175556d1944d7acd6ca69ec053
ref: 16db45894f11b9ba9780d720486f37d485e13239
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.17.1
16.20.1
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
storybook-static/
Source/Plugins/Core/com.equella.core/resources/web/reactjs/tinymce/skins/
20 changes: 13 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ We suggest using SDKMAN for installing (and managing multiple versions of) JDK,
Please follow the installation instructions provided by the tool.

### Install Java
At the time of writing the openEQUELLA is built with Java 8. For this, we prefer to use
openJDK which is current at version 8.0.302. To install that with SDKMAN:
Since January 2023, Java 11 is required to build openEQUELLA. Temurin is the recommended openJDK distribution.
To install that with SDKMAN:

```bash
sdk install java 8.0.302-open
sdk install java 11.0.17-tem
```

### Install NVM
Expand Down Expand Up @@ -286,16 +286,22 @@ The New UI consists of two modules:
- The React based SPA located in the `react-front-end` directory; and
- The REST Module which is located in the `oeq-ts-rest-api` directory.

For the most part, if you wish to work on the new UI you can simply go into the `react-front-end`
directory and execute:
For the most part, if you wish to work on the new UI, you need go into `oeq-ts-rest-api` directory and execute:

```bash
npm ci
npm run build
````

After building the REST module (`oeq-ts-rest-api`), then you can go into the `react-front-end` directory and execute:

```bash
npm ci
npm run dev
```

The first will also trigger a build of the REST module, and then `run dev` will build the React App
and place the output into the directory from which openEQUELLA serves its web resources.
The `run dev` command will build the React App and place the output into the directory from which
openEQUELLA serves its web resources.

Further to this, you may also wish to utilise the Storybook setup when working on UI components.
This can be done by:
Expand Down
1 change: 0 additions & 1 deletion Dev/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,5 @@ Usually `com.equella.core` is the place where new architecture classes will be p
- [REST endpoint creation](restendpoint.md)
- [Using security](security.md)
- [React based web pages](reactjs.md)
- [Scala server side code](scaladb.md)
- [Unexpected errors and notifications](clienterrors.md)
- [Guice integration](guice.md)
4 changes: 2 additions & 2 deletions Dev/docs/mainui.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ When the new UI is turned on, openEQUELLA runs in a Single Page App (SPA) style

The entrypoint for the SPA is located at [mainui/index.tsx](../../react-front-end/tsrc/mainui/index.tsx).

The route component uses [react-router](https://reacttraining.com/react-router/web/guides/quick-start) for routing
The route component uses [react-router](https://v5.reactrouter.com/web/guides/quick-start) for routing
with pages declared inside [mainui/routes.ts](../../react-front-end/tsrc/mainui/routes.tsx)

## Template
Expand Down Expand Up @@ -109,6 +109,6 @@ Now you should be able to see the page by going to:

`http://{insturl}/helloworld/hooks` or `http://{insturl}/helloworld/component`

Please see [react-router](https://reacttraining.com/react-router/web/guides/quick-start)
Please see [react-router](https://v5.reactrouter.com/web/guides/quick-start)
for examples on how to use route specific functionaility usage
(e.g. linking to other pages and extracting parameters for urls).
2 changes: 1 addition & 1 deletion Dev/docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Some of the useful methods in `TLEAclManager`:
Set<String> filterNonGrantedPrivileges(Collection<String> privileges, boolean includePossibleOwnerAcls);
```

Scala code can use the `AclChecks` object to check "top level" privileges in the [DB](scaladb.md) monad,
Scala code can use the `AclChecks` object to check "top level" privileges,
this will be expanded further to check privileges against particular domain objects.

```scala
Expand Down
3 changes: 2 additions & 1 deletion Installer/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Path.relativeTo

libraryDependencies ++= Seq(
"com.google.guava" % "guava" % "31.1-jre",
"commons-codec" % "commons-codec" % "1.15",
"commons-codec" % "commons-codec" % "1.16.0",
postgresDep,
sqlServerDep
)
Expand Down Expand Up @@ -49,6 +49,7 @@ installerZip := {
upZip -> s"manager/updates/${upZip.getName}"
) ++ allServerFiles
log.info(s"Creating installer ${outZip.absolutePath}")

IO.zip(allFiles.map(t => (t._1, s"$dirname/${t._2}")),
outZip,
Option((ThisBuild / buildTimestamp).value))
Expand Down
29 changes: 29 additions & 0 deletions Installer/data/server/manager/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Background about JSVC and oEQ

JSVC is a binary required to support running oEQ and the Upgrade Manager as a Daemon process in
Unix alike systems. It had not been updated until 2022 when we started adding the support
for Java 11. And the previous version of JSVC used in oEQ does not support Java 11. As a result,
we tried to build the JSVC binary again.

## How to build the JSVC binary
* Install required dependencies
* GNU AutoConf (at least version 2.53)
* An ANSI-C compliant compiler (e.g GCC)
* GNU Make
* Download the source code from this [page](https://commons.apache.org/proper/commons-daemon/download_daemon.cgi)
* Unzip the file and go to directory `src/native/unix `
* Execute the provided scripts to generate the binary
```
./support/buildconf.sh
./configure
```
* You will notice some files are created after above step. And now you can run `make` to generate the executable file.
For more details, please check this [page](https://commons.apache.org/proper/commons-daemon/jsvc.html)
## How to get the Windows executables
The JSVC equivalent on Windows is called `Procrun` which typically has two executables: `prunmgr.exe` and `prunsrv.exe`.
These two files can be downloaded from this [page](https://archive.apache.org/dist/commons/daemon/binaries/windows/).
For details about how to use the executables, please check this [page](https://commons.apache.org/proper/commons-daemon/procrun.html).
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#export RUN_USER=equella
export JAVA_HOME="${java/jdk#t\/}"
#export JMX_CONFIG="-Dcom.sun.management.jmxremote.port=8855 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
#export HEAP_CONFIG="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=../"
export CLASSPATH="../learningedge-config:../server/equella-server.jar"
export JAVA_OPTS="${webserver/javaopts} -Xrs -Xms${memory/min} -Xmx${memory/max} -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false -Djava.awt.headless=true -Djava.io.tmpdir=../server/temp -XX:MaxGCPauseMillis=500 -XX:NewRatio=3 -XX:GCTimeRatio=16 -XX:+DisableExplicitGC -XX:+UseG1GC -XX:CMSInitiatingOccupancyFraction=70 -Dcom.sun.jndi.ldap.connect.pool.timeout=3000000 -Dcom.sun.jndi.ldap.connect.pool.maxsize=200 -Dcom.sun.jndi.ldap.connect.pool.prefsize=20"

Binary file removed Installer/data/server/manager/linux/jsvc
Binary file not shown.
Loading

0 comments on commit 448a8ab

Please sign in to comment.