From 7266ec6064fdcbd021e29383968bde9806410fec Mon Sep 17 00:00:00 2001 From: ddrechse Date: Tue, 31 Oct 2023 14:24:28 -0400 Subject: [PATCH 001/294] Enable workflow triggers --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84f575ff1..a4c0dff7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,13 @@ name: ci on: + workflow_dispatch: + inputs: + logLevel: + description: 'Log level' + required: true + default: 'warning' + tags: + description: 'Test scenario tags' push: branches: [ main ] pull_request: @@ -8,6 +16,12 @@ on: paths-ignore: - '**/**.md' jobs: + printInputs: + runs-on: ubuntu-latest + steps: + - run: | + echo "Log level: ${{ github.event.inputs.logLevel }}" + echo "Tags: ${{ github.event.inputs.tags }}" run-parse-server-ci: name: CI of Parse Server ${{ matrix.version }} timeout-minutes: 15 From e1da1b91e33c39223d5f810e6bcd3aeb108a44da Mon Sep 17 00:00:00 2001 From: ddrechse Date: Tue, 31 Oct 2023 14:35:23 -0400 Subject: [PATCH 002/294] Remove workflow dispatch --- .github/workflows/ci.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4c0dff7a..84f575ff1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,13 +1,5 @@ name: ci on: - workflow_dispatch: - inputs: - logLevel: - description: 'Log level' - required: true - default: 'warning' - tags: - description: 'Test scenario tags' push: branches: [ main ] pull_request: @@ -16,12 +8,6 @@ on: paths-ignore: - '**/**.md' jobs: - printInputs: - runs-on: ubuntu-latest - steps: - - run: | - echo "Log level: ${{ github.event.inputs.logLevel }}" - echo "Tags: ${{ github.event.inputs.tags }}" run-parse-server-ci: name: CI of Parse Server ${{ matrix.version }} timeout-minutes: 15 From 0a5329c365507652f40fc90207061aa0e3db0958 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Tue, 31 Oct 2023 15:25:37 -0400 Subject: [PATCH 003/294] Enable step Run CI workflow of Parse Server --- .github/workflows/ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84f575ff1..a20615d65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,16 +22,16 @@ jobs: repository: parse-community/parse-server ref: ${{ matrix.version }} path: parse-server - # - name: Run CI workflow of Parse Server - # uses: actions/github-script@v6 - # with: - # script: | - # const fs = require('fs'); - # const yaml = require('js-yaml'); - # const path = './parse-server/.github/workflows/ci.yml'; - # const ciConfig = yaml.load(fs.readFileSync(path, 'utf8')); - # console.log(ciConfig); - # return ciConfig; + - name: Run CI workflow of Parse Server + uses: actions/github-script@v6 + with: + script: | + const fs = require('fs'); + const yaml = require('js-yaml'); + const path = './parse-server/.github/workflows/ci.yml'; + const ciConfig = yaml.load(fs.readFileSync(path, 'utf8')); + console.log(ciConfig); + return ciConfig; concurrency: group: ${{ github.workflow }}-${{ github.ref }} From beac06c209cda9f1a9efc978ac90f1e6261d634d Mon Sep 17 00:00:00 2001 From: ddrechse Date: Tue, 31 Oct 2023 16:01:06 -0400 Subject: [PATCH 004/294] Try to run --- .github/workflows/ci.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a20615d65..9f830db30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,12 +26,8 @@ jobs: uses: actions/github-script@v6 with: script: | - const fs = require('fs'); - const yaml = require('js-yaml'); - const path = './parse-server/.github/workflows/ci.yml'; - const ciConfig = yaml.load(fs.readFileSync(path, 'utf8')); - console.log(ciConfig); - return ciConfig; + cd parse-server + npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} From a3d20cd1ea22212a66897d45d78116779a5d5056 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Tue, 31 Oct 2023 16:04:38 -0400 Subject: [PATCH 005/294] Debug --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f830db30..413174cf5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: with: script: | cd parse-server - npm run test + ls concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 6527e3d2051b257014be46ccfeffb66b3e6fb509 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Tue, 31 Oct 2023 16:08:36 -0400 Subject: [PATCH 006/294] maybe spacing --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 413174cf5..154269b48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,9 +25,8 @@ jobs: - name: Run CI workflow of Parse Server uses: actions/github-script@v6 with: - script: | - cd parse-server - ls + script: | + ls concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 915acba67b4b4976461a7eac5ea8d5e4861837da Mon Sep 17 00:00:00 2001 From: ddrechse Date: Tue, 31 Oct 2023 16:13:31 -0400 Subject: [PATCH 007/294] Try run --- .github/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 154269b48..47d818939 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,10 +23,7 @@ jobs: ref: ${{ matrix.version }} path: parse-server - name: Run CI workflow of Parse Server - uses: actions/github-script@v6 - with: - script: | - ls + run: cd parse-server concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 9dd8fae8b57a003358b481b75065beb153b0689e Mon Sep 17 00:00:00 2001 From: ddrechse Date: Tue, 31 Oct 2023 16:16:44 -0400 Subject: [PATCH 008/294] Add more steps --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47d818939..af2b47fcc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,8 +22,12 @@ jobs: repository: parse-community/parse-server ref: ${{ matrix.version }} path: parse-server - - name: Run CI workflow of Parse Server + - name: cd to Parse Server run: cd parse-server + - name: ls Parse Server + run: ls + - name: Run CI workflow of Parse Server + run: npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} From af4bde4b436546389b83197d1263ce2bed93deed Mon Sep 17 00:00:00 2001 From: ddrechse Date: Tue, 31 Oct 2023 16:19:09 -0400 Subject: [PATCH 009/294] Chain commands --- .github/workflows/ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af2b47fcc..dfd8d1fdb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,11 +23,9 @@ jobs: ref: ${{ matrix.version }} path: parse-server - name: cd to Parse Server - run: cd parse-server - - name: ls Parse Server - run: ls - - name: Run CI workflow of Parse Server - run: npm run test + run: cd parse-server; ls +# - name: Run CI workflow of Parse Server +# run: npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 1dfaa7da15a68c817098a84b7397e3125ed63c7a Mon Sep 17 00:00:00 2001 From: ddrechse Date: Tue, 31 Oct 2023 16:21:33 -0400 Subject: [PATCH 010/294] chain more commands --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfd8d1fdb..542b4bc04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: ref: ${{ matrix.version }} path: parse-server - name: cd to Parse Server - run: cd parse-server; ls + run: cd parse-server; ls; npm run test # - name: Run CI workflow of Parse Server # run: npm run test From 7c259af662f1986cab8a52978848d1166e76d237 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Tue, 31 Oct 2023 16:24:33 -0400 Subject: [PATCH 011/294] npm install --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 542b4bc04..c73f12140 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: ref: ${{ matrix.version }} path: parse-server - name: cd to Parse Server - run: cd parse-server; ls; npm run test + run: cd parse-server; ls; npm install; npm run test # - name: Run CI workflow of Parse Server # run: npm run test From 6189c0877748f4792be373423bb71adc533b8121 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Wed, 1 Nov 2023 09:13:32 -0400 Subject: [PATCH 012/294] Cleanup --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c73f12140..e9b71bd23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,10 +22,8 @@ jobs: repository: parse-community/parse-server ref: ${{ matrix.version }} path: parse-server - - name: cd to Parse Server + - name: Run Tests run: cd parse-server; ls; npm install; npm run test -# - name: Run CI workflow of Parse Server -# run: npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 2dbd7a8f026c0175849eecb52b43de1b24d74a9c Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 1 Nov 2023 09:53:16 -0400 Subject: [PATCH 013/294] Update ci.yml --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9b71bd23..5cf777709 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,8 +23,9 @@ jobs: ref: ${{ matrix.version }} path: parse-server - name: Run Tests - run: cd parse-server; ls; npm install; npm run test - + run: cd parse-server; + npm install; + npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From bfd88738ce552388dfae6f9eac8c47d3469b9275 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 11:41:46 -0500 Subject: [PATCH 014/294] Clone Oracle Storage Adapter --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cf777709..85294c9a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,17 @@ jobs: repository: parse-community/parse-server ref: ${{ matrix.version }} path: parse-server + - name: Create Oracle Storage Adapter Dir + run: mkdir parse-server/src/Adapters/Storage/Oracle; + ls -la parse-server/src/Adapters/Storage/Oracle; + - name: Checkout Oracle Storage Adapter + uses: actions/checkout@v2 + with: + repository: oracle-samples/oracleadapter-parse + ref: latest + path: parse-server/src/Adapters/Storage/Oracle + - name: Validate Oracle Dir + run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Run Tests run: cd parse-server; npm install; From b5ec06f9a264102d33450c39ac67831e949f1df9 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 11:49:02 -0500 Subject: [PATCH 015/294] Use ref: default --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85294c9a7..dc1e747e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: uses: actions/checkout@v2 with: repository: oracle-samples/oracleadapter-parse - ref: latest + ref: '' path: parse-server/src/Adapters/Storage/Oracle - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; From 1a25908f94b495fc7b6f8632fdc70d6d02ac3c03 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 14:10:35 -0500 Subject: [PATCH 016/294] See if docker is in Env --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc1e747e7..62604a3f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,7 @@ jobs: - name: Create Oracle Storage Adapter Dir run: mkdir parse-server/src/Adapters/Storage/Oracle; ls -la parse-server/src/Adapters/Storage/Oracle; + docker info; - name: Checkout Oracle Storage Adapter uses: actions/checkout@v2 with: From af94a014d38f19b55b5961910ddbbfdc3b4ec1f3 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 14:20:06 -0500 Subject: [PATCH 017/294] Try to run Free23c image --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62604a3f7..ea7542cfd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,6 @@ jobs: - name: Create Oracle Storage Adapter Dir run: mkdir parse-server/src/Adapters/Storage/Oracle; ls -la parse-server/src/Adapters/Storage/Oracle; - docker info; - name: Checkout Oracle Storage Adapter uses: actions/checkout@v2 with: @@ -34,6 +33,9 @@ jobs: path: parse-server/src/Adapters/Storage/Oracle - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; + - name: Run Free23c + run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; + docker ps -a; - name: Run Tests run: cd parse-server; npm install; From 5b9ac4377c0ab943bd7ee64f71f3f8c70c076334 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 14:32:40 -0500 Subject: [PATCH 018/294] How long for container to come up? --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea7542cfd..7e4aaf70f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,9 @@ jobs: - name: Run Free23c run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; docker ps -a; + - name: Wait for container + run: sleep 60; + docker ps -a; - name: Run Tests run: cd parse-server; npm install; From f7c1c2d515b0c0fbe2cb2136cfb429d93507e96a Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 14:42:35 -0500 Subject: [PATCH 019/294] Try 2 mins --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e4aaf70f..f7fca94be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; docker ps -a; - name: Wait for container - run: sleep 60; + run: sleep 120; docker ps -a; - name: Run Tests run: cd parse-server; From d7eb1f121cf99f7d72e0028a1383adb1063ed800 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 14:56:54 -0500 Subject: [PATCH 020/294] Install sqlcl --- .github/workflows/ci.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7fca94be..cc3dcb09c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,16 +33,21 @@ jobs: path: parse-server/src/Adapters/Storage/Oracle - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - - name: Run Free23c - run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; - docker ps -a; - - name: Wait for container - run: sleep 120; - docker ps -a; - - name: Run Tests - run: cd parse-server; - npm install; - npm run test + - name: Install Sqlcl + run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; + unzip -d sql sqlcl-23.3.0.270.1251.zip ; + ls -la sql; + ls -la sql/bin; +# - name: Run Free23c +# run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; +# docker ps -a; +# - name: Wait for container +# run: sleep 120; +# docker ps -a; +# - name: Run Tests +# run: cd parse-server; +# npm install; +# npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From f84557702167120a5eef4317389b31f72c652ddd Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 15:01:05 -0500 Subject: [PATCH 021/294] Run sqlcl --- .github/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc3dcb09c..41952a2bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,9 +35,11 @@ jobs: run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; - unzip -d sql sqlcl-23.3.0.270.1251.zip ; - ls -la sql; - ls -la sql/bin; + unzip sqlcl-23.3.0.270.1251.zip ; + ls -la sqlcl; + ls -la sqlcl/bin; + alias sql="${HOME}/sqlcl/bin/sql" + sql -V; # - name: Run Free23c # run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; # docker ps -a; From 2d01a440dcf75ba1cd1af1d989e0c3701882a0f5 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 15:06:42 -0500 Subject: [PATCH 022/294] Get sqlcl working --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41952a2bc..2ad420078 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: unzip sqlcl-23.3.0.270.1251.zip ; ls -la sqlcl; ls -la sqlcl/bin; - alias sql="${HOME}/sqlcl/bin/sql" + sql="${HOME}/sqlcl/bin/sql" sql -V; # - name: Run Free23c # run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; From e7407d4de8f8ab4e0e41e5d12c277e43f58c5836 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 15:08:57 -0500 Subject: [PATCH 023/294] Update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ad420078..bd51058fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,8 +38,8 @@ jobs: unzip sqlcl-23.3.0.270.1251.zip ; ls -la sqlcl; ls -la sqlcl/bin; - sql="${HOME}/sqlcl/bin/sql" - sql -V; + osql="${HOME}/sqlcl/bin/sql" + osql -V; # - name: Run Free23c # run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; # docker ps -a; From 562050948ef45bdc63be6862da58eb61af00d0ed Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 15:10:18 -0500 Subject: [PATCH 024/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd51058fd..7619672cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: unzip sqlcl-23.3.0.270.1251.zip ; ls -la sqlcl; ls -la sqlcl/bin; - osql="${HOME}/sqlcl/bin/sql" + alias osql="${HOME}/sqlcl/bin/sql" osql -V; # - name: Run Free23c # run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; From 3da0860944b0c1636c07a3051127cec8bd83b642 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 15:11:45 -0500 Subject: [PATCH 025/294] Update ci.yml --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7619672cd..a599fa458 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,8 +38,7 @@ jobs: unzip sqlcl-23.3.0.270.1251.zip ; ls -la sqlcl; ls -la sqlcl/bin; - alias osql="${HOME}/sqlcl/bin/sql" - osql -V; + ${HOME}/sqlcl/bin/sql -V; # - name: Run Free23c # run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; # docker ps -a; From 80e9526aa3ffb68ea414b71ff197d0ce80aeac2e Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 15:14:48 -0500 Subject: [PATCH 026/294] 3rd time --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a599fa458..9c197d119 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,9 +36,10 @@ jobs: - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip ; + echo "PWD = ${pwd}"; ls -la sqlcl; ls -la sqlcl/bin; - ${HOME}/sqlcl/bin/sql -V; + ./sqlcl/bin/sql -V; # - name: Run Free23c # run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; # docker ps -a; From d2914373fa7a41671b62c1e3c0e4bbfcb95c19e8 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 15:18:20 -0500 Subject: [PATCH 027/294] pwd --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c197d119..0e8b3cdd8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip ; - echo "PWD = ${pwd}"; + pwd; ls -la sqlcl; ls -la sqlcl/bin; ./sqlcl/bin/sql -V; From 96a190f0c76c85cb1069c1c77b1e3ed84c47e62a Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 15:22:05 -0500 Subject: [PATCH 028/294] echo HOME --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e8b3cdd8..83c1ccf70 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,7 @@ jobs: run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip ; pwd; + echo $HOME; ls -la sqlcl; ls -la sqlcl/bin; ./sqlcl/bin/sql -V; From 286451c1a1db99662479696b3473c5ac97ccc2bc Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 15:27:58 -0500 Subject: [PATCH 029/294] Try alias --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83c1ccf70..85a67ac38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,8 @@ jobs: ls -la sqlcl; ls -la sqlcl/bin; ./sqlcl/bin/sql -V; + alias osql="$PWD/sqlcl/bin/sql"; + osql -V; # - name: Run Free23c # run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; # docker ps -a; From a0b0c36c47c4b0f36dfafae7ca115992c521e527 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 15:30:27 -0500 Subject: [PATCH 030/294] CleanUp --- .github/workflows/ci.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85a67ac38..d651f451f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,19 +36,14 @@ jobs: - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip ; - pwd; - echo $HOME; - ls -la sqlcl; - ls -la sqlcl/bin; ./sqlcl/bin/sql -V; - alias osql="$PWD/sqlcl/bin/sql"; - osql -V; -# - name: Run Free23c -# run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; -# docker ps -a; -# - name: Wait for container -# run: sleep 120; -# docker ps -a; + - name: Run Free23c + run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; + docker ps -a; + - name: Wait for container + run: sleep 120; + docker ps -a; + ./sqlcl/bin/sql -V; # - name: Run Tests # run: cd parse-server; # npm install; From 55fe7daa61896b9d4a4279823c7baf8600b27f4b Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 18 Jan 2024 15:36:54 -0500 Subject: [PATCH 031/294] Enable all steps --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d651f451f..abef86ce4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,10 +44,10 @@ jobs: run: sleep 120; docker ps -a; ./sqlcl/bin/sql -V; -# - name: Run Tests -# run: cd parse-server; -# npm install; -# npm run test + - name: Run Tests + run: cd parse-server; + npm install; + npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From 9bb5b31ddb4097d90ce86172fa1cf9a93d2335b2 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 10:59:45 -0500 Subject: [PATCH 032/294] Update Image to support SODA --- .github/workflows/ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index abef86ce4..dfb07a6da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,10 +44,14 @@ jobs: run: sleep 120; docker ps -a; ./sqlcl/bin/sql -V; - - name: Run Tests - run: cd parse-server; - npm install; - npm run test + - name: Enable SODA in image + run: echo "alter session set container=FREEPDB1;\ngrant db_developer_role to pdbadmin;\ngrant soda_app to pdbadmin;\nGRANT UNLIMITED TABLESPACE TO pdbadmin;\nquit;" > soda + cat soda; + ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda +# - name: Run Tests +# run: cd parse-server; +# npm install; +# npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From 304ae0688bc648e3fa45cfe9aa53d9471e7a1673 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 11:07:33 -0500 Subject: [PATCH 033/294] Missed ; --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfb07a6da..56d1eb6ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; - unzip sqlcl-23.3.0.270.1251.zip ; + unzip sqlcl-23.3.0.270.1251.zip; ./sqlcl/bin/sql -V; - name: Run Free23c run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; @@ -45,7 +45,7 @@ jobs: docker ps -a; ./sqlcl/bin/sql -V; - name: Enable SODA in image - run: echo "alter session set container=FREEPDB1;\ngrant db_developer_role to pdbadmin;\ngrant soda_app to pdbadmin;\nGRANT UNLIMITED TABLESPACE TO pdbadmin;\nquit;" > soda + run: echo "alter session set container=FREEPDB1;\ngrant db_developer_role to pdbadmin;\ngrant soda_app to pdbadmin;\nGRANT UNLIMITED TABLESPACE TO pdbadmin;\nquit;" > soda; cat soda; ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda # - name: Run Tests From 634e56f2f231b358f3eee3054fd101b0960e6f36 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 11:13:24 -0500 Subject: [PATCH 034/294] Remove newlines --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56d1eb6ca..f5f19e62a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: docker ps -a; ./sqlcl/bin/sql -V; - name: Enable SODA in image - run: echo "alter session set container=FREEPDB1;\ngrant db_developer_role to pdbadmin;\ngrant soda_app to pdbadmin;\nGRANT UNLIMITED TABLESPACE TO pdbadmin;\nquit;" > soda; + run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; cat soda; ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda # - name: Run Tests From 66180b5d96e6cbc464ca8f64e800ee14cef94392 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 11:22:35 -0500 Subject: [PATCH 035/294] Find out machine architecture --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5f19e62a..3632c77a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,8 @@ jobs: run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; cat soda; ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda + - name: Install Instant Client + run: uname -m # - name: Run Tests # run: cd parse-server; # npm install; From 138d15d6d19fa7d35e090b4a1eaad9b6cf6e2568 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 11:30:27 -0500 Subject: [PATCH 036/294] what glibc --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3632c77a6..2cae92c81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,10 @@ jobs: cat soda; ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - name: Install Instant Client - run: uname -m + run: uname -m; + ls -la /lib; + ls -al /lib/libc*; + ls -al /lib/glibc* # - name: Run Tests # run: cd parse-server; # npm install; From 46ecee07acbbe8f874093c166dde495c934ef477 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 11:37:40 -0500 Subject: [PATCH 037/294] its libc --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2cae92c81..52da0f678 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: run: uname -m; ls -la /lib; ls -al /lib/libc*; - ls -al /lib/glibc* + ls -al /lib/libc* # - name: Run Tests # run: cd parse-server; # npm install; From 9fb85f5e7dd4a4a4e45ebd9c84fda3d320672c1e Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 11:48:17 -0500 Subject: [PATCH 038/294] Download and Install Instant Client --- .github/workflows/ci.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52da0f678..323cc93af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,22 +37,23 @@ jobs: run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip; ./sqlcl/bin/sql -V; - - name: Run Free23c - run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; - docker ps -a; - - name: Wait for container - run: sleep 120; - docker ps -a; - ./sqlcl/bin/sql -V; - - name: Enable SODA in image - run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; - cat soda; - ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - name: Install Instant Client run: uname -m; ls -la /lib; ls -al /lib/libc*; - ls -al /lib/libc* + wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; + unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; +# - name: Run Free23c +# run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; +# docker ps -a; +# - name: Wait for container +# run: sleep 120; +# docker ps -a; +# ./sqlcl/bin/sql -V; +# - name: Enable SODA in image +# run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; +# cat soda; +# ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda # - name: Run Tests # run: cd parse-server; # npm install; From b3d8f5583017ba42fe86edcead7f83a01bd4db02 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 11:52:36 -0500 Subject: [PATCH 039/294] Run the whole shebang --- .github/workflows/ci.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 323cc93af..a2ba2816a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,21 +43,21 @@ jobs: ls -al /lib/libc*; wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; -# - name: Run Free23c -# run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; -# docker ps -a; -# - name: Wait for container -# run: sleep 120; -# docker ps -a; -# ./sqlcl/bin/sql -V; -# - name: Enable SODA in image -# run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; -# cat soda; -# ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda -# - name: Run Tests -# run: cd parse-server; -# npm install; -# npm run test + - name: Run Free23c + run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; + docker ps -a; + - name: Wait for container + run: sleep 120; + docker ps -a; + ./sqlcl/bin/sql -V; + - name: Enable SODA in image + run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; + cat soda; + ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda + - name: Run Tests + run: cd parse-server; + npm install; + npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From 7ec1723cf49b805436785c40467264ddb3c89dd5 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 12:16:46 -0500 Subject: [PATCH 040/294] The biginning of run tests --- .github/workflows/ci.yml | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2ba2816a..f2488139c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,21 +43,29 @@ jobs: ls -al /lib/libc*; wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; - - name: Run Free23c - run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; - docker ps -a; - - name: Wait for container - run: sleep 120; - docker ps -a; - ./sqlcl/bin/sql -V; - - name: Enable SODA in image - run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; - cat soda; - ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda + ls + - name: Install File Adapter + run: npm install --save @parse/fs-files-adapter; + - name: Install Oracle for Node + run: npm install oracledb@6.2.0; +# - name: Run Free23c +# run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; +# docker ps -a; +# - name: Wait for container +# run: sleep 120; +# docker ps -a; +# ./sqlcl/bin/sql -V; +# - name: Enable SODA in image +# run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; +# cat soda; +# ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - name: Run Tests run: cd parse-server; - npm install; - npm run test + npm install; + ls node_modules; + export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; + echo $PARSE_SERVER_DATABASE_ADAPTER; +# npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From de0daab96a5b578a40230b96f10c654a03887f31 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 12:23:15 -0500 Subject: [PATCH 041/294] packages overwritten? --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2488139c..b98c1208e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,8 +46,10 @@ jobs: ls - name: Install File Adapter run: npm install --save @parse/fs-files-adapter; + ls node_modules/@parse; - name: Install Oracle for Node run: npm install oracledb@6.2.0; + ls node_modules/oracledb; # - name: Run Free23c # run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; # docker ps -a; @@ -61,6 +63,7 @@ jobs: # ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - name: Run Tests run: cd parse-server; + ls node_modules; npm install; ls node_modules; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; From 80cf1829dfae14d8b1122eb41a4635877565a846 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 12:26:37 -0500 Subject: [PATCH 042/294] Install packages in Run Tests --- .github/workflows/ci.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b98c1208e..6f2ecf5ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,12 +44,12 @@ jobs: wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; ls - - name: Install File Adapter - run: npm install --save @parse/fs-files-adapter; - ls node_modules/@parse; - - name: Install Oracle for Node - run: npm install oracledb@6.2.0; - ls node_modules/oracledb; +# - name: Install File Adapter +# run: npm install --save @parse/fs-files-adapter; +# ls node_modules/@parse; +# - name: Install Oracle for Node +# run: npm install oracledb@6.2.0; +# ls node_modules/oracledb; # - name: Run Free23c # run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; # docker ps -a; @@ -63,8 +63,11 @@ jobs: # ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - name: Run Tests run: cd parse-server; - ls node_modules; npm install; + npm install --save @parse/fs-files-adapter; + npm install oracledb@6.2.0; + ls node_modules/@parse; + ls node_modules/oracledb; ls node_modules; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; From 182eeca1ac91523b9b251edcfb7b218af9c8e197 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 12:33:46 -0500 Subject: [PATCH 043/294] Just 6.3.1 --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f2ecf5ea..08f303e1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: ['5.6.0', '6.3.1'] +# version: ['5.6.0', '6.3.1'] + version: ['6.3.1'] steps: - name: Checkout parse-server ${{ matrix.version }} uses: actions/checkout@v2 From 5fcddaafe1319abb938a169ef4bb8771bc362f52 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 13:09:44 -0500 Subject: [PATCH 044/294] Play with sed --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08f303e1f..7c768d294 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,11 @@ jobs: wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; ls + - name: Play w SED + run: which sed; + sed -n; + sed -i '10 i sed command put me here!' sample_file.txt; + cat sample_file.txt; # - name: Install File Adapter # run: npm install --save @parse/fs-files-adapter; # ls node_modules/@parse; From 95db7a6ce64982d23b09cc3fcb2a39f31bb7ae12 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Fri, 19 Jan 2024 13:28:28 -0500 Subject: [PATCH 045/294] For Test Target testoracle --- package.json | 172 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 000000000..3d7a95903 --- /dev/null +++ b/package.json @@ -0,0 +1,172 @@ +{ + "name": "parse-server", + "version": "6.3.0-alpha.6", + "description": "An express module providing a Parse-compatible API server", + "main": "lib/index.js", + "repository": { + "type": "git", + "url": "https://github.com/parse-community/parse-server" + }, + "files": [ + "bin/", + "lib/", + "public_html/", + "views/", + "LICENSE", + "NOTICE", + "postinstall.js", + "README.md" + ], + "license": "Apache-2.0", + "dependencies": { + "@babel/eslint-parser": "7.21.8", + "@graphql-tools/merge": "8.4.1", + "@graphql-tools/schema": "9.0.4", + "@graphql-tools/utils": "8.12.0", + "@graphql-yoga/node": "2.6.0", + "@parse/fs-files-adapter": "1.2.2", + "@parse/push-adapter": "4.1.3", + "bcryptjs": "2.4.3", + "body-parser": "1.20.2", + "commander": "10.0.1", + "cors": "2.8.5", + "deepcopy": "2.1.0", + "express": "4.18.2", + "express-rate-limit": "6.7.0", + "follow-redirects": "1.15.2", + "graphql": "16.6.0", + "graphql-list-fields": "2.0.2", + "graphql-relay": "0.10.0", + "graphql-tag": "2.12.6", + "intersect": "1.0.1", + "ip-range-check": "0.2.0", + "jsonwebtoken": "9.0.0", + "jwks-rsa": "2.1.5", + "ldapjs": "2.3.3", + "lodash": "4.17.21", + "lru-cache": "9.1.1", + "mime": "3.0.0", + "mongodb": "4.10.0", + "mustache": "4.2.0", + "oracledb": "^6.2.0", + "otpauth": "9.1.2", + "parse": "4.1.0", + "path-to-regexp": "6.2.1", + "pg-monitor": "2.0.0", + "pg-promise": "11.5.0", + "pluralize": "8.0.0", + "rate-limit-redis": "3.0.2", + "redis": "4.6.6", + "semver": "7.5.2", + "subscriptions-transport-ws": "0.11.0", + "tv4": "1.3.0", + "uuid": "9.0.0", + "winston": "3.8.2", + "winston-daily-rotate-file": "4.7.1", + "ws": "8.13.0" + }, + "devDependencies": { + "@actions/core": "1.9.1", + "@apollo/client": "3.6.1", + "@babel/cli": "7.10.0", + "@babel/core": "7.20.2", + "@babel/plugin-proposal-object-rest-spread": "7.10.0", + "@babel/plugin-transform-flow-strip-types": "7.9.0", + "@babel/preset-env": "7.10.0", + "@saithodev/semantic-release-backmerge": "2.1.2", + "@semantic-release/changelog": "5.0.1", + "@semantic-release/commit-analyzer": "8.0.1", + "@semantic-release/git": "9.0.0", + "@semantic-release/github": "7.2.3", + "@semantic-release/npm": "7.1.3", + "@semantic-release/release-notes-generator": "9.0.3", + "all-node-versions": "11.3.0", + "apollo-upload-client": "17.0.0", + "bcrypt-nodejs": "0.0.3", + "clean-jsdoc-theme": "4.2.7", + "cross-env": "7.0.2", + "deep-diff": "1.0.2", + "eslint": "8.26.0", + "eslint-plugin-flowtype": "8.0.3", + "flow-bin": "0.119.1", + "form-data": "3.0.0", + "graphql-tag": "2.12.6", + "husky": "4.3.8", + "jasmine": "3.5.0", + "jasmine-spec-reporter": "7.0.0", + "jsdoc": "3.6.3", + "jsdoc-babel": "0.5.0", + "lint-staged": "10.2.3", + "madge": "5.0.1", + "mock-files-adapter": "file:spec/dependencies/mock-files-adapter", + "mock-mail-adapter": "file:spec/dependencies/mock-mail-adapter", + "mongodb-runner": "4.8.1", + "mongodb-version-list": "1.0.0", + "node-abort-controller": "3.0.1", + "node-fetch": "3.2.10", + "nyc": "15.1.0", + "prettier": "2.0.5", + "semantic-release": "17.4.6", + "yaml": "1.10.0" + }, + "scripts": { + "ci:check": "node ./ci/ciCheck.js", + "ci:checkNodeEngine": "node ./ci/nodeEngineCheck.js", + "ci:definitionsCheck": "node ./ci/definitionsCheck.js", + "definitions": "node ./resources/buildConfigDefinitions.js && prettier --write 'src/Options/*.js'", + "docs": "jsdoc -c ./jsdoc-conf.json", + "lint": "flow && eslint --cache ./", + "lint-fix": "eslint --fix --cache ./", + "build": "babel src/ -d lib/ --copy-files", + "watch": "babel --watch src/ -d lib/ --copy-files", + "test:mongodb:runnerstart": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=$npm_config_dbversion} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start", + "test:mongodb:testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=$npm_config_dbversion} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine", + "test:mongodb": "npm run test:mongodb:runnerstart --dbversion=$npm_config_dbversion && npm run test:mongodb:testonly --dbversion=$npm_config_dbversion", + "test:mongodb:4.2.19": "npm run test:mongodb --dbversion=4.2.19", + "test:mongodb:4.4.13": "npm run test:mongodb --dbversion=4.4.13", + "test:mongodb:5.3.2": "npm run test:mongodb --dbversion=5.3.2", + "test:mongodb:6.0.2": "npm run test:mongodb --dbversion=6.0.2", + "posttest:mongodb": "mongodb-runner stop", + "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start", + "testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine", + "testoracle": "export UV_THREADPOOL_SIZE=128 && cross-env PARSE_SERVER_TEST_DB=oracle PARSE_SERVER_TEST_TIMEOUT=10000 ORACLEDB_VERSION=${ORACLEDB_VERSION:=19.3.0.0} TESTING=1 jasmine", + "test": "npm run testonly", + "posttest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner stop", + "coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 nyc jasmine", + "start": "node ./bin/parse-server", + "prettier": "prettier --write {src,spec}/{**/*,*}.js", + "prepare": "npm run build", + "postinstall": "node -p 'require(\"./postinstall.js\")()'", + "madge:circular": "node_modules/.bin/madge ./src --circular" + }, + "engines": { + "node": ">=14.21.0 <17 || >=18 <19" + }, + "bin": { + "parse-server": "bin/parse-server" + }, + "optionalDependencies": { + "@node-rs/bcrypt": "1.1.0" + }, + "collective": { + "type": "opencollective", + "url": "https://opencollective.com/parse-server", + "logo": "https://opencollective.com/parse-server/logo.txt?reverse=true&variant=binary" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parse-server" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "{src,spec}/{**/*,*}.js": [ + "prettier --write", + "eslint --fix --cache", + "git add" + ] + } +} From 60195bf3ceefd0c21f6edc51a443f8b0256c2a4d Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 13:33:10 -0500 Subject: [PATCH 046/294] Use package.json for now --- .github/workflows/ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c768d294..0f9911133 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,11 +45,15 @@ jobs: wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; ls + - name: package.json + run: ls -la; + cp package.json parse-server; + cd parse-server; + cat package.json; - name: Play w SED run: which sed; - sed -n; - sed -i '10 i sed command put me here!' sample_file.txt; - cat sample_file.txt; +# sed -i '10 i sed command put me here!' sample_file.txt; +# cat sample_file.txt; # - name: Install File Adapter # run: npm install --save @parse/fs-files-adapter; # ls node_modules/@parse; From bb78469cee926e398fe7b7bf7dd9b087a76083f2 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 13:59:07 -0500 Subject: [PATCH 047/294] clone package.json --- .github/workflows/ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f9911133..6a9c95073 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,12 +46,13 @@ jobs: unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; ls - name: package.json - run: ls -la; - cp package.json parse-server; - cd parse-server; - cat package.json; - - name: Play w SED - run: which sed; + run: git clone git@github.com:ddrechse/parse-server-database-adapter-template.git; + ls -la; +# cp package.json parse-server; +# cd parse-server; +# cat package.json; +# - name: Play w SED +# run: which sed; # sed -i '10 i sed command put me here!' sample_file.txt; # cat sample_file.txt; # - name: Install File Adapter From 2c42e5bd2dfef8bf35e743ead825ba01dcb1145f Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 14:07:28 -0500 Subject: [PATCH 048/294] Clone the github way --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a9c95073..0fa8286a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,12 +45,14 @@ jobs: wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; ls - - name: package.json - run: git clone git@github.com:ddrechse/parse-server-database-adapter-template.git; - ls -la; -# cp package.json parse-server; -# cd parse-server; -# cat package.json; + - name: Checkout package.json + uses: actions/checkout@v2 + with: + repository: ddrechse/parse-server-database-adapter-template + ref: '' + path: parse-server-database-adapter-template + - name: Move package.json + run: ls; # - name: Play w SED # run: which sed; # sed -i '10 i sed command put me here!' sample_file.txt; From 8714fb36d522dc2c57cb485bc9461e4c33d516a0 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 14:13:26 -0500 Subject: [PATCH 049/294] Copy package.json --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fa8286a8..23458c494 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,6 +53,9 @@ jobs: path: parse-server-database-adapter-template - name: Move package.json run: ls; + ls -la parse-server-database-adapter-template; + cp parse-server-database-adapter-template/package.json parse-server; + ls -la parse-server; # - name: Play w SED # run: which sed; # sed -i '10 i sed command put me here!' sample_file.txt; From 5990dcd0de2026d47c8d9be1541a8ad019de14bc Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 14:21:08 -0500 Subject: [PATCH 050/294] First Run of testoracle --- .github/workflows/ci.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23458c494..b218bf10f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,17 +66,17 @@ jobs: # - name: Install Oracle for Node # run: npm install oracledb@6.2.0; # ls node_modules/oracledb; -# - name: Run Free23c -# run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; -# docker ps -a; -# - name: Wait for container -# run: sleep 120; -# docker ps -a; -# ./sqlcl/bin/sql -V; -# - name: Enable SODA in image -# run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; -# cat soda; -# ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda + - name: Run Free23c + run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; + docker ps -a; + - name: Wait for container + run: sleep 120; + docker ps -a; + ./sqlcl/bin/sql -V; + - name: Enable SODA in image + run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; + cat soda; + ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - name: Run Tests run: cd parse-server; npm install; @@ -87,6 +87,7 @@ jobs: ls node_modules; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; + ORACLE_CLIENT_LOCATION=../instantclient_21_13 npm run testoracle # npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 412986afcf5e7cd19aefa193a724bf14d0f9573f Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 15:20:03 -0500 Subject: [PATCH 051/294] Clone from realDBAdapterLoader --- .github/workflows/ci.yml | 48 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b218bf10f..6279ae475 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,8 +20,8 @@ jobs: - name: Checkout parse-server ${{ matrix.version }} uses: actions/checkout@v2 with: - repository: parse-community/parse-server - ref: ${{ matrix.version }} + repository: ddrechse/parse-server + ref: realDBAdapterLoader path: parse-server - name: Create Oracle Storage Adapter Dir run: mkdir parse-server/src/Adapters/Storage/Oracle; @@ -66,28 +66,28 @@ jobs: # - name: Install Oracle for Node # run: npm install oracledb@6.2.0; # ls node_modules/oracledb; - - name: Run Free23c - run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; - docker ps -a; - - name: Wait for container - run: sleep 120; - docker ps -a; - ./sqlcl/bin/sql -V; - - name: Enable SODA in image - run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; - cat soda; - ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - - name: Run Tests - run: cd parse-server; - npm install; - npm install --save @parse/fs-files-adapter; - npm install oracledb@6.2.0; - ls node_modules/@parse; - ls node_modules/oracledb; - ls node_modules; - export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; - echo $PARSE_SERVER_DATABASE_ADAPTER; - ORACLE_CLIENT_LOCATION=../instantclient_21_13 npm run testoracle +# - name: Run Free23c +# run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; +# docker ps -a; +# - name: Wait for container +# run: sleep 120; +# docker ps -a; +# ./sqlcl/bin/sql -V; +# - name: Enable SODA in image +# run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; +# cat soda; +# ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda +# - name: Run Tests +# run: cd parse-server; +# npm install; +# npm install --save @parse/fs-files-adapter; +# npm install oracledb@6.2.0; +# ls node_modules/@parse; +# ls node_modules/oracledb; +# ls node_modules; +# export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; +# echo $PARSE_SERVER_DATABASE_ADAPTER; +# ORACLE_CLIENT_LOCATION=../instantclient_21_13 npm run testoracle # npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 3059463fe070b40805a1eb16c435644b8e1ca96c Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 15:23:29 -0500 Subject: [PATCH 052/294] helper.js --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6279ae475..6ff480c01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,7 @@ jobs: ls -la parse-server-database-adapter-template; cp parse-server-database-adapter-template/package.json parse-server; ls -la parse-server; + cat parse-server/spec/helper.js # - name: Play w SED # run: which sed; # sed -i '10 i sed command put me here!' sample_file.txt; From fbf5c4029b25d804b00f0ead111763c666a1dedb Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 15:27:59 -0500 Subject: [PATCH 053/294] Whole Shebang v2 --- .github/workflows/ci.yml | 43 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ff480c01..8d0c66ee0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,28 +67,27 @@ jobs: # - name: Install Oracle for Node # run: npm install oracledb@6.2.0; # ls node_modules/oracledb; -# - name: Run Free23c -# run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; -# docker ps -a; -# - name: Wait for container -# run: sleep 120; -# docker ps -a; -# ./sqlcl/bin/sql -V; -# - name: Enable SODA in image -# run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; -# cat soda; -# ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda -# - name: Run Tests -# run: cd parse-server; -# npm install; -# npm install --save @parse/fs-files-adapter; -# npm install oracledb@6.2.0; -# ls node_modules/@parse; -# ls node_modules/oracledb; -# ls node_modules; -# export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; -# echo $PARSE_SERVER_DATABASE_ADAPTER; -# ORACLE_CLIENT_LOCATION=../instantclient_21_13 npm run testoracle + - name: Run Free23c + run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; + docker ps -a; + - name: Wait for container + run: sleep 120; + docker ps -a; + ./sqlcl/bin/sql -V; + - name: Enable SODA in image + run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; + cat soda; + ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda + - name: Run Tests + run: cd parse-server; + npm install; + npm install --save @parse/fs-files-adapter; + npm install oracledb@6.2.0; + export PARSE_SERVER_LOG_LEVEL=verbose + echo $PARSE_SERVER_LOG_LEVEL + export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; + echo $PARSE_SERVER_DATABASE_ADAPTER; + ORACLE_CLIENT_LOCATION=../instantclient_21_13 npm run testoracle # npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} From df1a639feb79e9b9c067e034bdcdf2bd151aa58a Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 15:48:09 -0500 Subject: [PATCH 054/294] APT? --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d0c66ee0..0f4854c6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,10 @@ jobs: cp parse-server-database-adapter-template/package.json parse-server; ls -la parse-server; cat parse-server/spec/helper.js + - name: ld-lib + run: echo $LD_LIBRARY_PATH + - name: apt + run: apt-get install libaio1; # - name: Play w SED # run: which sed; # sed -i '10 i sed command put me here!' sample_file.txt; @@ -67,27 +71,27 @@ jobs: # - name: Install Oracle for Node # run: npm install oracledb@6.2.0; # ls node_modules/oracledb; - - name: Run Free23c - run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; - docker ps -a; - - name: Wait for container - run: sleep 120; - docker ps -a; - ./sqlcl/bin/sql -V; - - name: Enable SODA in image - run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; - cat soda; - ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - - name: Run Tests - run: cd parse-server; - npm install; - npm install --save @parse/fs-files-adapter; - npm install oracledb@6.2.0; - export PARSE_SERVER_LOG_LEVEL=verbose - echo $PARSE_SERVER_LOG_LEVEL - export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; - echo $PARSE_SERVER_DATABASE_ADAPTER; - ORACLE_CLIENT_LOCATION=../instantclient_21_13 npm run testoracle +# - name: Run Free23c +# run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; +# docker ps -a; +# - name: Wait for container +# run: sleep 120; +# docker ps -a; +# ./sqlcl/bin/sql -V; +# - name: Enable SODA in image +# run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; +# cat soda; +# ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda +# - name: Run Tests +# run: cd parse-server; +# npm install; +# npm install --save @parse/fs-files-adapter; +# npm install oracledb@6.2.0; +# export PARSE_SERVER_LOG_LEVEL=verbose +# echo $PARSE_SERVER_LOG_LEVEL +# export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; +# echo $PARSE_SERVER_DATABASE_ADAPTER; +# ORACLE_CLIENT_LOCATION=../instantclient_21_13 npm run testoracle # npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 796ce8149a7c16dcd67023f7ad15da0832a46cfe Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 15:49:56 -0500 Subject: [PATCH 055/294] sudo apt-get --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f4854c6f..8427856a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: - name: ld-lib run: echo $LD_LIBRARY_PATH - name: apt - run: apt-get install libaio1; + run: sudo apt-get install libaio1; # - name: Play w SED # run: which sed; # sed -i '10 i sed command put me here!' sample_file.txt; From 6b5b629ea27992eac38e7eeaac8a006b0cf32c4b Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 15:54:04 -0500 Subject: [PATCH 056/294] Install instant client correctly, maybe --- .github/workflows/ci.yml | 44 +++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8427856a3..0d29e4de1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,27 +71,29 @@ jobs: # - name: Install Oracle for Node # run: npm install oracledb@6.2.0; # ls node_modules/oracledb; -# - name: Run Free23c -# run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; -# docker ps -a; -# - name: Wait for container -# run: sleep 120; -# docker ps -a; -# ./sqlcl/bin/sql -V; -# - name: Enable SODA in image -# run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; -# cat soda; -# ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda -# - name: Run Tests -# run: cd parse-server; -# npm install; -# npm install --save @parse/fs-files-adapter; -# npm install oracledb@6.2.0; -# export PARSE_SERVER_LOG_LEVEL=verbose -# echo $PARSE_SERVER_LOG_LEVEL -# export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; -# echo $PARSE_SERVER_DATABASE_ADAPTER; -# ORACLE_CLIENT_LOCATION=../instantclient_21_13 npm run testoracle + - name: Run Free23c + run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; + docker ps -a; + - name: Wait for container + run: sleep 120; + docker ps -a; + ./sqlcl/bin/sql -V; + - name: Enable SODA in image + run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; + cat soda; + ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda + - name: Run Tests + run: cd parse-server; + npm install; + npm install --save @parse/fs-files-adapter; + npm install oracledb@6.2.0; + export PARSE_SERVER_LOG_LEVEL=verbose + echo $PARSE_SERVER_LOG_LEVEL + export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; + echo $PARSE_SERVER_DATABASE_ADAPTER; + export LD_LIBRARY_PATH=${PWD}/instantclient_21_13 + echo $LD_LIBARARY_PATH + ORACLE_CLIENT_LOCATION=${PWD}/instantclient_21_13 npm run testoracle # npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 4fd9d345e7aae3f0cc6cd81f3e877a55a48f0949 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 16:06:03 -0500 Subject: [PATCH 057/294] LD_LIBRARY_PATH --- .github/workflows/ci.yml | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d29e4de1..7cd38a25e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,9 +57,7 @@ jobs: cp parse-server-database-adapter-template/package.json parse-server; ls -la parse-server; cat parse-server/spec/helper.js - - name: ld-lib - run: echo $LD_LIBRARY_PATH - - name: apt + - name: Install libaio1 run: sudo apt-get install libaio1; # - name: Play w SED # run: which sed; @@ -71,17 +69,17 @@ jobs: # - name: Install Oracle for Node # run: npm install oracledb@6.2.0; # ls node_modules/oracledb; - - name: Run Free23c - run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; - docker ps -a; - - name: Wait for container - run: sleep 120; - docker ps -a; - ./sqlcl/bin/sql -V; - - name: Enable SODA in image - run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; - cat soda; - ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda +# - name: Run Free23c +# run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; +# docker ps -a; +# - name: Wait for container +# run: sleep 120; +# docker ps -a; +# ./sqlcl/bin/sql -V; +# - name: Enable SODA in image +# run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; +# cat soda; +# ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - name: Run Tests run: cd parse-server; npm install; @@ -91,9 +89,10 @@ jobs: echo $PARSE_SERVER_LOG_LEVEL export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; - export LD_LIBRARY_PATH=${PWD}/instantclient_21_13 + echo $PWD + export LD_LIBRARY_PATH="${PWD}/instantclient_21_13" echo $LD_LIBARARY_PATH - ORACLE_CLIENT_LOCATION=${PWD}/instantclient_21_13 npm run testoracle +# ORACLE_CLIENT_LOCATION=${PWD}/instantclient_21_13 npm run testoracle # npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} From a2de839837841ffab984c7f029abf578e2ff8c7e Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 16:08:22 -0500 Subject: [PATCH 058/294] Update ci.yml --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cd38a25e..5f7fb93d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,9 +89,9 @@ jobs: echo $PARSE_SERVER_LOG_LEVEL export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; - echo $PWD - export LD_LIBRARY_PATH="${PWD}/instantclient_21_13" - echo $LD_LIBARARY_PATH + echo $PWD; + export LD_LIBRARY_PATH="${PWD}/instantclient_21_13"; + echo $LD_LIBARARY_PATH; # ORACLE_CLIENT_LOCATION=${PWD}/instantclient_21_13 npm run testoracle # npm run test concurrency: From 318fba1900b35a8983396b147eb4659d5b88304f Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 16:36:21 -0500 Subject: [PATCH 059/294] Pathing continues --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f7fb93d8..a6b9e81d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,8 +90,10 @@ jobs: export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; echo $PWD; - export LD_LIBRARY_PATH="${PWD}/instantclient_21_13"; - echo $LD_LIBARARY_PATH; + echo "Before setting LIB PATH"; + export LD_LIBRARY_PATH=${PWD}/instantclient_21_13:$LD_LIBRARY_PATH; + echo "This is LD LIBRARY PATH"; + echo $LD_LIBRARY_PATH; # ORACLE_CLIENT_LOCATION=${PWD}/instantclient_21_13 npm run testoracle # npm run test concurrency: From d3beaec0f691c073e405a738b8e20558665f705f Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 19 Jan 2024 16:39:13 -0500 Subject: [PATCH 060/294] Whole Shebang 3 --- .github/workflows/ci.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6b9e81d4..2930cf706 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,17 +69,17 @@ jobs: # - name: Install Oracle for Node # run: npm install oracledb@6.2.0; # ls node_modules/oracledb; -# - name: Run Free23c -# run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; -# docker ps -a; -# - name: Wait for container -# run: sleep 120; -# docker ps -a; -# ./sqlcl/bin/sql -V; -# - name: Enable SODA in image -# run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; -# cat soda; -# ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda + - name: Run Free23c + run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; + docker ps -a; + - name: Wait for container + run: sleep 120; + docker ps -a; + ./sqlcl/bin/sql -V; + - name: Enable SODA in image + run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; + cat soda; + ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - name: Run Tests run: cd parse-server; npm install; @@ -91,10 +91,10 @@ jobs: echo $PARSE_SERVER_DATABASE_ADAPTER; echo $PWD; echo "Before setting LIB PATH"; - export LD_LIBRARY_PATH=${PWD}/instantclient_21_13:$LD_LIBRARY_PATH; + export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; -# ORACLE_CLIENT_LOCATION=${PWD}/instantclient_21_13 npm run testoracle + ORACLE_CLIENT_LOCATION=${PWD}/instantclient_21_13 npm run testoracle # npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 4306976aaa97b93da2b25feb31166e843d45de69 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 09:27:51 -0500 Subject: [PATCH 061/294] why can't instant client libs be found? --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2930cf706..277b32be4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,8 @@ jobs: ls -al /lib/libc*; wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; - ls + ls; + ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/parse-server/instantclient_21_13; - name: Checkout package.json uses: actions/checkout@v2 with: From 248c404610175c2b3ecf487e1509034ca7324111 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 09:32:37 -0500 Subject: [PATCH 062/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 277b32be4..ebaa80302 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: ls -al /lib/libc*; wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; - ls; + ls -la; ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/parse-server/instantclient_21_13; - name: Checkout package.json uses: actions/checkout@v2 From 07e7fafc89b95271b5ee58ef09e6de4116e5fbd8 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 09:37:38 -0500 Subject: [PATCH 063/294] Update ci.yml --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebaa80302..6d365c8bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,8 @@ jobs: wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; ls -la; + echo "$PWD"; + ls -la $PWD/instantclient_21_13; ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/parse-server/instantclient_21_13; - name: Checkout package.json uses: actions/checkout@v2 From 7f15bb6b6147e5233682fe959eb353dace19927a Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 09:40:30 -0500 Subject: [PATCH 064/294] Instant Client Pathing problem --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d365c8bc..539dd98de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: ls -la; echo "$PWD"; ls -la $PWD/instantclient_21_13; - ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/parse-server/instantclient_21_13; + ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; - name: Checkout package.json uses: actions/checkout@v2 with: @@ -84,7 +84,12 @@ jobs: cat soda; ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - name: Run Tests - run: cd parse-server; + run: echo $PWD; + echo "Before setting LIB PATH"; + export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; + echo "This is LD LIBRARY PATH"; + echo $LD_LIBRARY_PATH; + cd parse-server; npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; @@ -92,11 +97,6 @@ jobs: echo $PARSE_SERVER_LOG_LEVEL export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; - echo $PWD; - echo "Before setting LIB PATH"; - export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; - echo "This is LD LIBRARY PATH"; - echo $LD_LIBRARY_PATH; ORACLE_CLIENT_LOCATION=${PWD}/instantclient_21_13 npm run testoracle # npm run test concurrency: From bdecefa619d8e338f3fd25f88cda6bf7aa1ba885 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 09:54:50 -0500 Subject: [PATCH 065/294] Update npm run --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 539dd98de..3ebf8cab9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,7 +97,7 @@ jobs: echo $PARSE_SERVER_LOG_LEVEL export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; - ORACLE_CLIENT_LOCATION=${PWD}/instantclient_21_13 npm run testoracle + ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH}/instantclient_21_13 npm run testoracle # npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 96dc4301d78873deedb54f05f63a809c0a948c22 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 10:02:43 -0500 Subject: [PATCH 066/294] Focus --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ebf8cab9..ff651f9b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,7 +97,7 @@ jobs: echo $PARSE_SERVER_LOG_LEVEL export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; - ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH}/instantclient_21_13 npm run testoracle + ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle # npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 02a13ecad6ee63855cff6ed17774b95173c19bea Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 10:21:58 -0500 Subject: [PATCH 067/294] Turn off Verbose --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff651f9b9..8feb3c6f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,8 +93,8 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; - export PARSE_SERVER_LOG_LEVEL=verbose - echo $PARSE_SERVER_LOG_LEVEL +# export PARSE_SERVER_LOG_LEVEL=verbose +# echo $PARSE_SERVER_LOG_LEVEL export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle From 8424350dd710f69bad96e35867b3875189b092c1 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 10:25:24 -0500 Subject: [PATCH 068/294] Just set log levelto info --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8feb3c6f9..816a2890c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,8 +93,8 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; -# export PARSE_SERVER_LOG_LEVEL=verbose -# echo $PARSE_SERVER_LOG_LEVEL + export PARSE_SERVER_LOG_LEVEL=info; + echo $PARSE_SERVER_LOG_LEVEL; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle From dab58c5ff959584d6c139cc49dff5bdb9327b022 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 10:43:20 -0500 Subject: [PATCH 069/294] No Log Level at all --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 816a2890c..31cf9e0f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,8 +93,6 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; - export PARSE_SERVER_LOG_LEVEL=info; - echo $PARSE_SERVER_LOG_LEVEL; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle From ee94caf34f53a2c8976decf05560118dcb322c91 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 11:10:37 -0500 Subject: [PATCH 070/294] Try to run target test --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31cf9e0f9..28a4a95af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,9 +93,12 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; + export UV_THREADPOOL_SIZE=128; + export PARSE_SERVER_TEST_DB=oracle; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; - ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle + ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run test +# ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle # npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 7f022ab6bc96b83f8496c0324a3a08d36a866692 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Mon, 22 Jan 2024 11:28:52 -0500 Subject: [PATCH 071/294] Delete package.json --- package.json | 172 --------------------------------------------------- 1 file changed, 172 deletions(-) delete mode 100644 package.json diff --git a/package.json b/package.json deleted file mode 100644 index 3d7a95903..000000000 --- a/package.json +++ /dev/null @@ -1,172 +0,0 @@ -{ - "name": "parse-server", - "version": "6.3.0-alpha.6", - "description": "An express module providing a Parse-compatible API server", - "main": "lib/index.js", - "repository": { - "type": "git", - "url": "https://github.com/parse-community/parse-server" - }, - "files": [ - "bin/", - "lib/", - "public_html/", - "views/", - "LICENSE", - "NOTICE", - "postinstall.js", - "README.md" - ], - "license": "Apache-2.0", - "dependencies": { - "@babel/eslint-parser": "7.21.8", - "@graphql-tools/merge": "8.4.1", - "@graphql-tools/schema": "9.0.4", - "@graphql-tools/utils": "8.12.0", - "@graphql-yoga/node": "2.6.0", - "@parse/fs-files-adapter": "1.2.2", - "@parse/push-adapter": "4.1.3", - "bcryptjs": "2.4.3", - "body-parser": "1.20.2", - "commander": "10.0.1", - "cors": "2.8.5", - "deepcopy": "2.1.0", - "express": "4.18.2", - "express-rate-limit": "6.7.0", - "follow-redirects": "1.15.2", - "graphql": "16.6.0", - "graphql-list-fields": "2.0.2", - "graphql-relay": "0.10.0", - "graphql-tag": "2.12.6", - "intersect": "1.0.1", - "ip-range-check": "0.2.0", - "jsonwebtoken": "9.0.0", - "jwks-rsa": "2.1.5", - "ldapjs": "2.3.3", - "lodash": "4.17.21", - "lru-cache": "9.1.1", - "mime": "3.0.0", - "mongodb": "4.10.0", - "mustache": "4.2.0", - "oracledb": "^6.2.0", - "otpauth": "9.1.2", - "parse": "4.1.0", - "path-to-regexp": "6.2.1", - "pg-monitor": "2.0.0", - "pg-promise": "11.5.0", - "pluralize": "8.0.0", - "rate-limit-redis": "3.0.2", - "redis": "4.6.6", - "semver": "7.5.2", - "subscriptions-transport-ws": "0.11.0", - "tv4": "1.3.0", - "uuid": "9.0.0", - "winston": "3.8.2", - "winston-daily-rotate-file": "4.7.1", - "ws": "8.13.0" - }, - "devDependencies": { - "@actions/core": "1.9.1", - "@apollo/client": "3.6.1", - "@babel/cli": "7.10.0", - "@babel/core": "7.20.2", - "@babel/plugin-proposal-object-rest-spread": "7.10.0", - "@babel/plugin-transform-flow-strip-types": "7.9.0", - "@babel/preset-env": "7.10.0", - "@saithodev/semantic-release-backmerge": "2.1.2", - "@semantic-release/changelog": "5.0.1", - "@semantic-release/commit-analyzer": "8.0.1", - "@semantic-release/git": "9.0.0", - "@semantic-release/github": "7.2.3", - "@semantic-release/npm": "7.1.3", - "@semantic-release/release-notes-generator": "9.0.3", - "all-node-versions": "11.3.0", - "apollo-upload-client": "17.0.0", - "bcrypt-nodejs": "0.0.3", - "clean-jsdoc-theme": "4.2.7", - "cross-env": "7.0.2", - "deep-diff": "1.0.2", - "eslint": "8.26.0", - "eslint-plugin-flowtype": "8.0.3", - "flow-bin": "0.119.1", - "form-data": "3.0.0", - "graphql-tag": "2.12.6", - "husky": "4.3.8", - "jasmine": "3.5.0", - "jasmine-spec-reporter": "7.0.0", - "jsdoc": "3.6.3", - "jsdoc-babel": "0.5.0", - "lint-staged": "10.2.3", - "madge": "5.0.1", - "mock-files-adapter": "file:spec/dependencies/mock-files-adapter", - "mock-mail-adapter": "file:spec/dependencies/mock-mail-adapter", - "mongodb-runner": "4.8.1", - "mongodb-version-list": "1.0.0", - "node-abort-controller": "3.0.1", - "node-fetch": "3.2.10", - "nyc": "15.1.0", - "prettier": "2.0.5", - "semantic-release": "17.4.6", - "yaml": "1.10.0" - }, - "scripts": { - "ci:check": "node ./ci/ciCheck.js", - "ci:checkNodeEngine": "node ./ci/nodeEngineCheck.js", - "ci:definitionsCheck": "node ./ci/definitionsCheck.js", - "definitions": "node ./resources/buildConfigDefinitions.js && prettier --write 'src/Options/*.js'", - "docs": "jsdoc -c ./jsdoc-conf.json", - "lint": "flow && eslint --cache ./", - "lint-fix": "eslint --fix --cache ./", - "build": "babel src/ -d lib/ --copy-files", - "watch": "babel --watch src/ -d lib/ --copy-files", - "test:mongodb:runnerstart": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=$npm_config_dbversion} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start", - "test:mongodb:testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=$npm_config_dbversion} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine", - "test:mongodb": "npm run test:mongodb:runnerstart --dbversion=$npm_config_dbversion && npm run test:mongodb:testonly --dbversion=$npm_config_dbversion", - "test:mongodb:4.2.19": "npm run test:mongodb --dbversion=4.2.19", - "test:mongodb:4.4.13": "npm run test:mongodb --dbversion=4.4.13", - "test:mongodb:5.3.2": "npm run test:mongodb --dbversion=5.3.2", - "test:mongodb:6.0.2": "npm run test:mongodb --dbversion=6.0.2", - "posttest:mongodb": "mongodb-runner stop", - "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start", - "testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine", - "testoracle": "export UV_THREADPOOL_SIZE=128 && cross-env PARSE_SERVER_TEST_DB=oracle PARSE_SERVER_TEST_TIMEOUT=10000 ORACLEDB_VERSION=${ORACLEDB_VERSION:=19.3.0.0} TESTING=1 jasmine", - "test": "npm run testonly", - "posttest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner stop", - "coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 nyc jasmine", - "start": "node ./bin/parse-server", - "prettier": "prettier --write {src,spec}/{**/*,*}.js", - "prepare": "npm run build", - "postinstall": "node -p 'require(\"./postinstall.js\")()'", - "madge:circular": "node_modules/.bin/madge ./src --circular" - }, - "engines": { - "node": ">=14.21.0 <17 || >=18 <19" - }, - "bin": { - "parse-server": "bin/parse-server" - }, - "optionalDependencies": { - "@node-rs/bcrypt": "1.1.0" - }, - "collective": { - "type": "opencollective", - "url": "https://opencollective.com/parse-server", - "logo": "https://opencollective.com/parse-server/logo.txt?reverse=true&variant=binary" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parse-server" - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "{src,spec}/{**/*,*}.js": [ - "prettier --write", - "eslint --fix --cache", - "git add" - ] - } -} From 1f99c277f734ff673145ad0291e82292237370c8 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 11:33:19 -0500 Subject: [PATCH 072/294] remove package.json steps --- .github/workflows/ci.yml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28a4a95af..e2bc47bc8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,30 +48,8 @@ jobs: echo "$PWD"; ls -la $PWD/instantclient_21_13; ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; - - name: Checkout package.json - uses: actions/checkout@v2 - with: - repository: ddrechse/parse-server-database-adapter-template - ref: '' - path: parse-server-database-adapter-template - - name: Move package.json - run: ls; - ls -la parse-server-database-adapter-template; - cp parse-server-database-adapter-template/package.json parse-server; - ls -la parse-server; - cat parse-server/spec/helper.js - name: Install libaio1 run: sudo apt-get install libaio1; -# - name: Play w SED -# run: which sed; -# sed -i '10 i sed command put me here!' sample_file.txt; -# cat sample_file.txt; -# - name: Install File Adapter -# run: npm install --save @parse/fs-files-adapter; -# ls node_modules/@parse; -# - name: Install Oracle for Node -# run: npm install oracledb@6.2.0; -# ls node_modules/oracledb; - name: Run Free23c run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; docker ps -a; @@ -99,7 +77,6 @@ jobs: echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run test # ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle -# npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From f62a08c8d1ef03dc1ba74bab140fd7601631d42f Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 15:16:59 -0500 Subject: [PATCH 073/294] Grab Ora Specs --- .github/workflows/ci.yml | 62 +++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2bc47bc8..b331566eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,32 +50,42 @@ jobs: ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; - name: Install libaio1 run: sudo apt-get install libaio1; - - name: Run Free23c - run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; - docker ps -a; - - name: Wait for container - run: sleep 120; - docker ps -a; - ./sqlcl/bin/sql -V; - - name: Enable SODA in image - run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; - cat soda; - ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - - name: Run Tests - run: echo $PWD; - echo "Before setting LIB PATH"; - export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; - echo "This is LD LIBRARY PATH"; - echo $LD_LIBRARY_PATH; - cd parse-server; - npm install; - npm install --save @parse/fs-files-adapter; - npm install oracledb@6.2.0; - export UV_THREADPOOL_SIZE=128; - export PARSE_SERVER_TEST_DB=oracle; - export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; - echo $PARSE_SERVER_DATABASE_ADAPTER; - ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run test + - name: Checkout OraSepcs + uses: actions/checkout@v2 + with: + repository: ddrechse/parse-server + ref: oraSpecs + path: ora-specs + - name: Validate oraSpecs + run: ls -la ora-specs; + cp -R ./ora-specs/specs ./parse-server; + ls -la parse-server/specs; +# - name: Run Free23c +# run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; +# docker ps -a; +# - name: Wait for container +# run: sleep 120; +# docker ps -a; +# ./sqlcl/bin/sql -V; +# - name: Enable SODA in image +# run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; +# cat soda; +# ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda +# - name: Run Tests +# run: echo $PWD; +# echo "Before setting LIB PATH"; +# export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; +# echo "This is LD LIBRARY PATH"; +# echo $LD_LIBRARY_PATH; +# cd parse-server; +# npm install; +# npm install --save @parse/fs-files-adapter; +# npm install oracledb@6.2.0; +# export UV_THREADPOOL_SIZE=128; +# export PARSE_SERVER_TEST_DB=oracle; +# export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; +# echo $PARSE_SERVER_DATABASE_ADAPTER; +# ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run test # ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle concurrency: group: ${{ github.workflow }}-${{ github.ref }} From b5b963a7c152caa4bd6823324e65c7588d86caf6 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 15:18:25 -0500 Subject: [PATCH 074/294] It's spec --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b331566eb..2b9469ac2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,8 +58,8 @@ jobs: path: ora-specs - name: Validate oraSpecs run: ls -la ora-specs; - cp -R ./ora-specs/specs ./parse-server; - ls -la parse-server/specs; + cp -R ./ora-specs/spec ./parse-server; + ls -la parse-server/spec; # - name: Run Free23c # run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; # docker ps -a; From 69c9e6a6d8c06685a58f347a5c266843486d0562 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 15:21:56 -0500 Subject: [PATCH 075/294] whole shebang 4 --- .github/workflows/ci.yml | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b9469ac2..61d97f4a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,32 +60,32 @@ jobs: run: ls -la ora-specs; cp -R ./ora-specs/spec ./parse-server; ls -la parse-server/spec; -# - name: Run Free23c -# run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; -# docker ps -a; -# - name: Wait for container -# run: sleep 120; -# docker ps -a; -# ./sqlcl/bin/sql -V; -# - name: Enable SODA in image -# run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; -# cat soda; -# ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda -# - name: Run Tests -# run: echo $PWD; -# echo "Before setting LIB PATH"; -# export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; -# echo "This is LD LIBRARY PATH"; -# echo $LD_LIBRARY_PATH; -# cd parse-server; -# npm install; -# npm install --save @parse/fs-files-adapter; -# npm install oracledb@6.2.0; -# export UV_THREADPOOL_SIZE=128; -# export PARSE_SERVER_TEST_DB=oracle; -# export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; -# echo $PARSE_SERVER_DATABASE_ADAPTER; -# ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run test + - name: Run Free23c + run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; + docker ps -a; + - name: Wait for container + run: sleep 120; + docker ps -a; + ./sqlcl/bin/sql -V; + - name: Enable SODA in image + run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; + cat soda; + ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda + - name: Run Tests + run: echo $PWD; + echo "Before setting LIB PATH"; + export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; + echo "This is LD LIBRARY PATH"; + echo $LD_LIBRARY_PATH; + cd parse-server; + npm install; + npm install --save @parse/fs-files-adapter; + npm install oracledb@6.2.0; + export UV_THREADPOOL_SIZE=128; + export PARSE_SERVER_TEST_DB=oracle; + export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; + echo $PARSE_SERVER_DATABASE_ADAPTER; + ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run test # ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 262e8037747000c212e935dfb50030a810f59aa9 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 15:51:41 -0500 Subject: [PATCH 076/294] Whole Shebang 5 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61d97f4a6..fb289ca24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: - '**/**.md' jobs: run-parse-server-ci: - name: CI of Parse Server ${{ matrix.version }} + name: CI of Parse Server timeout-minutes: 15 runs-on: ubuntu-latest strategy: From e8542bb257a14cd0a29ff63a41aead539d6fc023 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 16:10:42 -0500 Subject: [PATCH 077/294] timeout minutes = 30 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb289ca24..bbec40d95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: jobs: run-parse-server-ci: name: CI of Parse Server - timeout-minutes: 15 + timeout-minutes: 30 runs-on: ubuntu-latest strategy: matrix: From d330a74457bc4c625f9429d85a02a68ccb4574ed Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 22 Jan 2024 17:56:14 -0500 Subject: [PATCH 078/294] Version alpha, disable tests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bbec40d95..32c773387 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: # version: ['5.6.0', '6.3.1'] - version: ['6.3.1'] + version: ['alpha'] steps: - name: Checkout parse-server ${{ matrix.version }} uses: actions/checkout@v2 From dbb88c08ab7136851933113cbc630c978389f498 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 08:25:29 -0500 Subject: [PATCH 079/294] docker info --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32c773387..c6276a67d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,6 +63,7 @@ jobs: - name: Run Free23c run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; docker ps -a; + docker info; - name: Wait for container run: sleep 120; docker ps -a; From 727efcc167d2a86b4b1986aa4bb9cfbe3cee9b92 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 09:57:57 -0500 Subject: [PATCH 080/294] macos-latest? --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6276a67d..0773fe816 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: run-parse-server-ci: name: CI of Parse Server timeout-minutes: 30 - runs-on: ubuntu-latest + runs-on: macos-latest strategy: matrix: # version: ['5.6.0', '6.3.1'] From 8877becfd291638ce7e30cf22b16cd534c4db71e Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 11:04:47 -0500 Subject: [PATCH 081/294] Update ci.yml Go Back to ubuntu --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0773fe816..c6276a67d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: run-parse-server-ci: name: CI of Parse Server timeout-minutes: 30 - runs-on: macos-latest + runs-on: ubuntu-latest strategy: matrix: # version: ['5.6.0', '6.3.1'] From 6a66e8697cc410f7e42ddb0e8edd9c73db5f1fdc Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 12:12:42 -0500 Subject: [PATCH 082/294] Trun verbose on, extend timeout to 60 --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6276a67d..1c10143ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: jobs: run-parse-server-ci: name: CI of Parse Server - timeout-minutes: 30 + timeout-minutes: 60 runs-on: ubuntu-latest strategy: matrix: @@ -84,6 +84,7 @@ jobs: npm install oracledb@6.2.0; export UV_THREADPOOL_SIZE=128; export PARSE_SERVER_TEST_DB=oracle; + export PARSE_SERVER_LOG_LEVEL=verbose; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run test From 5e2041996cbe15a1404573affef1cb6914832805 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 12:57:46 -0500 Subject: [PATCH 083/294] Turn off verbose --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c10143ba..49111c039 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,7 +84,6 @@ jobs: npm install oracledb@6.2.0; export UV_THREADPOOL_SIZE=128; export PARSE_SERVER_TEST_DB=oracle; - export PARSE_SERVER_LOG_LEVEL=verbose; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run test From 439c4fe585c13d5128f804e5d9f9c677609af2dc Mon Sep 17 00:00:00 2001 From: ddrechse Date: Tue, 23 Jan 2024 14:08:48 -0500 Subject: [PATCH 084/294] lets try target testoracle --- package.json | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 000000000..9a90009e4 --- /dev/null +++ b/package.json @@ -0,0 +1,171 @@ +{ + "name": "parse-server", + "version": "7.0.0-alpha.5", + "description": "An express module providing a Parse-compatible API server", + "main": "lib/index.js", + "repository": { + "type": "git", + "url": "https://github.com/parse-community/parse-server" + }, + "files": [ + "bin/", + "lib/", + "public_html/", + "views/", + "LICENSE", + "NOTICE", + "postinstall.js", + "README.md" + ], + "license": "Apache-2.0", + "dependencies": { + "@babel/eslint-parser": "7.21.8", + "@graphql-tools/merge": "8.4.1", + "@graphql-tools/schema": "9.0.4", + "@graphql-tools/utils": "8.12.0", + "@graphql-yoga/node": "2.6.0", + "@parse/fs-files-adapter": "1.2.2", + "@parse/push-adapter": "5.0.2", + "bcryptjs": "2.4.3", + "body-parser": "1.20.2", + "commander": "10.0.1", + "cors": "2.8.5", + "deepcopy": "2.1.0", + "express": "4.18.2", + "express-rate-limit": "6.7.0", + "follow-redirects": "1.15.4", + "graphql": "16.8.1", + "graphql-list-fields": "2.0.2", + "graphql-relay": "0.10.0", + "graphql-tag": "2.12.6", + "intersect": "1.0.1", + "jsonwebtoken": "9.0.0", + "jwks-rsa": "2.1.5", + "ldapjs": "2.3.3", + "lodash": "4.17.21", + "lru-cache": "9.1.1", + "mime": "3.0.0", + "mongodb": "5.9.0", + "mustache": "4.2.0", + "oracledb": "^6.2.0", + "otpauth": "9.1.2", + "parse": "4.1.0", + "path-to-regexp": "6.2.1", + "pg-monitor": "2.0.0", + "pg-promise": "11.5.0", + "pluralize": "8.0.0", + "rate-limit-redis": "3.0.2", + "redis": "4.6.6", + "semver": "7.5.2", + "subscriptions-transport-ws": "0.11.0", + "tv4": "1.3.0", + "uuid": "9.0.0", + "winston": "3.8.2", + "winston-daily-rotate-file": "4.7.1", + "ws": "8.13.0" + }, + "devDependencies": { + "@actions/core": "1.9.1", + "@apollo/client": "3.6.1", + "@babel/cli": "7.10.0", + "@babel/core": "7.20.2", + "@babel/plugin-proposal-object-rest-spread": "7.10.0", + "@babel/plugin-transform-flow-strip-types": "7.9.0", + "@babel/preset-env": "7.10.0", + "@saithodev/semantic-release-backmerge": "2.1.2", + "@semantic-release/changelog": "5.0.1", + "@semantic-release/commit-analyzer": "8.0.1", + "@semantic-release/git": "9.0.0", + "@semantic-release/github": "7.2.3", + "@semantic-release/npm": "7.1.3", + "@semantic-release/release-notes-generator": "9.0.3", + "all-node-versions": "11.3.0", + "apollo-upload-client": "17.0.0", + "bcrypt-nodejs": "0.0.3", + "clean-jsdoc-theme": "4.2.7", + "cross-env": "7.0.2", + "deep-diff": "1.0.2", + "eslint": "8.26.0", + "eslint-plugin-flowtype": "8.0.3", + "flow-bin": "0.119.1", + "form-data": "3.0.0", + "graphql-tag": "2.12.6", + "husky": "4.3.8", + "jasmine": "3.5.0", + "jasmine-spec-reporter": "7.0.0", + "jsdoc": "3.6.3", + "jsdoc-babel": "0.5.0", + "lint-staged": "10.2.3", + "madge": "5.0.1", + "mock-files-adapter": "file:spec/dependencies/mock-files-adapter", + "mock-mail-adapter": "file:spec/dependencies/mock-mail-adapter", + "mongodb-runner": "5.4.4", + "mongodb-version-list": "1.0.0", + "node-abort-controller": "3.0.1", + "node-fetch": "3.2.10", + "nyc": "15.1.0", + "prettier": "2.0.5", + "semantic-release": "17.4.6", + "yaml": "1.10.0" + }, + "scripts": { + "ci:check": "node ./ci/ciCheck.js", + "ci:checkNodeEngine": "node ./ci/nodeEngineCheck.js", + "ci:definitionsCheck": "node ./ci/definitionsCheck.js", + "definitions": "node ./resources/buildConfigDefinitions.js && prettier --write 'src/Options/*.js'", + "docs": "jsdoc -c ./jsdoc-conf.json", + "lint": "flow && eslint --cache ./", + "lint-fix": "eslint --fix --cache ./", + "build": "babel src/ -d lib/ --copy-files", + "watch": "babel --watch src/ -d lib/ --copy-files", + "test:mongodb:runnerstart": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=$npm_config_dbversion} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017", + "test:mongodb:testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=$npm_config_dbversion} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine", + "test:mongodb": "npm run test:mongodb:runnerstart --dbversion=$npm_config_dbversion && npm run test:mongodb:testonly --dbversion=$npm_config_dbversion", + "test:mongodb:4.2.19": "npm run test:mongodb --dbversion=4.2.19", + "test:mongodb:4.4.13": "npm run test:mongodb --dbversion=4.4.13", + "test:mongodb:5.3.2": "npm run test:mongodb --dbversion=5.3.2", + "test:mongodb:6.0.2": "npm run test:mongodb --dbversion=6.0.2", + "test:mongodb:7.0.1": "npm run test:mongodb --dbversion=7.0.1", + "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017", + "testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine", + "testoracle": "export UV_THREADPOOL_SIZE=128 && cross-env PARSE_SERVER_TEST_DB=oracle PARSE_SERVER_TEST_TIMEOUT=60000 ORACLEDB_VERSION=${ORACLEDB_VERSION:=19.3.0.0} TESTING=1 jasmine", + "test": "npm run testonly", + "posttest": "cross-env mongodb-runner stop --all", + "coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 nyc jasmine", + "start": "node ./bin/parse-server", + "prettier": "prettier --write {src,spec}/{**/*,*}.js", + "prepare": "npm run build", + "postinstall": "node -p 'require(\"./postinstall.js\")()'", + "madge:circular": "node_modules/.bin/madge ./src --circular" + }, + "engines": { + "node": ">=14.21.0 <17 || >=18 <19" + }, + "bin": { + "parse-server": "bin/parse-server" + }, + "optionalDependencies": { + "@node-rs/bcrypt": "1.1.0" + }, + "collective": { + "type": "opencollective", + "url": "https://opencollective.com/parse-server", + "logo": "https://opencollective.com/parse-server/logo.txt?reverse=true&variant=binary" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parse-server" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "{src,spec}/{**/*,*}.js": [ + "prettier --write", + "eslint --fix --cache", + "git add" + ] + } +} From 5cc06fd18cd19da39dfc68e1786dd00d797c1dd0 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 14:14:12 -0500 Subject: [PATCH 085/294] Try w package.json and testoracle target --- .github/workflows/ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49111c039..567fbedb0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,18 @@ jobs: run: ls -la ora-specs; cp -R ./ora-specs/spec ./parse-server; ls -la parse-server/spec; + - name: Checkout package.json + uses: actions/checkout@v2 + with: + repository: ddrechse/parse-server-database-adapter-template + ref: '' + path: parse-server-database-adapter-template + - name: Move package.json + run: ls; + ls -la parse-server-database-adapter-template; + cp parse-server-database-adapter-template/package.json parse-server; + ls -la parse-server; + cat parse-server/spec/helper.js - name: Run Free23c run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; docker ps -a; @@ -86,8 +98,8 @@ jobs: export PARSE_SERVER_TEST_DB=oracle; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; - ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run test -# ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle + ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle +# ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run test concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From d4b3fe0237134f9e05e754e8d18bec3c87081ee0 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 15:22:03 -0500 Subject: [PATCH 086/294] Try macos, install java11 --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 567fbedb0..2493dfee6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: run-parse-server-ci: name: CI of Parse Server timeout-minutes: 60 - runs-on: ubuntu-latest + runs-on: macos-latest strategy: matrix: # version: ['5.6.0', '6.3.1'] @@ -34,6 +34,13 @@ jobs: path: parse-server/src/Adapters/Storage/Oracle - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; + - name: Install Java 11 + run: java --version; + /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”; + brew update; + brew install java11; + sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk; + java --version; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip; From a75b036c17f698146894a02dbbde72eb578f3fb9 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 15:23:32 -0500 Subject: [PATCH 087/294] Update ci.yml --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2493dfee6..ff1fce27c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,8 +35,7 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Install Java 11 - run: java --version; - /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”; + run: /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”; brew update; brew install java11; sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk; From 1c86a905bbaf88629d5eebd63e768a6f4ed39a35 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 15:24:53 -0500 Subject: [PATCH 088/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff1fce27c..aca384cf8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Install Java 11 - run: /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”; + run: curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh; brew update; brew install java11; sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk; From d72eb65458afa96143219775d6deddf3e82b0bf5 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 15:28:24 -0500 Subject: [PATCH 089/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aca384cf8..f693f20f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Install Java 11 - run: curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh; + run: wget https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh; brew update; brew install java11; sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk; From 01eaad95d80512fd3db995d5be30ab9617503347 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 15:32:03 -0500 Subject: [PATCH 090/294] Update ci.yml --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f693f20f2..7c554e19f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,7 @@ jobs: brew update; brew install java11; sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk; + export PATH="/usr/local/opt/openjdk@11/bin:$PATH"; java --version; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; From 121dda550f2b46c4e67aeedda8f7dbedec0ae942 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 15:35:38 -0500 Subject: [PATCH 091/294] Update ci.yml --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c554e19f..63b8dc809 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,9 +41,11 @@ jobs: sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk; export PATH="/usr/local/opt/openjdk@11/bin:$PATH"; java --version; + export JAVA_HOME="/usr/local/opt/openjdk@11/bin"; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip; + echo $JAVA_HOME; ./sqlcl/bin/sql -V; - name: Install Instant Client run: uname -m; From c503c81e4fb8034c93b8575890618f179246fdb9 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 15:39:20 -0500 Subject: [PATCH 092/294] Update ci.yml --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63b8dc809..f1731bd1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,9 +42,11 @@ jobs: export PATH="/usr/local/opt/openjdk@11/bin:$PATH"; java --version; export JAVA_HOME="/usr/local/opt/openjdk@11/bin"; + echo $JAVA_HOME; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip; + export JAVA_HOME="/usr/local/opt/openjdk@11/bin"; echo $JAVA_HOME; ./sqlcl/bin/sql -V; - name: Install Instant Client From 11ba612d52bf50757a59e1220e22905596043857 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 15:41:26 -0500 Subject: [PATCH 093/294] Update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1731bd1c..f6814b6cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,12 +41,12 @@ jobs: sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk; export PATH="/usr/local/opt/openjdk@11/bin:$PATH"; java --version; - export JAVA_HOME="/usr/local/opt/openjdk@11/bin"; + export JAVA_HOME="/usr/local/opt/openjdk@11"; echo $JAVA_HOME; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip; - export JAVA_HOME="/usr/local/opt/openjdk@11/bin"; + export JAVA_HOME="/usr/local/opt/openjdk@11"; echo $JAVA_HOME; ./sqlcl/bin/sql -V; - name: Install Instant Client From 78fcecffea24b2883592adf3e264f5ac3bc5a96e Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 15:50:50 -0500 Subject: [PATCH 094/294] Update ci.yml --- .github/workflows/ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6814b6cf..34eb4c428 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,10 +51,9 @@ jobs: ./sqlcl/bin/sql -V; - name: Install Instant Client run: uname -m; - ls -la /lib; - ls -al /lib/libc*; - wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; - unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; + wget https://download.oracle.com/otn_software/mac/instantclient/1916000/instantclient-basic-macos.x64-19.16.0.0.0dbru.dmg; + hdiutil attach instantclient-basic-macos.x64-19.16.0.0.0dbru.dmg; + ls /Volumes; ls -la; echo "$PWD"; ls -la $PWD/instantclient_21_13; From 844eddd508d4435002e80f0825a835b2e4fc51f0 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 15:53:53 -0500 Subject: [PATCH 095/294] Update ci.yml --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34eb4c428..5a5fe2163 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,8 @@ jobs: run: uname -m; wget https://download.oracle.com/otn_software/mac/instantclient/1916000/instantclient-basic-macos.x64-19.16.0.0.0dbru.dmg; hdiutil attach instantclient-basic-macos.x64-19.16.0.0.0dbru.dmg; - ls /Volumes; + ls -la /Volumes; + ls -la /Volumes/instantclient-basic-macos.x64-19.16.0.0.0dbru; ls -la; echo "$PWD"; ls -la $PWD/instantclient_21_13; From 5732d30566492b6399b7af4d8c7a7f2fb70ada97 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 16:00:27 -0500 Subject: [PATCH 096/294] Update ci.yml --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a5fe2163..7d1b2d04f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,6 +55,9 @@ jobs: hdiutil attach instantclient-basic-macos.x64-19.16.0.0.0dbru.dmg; ls -la /Volumes; ls -la /Volumes/instantclient-basic-macos.x64-19.16.0.0.0dbru; + sudo cp -R /Volumes/instantclient-basic-macos.x64-19.16.0.0.0dbru instantclient-basic-macos.x64-19.16.0.0.0; + cd instantclient-basic-macos.x64-19.16.0.0.0; + ./install_ic.sh; ls -la; echo "$PWD"; ls -la $PWD/instantclient_21_13; From b783c7491fb5a585282c2522510aa857cc8b83eb Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 16:04:46 -0500 Subject: [PATCH 097/294] Update ci.yml --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d1b2d04f..13f1762b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,11 +57,13 @@ jobs: ls -la /Volumes/instantclient-basic-macos.x64-19.16.0.0.0dbru; sudo cp -R /Volumes/instantclient-basic-macos.x64-19.16.0.0.0dbru instantclient-basic-macos.x64-19.16.0.0.0; cd instantclient-basic-macos.x64-19.16.0.0.0; + echo "Installing Instant Client w Shell Script"; ./install_ic.sh; + cd ..; + echo "Successfully installed Instant Client w Shell Script"; ls -la; echo "$PWD"; - ls -la $PWD/instantclient_21_13; - ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; + ls -la $PWD/instantclient-basic-macos.x64-19.16.0.0.0; - name: Install libaio1 run: sudo apt-get install libaio1; - name: Checkout OraSepcs From 04070b532566d312a134767dae30e2bc33f93730 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 16:07:54 -0500 Subject: [PATCH 098/294] Update ci.yml --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13f1762b1..74340fcc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,6 +64,8 @@ jobs: ls -la; echo "$PWD"; ls -la $PWD/instantclient-basic-macos.x64-19.16.0.0.0; + echo $USER; + ls -la /User/$USER/Downloads/instantclient_19_16 - name: Install libaio1 run: sudo apt-get install libaio1; - name: Checkout OraSepcs From 3049dd93aa4862f875e0e7dcc85b0ea6afba14f0 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 16:10:05 -0500 Subject: [PATCH 099/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74340fcc5..19a5b0751 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: echo "$PWD"; ls -la $PWD/instantclient-basic-macos.x64-19.16.0.0.0; echo $USER; - ls -la /User/$USER/Downloads/instantclient_19_16 + ls -la /Users/$USER/Downloads/instantclient_19_16 - name: Install libaio1 run: sudo apt-get install libaio1; - name: Checkout OraSepcs From 76f740f0870f5630b1e00359edfdffceaf3e4092 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 16:13:25 -0500 Subject: [PATCH 100/294] Update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19a5b0751..d06fa459c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: echo $USER; ls -la /Users/$USER/Downloads/instantclient_19_16 - name: Install libaio1 - run: sudo apt-get install libaio1; + run: brew install libaio; - name: Checkout OraSepcs uses: actions/checkout@v2 with: @@ -105,7 +105,7 @@ jobs: - name: Run Tests run: echo $PWD; echo "Before setting LIB PATH"; - export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; + export LD_LIBRARY_PATH=/Users/$USER/Downloads/instantclient_19_16; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; cd parse-server; From 5c5bdfdd8dcce0568d64f2e459613d73e9cf7215 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 16:15:59 -0500 Subject: [PATCH 101/294] Update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d06fa459c..9c5c2f216 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,8 +66,8 @@ jobs: ls -la $PWD/instantclient-basic-macos.x64-19.16.0.0.0; echo $USER; ls -la /Users/$USER/Downloads/instantclient_19_16 - - name: Install libaio1 - run: brew install libaio; +# - name: Install libaio1 +# run: brew install libaio; - name: Checkout OraSepcs uses: actions/checkout@v2 with: From eb4642553ff227bae3205968c434d7f12ebb10a2 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 16:26:49 -0500 Subject: [PATCH 102/294] Go back to Ubuntu --- .github/workflows/ci.yml | 39 +++++++++------------------------------ 1 file changed, 9 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c5c2f216..500a043c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: run-parse-server-ci: name: CI of Parse Server timeout-minutes: 60 - runs-on: macos-latest + runs-on: ubuntu-latest strategy: matrix: # version: ['5.6.0', '6.3.1'] @@ -33,41 +33,20 @@ jobs: ref: '' path: parse-server/src/Adapters/Storage/Oracle - name: Validate Oracle Dir - run: ls -la parse-server/src/Adapters/Storage/Oracle; - - name: Install Java 11 - run: wget https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh; - brew update; - brew install java11; - sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk; - export PATH="/usr/local/opt/openjdk@11/bin:$PATH"; - java --version; - export JAVA_HOME="/usr/local/opt/openjdk@11"; - echo $JAVA_HOME; + run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip; - export JAVA_HOME="/usr/local/opt/openjdk@11"; - echo $JAVA_HOME; ./sqlcl/bin/sql -V; - name: Install Instant Client run: uname -m; - wget https://download.oracle.com/otn_software/mac/instantclient/1916000/instantclient-basic-macos.x64-19.16.0.0.0dbru.dmg; - hdiutil attach instantclient-basic-macos.x64-19.16.0.0.0dbru.dmg; - ls -la /Volumes; - ls -la /Volumes/instantclient-basic-macos.x64-19.16.0.0.0dbru; - sudo cp -R /Volumes/instantclient-basic-macos.x64-19.16.0.0.0dbru instantclient-basic-macos.x64-19.16.0.0.0; - cd instantclient-basic-macos.x64-19.16.0.0.0; - echo "Installing Instant Client w Shell Script"; - ./install_ic.sh; - cd ..; - echo "Successfully installed Instant Client w Shell Script"; + wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; + unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; ls -la; - echo "$PWD"; - ls -la $PWD/instantclient-basic-macos.x64-19.16.0.0.0; - echo $USER; - ls -la /Users/$USER/Downloads/instantclient_19_16 -# - name: Install libaio1 -# run: brew install libaio; + ls -la $PWD/instantclient_21_13; + ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; + - name: Install libaio1 + run: sudo apt-get install libaio1; - name: Checkout OraSepcs uses: actions/checkout@v2 with: @@ -105,7 +84,7 @@ jobs: - name: Run Tests run: echo $PWD; echo "Before setting LIB PATH"; - export LD_LIBRARY_PATH=/Users/$USER/Downloads/instantclient_19_16; + export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; cd parse-server; From 7631f8b70942149ba20f914041d45c3f4ce1135d Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 23 Jan 2024 17:04:02 -0500 Subject: [PATCH 103/294] Try instant client 19.22 --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 500a043c0..51d0457cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,11 +40,11 @@ jobs: ./sqlcl/bin/sql -V; - name: Install Instant Client run: uname -m; - wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; - unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; + wget https://download.oracle.com/otn_software/linux/instantclient/1922000/instantclient-basic-linux.x64-19.22.0.0.0dbru.zip; + unzip instantclient-basic-linux.x64-19.22.0.0.0dbru.zip; ls -la; - ls -la $PWD/instantclient_21_13; - ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; + ls -la $PWD/instantclient_19_22; + ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_19_22; - name: Install libaio1 run: sudo apt-get install libaio1; - name: Checkout OraSepcs @@ -84,7 +84,7 @@ jobs: - name: Run Tests run: echo $PWD; echo "Before setting LIB PATH"; - export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; + export LD_LIBRARY_PATH=${PWD}/instantclient_19_22; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; cd parse-server; From 82dbe6efc41d2fd6dc9788424b1020cb9a08dd77 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Wed, 24 Jan 2024 08:44:31 -0500 Subject: [PATCH 104/294] Tweak Conn Pool --- Oracle | 1 + 1 file changed, 1 insertion(+) create mode 160000 Oracle diff --git a/Oracle b/Oracle new file mode 160000 index 000000000..f0a35c72a --- /dev/null +++ b/Oracle @@ -0,0 +1 @@ +Subproject commit f0a35c72ac2264e294707cc70a793705488a3dfd From 2bb2fb9e9bf27db8012176e8b38b0ebcd30fd0b2 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Wed, 24 Jan 2024 08:47:02 -0500 Subject: [PATCH 105/294] Remove branch --- Oracle | 1 - 1 file changed, 1 deletion(-) delete mode 160000 Oracle diff --git a/Oracle b/Oracle deleted file mode 160000 index f0a35c72a..000000000 --- a/Oracle +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f0a35c72ac2264e294707cc70a793705488a3dfd From 855004b1a0defeba62fe6e7cc403c377c7694b3e Mon Sep 17 00:00:00 2001 From: ddrechse Date: Wed, 24 Jan 2024 08:49:03 -0500 Subject: [PATCH 106/294] Tweak conn pool --- OracleStorageAdapter.js | 1299 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 1299 insertions(+) create mode 100644 OracleStorageAdapter.js diff --git a/OracleStorageAdapter.js b/OracleStorageAdapter.js new file mode 100644 index 000000000..470023c3e --- /dev/null +++ b/OracleStorageAdapter.js @@ -0,0 +1,1299 @@ +// Copyright (c) 2023, Oracle and/or its affiliates. +// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ +import OracleSchemaCollection from './OracleSchemaCollection'; +import OracleCollection from './OracleCollection'; +import { StorageAdapter } from '../StorageAdapter'; +import type { SchemaType, StorageClass, QueryType, QueryOptions } from '../StorageAdapter'; +// @flow-disable-next +import Parse from 'parse/node'; +// @flow-disable-next +import _ from 'lodash'; +import logger from '../../../logger.js'; + +import { + transformKey, + transformWhere, + transformUpdate, + parseObjectToOracleObjectForCreate, + oracleObjectToParseObject, + transformPointerString, +} from './OracleTransform'; +import { Pool } from 'oracledb'; + +const oracledb = require('oracledb'); +const OracleSchemaCollectionName = '_SCHEMA'; + +const storageAdapterAllCollections = oracleAdapter => { + const collections = oracleAdapter.listAllCollections(oracleAdapter._collectionPrefix); + logger.verbose('collections is ' + JSON.stringify(collections)); + return collections; +}; + +//CDB +//to preserve the original query to hack for $containedBy +var queryBackup = ''; +//CDB-END + +var initialized = false; +var createConnPool = true; +var schemaCollection = null; + +const convertParseSchemaToOracleSchema = ({ ...schema }) => { + delete schema.fields._rperm; + delete schema.fields._wperm; + + if (schema.className === '_User') { + // Legacy mongo adapter knows about the difference between password and _hashed_password. + // Future database adapters will only know about _hashed_password. + // Note: Parse Server will bring back password with injectDefaultSchema, so we don't need + // to add _hashed_password back ever. + delete schema.fields._hashed_password; + } + + return schema; +}; + +// Returns { code, error } if invalid, or { result }, an object +// suitable for inserting into _SCHEMA collection, otherwise. +const oracleSchemaFromFieldsAndClassNameAndCLP = ( + fields, + className, + classLevelPermissions, + indexes +) => { + const oracleObject = { + _id: className, + // TODO: I'm not sure we need objectId + objectId: 'string', + updatedAt: 'string', + createdAt: 'string', + _metadata: undefined, + }; + + for (const fieldName in fields) { + const { type, targetClass, ...fieldOptions } = fields[fieldName]; + oracleObject[fieldName] = OracleSchemaCollection.parseFieldTypeToOracleFieldType({ + type, + targetClass, + }); + if (fieldOptions && Object.keys(fieldOptions).length > 0) { + oracleObject._metadata = oracleObject._metadata || {}; + oracleObject._metadata.fields_options = oracleObject._metadata.fields_options || {}; + oracleObject._metadata.fields_options[fieldName] = fieldOptions; + } + } + + if (typeof classLevelPermissions !== 'undefined') { + oracleObject._metadata = oracleObject._metadata || {}; + if (!classLevelPermissions) { + delete oracleObject._metadata.class_permissions; + } else { + oracleObject._metadata.class_permissions = classLevelPermissions; + } + } + + if (indexes && typeof indexes === 'object' && Object.keys(indexes).length > 0) { + oracleObject._metadata = oracleObject._metadata || {}; + oracleObject._metadata.indexes = indexes; + } + + if (!oracleObject._metadata) { + // cleanup the unused _metadata + delete oracleObject._metadata; + } + + return oracleObject; +}; + +function validateExplainValue(explain) { + if (explain) { + // The list of allowed explain values is from node-mongodb-native/lib/explain.js + const explainAllowedValues = [ + 'queryPlanner', + 'queryPlannerExtended', + 'executionStats', + 'allPlansExecution', + false, + true, + ]; + if (!explainAllowedValues.includes(explain)) { + throw new Parse.Error(Parse.Error.INVALID_QUERY, 'Invalid value for explain'); + } + } +} + +export class OracleStorageAdapter implements StorageAdapter { + // private + _onchange: any; + _collectionPrefix: string; + _connectionPool: Pool; + _collections: Map; + + constructor(options: any) { + logger.verbose( + 'OracleStorageAdapter constructor, uri = ' + + options.databaseURI + + ' collectionPrefix = ' + + options.collectionPrefix + ); + this._uri = options.databaseURI; + this._collectionPrefix = options.collectionPrefix; + this._connectionPool = null; + this._collections = new Map(); + } + + _schemaCollection(): Promise { + try { + const collection = this._adaptiveCollection(OracleSchemaCollectionName); + if (schemaCollection === null) { + if (!this._stream && this.enableSchemaHooks) { + // TODO make sure these are all defined + this._stream = collection._orcaleCollection.watch(); + this._stream.on('change', () => this._onchange()); + } + schemaCollection = new OracleSchemaCollection(collection); + } + return schemaCollection; + } catch (error) { + this.handleError(error); + } + } + + listAllCollections(prefix) { + const result = new Array(); + this._collections.forEach(function (value, key) { + if (key.includes(prefix)) { + const array = key.split(prefix); + if (array.length == 2) { + result.push(array[1]); + } else { + result.push(array[0]); + } + } + }); + return result; + } + + async _truncate(collectionName) { + logger.verbose('Storage Adapter _truncate for ' + collectionName); + try { + const collection = this._adaptiveCollection(collectionName); + const result = await collection.truncate(); + logger.verbose('Storage Adapter _truncate returns ' + result); + return result; + } catch (error) { + logger.error('Storage Adapter _truncate Error for ' + collectionName); + this.handleError(error); + } + } + + async _drop(collectionName) { + logger.verbose('StorageAdapter _drop ' + collectionName); + try { + const collection = this._adaptiveCollection(collectionName); + const result = await collection.drop(); + if (result) { + // Remove Collection + logger.verbose('Dropping ' + this._collectionPrefix + collection + ' from collectionMap'); + this._collections.delete(this._collectionPrefix + collectionName); + if (collectionName.includes(OracleSchemaCollectionName)) { + schemaCollection = null; + } + } + logger.verbose('StorageAdapter _drop returns ' + result); + return result; + } catch (error) { + logger.error('Storage Adapter _drop Error for ' + collectionName); + this.handleError(error); + } + } + + _adaptiveCollection(name: string): OracleCollection { + let realName; + + if (name.includes(this._collectionPrefix)) { + realName = name; + } else { + realName = this._collectionPrefix + name; + } + // first check if we already have this collection, and if so, just return it + // this will reuse the same collection and its embedded connection, so we don't + // create a connection starvation scenario + if (this._collections.get(realName)) { + logger.verbose('Adaptive Collection returning Existing collection ' + realName); + return this._collections.get(realName); + } + + const collection = new OracleCollection(this, realName); + this._collections.set(realName, collection); + logger.verbose('Adaptive Collection returning Created collection ' + realName); + return collection; + } + + async initialize() { + if (initialized === false) { + const wallet_location = process.env.ORACLE_WALLET_LOCATION; + const client_location = process.env.ORACLE_CLIENT_LOCATION; + + if (typeof client_location === 'undefined') { + throw 'Required Environment Variable, ORACLE_CLIENT_LOCATION, is not defined'; + } + + logger.verbose('wallet location = ' + process.env.ORACLE_WALLET_LOCATION); + logger.verbose('oracle client = ' + process.env.ORACLE_CLIENT_LOCATION); + + try { + if (typeof wallet_location === 'undefined') { + logger.info( + 'No Wallet location specified. Intializing Oracle Client to access Local Database Docker Image' + ); + oracledb.initOracleClient({ + libDir: client_location, + }); + } else { + logger.info( + 'Wallet location specified. Intializing Oracle Client to access Cloud Database Instance' + ); + oracledb.initOracleClient({ + libDir: client_location, + configDir: wallet_location, + }); + } + } catch (error) { + if (error.message.includes('NJS-077')) { + // already initialized - so ignore the error + logger.verbose('oracledb already initialized'); + } else { + logger.error('Error Initalizing Oracle Client: ' + error); + // if we get here, probably should exit the whole server process + process.exit(1); + } + } + initialized = true; + } + } + + async connect() { + if (this.connectionPromise) { + logger.verbose('reusing connection pool ' + JSON.stringify(this._connectionPool)); + logger.verbose(' statistics: ' + JSON.stringify(this._connectionPool.getStatistics())); + return this._connectionPool; + } + + this.initialize(); + + var re = new RegExp('oracledb://[a-zA-Z0-9_]*:[^@:]*@[a-zA-Z0-9_.:/]*$'); + + if (!re.test(this._uri)) { + throw 'Incorrect Connection String Format. Format is oracledb://user:password@tnsname'; + } + + const user = this.getUserFromUri(this._uri); + const pw = this.getPasswordFromUri(this._uri); + const tnsname = this.getTnsNameFromUri(this._uri); + + logger.info('creating a connection pool'); + try { + if (createConnPool) { + createConnPool = false; + this.connectionPromise = await oracledb.createPool({ + poolAlias: 'parse', + user: user, + password: pw, + connectString: tnsname, + poolIncrement: 5, + poolMax: 100, + poolMin: 50, + poolTimeout: 10, + // Use default of 60000 ms + // queueTimeout: 10, + enableStatistics: true, + }); + logger.info('connection pool successfully created'); + this._connectionPool = oracledb.getPool('parse'); + return Promise.resolve(this._connectionPool); + } else { + logger.verbose('Returning connection promise while connecting'); + return this.connectionPromise; + } + } catch (error) { + logger.error('Error Creating Connection Pool: ', error); + throw error; + } + } + + getUserFromUri(uri) { + const myArray = uri.split('//'); + const myArray2 = myArray[1].split(':'); + return myArray2[0]; + } + + getPasswordFromUri(uri) { + const myArray = uri.split(':'); + const myArray2 = myArray[2].split('@'); + return myArray2[0]; + } + + getTnsNameFromUri(uri) { + const myArray = uri.split('@'); + return myArray[1]; + } + + handleError(error: ?(Error | Parse.Error)): Promise { + if (error && error.code === 13) { + // Unauthorized error + delete this.client; + delete this.database; + delete this.connectionPromise; + logger.error('Received unauthorized error', { error: error }); + } + + // What to throw? Maybe need to map ORA msgs to Parse msgs + // throw error.message; + throw error; + } + + classExists(className: string): Promise { + return new Promise(resolve => { + logger.verbose('classExists name = ' + className); + const collections = storageAdapterAllCollections(this); + resolve(collections.includes(className)); + }); + } + + async setClassLevelPermissions(className, CLPs) { + try { + logger.verbose('StorageAdapter setClassLevelPermissions for ' + className); + logger.verbose('setClassLevelPermissions permissions = ' + JSON.stringify(CLPs)); + const newCLPS = '{"_metadata": {"class_permissions":' + JSON.stringify(CLPs) + '}}'; + const newCLPSObj = JSON.parse(newCLPS); + const result = await this._schemaCollection().updateSchema(className, newCLPSObj); + logger.verbose('StorageAdapter setClassLevelPermissions returns ' + result); + return result; + } catch (error) { + logger.error('StorageAdapter setClassLevelPermissions Error for ' + className); + this.handleError(error); + } + } + + async createClass(className: string, schema: SchemaType): Promise { + try { + logger.verbose('StorageAdapter createClass for ' + className); + schema = convertParseSchemaToOracleSchema(schema); + const oracleObject = oracleSchemaFromFieldsAndClassNameAndCLP( + schema.fields, + className, + schema.classLevelPermissions, + schema.indexes + ); + oracleObject._id = className; + const result = await this._schemaCollection().insertSchema(oracleObject); + logger.verbose('StorageAdapter createClass insertSchema result = ' + result); + if (typeof schema.indexes !== 'undefined' && Object.keys(schema.indexes).length > 0) { + if (Array.isArray(schema.indexes)) { + await this.createIndexes(className, schema.indexes); + } else { + const indexes = new Array(schema.indexes); + await this.createIndexes(className, indexes); + } + } + return result; + } catch (error) { + logger.error('StorageAdapter createClass Error for ' + className); + this.handleError(error); + } + } + + async addFieldIfNotExists(className: string, fieldName: string, type: any): Promise { + try { + logger.verbose('StorageAdapter addFieldIfNotExists for ' + className); + const result = await this._schemaCollection().addFieldIfNotExists(className, fieldName, type); + logger.verbose('StorageAdapter addFieldIfNotExists returns ' + result); + await this.createIndexesIfNeeded(className, fieldName, type); + return result; + } catch (error) { + logger.error('StorageAdapter addFieldIfNotExists Error for ' + className); + this.handleError(error); + } + } + + async updateFieldOptions(className: string, fieldName: string, type: any): Promise { + const schemaCollection = this._schemaCollection(); + await schemaCollection.updateFieldOptions(className, fieldName, type); + } + + async deleteClass(className: string): Promise { + try { + logger.verbose('StorageAdapter deleteClass for ' + className); + const result1 = await this._drop(className); + logger.verbose('StorageAdapter deleteClass drop returns ' + result1); + const result = await this._schemaCollection().findAndDeleteSchema(className); + logger.verbose('StorageAdapter deleteClass deleteSchema returns ' + result); + return result; + } catch (error) { + logger.error('StorageAdapter deleteClass Error for ' + className); + this.handleError(error); + } + } + + async deleteAllClasses(fast: boolean) { + // let result; + logger.verbose('entering deleteAllClasses fast = ' + fast); + const collections = storageAdapterAllCollections(this); + return Promise.all( + collections.map(collection => (fast ? this._truncate(collection) : this._drop(collection))) + ); + } + + async deleteFields( + className: string, + schema: SchemaType, + fieldNames: Array + ): Promise { + logger.verbose('StorageAdapter deleteFields for className: ' + className); + logger.verbose('StorageAdapter deleteFields for schema: ' + schema); + logger.verbose('StorageAdapter deleteFields oracleFormatNames = ' + fieldNames); + try { + const collection = this._adaptiveCollection(className); + const result = await collection.deleteFields(fieldNames); + const result1 = await this._schemaCollection().deleteSchemaFields(className, fieldNames); + logger.verbose('StorageAdapter deleteFields collection result = ' + result); + logger.verbose('StorageAdapter deleteFields schemacollection result = ' + result1); + } catch (error) { + logger.error('StorageAdapter deleteFields Error for ' + className); + this.handleError(error); + } + } + + async getAllClasses(): Promise { + try { + const schemaCollection = this._schemaCollection(); + const result = await schemaCollection._fetchAllSchemasFrom_SCHEMA(); + logger.verbose('StorageAdapter getAllClasses returns ' + result); + return result; + } catch (error) { + logger.error('StorageAdapter getAllClasses Error'); + this.handleError(error); + } + } + // getClass(className: string): Promise; + + // TODO: As yet not particularly well specified. Creates an object. Maybe shouldn't even need the schema, + // and should infer from the type. Or maybe does need the schema for validations. Or maybe needs + // the schema only for the legacy mongo format. We'll figure that out later. + async createObject( + className: string, + schema: SchemaType, + object: any, + transactionalSession: ?any + ) { + logger.verbose('StorageAdapter createObject for className: ' + className); + + try { + schema = convertParseSchemaToOracleSchema(schema); + const oracleObject = parseObjectToOracleObjectForCreate(className, object, schema); + const collection = this._adaptiveCollection(className); + const result = await collection.insertOne(oracleObject, transactionalSession); + logger.verbose('StorageAdapter createObject insertOne returns: ' + result); + return { ops: [oracleObject] }; + } catch (error) { + // "ORA-00001: unique constraint (ADMIN.index_name) violated" + if (error.errorNum === 1) { + // Duplicate value + const err = new Parse.Error( + Parse.Error.DUPLICATE_VALUE, + 'A duplicate value for a field with unique values was provided' + ); + err.underlyingError = error; + if (error.message) { + const matches = error.message.match(/index:[\sa-zA-Z0-9_\-\.]+\$?([a-zA-Z_-]+)_1/); + if (matches && Array.isArray(matches)) { + err.userInfo = { duplicated_field: matches[1] }; + } + } + this.handleError(err); + } + this.handleError(error); + } + } + + async findOneAndUpdate(className, schema, query, update, transactionalSession) { + try { + logger.verbose('StorageAdapter findOneAndUpdate for ' + className); + let oraWhere = transformWhere(className, query, schema); + const oraUpdate = transformUpdate(className, update, schema); + // Check if this query needs Oracle Storage Adapter _wperm syntax + oraWhere = this.checkUserQuery(oraWhere); + const collection = this._adaptiveCollection(className); + const result = await collection.findOneAndUpdate(oraWhere, oraUpdate, transactionalSession); + logger.verbose('StorageAdapter findOneAndUpdate returns ' + JSON.stringify(result)); + return result; + } catch (error) { + logger.error('StorageAdapter indOneAndUpdate Error for ' + className); + this.handleError(error); + } + } + + /* + Parse has ACL formats that are part of a query which causes an error which was fixed in + https://bug.oraclecorp.com/pls/bug/webbug_print.show?c_rptno=34596223 + + Basically, Oracle cannot handle a null as part of an in operator clause + {_id: "TV5CazXRtP",_wperm: {$in: [null,"*","tE8wEhXmJg","role:Admins",],},} + + This needs to be modified to + {_id: "tE8wEhXmJg",$or : [{_wperm: {"$in": [ "*", "tE8wEhXmJg" ]}}, {_wperm : null}]} + to work with Oracle SODA + + Waiting on maintenance update to pick up the fix. + In the meantime, checkUserQuery will fix up the query + + More here + https://orahub.oci.oraclecorp.com/ora-microservices-dev/mbaas-parse-server/-/wikis/Error:-ORA-40596:-error-occurred-in-JSON-processing-jznEngValCmpWithTypCnv:invTyp + */ + + checkUserQuery(query) { + logger.verbose('in StorageAdapter checkUserQuery'); + logger.verbose('Input query = ' + JSON.stringify(query)); + const newObj = new Object(); + const queryObj = JSON.parse(JSON.stringify(query)); + let checkNull = false; + + for (const x in queryObj) { + if (x === '_wperm' && typeof queryObj[x] === 'object') { + const myArray = []; + const json = JSON.parse(JSON.stringify(queryObj[x])); + + for (const y in json) { + if (y === '$in') { + if (json[y].length >= 2) { + for (let i = 0; i < json[y].length; i++) { + if (json[y][i] === null) { + checkNull = true; + } else { + myArray.push(json[y][i]); + } + } + } + } + if (json[y].length !== myArray.length) { + let temp; + if (checkNull) { + // Case where no Perms exists on the document + temp = `[{"_wperm":{"$in":${JSON.stringify( + myArray + )}}},{"_wperm":null},{"_wperm":{"$exists":false}}]`; + } else { + temp = `[{"_wperm":{"$in":${JSON.stringify(myArray)}}},{"_wperm":null}]`; + } + delete queryObj['_wperm']; + newObj['$or'] = JSON.parse(temp); + } else { + newObj[x] = queryObj[x]; + } + } + } else { + newObj[x] = queryObj[x]; + } + if (x === '_rperm' && typeof queryObj[x] === 'object') { + const myArray = []; + const json = JSON.parse(JSON.stringify(queryObj[x])); + + for (const y in json) { + if (y === '$in') { + if (json[y].length >= 2) { + for (let i = 0; i < json[y].length; i++) { + if (json[y][i] === null) { + checkNull = true; + } else { + myArray.push(json[y][i]); + } + } + } + } + if (json[y].length !== myArray.length) { + let rpermOr; + delete newObj['_rperm']; + if (checkNull) { + // Case where no Perms exists on the document + rpermOr = `[{"_rperm":{"$in":${JSON.stringify( + myArray + )}}},{"_rperm":null},{"_rperm":{"$exists":false}}]`; + } else { + rpermOr = `[{"_rperm":{"$in":${JSON.stringify(myArray)}}},{"_rperm":null}]`; + } + if (Object.prototype.hasOwnProperty.call(newObj, '$or')) { + // $and the existing $or with the _rperm $or + const originalOr = JSON.stringify(newObj['$or']); + const andString = `[{"$or":${originalOr}},{"$or":${rpermOr}}]`; + // TODO: replacing the $and without checking if it existed + // look at lodash to merge + newObj['$and'] = JSON.parse(andString); + delete newObj['$or']; + } else { + newObj['$or'] = JSON.parse(rpermOr); + } + } else { + newObj[x] = queryObj[x]; + } + } + } else { + newObj[x] = queryObj[x]; + } + } + logger.verbose('Return query = ' + JSON.stringify(newObj)); + return newObj; + } + + async upsertOneObject(className, schema, query, update, transactionalSession) { + try { + logger.verbose('StorageAdapter upsertOneObject for Collection ' + className); + schema = convertParseSchemaToOracleSchema(schema); + const oraWhere = transformWhere(className, query, schema); + const oraUpdate = transformUpdate(className, update, schema); + const collection = this._adaptiveCollection(className); + const result = await collection.upsertOne(oraWhere, oraUpdate, transactionalSession); + logger.verbose('StorageAdapter upsertOneObject returns ' + result); + return result; + } catch (error) { + logger.error('StorageAdapter upsertOneObject Error for ' + className); + this.handleError(error); + } + } + + async deleteObjectsByQuery(className, schema, query, transactionalSession) { + try { + logger.verbose('StorageAdapter deleteObjectsByQuery for ' + className); + schema = convertParseSchemaToOracleSchema(schema); + let oraWhere = transformWhere(className, query, schema); + // Check if query needs Oracle Storage Adapter _wperm syntax + oraWhere = this.checkUserQuery(oraWhere); + const collection = this._adaptiveCollection(className); + const result = await collection.deleteObjectsByQuery(oraWhere, transactionalSession); + logger.verbose('StorageAdapter deleteObjectsByQuery returns ' + result); + return result; + } catch (error) { + this.handleError(error); + } + } + + // Executes a find. Accepts: className, query in Parse format, and { skip, limit, sort }. + find( + className: string, + schema: SchemaType, + query: QueryType, + { skip, limit, sort, keys, readPreference, hint, caseInsensitive, explain }: QueryOptions + ): Promise { + // try { + logger.verbose('StorageAdapter find for ' + className); + validateExplainValue(explain); + schema = convertParseSchemaToOracleSchema(schema); + logger.verbose('query = ' + JSON.stringify(query)); + + // start hack + // this is a temporary hack while i work on the _rperm stuff + // remove that from the query if present + //CDB + //to preserve the original query to hack for $containedBy + queryBackup = query; + //CDB-END + // end hack + + let oracleWhere = transformWhere(className, query, schema); + // Check if this query needs Oracle Storage Adapter _wperm syntax + oracleWhere = this.checkUserQuery(oracleWhere); + logger.verbose('oracleWhere = ' + JSON.stringify(oracleWhere)); + // fix 15-11 + const oracleSort = _.mapKeys(sort, (value, fieldName) => + transformKey(className, fieldName, schema) + ); + + const sortTypes = new Object(); + for (const s in sort) { + let schemaFieldName; + let sortType = 'string'; + if (s.split('.').length > 1) { + schemaFieldName = s.split('.')[0]; + } else { + schemaFieldName = s; + } + const schemaTypeEntry = schema.fields[schemaFieldName]; + const schemaType = schemaTypeEntry[Object.keys(schemaTypeEntry)[0]]; + if (schemaType === 'Number') { + sortType = 'number'; + } + sortTypes[s] = sortType; + } + + logger.verbose('Make linter happy by using keys = ' + keys); + + const oracleKeys = keys; + + logger.verbose('oracleKeys = ' + JSON.stringify(oracleKeys)); + logger.verbose('make linter ignore ' + readPreference); + + const collection = this._adaptiveCollection(className); + return collection + .find(oracleWhere, { + skip, + limit, + sort: oracleSort, + keys: oracleKeys, + maxTimeMS: this._maxTimeMS, + readPreference: null, + hint, + caseInsensitive, + explain, + sortTypes, + }) + .then(objects => { + logger.verbose('after the find, objects = ' + JSON.stringify(objects)); + logger.verbose('about to map oracleObjectToParseObject'); + let result = objects.map(object => oracleObjectToParseObject(className, object, schema)); + logger.verbose('result = ' + JSON.stringify(result)); + + //CDB + //$containedBy issue: remove extra documents from the collection with Diff between two Sets + if (JSON.stringify(queryBackup).indexOf('$containedBy') > -1) { + for (var prop in queryBackup) { + if (!(/*typeof*/ (queryBackup[prop].$containedBy === undefined))) { + //let arr = queryBackup[prop].$containedBy; + //11-11fix for 'containedBy number array' + var filteredResult = result.filter(function (myObject) { + const diff = myObject[prop].filter( + x => !queryBackup[prop].$containedBy.includes(x) + ); + return diff.length == 0; + }); + result = filteredResult; + /* + for (const r in result) { + const myObject = result[r]; + const diff = myObject[prop].filter(x => !queryBackup[prop].$containedBy.includes(x)); + + if (diff.length > 0) { + //remove document + result.splice(r, 1); + } + } + */ + //END11-11 fix + } + } + } + //CDB-END + + //CDB + //Delete all fields not in oracleKeys + if (!(typeof oracleKeys === 'undefined')) { + for (const r in result) { + logger.verbose('oracleKeys to mantain = ' + JSON.stringify(oracleKeys)); + //to be cleaned + const myObject = result[r]; + + var oracleKeysSet = new Set(oracleKeys); + oracleKeysSet.add('createdAt'); + oracleKeysSet.add('updatedAt'); + oracleKeysSet.add('objectId'); + + var keysResult = new Set(Object.keys(myObject)); + logger.verbose('keys remained = ' + JSON.stringify(keysResult)); + + const diff = new Set([...keysResult].filter(element => !oracleKeysSet.has(element))); + logger.verbose('keys toDel = ' + JSON.stringify(diff)); + + for (var iter = diff.values(), toDel = null; (toDel = iter.next().value);) { + // Do NOT remove _rperm and _wperm. DatabaseController uses them to value ParseObject.ACL + if (!(toDel === '_rperm' || toDel === '_wperm')) { + delete myObject[toDel]; + } + } + logger.verbose('properties remained = ' + JSON.stringify(myObject)); + } + } + //CDB-END + logger.verbose('StorageAdapter find returns ' + result); + return result; + }) + .catch(err => this.handleError(err)); + } + + async setIndexesFromOracle(className: string) { + try { + logger.verbose('StorageAdapter setIndexesFromOracle for ' + className); + const indexes = await this.getIndexes(className); + const result = await this._schemaCollection().updateSchema(className, { + _metadata: { indexes: indexes }, + }); + logger.verbose('StorageAdapter setIndexesFromOracle returns ' + result); + return result; + } catch (error) { + logger.error('StorageAdapter setIndexesFromOracle throws for className ' + className); + this.handleError(error); + } + } + + createTextIndexesIfNeeded(className: string, query: QueryType, schema: any): Promise { + logger.verbose('entered createTextIndexesIfNeeded query = ' + JSON.stringify(query)); + for (const fieldName in query) { + logger.verbose('processing field ' + fieldName); + if (!query[fieldName] || !query[fieldName].$text) { + continue; + } + const existingIndexes = schema.indexes; + logger.verbose('existingIndexes = ' + existingIndexes); + for (const key in existingIndexes) { + const index = existingIndexes[key]; + if (Object.prototype.hasOwnProperty.call(index, fieldName)) { + return Promise.resolve(); + } + } + const indexName = `${fieldName}_text`; + const textIndex = { + [indexName]: { [fieldName]: 'text' }, + }; + return this.setIndexesWithSchemaFormat( + className, + textIndex, + existingIndexes, + schema.fields + ).catch(error => { + logger.error('got error ' + JSON.stringify(error)); + if (error.code === 85) { + // Index exist with different options + return this.setIndexesFromOracle(className); + } + throw error; + }); + } + return Promise.resolve(); + } + /* + TODO: + Are multiple indexes processed? I think not because of + const fieldName = Object.keys(indexCreationRequest)[0]; + Also, can the code creating the indexspec in + ensureIndex and ensureUniqueness + be combined into 1 method + https://orahub.oci.oraclecorp.com/ora-microservices-dev/mbaas-parse-server/-/issues/35 + */ + async ensureIndex( + className: string, + schema: SchemaType, + fieldNames: string[], + indexName: ?string, + caseInsensitive: boolean = false, + options?: Object = {} + ): Promise { + try { + logger.verbose('StorageAdapter ensureIndex for ' + className); + schema = convertParseSchemaToOracleSchema(schema); + const indexCreationRequest = {}; + const oracleFieldNames = fieldNames.map(fieldName => + transformKey(className, fieldName, schema) + ); + oracleFieldNames.forEach(fieldName => { + indexCreationRequest[fieldName] = options.indexType !== undefined ? options.indexType : 1; + }); + + logger.verbose( + 'use these to make linter happy ' + + JSON.stringify(indexName) + + ' ' + + JSON.stringify(caseInsensitive) + ); + + const fieldName = Object.keys(indexCreationRequest)[0]; + // TODO: This code made maxLength = 1 which caused all kinds of breakage + // Determine the better way to do this but for now, default to 2000 which is what the JSON console did + // const maxLength = indexCreationRequest[Object.keys(indexCreationRequest)[0]]; + const maxLength = 2000; + const indexRequest = { + name: fieldName, + fields: [ + { + path: fieldName, + maxlength: maxLength, + }, + ], + unique: true, + }; + const collection = this._adaptiveCollection(className); + const result = await collection._createIndex(indexRequest); + logger.verbose('StorageAdapter ensureIndex returns ' + result); + return result; + } catch (error) { + logger.error('StorageAdapter ensureIndex throws for className ' + className); + this.handleError(error); + } + } + + // Create a unique index. Unique indexes on nullable fields are not allowed. Since we don't + // currently know which fields are nullable and which aren't, we ignore that criteria. + // As such, we shouldn't expose this function to users of parse until we have an out-of-band + // Way of determining if a field is nullable. Undefined doesn't count against uniqueness, + // which is why we use sparse indexes. + async ensureUniqueness(className: string, schema: SchemaType, fieldNames: string[]) { + try { + logger.verbose('StorageAdapter ensureUniqueness for ' + className); + schema = convertParseSchemaToOracleSchema(schema); + const indexCreationRequest = {}; + const oracleFieldNames = fieldNames.map(fieldName => + transformKey(className, fieldName, schema) + ); + oracleFieldNames.forEach(fieldName => { + indexCreationRequest[fieldName] = 1; + }); + const fieldName = Object.keys(indexCreationRequest)[0]; + // TODO: This code made maxLength = 1 which caused all kinds of breakage + // Determine the better way to do this but for now, default to 2000 which is what the JSON console did + // const maxLength = indexCreationRequest[Object.keys(indexCreationRequest)[0]]; + const maxLength = 2000; + const indexRequest = { + name: fieldName, + fields: [ + { + path: fieldName, + maxlength: maxLength, + }, + ], + unique: true, + }; + + const collection = this._adaptiveCollection(className); + const result = await collection._ensureSparseUniqueIndexInBackground(indexRequest); + logger.verbose('StorageAdapter ensureUniqueness returns ' + result); + return result; + } catch (error) { + logger.error('StorageAdapter ensureUniqueness throws for className ' + className); + this.handleError(error); + } + } + + async count(className, schema, query, readPreference, hint) { + const skip = 0; + const limit = 0; + const sort = {}; + let keys; + const caseInsensitive = false; + const explain = false; + // See line 1183 in DatabaseController, it passes null in query + if (query === null) { + query = {}; + } + return this.find(className, schema, query, { + skip, + limit, + sort, + keys, + readPreference, + hint, + caseInsensitive, + explain, + }) + .then(collection => { + return collection.length; + }) + .catch(err => { + logger.error('in the catch block after collection.find for count()'); + this.handleError(err); + }); + } + + //CDB Fix 18-11 + async distinct(className, schema, query, fieldName) { + try { + logger.verbose('StorageAdapter distinct for ' + className); + schema = convertParseSchemaToOracleSchema(schema); + const isPointerField = + schema.fields[fieldName] && schema.fields[fieldName].type === 'Pointer'; + const transformField = transformKey(className, fieldName, schema); + const collection = this._adaptiveCollection(className); + let objects = collection.distinct(transformField, transformWhere(className, query, schema)); + objects = objects.filter(obj => obj != null); + logger.verbose('StorageAdapter distinct returns ' + objects); + return objects.map(object => { + if (isPointerField) { + return transformPointerString(schema, fieldName, object); + } + + return oracleObjectToParseObject(className, object, schema); + }); + } catch (error) { + logger.error('StorageAdapter distinct throws for className ' + className); + this.handleError(error); + } + } + + //TO BE TESTED + /* + aggregate( + className: string, + schema: any, + pipeline: any, + readPreference: ?string, + hint: ?mixed, + explain?: boolean + ) { + validateExplainValue(explain); + let isPointerField = false; + pipeline = pipeline.map(stage => { + if (stage.$group) { + stage.$group = this._parseAggregateGroupArgs(schema, stage.$group); + if ( + stage.$group._id && + typeof stage.$group._id === 'string' && + stage.$group._id.indexOf('$_p_') >= 0 + ) { + isPointerField = true; + } + } + if (stage.$match) { + stage.$match = this._parseAggregateArgs(schema, stage.$match); + } + if (stage.$project) { + stage.$project = this._parseAggregateProjectArgs(schema, stage.$project); + } + if (stage.$geoNear && stage.$geoNear.query) { + stage.$geoNear.query = this._parseAggregateArgs(schema, stage.$geoNear.query); + } + return stage; + }); + readPreference = this._parseReadPreference(readPreference); + return this._adaptiveCollection(className) + .then(collection => + collection.aggregate(pipeline, { + readPreference, + maxTimeMS: this._maxTimeMS, + hint, + explain, + }) + ) + .then(results => { + results.forEach(result => { + if (Object.prototype.hasOwnProperty.call(result, '_id')) { + if (isPointerField && result._id) { + result._id = result._id.split('$')[1]; + } + if ( + result._id == null || + result._id == undefined || + (['object', 'string'].includes(typeof result._id) && _.isEmpty(result._id)) + ) { + result._id = null; + } + result.objectId = result._id; + delete result._id; + } + }); + return results; + }) + .then(objects => objects.map(object => oracleObjectToParseObject(className, object, schema))) + .catch(err => this.handleError(err)); + } +*/ + //CDB-END + + performInitialization(): Promise { + return Promise.resolve(); + } + + watch(callback: () => void): void { + this._onchange = callback; + } + + createIndexPaths(index) { + var paths = Array(); + + Object.keys(index).forEach(key => { + paths.push({ + path: key, + maxlength: 2000, + }); + }); + return paths; + } + + async createIndexes(className: string, indexes: any) { + try { + logger.verbose('StorageAdapter createIndexes for ' + className); + var promises = Array(); + const collection = this._adaptiveCollection(className); + + for (let idx = 0; idx < indexes.length; idx++) { + const index = indexes[idx]; + + let idxName = Object.keys(index)[0]; + let paths; + /* + 2 index formats can be passed in + { key: { aString: 1 }, name: 'name1' } + { name1: { aString: 1 } } + Handle them both + */ + if (idxName === 'key') { + paths = index[idxName]; + idxName = index['name']; + } else { + paths = index[idxName]; + } + + const indexRequest = { + name: idxName, + fields: this.createIndexPaths(paths), + unique: true, + }; + const promise = await collection._createIndex(indexRequest); + promises.push(promise); + } + const results = await Promise.all(promises); + logger.verbose('StorageAdapter createIndexes returns ' + results); + return results; + } catch (error) { + logger.error('StorageAdapter createIndexes throws for className ' + className); + this.handleError(error); + } + } + + async getIndexes(className: string, connection: ?any): Promise { + try { + logger.verbose( + 'StorageAdapter getIndexes for ' + className + ' Connection = ' + connection + ); + const collection = this._adaptiveCollection(className); + const result = collection.getIndexes(className); + logger.verbose('StorageAdapter getIndexes returns ' + result); + return result; + } catch (error) { + logger.error('StorageAdapter getIndexes throws for className ' + className); + this.handleError(error); + } + } + + updateSchemaWithIndexes() { + return this.getAllClasses() + .then(classes => { + const promises = classes.map(schema => { + return this.setIndexesFromOracle(schema.className); + }); + return Promise.all(promises); + }) + .catch(err => this.handleError(err)); + } + + async setIndexesWithSchemaFormat( + className: string, + submittedIndexes: any, + existingIndexes: any = {}, + fields: any + ): Promise { + try { + logger.verbose('StorageAdapter setIndexesWithSchemaFormat for ' + className); + if (submittedIndexes === undefined) { + return Promise.resolve(); + } + if (Object.keys(existingIndexes).length === 0) { + existingIndexes = { _id_: { _id: 1 } }; + } + const deletePromises = []; + const insertedIndexes = []; + + for (let i = 0; i < Object.keys(submittedIndexes).length; i++) { + const name = Object.keys(submittedIndexes)[i]; + const field = submittedIndexes[name]; + if (existingIndexes[name] && field.__op !== 'Delete') { + throw new Parse.Error(Parse.Error.INVALID_QUERY, `Index ${name} exists, cannot update.`); + } + if (!existingIndexes[name] && field.__op === 'Delete') { + throw new Parse.Error( + Parse.Error.INVALID_QUERY, + `Index ${name} does not exist, cannot delete.` + ); + } + if (field.__op === 'Delete') { + const promise = await this.dropIndex(className, name); + deletePromises.push(promise); + delete existingIndexes[name]; + } else { + Object.keys(field).forEach(key => { + if ( + !Object.prototype.hasOwnProperty.call( + fields, + key.indexOf('_p_') === 0 ? key.replace('_p_', '') : key + ) + ) { + throw new Parse.Error( + Parse.Error.INVALID_QUERY, + `Field ${key} does not exist, cannot add index.` + ); + } + }); + existingIndexes[name] = field; + insertedIndexes.push({ + key: field, + name, + }); + } + } + if (insertedIndexes.length > 0) { + const insertPromise = await this.createIndexes(className, insertedIndexes); + logger.verbose( + 'StorageAdapter setIndexesWithSchemaFormat insertPromise = ' + insertPromise + ); + } + // Munge existing indexs into expected format based on Shema.spec.js tests + const newExistindIndexes = + '{"_metadata": {"indexes":' + JSON.stringify(existingIndexes) + '}}'; + const newExistingIndexesObj = JSON.parse(newExistindIndexes); + await Promise.all(deletePromises); + const result = await this._schemaCollection().updateSchemaIndexes( + className, + newExistingIndexesObj + ); + logger.verbose('StorageAdapter setIndexesWithSchemaFormat returns ' + result); + return result; + } catch (error) { + logger.error('StorageAdapter setIndexesWithSchemaFormat throws for className ' + className); + this.handleError(error); + } + } + + // createTransactionalSession(): Promise; + // commitTransactionalSession(transactionalSession: any): Promise; + // abortTransactionalSession(transactionalSession: any): Promise; + + async dropIndex(className: string, index: any) { + try { + logger.verbose('StorageAdapter dropIndex for ' + className); + const collection = this._adaptiveCollection(className); + const result = await collection.dropIndex(index); + logger.verbose('StorageAdapter dropIndex returns ' + result); + return result; + } catch (error) { + logger.error('StorageAdapter dropIndex throws for className ' + className); + this.handleError(error); + } + } + + createIndexesIfNeeded(className, fieldName, type) { + // The original Method impl from Mongo below + // Not sure if we need the 2dsphere index for Geo, may be Mongo specific + logger.verbose( + 'createIndexesIfNeeded use className, fieldName and type to make linter happy ' + + className + + ' ' + + fieldName + + ' ' + + type + ); + /* if (type && type.type === 'Polygon') { + const index = { + [fieldName]: '2dsphere' + }; + return this.createIndex(className, index); + }*/ + return Promise.resolve(); + } +} + +export default OracleStorageAdapter; From c3209db0cae93ad3b1e411b53f983ac61af64246 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 24 Jan 2024 08:52:31 -0500 Subject: [PATCH 107/294] Min Connections = 50 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51d0457cc..c315b8851 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,6 +67,7 @@ jobs: run: ls; ls -la parse-server-database-adapter-template; cp parse-server-database-adapter-template/package.json parse-server; + cp parse-server-database-adapter-template/OracleStorageAdapter.js parse-server/src/Adapters/Storage/Oracle; ls -la parse-server; cat parse-server/spec/helper.js - name: Run Free23c From e3f8e7188653b3dba5a24ab99b98292503b0b0ce Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 24 Jan 2024 12:21:11 -0500 Subject: [PATCH 108/294] Try a fresh pipeline --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c315b8851..6b23a9269 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,8 +92,6 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; - export UV_THREADPOOL_SIZE=128; - export PARSE_SERVER_TEST_DB=oracle; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle From 89541c3110e9155c2b76d4f4a3eb74d6a147cd45 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 24 Jan 2024 12:37:08 -0500 Subject: [PATCH 109/294] Update ci.yml --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b23a9269..b03df22eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,7 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; + export PARSE_SERVER_LOG_LEVEL=verbose; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle From f5515b61ade2336940235ebb224d77950007b28c Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 24 Jan 2024 12:57:29 -0500 Subject: [PATCH 110/294] Update ci.yml --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b03df22eb..bee9fcdae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,7 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; + echo "REPLICATE RUN"; export PARSE_SERVER_LOG_LEVEL=verbose; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; From e5888bcdf2a3d044d02f84ac3798747e9afefd85 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 24 Jan 2024 13:25:25 -0500 Subject: [PATCH 111/294] Test Run 3 --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bee9fcdae..b03df22eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,6 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; - echo "REPLICATE RUN"; export PARSE_SERVER_LOG_LEVEL=verbose; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; From 41ee9be4505b4edf396ece1cb4ce142fdfecedf6 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Wed, 24 Jan 2024 14:40:13 -0500 Subject: [PATCH 112/294] Better Truncate debug --- OracleStorageAdapter.js | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/OracleStorageAdapter.js b/OracleStorageAdapter.js index 470023c3e..453afc5e1 100644 --- a/OracleStorageAdapter.js +++ b/OracleStorageAdapter.js @@ -1,5 +1,6 @@ // Copyright (c) 2023, Oracle and/or its affiliates. // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ +import defaults from '../../../defaults'; import OracleSchemaCollection from './OracleSchemaCollection'; import OracleCollection from './OracleCollection'; import { StorageAdapter } from '../StorageAdapter'; @@ -134,7 +135,7 @@ export class OracleStorageAdapter implements StorageAdapter { 'OracleStorageAdapter constructor, uri = ' + options.databaseURI + ' collectionPrefix = ' + - options.collectionPrefix + options.collectionPrefix ); this._uri = options.databaseURI; this._collectionPrefix = options.collectionPrefix; @@ -179,10 +180,10 @@ export class OracleStorageAdapter implements StorageAdapter { try { const collection = this._adaptiveCollection(collectionName); const result = await collection.truncate(); - logger.verbose('Storage Adapter _truncate returns ' + result); + logger.verbose('Storage Adapter _truncate for collection ' + collectionName + ' returns ' + JSON.stringify(result)); return result; } catch (error) { - logger.error('Storage Adapter _truncate Error for ' + collectionName); + logger.error('Storage Adapter _truncate Error for collection' + collectionName + ' ERROR = ' + error); this.handleError(error); } } @@ -303,7 +304,7 @@ export class OracleStorageAdapter implements StorageAdapter { connectString: tnsname, poolIncrement: 5, poolMax: 100, - poolMin: 50, + poolMin: 3, poolTimeout: 10, // Use default of 60000 ms // queueTimeout: 10, @@ -340,14 +341,14 @@ export class OracleStorageAdapter implements StorageAdapter { } handleError(error: ?(Error | Parse.Error)): Promise { - if (error && error.code === 13) { - // Unauthorized error - delete this.client; - delete this.database; - delete this.connectionPromise; - logger.error('Received unauthorized error', { error: error }); - } - + // if (error && error.code === 13) { + // // Unauthorized error + // delete this.client; + // delete this.database; + // delete this.connectionPromise; + // logger.error('Received unauthorized error', { error: error }); + // } + logger.error('in handleError with error =' + error); // What to throw? Maybe need to map ORA msgs to Parse msgs // throw error.message; throw error; @@ -517,6 +518,20 @@ export class OracleStorageAdapter implements StorageAdapter { } } + // deleteObjectsByQuery( + // className: string, + // schema: SchemaType, + // query: QueryType, + // transactionalSession: ?any + // ): Promise; + // updateObjectsByQuery( + // className: string, + // schema: SchemaType, + // query: QueryType, + // update: any, + // transactionalSession: ?any + // ): Promise<[any]>; + async findOneAndUpdate(className, schema, query, update, transactionalSession) { try { logger.verbose('StorageAdapter findOneAndUpdate for ' + className); @@ -673,6 +688,7 @@ export class OracleStorageAdapter implements StorageAdapter { logger.verbose('StorageAdapter deleteObjectsByQuery returns ' + result); return result; } catch (error) { + logger.error('StorageAdapter deleteObjectsByQuery Error for ' + className); this.handleError(error); } } From f61badbe7a0d3af34b62382c76cee47d10823b8a Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 24 Jan 2024 14:42:44 -0500 Subject: [PATCH 113/294] Better Truncate msgs --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b03df22eb..70cbf00ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,7 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; + echo "Better Truncate msgs"; export PARSE_SERVER_LOG_LEVEL=verbose; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; From aff5954cb1ebcd0c5b6ba096cfda17ac6c62a6e1 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 24 Jan 2024 15:20:39 -0500 Subject: [PATCH 114/294] turn verbose off --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70cbf00ad..518b36b29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,7 +93,6 @@ jobs: npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; echo "Better Truncate msgs"; - export PARSE_SERVER_LOG_LEVEL=verbose; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle From 8cb778aa5cd55071f01d9703ed82ca151d041df5 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 24 Jan 2024 15:36:47 -0500 Subject: [PATCH 115/294] Enable AuthAdapter suites --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 518b36b29..6b23a9269 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,6 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; - echo "Better Truncate msgs"; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle From 33cc3e1079c2ffac484b2816ca00717601809d2c Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 24 Jan 2024 16:01:09 -0500 Subject: [PATCH 116/294] Enable More Test Suites --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b23a9269..c895073ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,7 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; + echo "Run w More Suites"; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle From f4d9843b0b1a062e6b22356160b0850b6b70e88e Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 24 Jan 2024 16:24:55 -0500 Subject: [PATCH 117/294] disable 3 tests --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c895073ed..6b23a9269 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,6 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; - echo "Run w More Suites"; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle From cbaa6cb37bc9cd22da4423444d05af36dd07c1a3 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 24 Jan 2024 16:36:39 -0500 Subject: [PATCH 118/294] Turn on verbose --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b23a9269..b03df22eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,7 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; + export PARSE_SERVER_LOG_LEVEL=verbose; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle From 85b549f200f12a7a36b3a7e6284529c44b47b62b Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 25 Jan 2024 14:48:59 -0500 Subject: [PATCH 119/294] Turn verbose off --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b03df22eb..6b23a9269 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,6 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.2.0; - export PARSE_SERVER_LOG_LEVEL=verbose; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle From b0797c3b3c654fe54001975441a2ca59da685a8e Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 25 Jan 2024 14:59:02 -0500 Subject: [PATCH 120/294] Run it again --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b23a9269..f57f26d9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,7 +87,8 @@ jobs: echo "Before setting LIB PATH"; export LD_LIBRARY_PATH=${PWD}/instantclient_19_22; echo "This is LD LIBRARY PATH"; - echo $LD_LIBRARY_PATH; + echo $LD_LIBRARY_PATH; + echo "RUN IT"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 47849419490d828ba210d46ca6c84ad031e9b09b Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 25 Jan 2024 16:17:52 -0500 Subject: [PATCH 121/294] Save free23c logs --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f57f26d9c..ee1fcbb53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,7 +95,10 @@ jobs: npm install oracledb@6.2.0; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; - ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle + ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; + mkdir oralogs; + docker cp free23c: Date: Fri, 26 Jan 2024 09:19:52 -0500 Subject: [PATCH 122/294] Capture container logs on failure --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee1fcbb53..bb8340db2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,11 @@ jobs: mkdir oralogs; docker cp free23c: Date: Fri, 26 Jan 2024 09:37:16 -0500 Subject: [PATCH 123/294] Archive Artifacts --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb8340db2..68e4e47d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,11 +99,16 @@ jobs: mkdir oralogs; docker cp free23c: Date: Fri, 26 Jan 2024 09:54:50 -0500 Subject: [PATCH 124/294] Focus --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68e4e47d7..2526a41c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,6 +105,7 @@ jobs: docker cp free23c:/opt/oracle/diag/rdbms/free/FREE/trace oralogs; ls -la oralogs; - name: Archive Test Results + if: always() uses: actions/upload-artifact@v1 with: name: containerlogs From ec832ee95656034e029e69f65770ca224781ee48 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 26 Jan 2024 13:55:08 -0500 Subject: [PATCH 125/294] Save dumps --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2526a41c7..faea5ccac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,13 +103,21 @@ jobs: if: always() run: mkdir oralogs; docker cp free23c:/opt/oracle/diag/rdbms/free/FREE/trace oralogs; + docker cp free23c:/opt/oracle/diag/rdbms/free/FREE oradumps; ls -la oralogs; + ls -la oradumps; - name: Archive Test Results if: always() uses: actions/upload-artifact@v1 with: name: containerlogs path: oralogs/trace + - name: Archive Test Results + if: always() + uses: actions/upload-artifact@v1 + with: + name: containerdumps + path: oradumps concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From 1281428a314bfa8f1d87e735ef78c7f86237f370 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 12 Feb 2024 10:47:27 -0500 Subject: [PATCH 126/294] Kick a run after vacation --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index faea5ccac..00506c262 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,6 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_19_22; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "RUN IT"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 70e2ac347081af05991fa5bf0e13e3f527e6955f Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 13 Feb 2024 11:42:00 -0500 Subject: [PATCH 127/294] John suggestion --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00506c262..7372ab8ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,7 +79,7 @@ jobs: docker ps -a; ./sqlcl/bin/sql -V; - name: Enable SODA in image - run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; + run: echo "alter system set pga_aggregate_limit=4G scope=memory;alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; cat soda; ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - name: Run Tests From 934b977528d49ca4d880a1f114fbde73cd8a732f Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 13 Feb 2024 12:02:52 -0500 Subject: [PATCH 128/294] Just the One Suite --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7372ab8ac..f5d8570ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,6 +88,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_19_22; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; + echo "Just the one suite"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 21c2dcc8ab51422f0384a5fd239ec403b56b7c5a Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 13 Feb 2024 12:11:19 -0500 Subject: [PATCH 129/294] Turn off log dump --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5d8570ab..6c15a01cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,8 +97,8 @@ jobs: echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; mkdir oralogs; - docker cp free23c: Date: Tue, 13 Feb 2024 16:32:19 -0500 Subject: [PATCH 130/294] Try Oracle Node DB 6.3 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c15a01cc..afe751eb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,7 @@ jobs: cd parse-server; npm install; npm install --save @parse/fs-files-adapter; - npm install oracledb@6.2.0; + npm install oracledb@6.3.0; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; From 0da3ef5dcc27d61a2b8eda02df5f5f76058622e2 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 13 Feb 2024 16:45:10 -0500 Subject: [PATCH 131/294] Try multiple suites with 6.3 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index afe751eb1..c7cacd25c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_19_22; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Just the one suite"; + echo "Multiple Suites again"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; @@ -97,8 +97,8 @@ jobs: echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; mkdir oralogs; -# docker cp free23c: Date: Wed, 14 Feb 2024 10:57:26 -0500 Subject: [PATCH 132/294] Don't install libaio1 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7cacd25c..33e77a443 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,8 +45,8 @@ jobs: ls -la; ls -la $PWD/instantclient_19_22; ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_19_22; - - name: Install libaio1 - run: sudo apt-get install libaio1; + # - name: Install libaio1 + # run: sudo apt-get install libaio1; - name: Checkout OraSepcs uses: actions/checkout@v2 with: From a1ebbc29540dda8f3817f7ff097b6ed142208d4a Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 14 Feb 2024 12:15:42 -0500 Subject: [PATCH 133/294] put libaio1 back --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33e77a443..c7cacd25c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,8 +45,8 @@ jobs: ls -la; ls -la $PWD/instantclient_19_22; ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_19_22; - # - name: Install libaio1 - # run: sudo apt-get install libaio1; + - name: Install libaio1 + run: sudo apt-get install libaio1; - name: Checkout OraSepcs uses: actions/checkout@v2 with: From c34d1b4e1145403bb1dd58b9952b2b85687bc2bb Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 14 Feb 2024 13:36:24 -0500 Subject: [PATCH 134/294] One second sleep in between tests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7cacd25c..c1636dbe9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_19_22; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Multiple Suites again"; + echo "Try with 1 second sleep in between tests"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 2acb8b7c3a10d37c3b2b6dc725cb08665f9b9e62 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 14 Feb 2024 13:46:55 -0500 Subject: [PATCH 135/294] Disable Dump --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1636dbe9..5dc8b39d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,8 +97,8 @@ jobs: echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; mkdir oralogs; - docker cp free23c: Date: Wed, 14 Feb 2024 13:56:38 -0500 Subject: [PATCH 136/294] Run Again --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5dc8b39d0..a54c62cb7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_19_22; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Try with 1 second sleep in between tests"; + echo "Could it work twice in a row"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From eb4b34e4510d3640d929f78321f718ac6208ebe0 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 14 Feb 2024 14:11:19 -0500 Subject: [PATCH 137/294] 5 seconds --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a54c62cb7..fff619a75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_19_22; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Could it work twice in a row"; + echo "5 seconds"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 90a6538617d41fa53da44d5e61b4932f80b80587 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 14 Feb 2024 14:20:26 -0500 Subject: [PATCH 138/294] 5 secs again --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fff619a75..c8300f339 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_19_22; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "5 seconds"; + echo "Try with await 5 seconds"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 23cef8f92de7ba4fca75fef1794f9b0c95b520df Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 14 Feb 2024 16:02:41 -0500 Subject: [PATCH 139/294] 1 second timeout implemented correctly --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8300f339..a6c480bdb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_19_22; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Try with await 5 seconds"; + echo "1 second timeout implemented correctly"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 9f714748dcd01212db8534931fc9d70fc53fc815 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 14 Feb 2024 16:54:40 -0500 Subject: [PATCH 140/294] Again --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6c480bdb..43f946d8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_19_22; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "1 second timeout implemented correctly"; + echo "Run it again"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 7c0fd73632f941d603ba9142b398394a06c5b160 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 09:55:41 -0500 Subject: [PATCH 141/294] Turn sleep off --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43f946d8a..f60ba9667 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_19_22; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Run it again"; + echo "Turn sleep off"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From fecd72df97f332767669b62a7aba1869a98479c7 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 10:53:18 -0500 Subject: [PATCH 142/294] Grab latest Instant Client --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f60ba9667..9efa67845 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,11 +40,11 @@ jobs: ./sqlcl/bin/sql -V; - name: Install Instant Client run: uname -m; - wget https://download.oracle.com/otn_software/linux/instantclient/1922000/instantclient-basic-linux.x64-19.22.0.0.0dbru.zip; - unzip instantclient-basic-linux.x64-19.22.0.0.0dbru.zip; + wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; + unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; ls -la; - ls -la $PWD/instantclient_19_22; - ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_19_22; + ls -la $PWD/instantclient_21_13; + ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; - name: Install libaio1 run: sudo apt-get install libaio1; - name: Checkout OraSepcs @@ -85,7 +85,7 @@ jobs: - name: Run Tests run: echo $PWD; echo "Before setting LIB PATH"; - export LD_LIBRARY_PATH=${PWD}/instantclient_19_22; + export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; echo "Turn sleep off"; From 0c5f613537ac2511d027398a0c176427644d81e8 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Thu, 15 Feb 2024 11:36:14 -0500 Subject: [PATCH 143/294] No Collection metadata used --- OracleCollection.js | 1387 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1387 insertions(+) create mode 100644 OracleCollection.js diff --git a/OracleCollection.js b/OracleCollection.js new file mode 100644 index 000000000..06ee9aed0 --- /dev/null +++ b/OracleCollection.js @@ -0,0 +1,1387 @@ +// Copyright (c) 2023, Oracle and/or its affiliates. +// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ +import Parse from 'parse/node'; +import logger from '../../../logger.js'; +import _ from 'lodash'; +import OracleStorageAdapter from './OracleStorageAdapter'; + +const oracledb = require('oracledb'); +oracledb.autoCommit = true; +const Collection = oracledb.SodaCollection; +const SodaDB = oracledb.SodaDB; + +export default class OracleCollection { + _oracleSodaDB: SodaDB; + _oracleCollection: Collection; + _oracleStorageAdapter: OracleStorageAdapter; + _name: string; + indexes = new Array(); + idIndexCreating = false; + + constructor(oracleStorageAdapter: OracleStorageAdapter, collectionName: String) { + this._oracleStorageAdapter = oracleStorageAdapter; + this._name = collectionName; + this._oracleCollection = undefined; + } + + async getCollectionConnection() { + // To support backwards compatibility with instant clients +/* const mymetadata = { + keyColumn: { name: 'ID', assignmentMethod: 'UUID' }, + contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'JSON' }, + versionColumn: { name: 'VERSION', method: 'UUID' }, + lastModifiedColumn: { name: 'LAST_MODIFIED' }, + creationTimeColumn: { name: 'CREATED_ON' }, + };*/ + +// console.log( "Metadata = " + JSON.stringify(mymetadata)); + + logger.verbose('getCollectionConnection about to connect for collection ' + this._name); + let localConn; + this._oracleCollection = await this._oracleStorageAdapter + .connect() + .then(p => { + logger.verbose('getCollectionConnection about to get connection from pool '); + logger.verbose(p); + logger.verbose(' statistics: ' + JSON.stringify(p.getStatistics())); + return p.getConnection(); + }) + .then(conn => { + logger.verbose('getCollectionConnection about to get SodaDB'); + localConn = conn; + return conn.getSodaDatabase(); + }) + .then(sodadb => { + logger.verbose('getCollectionConnection open collection for ' + this._name); + this._oracleSodaDB = sodadb; + return sodadb.openCollection(this._name); + }) + .then(async coll => { + if (!coll) { + logger.verbose('getCollectionConnection create NEW collection for ' + this._name); +// const newCollection = await this._oracleSodaDB.createCollection(this._name, { +// metaData: mymetadata, +// }); + + + const newCollection = await this._oracleSodaDB.createCollection(this._name); + /* + Create index on _id for every new collection + This imitates Mongo behavior which happens automatically + + Index names MUST be unique in a schema, append table name + cannot have two indexes with the same name in a single schema. + */ + if (!this.idIndexCreating) { + this.idIndexCreating = true; + const indexName = 'ididx' + this._name; + const indexSpec = { name: indexName, unique: true, fields: [{ path: '_id' }] }; + await newCollection.createIndex(indexSpec); + logger.verbose( + 'getCollectionConnection successfully create _id index for ' + this._name + ); + // Add _id if it doesn't exist to indexes array + const found = this.indexes.find(item => { + return Object.keys(item)[0] === '_id_'; + }); + if (typeof found === 'undefined') { + this.indexes.push({ _id_: { _id: 1 } }); + } + } + return newCollection; + } + return coll; + }) + .catch(error => { + logger.error('getCollectionConnection ERROR: ' + error); + throw error; + }); + logger.verbose( + 'getCollectionConnection returning collection for ' + + this._name + + ' returned ' + + this._oracleCollection + ); + return localConn; + } + + // Atomically updates data in the database for a single (first) object that matched the query + // If there is nothing that matches the query - does insert + // Postgres Note: `INSERT ... ON CONFLICT UPDATE` that is available since 9.5. + async upsertOne(query, update, session) { + /* + UpsertOne is of the form + where query = + {"_id": "HasAllPOD"} + and update = the new document + {"_id": "HasAllPOD","numPODs": 17"} + + in this case if update fails becuase no document existed then + rerunning the query would return 0 and indicate an insert + */ + + logger.verbose('in upsertOne query = ' + JSON.stringify(query)); + logger.verbose('use session to make linter happy ' + JSON.stringify(session)); + // TODO need to use save(), which is the SODA equivalent of upsert() andit takes a SodaDocument + let docs; + let promise; + + try { + promise = await this.findOneAndUpdate(query, update, null); + logger.verbose('Upsert Promise = ' + promise); + if (promise === false) { + logger.verbose('Upsert Insert for query ' + JSON.stringify(query)); + promise = await this._rawFind(query, { type: 'sodadocs' }).then(d => (docs = d)); + if (docs && docs.length == 0) { + // Its an insert so merge query into update + _.merge(update, query); + promise = await this.insertOne(update); + } + } + return promise; + } catch (error) { + logger.error('Collection UpsertOne throws ' + error); + throw error; + } + } + + async findOneAndUpdate(query, update, transactionalSession) { + try { + logger.verbose('in Collection findOneAndUpdate query = ' + JSON.stringify(query)); + logger.verbose( + 'use transactionalSession to make linter happy ' + JSON.stringify(transactionalSession) + ); + + // TODO: Fix updatedAt, it should be _updatedAt because its an internal field + // and updatedAt doesn't get updated for Schemas + + let updateObj; + + let result = await this._rawFind(query, { type: 'one' }).then(result => { + return result; + }); + //************************************************************************************************/ + // Modify Update based on Mongo operators + // + // Look for $unset, Mongo's deleteField + // Create array of fieldNames to be deleted + const newUpdate = new Object(); + const fieldNames = new Array(); + Object.keys(update).forEach(item => { + if (item === '$unset') { + Object.keys(update[item]).forEach(item => { + fieldNames.push(item); + }); + } else { + if (item === '_updated_at') { + newUpdate['updatedAt'] = update[item]; + } else { + newUpdate[item] = update[item]; + } + } + }); + + // if FieldNames > 0, delete those fields and + // repalce update with newUpdate that has the $unset pairs removed + // Don't move deletefields to update transform code + if (fieldNames.length > 0) { + await this.deleteFields(fieldNames).then(result => { + update = newUpdate; + return result; + }); + // Ya changed the key values get them again + result = await this._rawFind(query, { type: 'one' }).then(result => { + return result; + }); + } + + // Process Increments $inc + const newIncUpdate = new Object(); + let incUpdt = false; + Object.keys(update).forEach(item => { + if (item === '$inc') { + Object.keys(update[item]).forEach(it2 => { + incUpdt = true; + _.set(result.content, it2, _.result(result.content, it2) + update[item][it2]); + }); + } else { + if (item === '_updated_at') { + newIncUpdate['updatedAt'] = update[item]; + } else { + newIncUpdate[item] = update[item]; + } + } + }); + + if (incUpdt) { + update = newIncUpdate; + } + + // Process $AddToSet operator adds a value to an array unless the value is already present, in which case $addToSet does nothing to that array. + const newAddToSetUpdate = new Object(); + let addToSetUpdt = false; + Object.keys(update).forEach(item => { + if (item === '$addToSet') { + Object.keys(update[item]).forEach(it2 => { + Object.keys(update[item][it2]).forEach(it3 => { + if (it3 === '$each') { + const updtArray = update[item][it2][it3]; + // Check for dot notation + const temp = it2.split('.'); + let newArray; + if (temp.length > 1) { + newArray = result.content[temp[0]][temp[1]]; + } else { + newArray = result.content[it2]; + } + updtArray.forEach(updt => { + if (typeof updt === 'object') { + if (!newArray.some(entry => Object.keys(entry)[0] === Object.keys(updt)[0])) { + addToSetUpdt = true; + newArray.push(updt); + } + } else { + if (!newArray.includes(updt)) { + addToSetUpdt = true; + newArray.push(updt); + } + } + }); + } + }); + }); + } else { + if (item === '_updated_at') { + newAddToSetUpdate['updatedAt'] = update[item]; + } else { + newAddToSetUpdate[item] = update[item]; + } + } + }); + + if (addToSetUpdt) { + update = newAddToSetUpdate; + } + + // Process $pullAll operator removes all instances of the specified values from an existing array. + const newPullAllUpdate = new Object(); + let pullAllUpdt = false; + Object.keys(update).forEach(item => { + if (item === '$pullAll') { + Object.keys(update[item]).forEach(it2 => { + const updtArray = update[item][it2]; + const rsltArray = result.content[it2]; + const newArray = new Array(); + updtArray.forEach(updt => { + if (typeof updt === 'object') { + rsltArray.forEach(entry => { + if (Object.keys(entry)[0] != Object.keys(updt)[0]) { + newArray.push(entry); + pullAllUpdt = true; + } + }); + } + newPullAllUpdate[it2] = newArray; + }); + }); + } else { + if (item === '_updated_at') { + newPullAllUpdate['updatedAt'] = update[item]; + } else { + newPullAllUpdate[item] = update[item]; + } + } + }); + + if (pullAllUpdt) { + update = newPullAllUpdate; + } + + // End of Transform Update + //************************************************************************************************/ + + if (result && Object.keys(result).length > 0) { + // found the doc, so we need to update it + const key = result.key; + logger.verbose('key = ' + key); + const version = result.version; + logger.verbose('version = ' + version); + const oldContent = result.content; + + logger.verbose('oldContent = ' + JSON.stringify(oldContent)); + logger.verbose('update = ' + JSON.stringify(update)); + + // Check for empty object and remove it from original, no merging, replacing + Object.keys(update).forEach(item => { + if ( + typeof update[item] === 'object' && + update[item] !== null && + item !== 'updatedAt' && + Object.keys(update[item]).length === 0 + ) { + _.unset(oldContent, item); + } + }); + + if (update.fieldName) { + const theUpdate = { [update.fieldName]: update.theFieldType }; + logger.verbose('theUpdate = ' + JSON.stringify(theUpdate)); + updateObj = { ...oldContent, ...theUpdate }; + } else { + if (pullAllUpdt || update['_metadata']) { + // Handle set or merge for _metadata in Schema + Object.keys(update).forEach(item => { + const found = Object.keys(oldContent).find(item => { + return item === '_metadata'; + }); + if (item === '_metadata') { + if (found) { + if ( + Object.prototype.hasOwnProperty.call(oldContent[item], 'class_permissions') && + Object.prototype.hasOwnProperty.call(update[item], 'class_permissions') + ) { + // Just reset class_permissions to update + _.set(oldContent[item], 'class_permissions', update[item]['class_permissions']); + } else { + _.merge(oldContent['_metadata'], update[item]); + } + } else { + _.set(oldContent, item, update[item]); + } + } else { + _.set(oldContent, item, update[item]); + } + }); + updateObj = oldContent; + } else { + updateObj = _.merge(oldContent, update); + } + } + logger.verbose('Updated Object = ' + JSON.stringify(updateObj)); + let localConn = null; + return this.getCollectionConnection() + .then(conn => { + localConn = conn; + return this._oracleCollection.find().key(key).version(version).replaceOne(updateObj); + }) + .then(result => { + if (result.replaced == true) { + return updateObj; + } else { + return 'retry'; + } + }) + .finally(() => { + if (localConn) { + localConn.close(); + localConn = null; + } + }) + .catch(error => { + logger.error('Find One and Update replaceOne ERROR = ', error); + throw error; + }); + } else { + logger.verbose('No Docs, nothing to update, return false'); + return false; + } + } catch (error) { + logger.error('Find One and Update ERROR = ', error); + throw error; + } + } + + async updateSchemaIndexes(query, update) { + // This method just updates Schema _metadata.indexes + // It is laways a set (replace), never a merge + logger.verbose('in Collection updateSchemaIndexes query = ' + JSON.stringify(query)); + logger.verbose('update = ' + JSON.stringify(update)); + const result = await this._rawFind(query, { type: 'one' }).then(result => { + return result; + }); + if (Object.keys(result).length > 0) { + // found the doc, so we need to update it + const key = result.key; + logger.verbose('key = ' + key); + const version = result.version; + logger.verbose('version = ' + version); + const oldContent = result.content; + logger.verbose('oldContent = ' + JSON.stringify(oldContent)); + logger.verbose('update = ' + JSON.stringify(update)); + // Either set or merge _metadata depending on if it existed before + Object.keys(update).forEach(item => { + if (item === '_metadata') { + if (Object.prototype.hasOwnProperty.call(oldContent, item)) { + if (Object.prototype.hasOwnProperty.call(oldContent[item], 'indexes')) { + if ( + Object.keys(update).length <= Object.keys(oldContent['_metadata']['indexes']).length + ) { + // Its a delete. Parse deletes by sending an update with the deleted index + // Set Indexes w Update only + _.set(oldContent[item], 'indexes', update[item]['indexes']); + } else { + _.merge(oldContent['_metadata'], update[item]); + } + } else { + _.merge(oldContent['_metadata'], update[item]); + } + } else { + _.set(oldContent, item, update[item]); + } + } + }); + const updateObj = oldContent; + logger.verbose('Updated Object = ' + JSON.stringify(updateObj)); + + let localConn = null; + return this.getCollectionConnection() + .then(conn => { + localConn = conn; + return this._oracleCollection.find().key(key).version(version).replaceOne(updateObj); + }) + .then(result => { + if (result.replaced == true) { + return update; + } else { + return 'retry'; + } + }) + .finally(() => { + if (localConn) { + localConn.close(); + localConn = null; + } + }) + .catch(error => { + logger.error('updateSchemaIndexes update ERROR: ', error); + throw error; + }); + } else { + logger.verbose('updateSchemaIndexes No record found for query: ' + JSON.stringify(query)); + return false; + } + } + catch(error) { + logger.error('updateSchemaIndexes ERROR: ', error); + throw error; + } + + async findOneAndDelete(query: string) { + try { + logger.verbose('in Collection findOneAndDelete query = ' + JSON.stringify(query)); + + const result = await this._rawFind(query, { type: 'one' }).then(result => { + return result; + }); + + if (Object.keys(result).length > 0) { + // found the doc, so we need to update it + const key = result.key; + logger.verbose('key = ' + key); + const version = result.version; + logger.verbose('version = ' + version); + + let localConn = null; + return this.getCollectionConnection() + .then(conn => { + localConn = conn; + return this._oracleCollection.find().key(key).version(version).remove(); + }) + .finally(() => { + if (localConn) { + localConn.close(); + localConn = null; + } + }) + .catch(error => { + logger.error('Find One and Delete remove ERROR: ', error); + throw error; + }); + } else { + logger.verbose('Find One and Delete No record found for query: ' + JSON.stringify(query)); + } + } catch (error) { + logger.error('Find One and Delete ERROR: ', error); + throw error; + } + } + + async deleteObjectsByQuery(query, transactionalSession) { + try { + logger.verbose('in Collection deleteObjectsByQuery query = ' + JSON.stringify(query)); + logger.verbose( + 'use transactionalSession to make linter happy ' + JSON.stringify(transactionalSession) + ); + + const result = await this._rawFind(query, { type: 'all' }).then(result => { + return result; + }); + + if (result.length > 0) { + for (let i = 0; i < result.length; i++) { + // found the doc, so we need to update it + const key = result[i].key; + logger.verbose('key = ' + key); + const version = result[i].version; + logger.verbose('version = ' + version); + let localConn = null; + return this.getCollectionConnection() + .then(conn => { + localConn = conn; + return this._oracleCollection.find().key(key).version(version).remove(); + }) + .finally(() => { + if (localConn) { + localConn.close(); + localConn = null; + } + }) + .catch(error => { + logger.error('Delete Objects By Query remove ERROR: ', error); + throw error; + }); + } + } else { + throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'Object not found.'); + } + } catch (error) { + logger.error('Delete Objects By Query ERROR: ', error); + throw error; + } + } + + // Delete fields from all documents in a collection + async deleteFields(fieldNames: Array) { + try { + var promises = Array(); + // Rewriting like createIndexes, Collection method will just delete a field + logger.verbose( + 'DeleteFields ' + JSON.stringify(fieldNames) + ' for Collection ' + this._name + ); + for (let idx = 0; idx < fieldNames.length; idx++) { + const fieldName = fieldNames[idx]; + logger.verbose('about to delete field' + fieldName); + const promise = this.deleteFieldFromCollection(fieldName) + .then(promise => { + if (promise === 'retry') { + return this.deleteFieldFromCollection(fieldName); + } + return promise; + }) + .catch(error => { + logger.error('Collection deleteFields caught error ' + error.message); + throw error; + }); + promises.push(promise); + } + + const results = await Promise.all(promises); + logger.verbose('DeleteFields returns ' + results); + return results; + } catch (error) { + logger.error('Delete Fields ERROR: ', error); + throw error; + } + } + + // deleteField from all docs in a collection that has it + async deleteFieldFromCollection(fieldName: string) { + try { + logger.verbose('deleteFieldFromCollection fieldName to delete is ' + fieldName); + const query = JSON.parse(`{"${fieldName}":{"$exists":true}}`); + const result = await this._rawFind(query, { type: 'all' }).then(result => { + return result; + }); + + if (result.length > 0) { + // found the doc, so we need to update it + var promises = Array(); + for (let i = 0; i < result.length; i++) { + const promise = this.deleteField( + fieldName, + result[i].key, + result[i].version, + result[i].content + ) + .then(promise => { + if (promise === 'retry') { + return this.deleteFieldFromCollection(fieldName); + } + return promise; + }) + .catch(error => { + logger.error('deleteFieldFromConnection caught error ' + error.message); + throw error; + }); + promises.push(promise); + } + + const results = await Promise.all(promises); + logger.verbose('DeleteFieldFromCollection returns ' + results); + return results; + } else { + logger.verbose('Field ' + fieldName + ' Not Found In DeleteFieldFromCollection'); + return false; + } + } catch (error) { + logger.error('Delete Field ERROR: ', error); + throw error; + } + } + + // deleteField from a specific document containing it + async deleteField(fieldName: string, key: string, version: string, oldContent: string) { + logger.verbose('key = ' + key); + logger.verbose('version = ' + version); + logger.verbose('oldContent before delete = ' + JSON.stringify(oldContent)); + delete oldContent[fieldName]; + logger.verbose('oldContent after delete update = ' + JSON.stringify(oldContent)); + + let localConn = null; + return this.getCollectionConnection() + .then(conn => { + localConn = conn; + return this._oracleCollection.find().key(key).version(version).replaceOne(oldContent); + }) + .then(result => { + if (result.replaced == true) { + return oldContent; + } else { + return 'retry'; + } + }) + .finally(() => { + if (localConn) { + localConn.close(); + localConn = null; + } + }) + .catch(error => { + logger.error('DeleteFieldFromCollection replaceOne ERROR: ', error); + throw error; + }); + } + + // Delete a field in a specific SCHEMA doc + async deleteSchemaField(query: string, fieldName: string) { + try { + logger.verbose('fieldName to delete is ' + fieldName); + const existobj = JSON.parse(`{"${fieldName}":{"$exists":true}}`); + const newquery = { ...query, ...existobj }; + const result = await this._rawFind(newquery, { type: 'one' }).then(result => { + return result; + }); + + if (result) { + // found the doc, so we need to update it + const key = result.key; + logger.verbose('key = ' + key); + const version = result.version; + logger.verbose('version = ' + version); + const oldContent = result.content; + + logger.verbose('oldContent before delete = ' + JSON.stringify(oldContent)); + delete oldContent[fieldName]; + logger.verbose('oldContent after delete update = ' + JSON.stringify(oldContent)); + + let localConn = null; + return this.getCollectionConnection() + .then(conn => { + localConn = conn; + return this._oracleCollection.find().key(key).version(version).replaceOne(oldContent); + }) + .then(result => { + if (result.replaced == true) { + return oldContent; + } else { + return 'retry'; + } + }) + .finally(() => { + if (localConn) { + localConn.close(); + localConn = null; + } + }) + .catch(error => { + logger.error('Delete SCHEMA Field replaceOne ERROR: ', error.message); + throw error; + }); + } else { + logger.verbose('Field ' + fieldName + ' Not Found In DeleteSchemaField'); + return false; + } + } catch (error) { + logger.error('Delete SCHEMA Field ERROR: ', error); + throw error; + } + } + + // Does a find with "smart indexing". + // Currently this just means, if it needs a geoindex and there is + // none, then build the geoindex. + // This could be improved a lot but it's not clear if that's a good + // idea. Or even if this behavior is a good idea. + async find( + query, + { + skip, + limit, + sort, + keys, + maxTimeMS, + readPreference, + hint, + caseInsensitive, + explain, + sortTypes, + } = {} + ) { + try { + logger.verbose('entering find()'); + // Support for Full Text Search - $text + if (keys && keys.$score) { + delete keys.$score; + keys.score = { $meta: 'textScore' }; + } + + return this._rawFind( + query, + { type: 'content' }, + { + skip, + limit, + sort, + keys, + maxTimeMS, + readPreference, + hint, + caseInsensitive, + explain, + sortTypes, + } + ).then(result => { + return result; + }); + } catch (error) { + logger.verbose("in find()'s error block"); + // Check for "no geoindex" error + if (error.code != 17007 && !error.message.match(/unable to find index for .geoNear/)) { + throw error; + } + // Figure out what key needs an index + const key = error.message.match(/field=([A-Za-z_0-9]+) /)[1]; + if (!key) { + throw error; + } + // TODO: Need to fix up this call to DB + // TODO: MUST FIX + var index = {}; + index[key] = '2d'; + await this.getCollectionConnection(); + + const result = await this._oracleCollection + .createIndex(index) + // Retry, but just once. + .then(() => + this._rawFind(query, { + skip, + limit, + sort, + keys, + maxTimeMS, + readPreference, + hint, + caseInsensitive, + explain, + }) + ); + this.closeConnection(); + return result.map(i => i.getContent()); + } + } + + async _rawFind( + query, + retval, + { + skip, + limit, + sort, + keys, + maxTimeMS, + readPreference, + hint, + caseInsensitive, + explain, + sortTypes, + } = {} + ) { + logger.verbose('_rawFind: collection = ' + JSON.stringify(this._oracleCollection)); + logger.verbose('query = ' + JSON.stringify(query)); + logger.verbose('limit = ' + limit); + // use these so the linter will not complain - until i actually use them properly + logger.verbose( + 'TODO: not using these: ' + sort, + maxTimeMS, + readPreference, + caseInsensitive, + explain + ); + + let localConn = null; + try { + let findOperation; + + await this.getCollectionConnection() + .then(conn => { + localConn = conn; + findOperation = this._oracleCollection.find(); + }) + .catch(error => { + logger.error('Error getting connection in _rawFind, ERROR =' + error); + if (localConn) { + localConn.close(); + localConn = null; + } + throw error; + }); + + // let findOperation = this._oracleCollection.find(); // find() is sync and returns SodaOperation + + // All this below is to handle empty array in $in selection + // Node APIs fail for empty array error + // The fix will be in a future release of instant client + // https://orahub.oci.oraclecorp.com/ora-microservices-dev/mbaas-parse-server/-/wikis/ORA-40676:-invalid-Query-By-Example-(QBE)-filter-specification-JZN-00305:-Array-of-values-was-empty + const myObj = JSON.parse(JSON.stringify(query)); + + for (const x in myObj) { + if (typeof myObj[x] === 'object') { + const json = JSON.parse(JSON.stringify(myObj[x])); + + //CDB + //to manage EqualTo() with null + // when an input query is like + // {"foo":null,"$or":[{"_rperm":{"$in":["*","*"]}},{"_rperm":null},{"_rperm":{"$exists":false}}]} + // and need to generate a $or for null check, need to wrap the whole thing with a $and + // It looks like null = non-existance or null + if (json == null) { + let newQuery = {}; + + if (Object.prototype.hasOwnProperty.call(myObj, '$or')) { + // This whole not handling null is getting ugly + const originalOr = JSON.stringify(myObj['$or']); + const queryOr = JSON.stringify({ $or: [{ [x]: { $exists: false } }, { [x]: null }] }); + const andString = `[${queryOr},{"$or":${originalOr}}]`; + newQuery['$and'] = JSON.parse(andString); + delete myObj['$or']; + } else { + newQuery = { $or: [{ [x]: { $exists: false } }, { [x]: null }] }; + } + query = newQuery; + } + //CDB-END + //CDB + //to manage notEqualTo() with null + if (json != null) { + if (Object.keys(json)[0] == '$ne') { + if (json['$ne'] == null) { + const newQuery = { $and: [{ [x]: { $exists: true } }, { [x]: { $ne: null } }] }; + query = newQuery; + } + } + } + //CDB-END + + //CDD + // Remove empty objects from $and clause + // ORA-40676: invalid Query-By-Example (QBE) filter specification + // JZN-00315: Empty objects not allowed + // + // fix up queries like + // { '$and': [ {}, { _p_user: '_User$EYTVvcG4j9' } ] } + if (json != null && x == '$and') { + if (Array.isArray(json)) { + const condList = new Array(); + json.forEach(item => { + if (!(Object.keys(item).length === 0)) { + condList.push(item); + } + }); + query = { + $and: condList, + }; + } + } + //CDD + + for (const y in json) { + //query should not match on array when searching for null + if (y === '$all' && Array.isArray(json[y]) && json[y][0] == null) { + if (localConn) { + localConn.close(); + localConn = null; + } + return []; + } else { + // to manage $all of normal expression for query match on array with multiple objects + if ( + y === '$all' && + Array.isArray(json[y]) && + json[y][0]['__FIELD__!!__'] === undefined + ) { + const newCondList = Array(); + + for (var ass in myObj[x]['$all']) { + if (typeof myObj[x]['$all'][ass] === 'object') { + // ??? + const condList = myObj[x]['$all'][0]; + Object.keys(condList).forEach(function (key) { + // key: the name of the object key + // index: the ordinal position of the key within the object + const newField = x + '[*].' + key; + newCondList.push({ + [newField]: condList[key], + }); + }); + } + } + // For 'containsAll date array queries','containsAll string array queries','containsAll number array queries' + // no 'objects' in array: doesn't need a query re-write in $and:[] 'for query match on array with multiple objects' + // newCondList == [] + if (newCondList.length != 0) { + query = { + $and: newCondList, + }; + } + } //CDB + } + + if (y === '$in' || y === '$nin' || y === '$all') { + if (json[y].length > 0 && json[y][0] !== null) { + //TO MANAGE 'containsAllStartingWith single empty value returns empty results' test + if ( + Object.keys(json[y][0]).length == 0 && + y === '$all' && + typeof json[y][0] == 'object' + ) { + if (localConn) { + localConn.close(); + localConn = null; + } + return []; + } + } + + if (json[y].length == 0) { + if (y === '$in' || y === '$all') { + if (localConn) { + localConn.close(); + localConn = null; + } + return []; + } else { + query = JSON.parse('{}'); + } + } + } + // to manage $all of $regex expression + //To exclude a $all on $regex array to be transformed in $and + + /* CDD Commented this code out becuase it broke this query + {"numbers":{"$all":[1,2,3]} + and this test + containsAll number array queries + */ + + /* if (y === '$all' && json[y][0]['__FIELD__!!__'] === undefined) { + //find wrong field + for (ass in myObj[x]['$all']) { + if (typeof myObj[x]['$all'][ass] === 'object') { + if (Object.keys(ass)[0] != '$regex') { + //TO BE FIXED + if (localConn) { + localConn.close(); + localConn = null; + } + return []; + } + } + } //To manage 'containsAll number array queries' in conflict with 'containsAllStartingWith single empty value returns empty results' test + if (localConn) { + localConn.close(); + localConn = null; + } + return []; + }*/ + + if (y === '$all' && !(json[y][0]['__FIELD__!!__'] === undefined)) { + const condList = []; + + for (const condition in query[x][y]) { + condList.push({ + [x]: query[x][y][condition]['__FIELD__!!__'], + }); + } + + query = { + $and: condList, + }; + } //CDB-END + } + + // Let $or just passthrough + if (x === '$or') { + query[x] = myObj[x]; + } + } + } //CDB + + if (sort && Object.keys(sort).length != 0) { + //ADD ORDER IN QUERY + //FIX 15-11 + const orderByList = []; //let collection = new OracleSchemaCollection(this._oracleCollection); + for (const s in sort) { + const order = sort[s] == -1 ? 'desc' : 'asc'; + const orderStatement = { + path: s, + datatype: sortTypes[s], + order: order, + }; //Fix 11-11 + + orderByList.push(orderStatement); + } //Fix 15-11 + + const oldQuery = query; + query = {}; + query['$query'] = oldQuery; + query['$orderby'] = orderByList; //Fix-End 11-11 + } // CDB-END + + findOperation = findOperation.filter(query); + + if (skip) { + findOperation = findOperation.skip(Number(skip)); + } + + if (limit) { + findOperation = findOperation.limit(Number(limit)); + } + + if (hint) { + findOperation = findOperation.hint(String(hint)); + } + // TODO need to handle sort and readPreference + // let findOperation = this._oracleCollection.find(query, { + // skip, + // limit, + // sort, + // readPreference, + // hint, + // }); + + if (keys) { + logger.verbose('keys.. with input = ' + JSON.stringify(keys)); + // param needs to be an Array + // check it is not an empty object... + if (!_.isEmpty(keys)) { + logger.verbose('keys was not empty'); + //CDB + //findOperation = findOperation.keys(keys); + //CDB-END + } + } + + // if (caseInsensitive) { + // findOperation = findOperation.collation(OracleCollection.caseInsensitiveCollation()); + // } + + // if (maxTimeMS) { + // findOperation = findOperation.maxTimeMS(maxTimeMS); + // } + + logger.verbose('findOperation = ' + JSON.stringify(findOperation)); + logger.verbose('about to getDocuments()'); + let localDocs; + return findOperation + .getDocuments() + .then(docs => { + if (retval.type === 'content') { + localDocs = docs.map(i => i.getContent()); + } + if (retval.type === 'sodadocs') { + localDocs = docs; + } + if (retval.type === 'one') { + // return docs, keys and version + if (docs && docs.length == 1) { + const one = new Object(); + one.content = docs[0].getContent(); + one.key = docs[0].key; + one.version = docs[0].version; + localDocs = one; + } else { + if (docs && docs.length == 0) { + return {}; + } else { + logger.error('rawFind ONE return type found multiple docs'); + throw 'rawFind ONE return type found multiple docs'; + } + } + } + if (retval.type === 'all') { + // return docs, keys and version + if (docs) { + const returndocs = new Array(); + for (var i = 0; i < docs.length; i++) { + const all = new Object(); + all.content = docs[i].getContent(); + all.key = docs[i].key; + all.version = docs[i].version; + returndocs.push(all); + } + localDocs = returndocs; + } + } + return localDocs; + }) + .finally(() => { + if (localConn) { + localConn.close(); + localConn = null; + } + }) + .catch(error => { + logger.error('Error running findOperation GetDocuments, ERROR =' + error); + throw error; + }); + } catch (error) { + if (localConn) { + localConn.close(); + localConn = null; + } + logger.error('Error running _rawfind, ERROR =' + error); + throw error; + } + } + + //CDB 17-11 fix + + async distinct(field, query) { + //return this._oracleCollection.distinct(field, query); + const objects = await this._oracleCollection.find().filter(query).getDocuments(); + const arr = []; + for (const obj in objects) { + const content = _.get(objects[obj].getContent(), field); + Array.isArray(content) ? arr.push(...content) : arr.push(content); + } + //let distinctObjects = [...new Set(arr)]; + return [...new Set(arr)]; + } + //CDB-END + + async updateOne(query, update) { + logger.verbose('UpdateOne calling findOneandUpdate'); + return this.findOneAndUpdate(query, update, null); + } + + async insertOne(object) { + let localConn = null; + try { + localConn = await this.getCollectionConnection(); + await this._oracleCollection.insertOne(object); + return object; + } catch (error) { + logger.error('error during insertOne = ' + error); + throw error; + } finally { + if (localConn) { + await localConn.close(); + } + } + } + + async drop() { + let localConn = null; + + logger.verbose('entered drop for ' + this._name); + return this.getCollectionConnection() + .then(conn => { + localConn = conn; + return this._oracleCollection.drop(); + }) + .then(result => { + if (result) { + logger.verbose('drop succeeded for ' + this._name); + } else { + logger.verbose('drop failed for ' + this._name); + } + return result; + }) + .finally(() => { + if (localConn) { + localConn.close(); + localConn = null; + } + }) + .catch(error => { + logger.error('in Drop Error' + error); + throw error; + }); + } + + async truncate() { + // collection.truncate() does not work with instant clients less than version 20 + // https://oracle.github.io/node-oracledb/doc/api.html#-11212-sodacollectiontruncate + // Error: DPI-1050: Oracle Client library is at version 19.8 but version 20.1 or higher is needed + // for now, do it the old fashioned way with collection.find.remove + let localConn = null; + return this.getCollectionConnection() + .then(conn => { + localConn = conn; + return this._oracleCollection.find().remove(); + }) + .finally(() => { + if (localConn) { + localConn.close(); + localConn = null; + } + }) + .catch(error => { + logger.error('in truncate Error' + error); + throw error; + }); + } + async _fetchAllSchemasFrom_SCHEMA() { + return this._rawFind({}, { type: 'content' }) + .then(schemas => { + logger.verbose('schemas = ' + schemas); + return schemas; + }) + .catch(error => { + logger.error('error during fetchAllSchemasFrom_SCHEMA = ' + error); + throw error; + }); + } + + getCollectionName() { + return this._name; + } + + _ensureSparseUniqueIndexInBackground(indexRequest) { + // TODO rewrite params to suit oracle soda + logger.verbose( + 'entered _ensureSparseUniqueIndexInBackground with indexRequest = ' + + JSON.stringify(indexRequest) + ); + return this._createIndex(indexRequest); + } + + async _createIndex(indexSpec) { + let localConn = null; + + logger.verbose('_createIndex index spec is ' + JSON.stringify(indexSpec)); + return await this.getCollectionConnection() + .then(async conn => { + localConn = conn; + await this._oracleCollection.createIndex(indexSpec); + return Promise.resolve; + }) + .then(result => { + // Parse expects _id index in Schema to be + // _metadata: { indexes: { _id_: { _id: 1 }, name_1: { name: 1 } } } + const idx = { [indexSpec.fields[0].path]: 1 }; + if (indexSpec.fields[0].path === '_id') { + // indexSpec.fields[0].path = '_id_'; + indexSpec.name = '_id_'; + } + // const obj = { [indexSpec.fields[0].path]: [idx] }; + const obj = { [indexSpec.name]: [idx] }; + this.indexes.push(obj); + return result; + }) + .finally(async () => { + if (localConn) { + await localConn.close(); + localConn = null; + } + }) + .catch(error => { + if (error.errorNum === 40733) { + /* + Rebuild internal indexes array on server restart from schema indexes + */ + const found = this.indexes.find(item => { + // Parse expects _id index in Schema to be + // _metadata: { indexes: { _id_: { _id: 1 }, name_1: { name: 1 } } } + if (indexSpec.fields[0].path === '_id') { + indexSpec.fields[0].path = '_id_'; + } + return Object.keys(item)[0] === indexSpec.fields[0].path; + }); + + if (typeof found === 'undefined') { + const idx = { [indexSpec.fields[0].path]: 1 }; + if (indexSpec.fields[0].path === '_id') { + indexSpec.name = '_id_'; + } + // const obj = { [indexSpec.fields[0].path]: [idx] }; + const obj = { [indexSpec.name]: [idx] }; + this.indexes.push(obj); + return Promise.resolve; + } + logger.verbose('Index' + JSON.stringify(indexSpec) + ' already exists'); + } else { + logger.error('createIndex throws ' + error); + throw error; + } + }); + } + + getIndexes(className) { + logger.verbose('OracleCollection getIndexes className = ' + className); + + // There is an odd case where _id is not added to schema document until server restart + // If _id_ does not exist in indexes array add it to returned array. + // It does exist on the actual Collection + const found = this.indexes.find(item => { + return Object.keys(item)[0] === '_id_'; + }); + if (typeof found === 'undefined') { + this.indexes.push({ _id_: { _id: 1 } }); + } + logger.verbose('getIndexes returns ' + JSON.stringify(this.indexes)); + return this.indexes; + } + + async dropIndex(indexName) { + logger.verbose('Collection ' + this._name + ' is dropping index' + indexName); + let localConn = null; + + const result = await this.getCollectionConnection() + .then(async conn => { + localConn = conn; + const result = await this._oracleCollection.dropIndex(indexName); + return result; + }) + .finally(() => { + if (localConn) { + localConn.close(); + localConn = null; + } + }) + .catch(error => { + logger.error('error during dropIndex = ' + error); + throw error; + }); + + const found = this.indexes.find(item => { + return Object.keys(item)[0] === indexName; + }); + if (found) { + this.indexes.splice(this.indexes.indexOf(found), 1); + } + + return result; + } +} From 711f97ba31769bcd198b3edfa80f8d9a6e3aced8 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 11:38:27 -0500 Subject: [PATCH 144/294] OracleCollection with no metadata --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9efa67845..35721c39f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,6 +68,7 @@ jobs: ls -la parse-server-database-adapter-template; cp parse-server-database-adapter-template/package.json parse-server; cp parse-server-database-adapter-template/OracleStorageAdapter.js parse-server/src/Adapters/Storage/Oracle; + cp parse-server-database-adapter-template/OracleCollection.js parse-server/src/Adapters/Storage/Oracle; ls -la parse-server; cat parse-server/spec/helper.js - name: Run Free23c From dbe144ee9fc1e8e4fe89c615866e53748b51477f Mon Sep 17 00:00:00 2001 From: ddrechse Date: Thu, 15 Feb 2024 11:59:42 -0500 Subject: [PATCH 145/294] Add Log --- OracleCollection.js | 1 + 1 file changed, 1 insertion(+) diff --git a/OracleCollection.js b/OracleCollection.js index 06ee9aed0..390c69856 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -35,6 +35,7 @@ export default class OracleCollection { };*/ // console.log( "Metadata = " + JSON.stringify(mymetadata)); + console.log("No Connection Metadata"); logger.verbose('getCollectionConnection about to connect for collection ' + this._name); let localConn; From e60093794c8c01b956f6a9ad4a42ab7b02375403 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 12:01:54 -0500 Subject: [PATCH 146/294] No connection metadata used --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35721c39f..126da59d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Turn sleep off"; + echo "No connection metadata used"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From a247a265c5e0e9bf1af0013be65cdf1bfbf75612 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 14:23:30 -0500 Subject: [PATCH 147/294] Create macos.yml --- .github/workflows/macos.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/macos.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1 @@ + From ce342a41ec7fbe3da43bab4bcd69539639127fb1 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 14:26:58 -0500 Subject: [PATCH 148/294] Update macos.yml --- .github/workflows/macos.yml | 44 ++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 8b1378917..f633d91db 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1 +1,43 @@ - +name: ci +on: + push: + branches: [ main ] + pull_request: + branches: + - '**' + paths-ignore: + - '**/**.md' +jobs: + run-parse-server-ci: + name: CI of Parse Server + timeout-minutes: 60 + runs-on: macos-latest + strategy: + matrix: +# version: ['5.6.0', '6.3.1'] + version: ['alpha'] + steps: + - name: Checkout parse-server ${{ matrix.version }} + uses: actions/checkout@v2 + with: + repository: ddrechse/parse-server + ref: realDBAdapterLoader + path: parse-server + - name: Create Oracle Storage Adapter Dir + run: mkdir parse-server/src/Adapters/Storage/Oracle; + ls -la parse-server/src/Adapters/Storage/Oracle; + - name: Checkout Oracle Storage Adapter + uses: actions/checkout@v2 + with: + repository: oracle-samples/oracleadapter-parse + ref: '' + path: parse-server/src/Adapters/Storage/Oracle + - name: Validate Oracle Dir + run: ls -la parse-server/src/Adapters/Storage/Oracle; + - name: Install Sqlcl + run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; + unzip sqlcl-23.3.0.270.1251.zip; + ./sqlcl/bin/sql -V; +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true From 337ed50ecb2fa896bc14eaf6618d702bcdd2d039 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 14:30:41 -0500 Subject: [PATCH 149/294] Brew --- .github/workflows/macos.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index f633d91db..20f015cf5 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -33,7 +33,9 @@ jobs: ref: '' path: parse-server/src/Adapters/Storage/Oracle - name: Validate Oracle Dir - run: ls -la parse-server/src/Adapters/Storage/Oracle; + run: ls -la parse-server/src/Adapters/Storage/Oracle; + - name: Install Java 11 + run: brew update; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip; From a7de93581d32c1f4ec199e821166f9a1b2efbd0f Mon Sep 17 00:00:00 2001 From: ddrechse Date: Thu, 15 Feb 2024 14:34:49 -0500 Subject: [PATCH 150/294] Restore to original connection behavior using metadata --- OracleCollection.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OracleCollection.js b/OracleCollection.js index 390c69856..1a5747b59 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -26,13 +26,13 @@ export default class OracleCollection { async getCollectionConnection() { // To support backwards compatibility with instant clients -/* const mymetadata = { + const mymetadata = { keyColumn: { name: 'ID', assignmentMethod: 'UUID' }, contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'JSON' }, versionColumn: { name: 'VERSION', method: 'UUID' }, lastModifiedColumn: { name: 'LAST_MODIFIED' }, creationTimeColumn: { name: 'CREATED_ON' }, - };*/ + }; // console.log( "Metadata = " + JSON.stringify(mymetadata)); console.log("No Connection Metadata"); @@ -60,12 +60,12 @@ export default class OracleCollection { .then(async coll => { if (!coll) { logger.verbose('getCollectionConnection create NEW collection for ' + this._name); -// const newCollection = await this._oracleSodaDB.createCollection(this._name, { -// metaData: mymetadata, -// }); + const newCollection = await this._oracleSodaDB.createCollection(this._name, { + metaData: mymetadata, + }); - const newCollection = await this._oracleSodaDB.createCollection(this._name); +// const newCollection = await this._oracleSodaDB.createCollection(this._name); /* Create index on _id for every new collection This imitates Mongo behavior which happens automatically From f49ab6f133b2b689336888b9ec9b9c58db8a2ec3 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 14:38:14 -0500 Subject: [PATCH 151/294] Try w MacOS --- .github/workflows/ci.yml | 92 ++++------------------------------------ 1 file changed, 8 insertions(+), 84 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 126da59d0..7d278ffff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: run-parse-server-ci: name: CI of Parse Server timeout-minutes: 60 - runs-on: ubuntu-latest + runs-on: macos-latest strategy: matrix: # version: ['5.6.0', '6.3.1'] @@ -33,92 +33,16 @@ jobs: ref: '' path: parse-server/src/Adapters/Storage/Oracle - name: Validate Oracle Dir - run: ls -la parse-server/src/Adapters/Storage/Oracle; + run: ls -la parse-server/src/Adapters/Storage/Oracle; + - name: Install Java 11 + run: brew update; + brew install java11; + sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk; + java --version; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip; ./sqlcl/bin/sql -V; - - name: Install Instant Client - run: uname -m; - wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; - unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; - ls -la; - ls -la $PWD/instantclient_21_13; - ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; - - name: Install libaio1 - run: sudo apt-get install libaio1; - - name: Checkout OraSepcs - uses: actions/checkout@v2 - with: - repository: ddrechse/parse-server - ref: oraSpecs - path: ora-specs - - name: Validate oraSpecs - run: ls -la ora-specs; - cp -R ./ora-specs/spec ./parse-server; - ls -la parse-server/spec; - - name: Checkout package.json - uses: actions/checkout@v2 - with: - repository: ddrechse/parse-server-database-adapter-template - ref: '' - path: parse-server-database-adapter-template - - name: Move package.json - run: ls; - ls -la parse-server-database-adapter-template; - cp parse-server-database-adapter-template/package.json parse-server; - cp parse-server-database-adapter-template/OracleStorageAdapter.js parse-server/src/Adapters/Storage/Oracle; - cp parse-server-database-adapter-template/OracleCollection.js parse-server/src/Adapters/Storage/Oracle; - ls -la parse-server; - cat parse-server/spec/helper.js - - name: Run Free23c - run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; - docker ps -a; - docker info; - - name: Wait for container - run: sleep 120; - docker ps -a; - ./sqlcl/bin/sql -V; - - name: Enable SODA in image - run: echo "alter system set pga_aggregate_limit=4G scope=memory;alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; - cat soda; - ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - - name: Run Tests - run: echo $PWD; - echo "Before setting LIB PATH"; - export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; - echo "This is LD LIBRARY PATH"; - echo $LD_LIBRARY_PATH; - echo "No connection metadata used"; - cd parse-server; - npm install; - npm install --save @parse/fs-files-adapter; - npm install oracledb@6.3.0; - export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; - echo $PARSE_SERVER_DATABASE_ADAPTER; - ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; - mkdir oralogs; -# docker cp free23c: Date: Thu, 15 Feb 2024 14:40:34 -0500 Subject: [PATCH 152/294] Delete .github/workflows/macos.yml --- .github/workflows/macos.yml | 45 ------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 .github/workflows/macos.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index 20f015cf5..000000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: ci -on: - push: - branches: [ main ] - pull_request: - branches: - - '**' - paths-ignore: - - '**/**.md' -jobs: - run-parse-server-ci: - name: CI of Parse Server - timeout-minutes: 60 - runs-on: macos-latest - strategy: - matrix: -# version: ['5.6.0', '6.3.1'] - version: ['alpha'] - steps: - - name: Checkout parse-server ${{ matrix.version }} - uses: actions/checkout@v2 - with: - repository: ddrechse/parse-server - ref: realDBAdapterLoader - path: parse-server - - name: Create Oracle Storage Adapter Dir - run: mkdir parse-server/src/Adapters/Storage/Oracle; - ls -la parse-server/src/Adapters/Storage/Oracle; - - name: Checkout Oracle Storage Adapter - uses: actions/checkout@v2 - with: - repository: oracle-samples/oracleadapter-parse - ref: '' - path: parse-server/src/Adapters/Storage/Oracle - - name: Validate Oracle Dir - run: ls -la parse-server/src/Adapters/Storage/Oracle; - - name: Install Java 11 - run: brew update; - - name: Install Sqlcl - run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; - unzip sqlcl-23.3.0.270.1251.zip; - ./sqlcl/bin/sql -V; -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true From f10f7d1c7693d768366e2d80679e34f0ed2e4b41 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 14:44:17 -0500 Subject: [PATCH 153/294] install java11 --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d278ffff..42fb22c59 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,8 @@ jobs: run: brew update; brew install java11; sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk; + export PATH="/usr/local/opt/openjdk@11/bin:$PATH" + echo $PATH; java --version; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; From 47700f779259520c7c8b6b3087fbb0b22e5c10e2 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 14:47:22 -0500 Subject: [PATCH 154/294] Update ci.yml --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42fb22c59..0a85019c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: ci +oname: ci on: push: branches: [ main ] @@ -37,10 +37,11 @@ jobs: - name: Install Java 11 run: brew update; brew install java11; + echo "PERFORMING SYMLINK" sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk; - export PATH="/usr/local/opt/openjdk@11/bin:$PATH" - echo $PATH; - java --version; +# export PATH="/usr/local/opt/openjdk@11/bin:$PATH" +# echo $PATH; +# java --version; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip; From 404ee2dac98764b0444ee36d36213f1eff4995ac Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 14:48:48 -0500 Subject: [PATCH 155/294] Fix typo --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a85019c3..557e7d331 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -oname: ci +name: ci on: push: branches: [ main ] From 07941abb3de06d107a771474c7f1df1c7872f297 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 14:51:28 -0500 Subject: [PATCH 156/294] Update ci.yml --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 557e7d331..b1807724a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,8 +39,9 @@ jobs: brew install java11; echo "PERFORMING SYMLINK" sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk; -# export PATH="/usr/local/opt/openjdk@11/bin:$PATH" -# echo $PATH; + ls -la /usr/local/opt/openjdk@11/libexec/openjdk.jdk; + export PATH=/usr/local/opt/openjdk@11/bin:$PATH + echo $PATH; # java --version; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; From f4af337a4dc44fefaa5e26fc29628ecdc601b89a Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 14:56:22 -0500 Subject: [PATCH 157/294] The old way --- .github/workflows/ci.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1807724a..df6432934 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,18 +35,12 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Install Java 11 - run: brew update; - brew install java11; - echo "PERFORMING SYMLINK" - sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk; - ls -la /usr/local/opt/openjdk@11/libexec/openjdk.jdk; - export PATH=/usr/local/opt/openjdk@11/bin:$PATH - echo $PATH; -# java --version; - - name: Install Sqlcl - run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; - unzip sqlcl-23.3.0.270.1251.zip; - ./sqlcl/bin/sql -V; + run: java --version; + which java; +# - name: Install Sqlcl +# run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; +# unzip sqlcl-23.3.0.270.1251.zip; +# ./sqlcl/bin/sql -V; concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From 63c70f9fb1cef3b2823c70094719317cc4990515 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 14:57:40 -0500 Subject: [PATCH 158/294] java --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df6432934..c6f5ef41d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Install Java 11 - run: java --version; + run: java; which java; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; From 61743ab124616b702e5fbfc546b60869e59778ce Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 14:59:08 -0500 Subject: [PATCH 159/294] java -version --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6f5ef41d..e9bb0e472 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,8 +35,8 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Install Java 11 - run: java; - which java; + run: java -version; +# which java; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; # unzip sqlcl-23.3.0.270.1251.zip; From f70b4eb585128c60e01629a046b65eaa980aece4 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 15:01:14 -0500 Subject: [PATCH 160/294] Use brew --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9bb0e472..f2fe64365 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,9 @@ jobs: run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Install Java 11 run: java -version; + brew update; + brew install java11; + java -version; # which java; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; From 8412e2637d0a525f838ee0aef3aef6b486f0651a Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 15:11:57 -0500 Subject: [PATCH 161/294] the old way --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2fe64365..e7dbdfb3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,9 +36,9 @@ jobs: run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Install Java 11 run: java -version; - brew update; - brew install java11; - java -version; + wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz; + gunzip jdk-21_linux-x64_bin.tar.gz; + ls -la; # which java; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; From 7446def46558038aaac113838b0bc11d4f110ca5 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 15:15:12 -0500 Subject: [PATCH 162/294] untar --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7dbdfb3e..2f5b5cf82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,7 @@ jobs: run: java -version; wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz; gunzip jdk-21_linux-x64_bin.tar.gz; + tar –xvzf jdk-21_linux-x64_bin.tar; ls -la; # which java; # - name: Install Sqlcl From 7e5c1a157c169be82fc0300cea531de10749a81c Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 15:16:22 -0500 Subject: [PATCH 163/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f5b5cf82..7e1ba5cba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: run: java -version; wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz; gunzip jdk-21_linux-x64_bin.tar.gz; - tar –xvzf jdk-21_linux-x64_bin.tar; + tar –xf jdk-21_linux-x64_bin.tar; ls -la; # which java; # - name: Install Sqlcl From 24affa3e04991212aa34dbbc121bd8c5817ca5cc Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 15:19:38 -0500 Subject: [PATCH 164/294] chmod --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e1ba5cba..00c5a7e33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,8 @@ jobs: run: java -version; wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz; gunzip jdk-21_linux-x64_bin.tar.gz; + chmod 777 jdk-21_linux-x64_bin.tar; + ls -la; tar –xf jdk-21_linux-x64_bin.tar; ls -la; # which java; From 2643b1e0430a25b3e745fa339037dbad023183f6 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 15:22:56 -0500 Subject: [PATCH 165/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00c5a7e33..439f9b9ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: gunzip jdk-21_linux-x64_bin.tar.gz; chmod 777 jdk-21_linux-x64_bin.tar; ls -la; - tar –xf jdk-21_linux-x64_bin.tar; + tar -tf jdk-21_linux-x64_bin.tar; ls -la; # which java; # - name: Install Sqlcl From e633de8b9e30f820717a4240edd1f4ceb73c12a0 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 15:24:17 -0500 Subject: [PATCH 166/294] Update ci.yml --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 439f9b9ed..6226b0cd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,8 @@ jobs: gunzip jdk-21_linux-x64_bin.tar.gz; chmod 777 jdk-21_linux-x64_bin.tar; ls -la; - tar -tf jdk-21_linux-x64_bin.tar; + tar -help; + tar -xf jdk-21_linux-x64_bin.tar; ls -la; # which java; # - name: Install Sqlcl From 715b6f96c1bc7c8a96ae613d7b4f780e5d078c52 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 15:25:20 -0500 Subject: [PATCH 167/294] --help --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6226b0cd3..f6ddea2b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: gunzip jdk-21_linux-x64_bin.tar.gz; chmod 777 jdk-21_linux-x64_bin.tar; ls -la; - tar -help; + tar --help; tar -xf jdk-21_linux-x64_bin.tar; ls -la; # which java; From e97f711108ed82ee17e3f42f1de564a78a53ee5d Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 15:42:25 -0500 Subject: [PATCH 168/294] Look at dir structure --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6ddea2b6..9441b06f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,9 @@ jobs: ls -la; tar --help; tar -xf jdk-21_linux-x64_bin.tar; - ls -la; + ls -la jdk-21.0.2; + ls -la jdk-21.0.2/bin; +# export PATH=$PATH:/Users/ddrechse/istio-1.10.3/bin # which java; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; From 39c51a746f071821effd0b65757cedefd646b9ac Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 15:48:48 -0500 Subject: [PATCH 169/294] Set java path --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9441b06f9..c54a174cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,9 @@ jobs: tar -xf jdk-21_linux-x64_bin.tar; ls -la jdk-21.0.2; ls -la jdk-21.0.2/bin; -# export PATH=$PATH:/Users/ddrechse/istio-1.10.3/bin + export PATH=${PWD}/jdk-21.0.2/bin:$PATH; + echo $PATH; + java; # which java; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; From 63b292681e5f80eaa0320fba0d839998caa3e883 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 15:52:11 -0500 Subject: [PATCH 170/294] Install Mac JDK --- .github/workflows/ci.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c54a174cf..b252666ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,17 +36,18 @@ jobs: run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Install Java 11 run: java -version; - wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz; - gunzip jdk-21_linux-x64_bin.tar.gz; - chmod 777 jdk-21_linux-x64_bin.tar; + wget jdk-11.interim.update.patch_macos-x64_bin.tar.gz; + gunzip jdk-11.interim.update.patch_macos-x64_bin.tar.gz + chmod 777 jdk-11.interim.update.patch_macos-x64_bin.tar; ls -la; tar --help; - tar -xf jdk-21_linux-x64_bin.tar; - ls -la jdk-21.0.2; - ls -la jdk-21.0.2/bin; - export PATH=${PWD}/jdk-21.0.2/bin:$PATH; - echo $PATH; - java; + tar -xf jdk-11.interim.update.patch_macos-x64_bin.tar; + ls -la; +# ls -la jdk-21.0.2; +# ls -la jdk-21.0.2/bin; +# export PATH=${PWD}/jdk-21.0.2/bin:$PATH; +# echo $PATH; +# java; # which java; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; From 91659447483b5d488b19084fb9010ec9f24efa01 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 15:54:51 -0500 Subject: [PATCH 171/294] Mac OS Java 17 --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b252666ec..abdc078b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,12 +36,12 @@ jobs: run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Install Java 11 run: java -version; - wget jdk-11.interim.update.patch_macos-x64_bin.tar.gz; - gunzip jdk-11.interim.update.patch_macos-x64_bin.tar.gz - chmod 777 jdk-11.interim.update.patch_macos-x64_bin.tar; + wget https://download.oracle.com/java/17/latest/jdk-17_macos-x64_bin.tar.gz; + gunzip jdk-17_macos-x64_bin.tar.gz; + chmod 777 jdk-17_macos-x64_bin.tar; ls -la; tar --help; - tar -xf jdk-11.interim.update.patch_macos-x64_bin.tar; + tar -xf jdk-17_macos-x64_bin.tar; ls -la; # ls -la jdk-21.0.2; # ls -la jdk-21.0.2/bin; From 8b58848bd1cf82712de30d225d71d25ac41b4185 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 15:56:47 -0500 Subject: [PATCH 172/294] Is java --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index abdc078b3..045543f98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,11 +43,11 @@ jobs: tar --help; tar -xf jdk-17_macos-x64_bin.tar; ls -la; -# ls -la jdk-21.0.2; -# ls -la jdk-21.0.2/bin; -# export PATH=${PWD}/jdk-21.0.2/bin:$PATH; -# echo $PATH; -# java; + ls -la jdk-17.0.10.jdk; + ls -la jdk-17.0.10.jdk/bin; + export PATH=${PWD}/jdk-17.0.10.jdk/bin:$PATH; + echo $PATH; + java; # which java; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; From 7b41ea23489000c4023e547ad59942a7c2498d1b Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 15:59:07 -0500 Subject: [PATCH 173/294] Contents --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 045543f98..4aebe473e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,10 +44,10 @@ jobs: tar -xf jdk-17_macos-x64_bin.tar; ls -la; ls -la jdk-17.0.10.jdk; - ls -la jdk-17.0.10.jdk/bin; - export PATH=${PWD}/jdk-17.0.10.jdk/bin:$PATH; - echo $PATH; - java; + ls -la jdk-17.0.10.jdk/Contents; +# export PATH=${PWD}/jdk-17.0.10.jdk/bin:$PATH; +# echo $PATH; +# java; # which java; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; From 502b8bcc658ac73640f0fb7b34f20055f7963630 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 16:02:31 -0500 Subject: [PATCH 174/294] where is it --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4aebe473e..3c813d045 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,8 @@ jobs: ls -la; ls -la jdk-17.0.10.jdk; ls -la jdk-17.0.10.jdk/Contents; + ls -la jdk-17.0.10.jdk/Contents/Home; + ls -la jdk-17.0.10.jdk/Contents/MacOS; # export PATH=${PWD}/jdk-17.0.10.jdk/bin:$PATH; # echo $PATH; # java; From 85f538c497bc26ccf3aeec50e74381dd83febe7c Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 16:04:09 -0500 Subject: [PATCH 175/294] I found bin --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c813d045..10bf08260 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,7 @@ jobs: ls -la jdk-17.0.10.jdk/Contents; ls -la jdk-17.0.10.jdk/Contents/Home; ls -la jdk-17.0.10.jdk/Contents/MacOS; + ls -la jdk-17.0.10.jdk/Contents/Home/bin; # export PATH=${PWD}/jdk-17.0.10.jdk/bin:$PATH; # echo $PATH; # java; From 69c5e7360fe4107af3673d635aa2fcf825749489 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 16:06:16 -0500 Subject: [PATCH 176/294] 5th times a charm --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10bf08260..81d52e881 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,9 +48,9 @@ jobs: ls -la jdk-17.0.10.jdk/Contents/Home; ls -la jdk-17.0.10.jdk/Contents/MacOS; ls -la jdk-17.0.10.jdk/Contents/Home/bin; -# export PATH=${PWD}/jdk-17.0.10.jdk/bin:$PATH; -# echo $PATH; -# java; + export PATH=${PWD}/jdk-17.0.10.jdk/Contents/Home/bin:$PATH; + echo $PATH; + java; # which java; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; From dfad07269c3e788215c30d5667035f9bc69cc63c Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 16:07:41 -0500 Subject: [PATCH 177/294] java --version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81d52e881..4a985311c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: ls -la jdk-17.0.10.jdk/Contents/Home/bin; export PATH=${PWD}/jdk-17.0.10.jdk/Contents/Home/bin:$PATH; echo $PATH; - java; + java --version; # which java; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; From 0182d068f50a656ed1d076fc6d6b43415a3506f5 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 16:09:13 -0500 Subject: [PATCH 178/294] Install SQLcl --- .github/workflows/ci.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a985311c..61b8dd612 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,23 +39,14 @@ jobs: wget https://download.oracle.com/java/17/latest/jdk-17_macos-x64_bin.tar.gz; gunzip jdk-17_macos-x64_bin.tar.gz; chmod 777 jdk-17_macos-x64_bin.tar; - ls -la; - tar --help; tar -xf jdk-17_macos-x64_bin.tar; - ls -la; - ls -la jdk-17.0.10.jdk; - ls -la jdk-17.0.10.jdk/Contents; - ls -la jdk-17.0.10.jdk/Contents/Home; - ls -la jdk-17.0.10.jdk/Contents/MacOS; - ls -la jdk-17.0.10.jdk/Contents/Home/bin; export PATH=${PWD}/jdk-17.0.10.jdk/Contents/Home/bin:$PATH; echo $PATH; java --version; -# which java; -# - name: Install Sqlcl -# run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; -# unzip sqlcl-23.3.0.270.1251.zip; -# ./sqlcl/bin/sql -V; + - name: Install Sqlcl + run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; + unzip sqlcl-23.3.0.270.1251.zip; + ./sqlcl/bin/sql -V; concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From a4b3cb1861424592fecc89c0e0ca79f16241f3bd Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 16:11:32 -0500 Subject: [PATCH 179/294] set JAVA_HOME --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61b8dd612..83909b293 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,9 @@ jobs: java --version; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; + echo $JAVA_HOME; + export JAVA_HOME=${PWD}/jdk-17.0.10.jdk/Contents/Home/bin; + echo $JAVA_HOME; unzip sqlcl-23.3.0.270.1251.zip; ./sqlcl/bin/sql -V; concurrency: From 400c0482b3a1be2127d6065332b2b7e87c0f560c Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 16:12:45 -0500 Subject: [PATCH 180/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83909b293..2a4aade75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; echo $JAVA_HOME; - export JAVA_HOME=${PWD}/jdk-17.0.10.jdk/Contents/Home/bin; + export JAVA_HOME=${PWD}/jdk-17.0.10.jdk/Contents/Home; echo $JAVA_HOME; unzip sqlcl-23.3.0.270.1251.zip; ./sqlcl/bin/sql -V; From 390909bdb9b16e6d756deacc51aeb131d61f825a Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 16:15:00 -0500 Subject: [PATCH 181/294] Is Docker preInstalled --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a4aade75..2f42d982b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,8 @@ jobs: echo $JAVA_HOME; unzip sqlcl-23.3.0.270.1251.zip; ./sqlcl/bin/sql -V; + - name: Install Docker + run: docker info; concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From 4b746d90cffaeeb6ee1cc3cec43dfed55a7e3884 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 16:17:25 -0500 Subject: [PATCH 182/294] Really install Docker --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f42d982b..a3da179af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,9 @@ jobs: unzip sqlcl-23.3.0.270.1251.zip; ./sqlcl/bin/sql -V; - name: Install Docker - run: docker info; + run: brew install --cask docker; + open /Applications/Docker.app; + docker info; concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From e2e6a3a4d19f7043734d526c4dc855a839f5f1fb Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 16:21:36 -0500 Subject: [PATCH 183/294] Update ci.yml --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3da179af..4feee1a29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,8 +52,9 @@ jobs: ./sqlcl/bin/sql -V; - name: Install Docker run: brew install --cask docker; - open /Applications/Docker.app; docker info; +# open /Applications/Docker.app; +# docker info; concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From c50b5de21ae0e94a905e09bc1cda4f1b302e7459 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 16:26:28 -0500 Subject: [PATCH 184/294] Start Docker --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4feee1a29..73c047dca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,7 @@ jobs: ./sqlcl/bin/sql -V; - name: Install Docker run: brew install --cask docker; + open -a docker && while ! docker info > /dev/null 2>&1; do sleep 1 ; done docker info; # open /Applications/Docker.app; # docker info; From 0ff7ce73d5821b6c5ff2629b75783384daf96d2f Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 16:31:17 -0500 Subject: [PATCH 185/294] Another docker install method --- .github/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73c047dca..fb961b744 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,9 +51,11 @@ jobs: unzip sqlcl-23.3.0.270.1251.zip; ./sqlcl/bin/sql -V; - name: Install Docker - run: brew install --cask docker; - open -a docker && while ! docker info > /dev/null 2>&1; do sleep 1 ; done - docker info; + run: brew install docker; + colima start; +# brew install --cask docker; +# open -a docker && while ! docker info > /dev/null 2>&1; do sleep 1 ; done +# docker info; # open /Applications/Docker.app; # docker info; concurrency: From 193558a1e1410b2d35262814e8e2f036532b8a7d Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 16:35:09 -0500 Subject: [PATCH 186/294] docker info --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb961b744..7a580f2b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,6 +53,7 @@ jobs: - name: Install Docker run: brew install docker; colima start; + docker info; # brew install --cask docker; # open -a docker && while ! docker info > /dev/null 2>&1; do sleep 1 ; done # docker info; From a003a2e6cae219bf465d3b29c2ad5bc1784e0910 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 16:42:55 -0500 Subject: [PATCH 187/294] Run Free23c --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a580f2b2..9c47e2e97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,6 +54,14 @@ jobs: run: brew install docker; colima start; docker info; + - name: Run Free23c + run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; + docker ps -a; + docker info; + - name: Wait for container + run: sleep 120; + docker ps -a; +# ./sqlcl/bin/sql -V; # brew install --cask docker; # open -a docker && while ! docker info > /dev/null 2>&1; do sleep 1 ; done # docker info; From 52a2c953ae75250bee1f41b3a8d40c62bb6ce568 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 15 Feb 2024 17:18:58 -0500 Subject: [PATCH 188/294] Its slow as --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c47e2e97..6873f7abb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: docker ps -a; docker info; - name: Wait for container - run: sleep 120; + run: sleep 300; docker ps -a; # ./sqlcl/bin/sql -V; # brew install --cask docker; From 197ed24a44292e759e0441418039ec82651955d7 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 16 Feb 2024 09:24:22 -0500 Subject: [PATCH 189/294] Back to Ubuntu image --- .github/workflows/ci.yml | 104 +++++++++++++++++++++++++++++---------- 1 file changed, 78 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6873f7abb..126da59d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: run-parse-server-ci: name: CI of Parse Server timeout-minutes: 60 - runs-on: macos-latest + runs-on: ubuntu-latest strategy: matrix: # version: ['5.6.0', '6.3.1'] @@ -33,40 +33,92 @@ jobs: ref: '' path: parse-server/src/Adapters/Storage/Oracle - name: Validate Oracle Dir - run: ls -la parse-server/src/Adapters/Storage/Oracle; - - name: Install Java 11 - run: java -version; - wget https://download.oracle.com/java/17/latest/jdk-17_macos-x64_bin.tar.gz; - gunzip jdk-17_macos-x64_bin.tar.gz; - chmod 777 jdk-17_macos-x64_bin.tar; - tar -xf jdk-17_macos-x64_bin.tar; - export PATH=${PWD}/jdk-17.0.10.jdk/Contents/Home/bin:$PATH; - echo $PATH; - java --version; + run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; - echo $JAVA_HOME; - export JAVA_HOME=${PWD}/jdk-17.0.10.jdk/Contents/Home; - echo $JAVA_HOME; unzip sqlcl-23.3.0.270.1251.zip; ./sqlcl/bin/sql -V; - - name: Install Docker - run: brew install docker; - colima start; - docker info; + - name: Install Instant Client + run: uname -m; + wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; + unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; + ls -la; + ls -la $PWD/instantclient_21_13; + ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; + - name: Install libaio1 + run: sudo apt-get install libaio1; + - name: Checkout OraSepcs + uses: actions/checkout@v2 + with: + repository: ddrechse/parse-server + ref: oraSpecs + path: ora-specs + - name: Validate oraSpecs + run: ls -la ora-specs; + cp -R ./ora-specs/spec ./parse-server; + ls -la parse-server/spec; + - name: Checkout package.json + uses: actions/checkout@v2 + with: + repository: ddrechse/parse-server-database-adapter-template + ref: '' + path: parse-server-database-adapter-template + - name: Move package.json + run: ls; + ls -la parse-server-database-adapter-template; + cp parse-server-database-adapter-template/package.json parse-server; + cp parse-server-database-adapter-template/OracleStorageAdapter.js parse-server/src/Adapters/Storage/Oracle; + cp parse-server-database-adapter-template/OracleCollection.js parse-server/src/Adapters/Storage/Oracle; + ls -la parse-server; + cat parse-server/spec/helper.js - name: Run Free23c run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; docker ps -a; docker info; - name: Wait for container - run: sleep 300; + run: sleep 120; docker ps -a; -# ./sqlcl/bin/sql -V; -# brew install --cask docker; -# open -a docker && while ! docker info > /dev/null 2>&1; do sleep 1 ; done -# docker info; -# open /Applications/Docker.app; -# docker info; + ./sqlcl/bin/sql -V; + - name: Enable SODA in image + run: echo "alter system set pga_aggregate_limit=4G scope=memory;alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; + cat soda; + ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda + - name: Run Tests + run: echo $PWD; + echo "Before setting LIB PATH"; + export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; + echo "This is LD LIBRARY PATH"; + echo $LD_LIBRARY_PATH; + echo "No connection metadata used"; + cd parse-server; + npm install; + npm install --save @parse/fs-files-adapter; + npm install oracledb@6.3.0; + export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; + echo $PARSE_SERVER_DATABASE_ADAPTER; + ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; + mkdir oralogs; +# docker cp free23c: Date: Fri, 16 Feb 2024 09:52:49 -0500 Subject: [PATCH 190/294] Back to BLOB --- OracleCollection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index 1a5747b59..462b79145 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -28,7 +28,7 @@ export default class OracleCollection { // To support backwards compatibility with instant clients const mymetadata = { keyColumn: { name: 'ID', assignmentMethod: 'UUID' }, - contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'JSON' }, + contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'BLOB' }, versionColumn: { name: 'VERSION', method: 'UUID' }, lastModifiedColumn: { name: 'LAST_MODIFIED' }, creationTimeColumn: { name: 'CREATED_ON' }, From 5dcffe9c19d4fb38e76b1f0892e649c093d9c14c Mon Sep 17 00:00:00 2001 From: ddrechse Date: Fri, 16 Feb 2024 10:10:47 -0500 Subject: [PATCH 191/294] Remove log --- OracleCollection.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/OracleCollection.js b/OracleCollection.js index 462b79145..06bcdfa69 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -34,9 +34,6 @@ export default class OracleCollection { creationTimeColumn: { name: 'CREATED_ON' }, }; -// console.log( "Metadata = " + JSON.stringify(mymetadata)); - console.log("No Connection Metadata"); - logger.verbose('getCollectionConnection about to connect for collection ' + this._name); let localConn; this._oracleCollection = await this._oracleStorageAdapter From 0e5e041469a870c59534fd7e88ed5fba0a1a2277 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 16 Feb 2024 10:49:34 -0500 Subject: [PATCH 192/294] Let try ubuntu-20.04 for kicks --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 126da59d0..98070fb2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: run-parse-server-ci: name: CI of Parse Server timeout-minutes: 60 - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: # version: ['5.6.0', '6.3.1'] From 99c612d266dd6a142736b30580e0ef7fac5e996a Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 16 Feb 2024 11:30:54 -0500 Subject: [PATCH 193/294] Go back to ubuntu-latest, earlier version deosn't matter --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98070fb2e..126da59d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: run-parse-server-ci: name: CI of Parse Server timeout-minutes: 60 - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: # version: ['5.6.0', '6.3.1'] From 9bbf7e3b4d9b093286031dd608ce49ecb108902c Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 10:05:06 -0500 Subject: [PATCH 194/294] Kick it --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 126da59d0..b00bf46b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "No connection metadata used"; + echo "Kick it"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 3e6e46d1ae0324bf4bb43cd5e9170552019dcdd6 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 10:16:34 -0500 Subject: [PATCH 195/294] Try Upload Action --- .github/workflows/ci.yml | 173 ++++++++++++++++++++------------------- 1 file changed, 90 insertions(+), 83 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b00bf46b8..7381fab42 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,91 +34,98 @@ jobs: path: parse-server/src/Adapters/Storage/Oracle - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - - name: Install Sqlcl - run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; - unzip sqlcl-23.3.0.270.1251.zip; - ./sqlcl/bin/sql -V; - - name: Install Instant Client - run: uname -m; - wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; - unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; - ls -la; - ls -la $PWD/instantclient_21_13; - ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; - - name: Install libaio1 - run: sudo apt-get install libaio1; - - name: Checkout OraSepcs - uses: actions/checkout@v2 - with: - repository: ddrechse/parse-server - ref: oraSpecs - path: ora-specs - - name: Validate oraSpecs - run: ls -la ora-specs; - cp -R ./ora-specs/spec ./parse-server; - ls -la parse-server/spec; - - name: Checkout package.json - uses: actions/checkout@v2 + - name: Upload 23 Instant Client + uses: actions/upload-artifact@v4 with: - repository: ddrechse/parse-server-database-adapter-template - ref: '' - path: parse-server-database-adapter-template - - name: Move package.json - run: ls; - ls -la parse-server-database-adapter-template; - cp parse-server-database-adapter-template/package.json parse-server; - cp parse-server-database-adapter-template/OracleStorageAdapter.js parse-server/src/Adapters/Storage/Oracle; - cp parse-server-database-adapter-template/OracleCollection.js parse-server/src/Adapters/Storage/Oracle; - ls -la parse-server; - cat parse-server/spec/helper.js - - name: Run Free23c - run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; - docker ps -a; - docker info; - - name: Wait for container - run: sleep 120; - docker ps -a; - ./sqlcl/bin/sql -V; - - name: Enable SODA in image - run: echo "alter system set pga_aggregate_limit=4G scope=memory;alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; - cat soda; - ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - - name: Run Tests - run: echo $PWD; - echo "Before setting LIB PATH"; - export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; - echo "This is LD LIBRARY PATH"; - echo $LD_LIBRARY_PATH; - echo "Kick it"; - cd parse-server; - npm install; - npm install --save @parse/fs-files-adapter; - npm install oracledb@6.3.0; - export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; - echo $PARSE_SERVER_DATABASE_ADAPTER; - ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; - mkdir oralogs; -# docker cp free23c: soda; +# cat soda; +# ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda +# - name: Run Tests +# run: echo $PWD; +# echo "Before setting LIB PATH"; +# export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; +# echo "This is LD LIBRARY PATH"; +# echo $LD_LIBRARY_PATH; +# echo "Kick it"; +# cd parse-server; +# npm install; +# npm install --save @parse/fs-files-adapter; +# npm install oracledb@6.3.0; +# export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; +# echo $PARSE_SERVER_DATABASE_ADAPTER; +# ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; +# mkdir oralogs; +## docker cp free23c: Date: Wed, 21 Feb 2024 10:42:44 -0500 Subject: [PATCH 196/294] Check tests --- .github/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7381fab42..6aedcffaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,10 +35,7 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Upload 23 Instant Client - uses: actions/upload-artifact@v4 - with: - name: instantclient - path: /Users/ddrechse/Downloads/basic + run: wget --no-check-certificate 'https://drive.google.com/file/d/1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh/view?usp=sharing' -O basic.zip; - name: ls run: ls -la; # - name: Install Sqlcl From a9d52d21f4e8e2ff86a42e1caee4bcb2e8e3b2be Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 10:48:24 -0500 Subject: [PATCH 197/294] Update ci.yml --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6aedcffaf..759a1108e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,8 +36,9 @@ jobs: run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Upload 23 Instant Client run: wget --no-check-certificate 'https://drive.google.com/file/d/1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh/view?usp=sharing' -O basic.zip; - - name: ls - run: ls -la; + ls -la; + unzip basic.zip; + ls -la basic; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; # unzip sqlcl-23.3.0.270.1251.zip; From 099a644113239d83b58c340df0cc8988491a44b5 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 10:49:38 -0500 Subject: [PATCH 198/294] One test suite --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 759a1108e..5bd5fb89e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,7 @@ jobs: - name: Upload 23 Instant Client run: wget --no-check-certificate 'https://drive.google.com/file/d/1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh/view?usp=sharing' -O basic.zip; ls -la; + chmod 777 basic.zip; unzip basic.zip; ls -la basic; # - name: Install Sqlcl From cdcb000aced666011c4e7c88f04276542db5fbb4 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 10:52:55 -0500 Subject: [PATCH 199/294] 2 suites From 6d3a5781b4512140493be06983f75beab081c9ce Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 10:59:24 -0500 Subject: [PATCH 200/294] yeah right --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5bd5fb89e..3674e0df4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Upload 23 Instant Client - run: wget --no-check-certificate 'https://drive.google.com/file/d/1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh/view?usp=sharing' -O basic.zip; + run: wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://drive.google.com/file/d/1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh/view?usp=sharing' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O basic.zip && rm -rf /tmp/cookies.txt; ls -la; chmod 777 basic.zip; unzip basic.zip; From 888b6a5f358b7b1ab59b488acd6876ac54f97547 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 11:06:46 -0500 Subject: [PATCH 201/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3674e0df4..73f2e9c97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Upload 23 Instant Client - run: wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://drive.google.com/file/d/1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh/view?usp=sharing' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O basic.zip && rm -rf /tmp/cookies.txt; + run: wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh' -O 'files.zip' ls -la; chmod 777 basic.zip; unzip basic.zip; From ad11224e2ea016d9d6dceaf6cfbf5ca2dc6e3305 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 11:07:47 -0500 Subject: [PATCH 202/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73f2e9c97..b500f1cff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Upload 23 Instant Client - run: wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh' -O 'files.zip' + run: wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh' -O 'files.zip'; ls -la; chmod 777 basic.zip; unzip basic.zip; From 8c947a8a5437a6fccf57cb90c8cf7c78ed3abfb6 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 11:11:46 -0500 Subject: [PATCH 203/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b500f1cff..b3f6729b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Upload 23 Instant Client - run: wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh' -O 'files.zip'; + run: wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh" -O basic.zip && rm -rf /tmp/cookies.txt; ls -la; chmod 777 basic.zip; unzip basic.zip; From 2440dda9a042b883cd6c9ce2f57a965eb952e986 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 11:13:19 -0500 Subject: [PATCH 204/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3f6729b0..dfc1f11a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Upload 23 Instant Client - run: wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh" -O basic.zip && rm -rf /tmp/cookies.txt; + run: wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh" -O basic.zip && rm -rf /tmp/cookies.txt; ls -la; chmod 777 basic.zip; unzip basic.zip; From 1046f0d77db99295be14ad02efb1a67092aeaf10 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 11:18:36 -0500 Subject: [PATCH 205/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfc1f11a1..179a8dcdd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Upload 23 Instant Client - run: wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh" -O basic.zip && rm -rf /tmp/cookies.txt; + run: wget https://drive.google.com/file/d/1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh/view?usp=sharing; ls -la; chmod 777 basic.zip; unzip basic.zip; From a9cc329c67df2b4cb2d8178a7815b4f306ea2177 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 11:22:29 -0500 Subject: [PATCH 206/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 179a8dcdd..4586dc482 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Upload 23 Instant Client - run: wget https://drive.google.com/file/d/1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh/view?usp=sharing; + run: wget -O basic.zip --no-check-certificate -r ''https://drive.google.com/uc?export=download&id=1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh'; ls -la; chmod 777 basic.zip; unzip basic.zip; From 0536fed8df42fab854411b8cbd1da637b9d0d18b Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 11:23:12 -0500 Subject: [PATCH 207/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4586dc482..093def103 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Upload 23 Instant Client - run: wget -O basic.zip --no-check-certificate -r ''https://drive.google.com/uc?export=download&id=1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh'; + run: wget -O basic.zip --no-check-certificate -r 'https://drive.google.com/uc?export=download&id=1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh'; ls -la; chmod 777 basic.zip; unzip basic.zip; From 7a7588c412e3086cc629e6c028ea6dc1326e49ee Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 11:24:39 -0500 Subject: [PATCH 208/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 093def103..2bbe1f344 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Upload 23 Instant Client - run: wget -O basic.zip --no-check-certificate -r 'https://drive.google.com/uc?export=download&id=1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh'; + run: wget -O basic.zip --no-check-certificate -r 'https://drive.google.com/file/d/1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh/view?usp=drive_link'; ls -la; chmod 777 basic.zip; unzip basic.zip; From 395286508cabb0b1eca0db9ae9d05847b55ac394 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 11:35:17 -0500 Subject: [PATCH 209/294] Update ci.yml --- .github/workflows/ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bbe1f344..6ec2d778b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,11 +35,7 @@ jobs: - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Upload 23 Instant Client - run: wget -O basic.zip --no-check-certificate -r 'https://drive.google.com/file/d/1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh/view?usp=drive_link'; - ls -la; - chmod 777 basic.zip; - unzip basic.zip; - ls -la basic; + run: pip install gdown; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; # unzip sqlcl-23.3.0.270.1251.zip; From b34a01035395fab4a9bb19336414037d71dfe6df Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 11:36:38 -0500 Subject: [PATCH 210/294] Update ci.yml --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ec2d778b..32ecde195 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,8 @@ jobs: run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Upload 23 Instant Client run: pip install gdown; + gdown --id 1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh; + ls -la; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; # unzip sqlcl-23.3.0.270.1251.zip; From 6e6db70c5ec924b29894848a18da19a5b0ea4db3 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 11:38:02 -0500 Subject: [PATCH 211/294] Update ci.yml --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32ecde195..322fbe002 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,10 @@ jobs: run: pip install gdown; gdown --id 1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh; ls -la; + chmod 777 basic.zip; + unzip basic.zip; + ls -la; + ls -la basic; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; # unzip sqlcl-23.3.0.270.1251.zip; From 4d83971dbd9be483c994d46b9e90b6f32f76d461 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 11:39:08 -0500 Subject: [PATCH 212/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 322fbe002..055eef781 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: chmod 777 basic.zip; unzip basic.zip; ls -la; - ls -la basic; + ls -la instantclient_23_4; # - name: Install Sqlcl # run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; # unzip sqlcl-23.3.0.270.1251.zip; From 700a8f3599d28bc02ae0eacd0c23c671c3dac443 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 11:46:42 -0500 Subject: [PATCH 213/294] Go Time --- .github/workflows/ci.yml | 154 +++++++++++++++++++-------------------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 055eef781..ffbc71a21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,10 +42,10 @@ jobs: unzip basic.zip; ls -la; ls -la instantclient_23_4; -# - name: Install Sqlcl -# run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; -# unzip sqlcl-23.3.0.270.1251.zip; -# ./sqlcl/bin/sql -V; + - name: Install Sqlcl + run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; + unzip sqlcl-23.3.0.270.1251.zip; + ./sqlcl/bin/sql -V; # - name: Install Instant Client # run: uname -m; # wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; @@ -53,80 +53,80 @@ jobs: # ls -la; # ls -la $PWD/instantclient_21_13; # ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; -# - name: Install libaio1 -# run: sudo apt-get install libaio1; -# - name: Checkout OraSepcs -# uses: actions/checkout@v2 -# with: -# repository: ddrechse/parse-server -# ref: oraSpecs -# path: ora-specs -# - name: Validate oraSpecs -# run: ls -la ora-specs; -# cp -R ./ora-specs/spec ./parse-server; -# ls -la parse-server/spec; -# - name: Checkout package.json -# uses: actions/checkout@v2 -# with: -# repository: ddrechse/parse-server-database-adapter-template -# ref: '' -# path: parse-server-database-adapter-template -# - name: Move package.json -# run: ls; -# ls -la parse-server-database-adapter-template; -# cp parse-server-database-adapter-template/package.json parse-server; -# cp parse-server-database-adapter-template/OracleStorageAdapter.js parse-server/src/Adapters/Storage/Oracle; -# cp parse-server-database-adapter-template/OracleCollection.js parse-server/src/Adapters/Storage/Oracle; -# ls -la parse-server; -# cat parse-server/spec/helper.js -# - name: Run Free23c -# run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; -# docker ps -a; -# docker info; -# - name: Wait for container -# run: sleep 120; -# docker ps -a; -# ./sqlcl/bin/sql -V; -# - name: Enable SODA in image -# run: echo "alter system set pga_aggregate_limit=4G scope=memory;alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; -# cat soda; -# ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda -# - name: Run Tests -# run: echo $PWD; -# echo "Before setting LIB PATH"; -# export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; -# echo "This is LD LIBRARY PATH"; -# echo $LD_LIBRARY_PATH; -# echo "Kick it"; -# cd parse-server; -# npm install; -# npm install --save @parse/fs-files-adapter; -# npm install oracledb@6.3.0; -# export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; -# echo $PARSE_SERVER_DATABASE_ADAPTER; -# ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; -# mkdir oralogs; -## docker cp free23c: soda; + cat soda; + ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda + - name: Run Tests + run: echo $PWD; + echo "Before setting LIB PATH"; + export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; + echo "This is LD LIBRARY PATH"; + echo $LD_LIBRARY_PATH; + echo "Kick it"; + cd parse-server; + npm install; + npm install --save @parse/fs-files-adapter; + npm install oracledb@6.3.0; + export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; + echo $PARSE_SERVER_DATABASE_ADAPTER; + ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; + mkdir oralogs; +# docker cp free23c: Date: Wed, 21 Feb 2024 11:55:07 -0500 Subject: [PATCH 214/294] set JSONTYPE to JSON --- OracleCollection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index 06bcdfa69..ea083ccb7 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -28,7 +28,7 @@ export default class OracleCollection { // To support backwards compatibility with instant clients const mymetadata = { keyColumn: { name: 'ID', assignmentMethod: 'UUID' }, - contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'BLOB' }, + contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'JSON' }, versionColumn: { name: 'VERSION', method: 'UUID' }, lastModifiedColumn: { name: 'LAST_MODIFIED' }, creationTimeColumn: { name: 'CREATED_ON' }, From 8d86c672b409c483de099ddd5747e673ef67823d Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 11:57:05 -0500 Subject: [PATCH 215/294] JSONTYPE = JSON --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffbc71a21..a2d5eeb3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,6 +77,7 @@ jobs: cp parse-server-database-adapter-template/package.json parse-server; cp parse-server-database-adapter-template/OracleStorageAdapter.js parse-server/src/Adapters/Storage/Oracle; cp parse-server-database-adapter-template/OracleCollection.js parse-server/src/Adapters/Storage/Oracle; + cat parse-server/src/Adapters/Storage/Oracle/OracleCollection.js; ls -la parse-server; cat parse-server/spec/helper.js - name: Run Free23c From e83f9c6329b124c3838a7bb0d98cf3ae75907a95 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Wed, 21 Feb 2024 12:24:46 -0500 Subject: [PATCH 216/294] Remove maxLength --- OracleStorageAdapter.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OracleStorageAdapter.js b/OracleStorageAdapter.js index 453afc5e1..c00ea524d 100644 --- a/OracleStorageAdapter.js +++ b/OracleStorageAdapter.js @@ -923,13 +923,13 @@ export class OracleStorageAdapter implements StorageAdapter { // TODO: This code made maxLength = 1 which caused all kinds of breakage // Determine the better way to do this but for now, default to 2000 which is what the JSON console did // const maxLength = indexCreationRequest[Object.keys(indexCreationRequest)[0]]; - const maxLength = 2000; +// const maxLength = 2000; const indexRequest = { name: fieldName, fields: [ { path: fieldName, - maxlength: maxLength, +// maxlength: maxLength, }, ], unique: true, @@ -964,13 +964,13 @@ export class OracleStorageAdapter implements StorageAdapter { // TODO: This code made maxLength = 1 which caused all kinds of breakage // Determine the better way to do this but for now, default to 2000 which is what the JSON console did // const maxLength = indexCreationRequest[Object.keys(indexCreationRequest)[0]]; - const maxLength = 2000; +// const maxLength = 2000; const indexRequest = { name: fieldName, fields: [ { path: fieldName, - maxlength: maxLength, +// maxlength: maxLength, }, ], unique: true, From 485e2adafea49fb465b3f9915a16f75a800cd4ad Mon Sep 17 00:00:00 2001 From: ddrechse Date: Wed, 21 Feb 2024 12:53:55 -0500 Subject: [PATCH 217/294] Log CreateIndex spec --- OracleCollection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index ea083ccb7..e176c4b13 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1277,7 +1277,7 @@ export default class OracleCollection { async _createIndex(indexSpec) { let localConn = null; - + console.log('_createIndex index spec is ' + JSON.stringify(indexSpec)); logger.verbose('_createIndex index spec is ' + JSON.stringify(indexSpec)); return await this.getCollectionConnection() .then(async conn => { From 44d538d1cb11b63facdd13147214d3d8d9c5d317 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Wed, 21 Feb 2024 13:17:27 -0500 Subject: [PATCH 218/294] Log handleError --- OracleStorageAdapter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/OracleStorageAdapter.js b/OracleStorageAdapter.js index c00ea524d..14faee1a6 100644 --- a/OracleStorageAdapter.js +++ b/OracleStorageAdapter.js @@ -349,6 +349,7 @@ export class OracleStorageAdapter implements StorageAdapter { // logger.error('Received unauthorized error', { error: error }); // } logger.error('in handleError with error =' + error); + console.log('in handleError with error =' + error); // What to throw? Maybe need to map ORA msgs to Parse msgs // throw error.message; throw error; From ec7687a58223069f0205976473858b3e3c9ad5c7 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Wed, 21 Feb 2024 13:57:28 -0500 Subject: [PATCH 219/294] add trace --- OracleStorageAdapter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/OracleStorageAdapter.js b/OracleStorageAdapter.js index 14faee1a6..3b572d052 100644 --- a/OracleStorageAdapter.js +++ b/OracleStorageAdapter.js @@ -350,6 +350,7 @@ export class OracleStorageAdapter implements StorageAdapter { // } logger.error('in handleError with error =' + error); console.log('in handleError with error =' + error); + console.trace(); // What to throw? Maybe need to map ORA msgs to Parse msgs // throw error.message; throw error; From bf58efb5235f0fb5878ad22f779a719001b40f70 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Wed, 21 Feb 2024 14:15:32 -0500 Subject: [PATCH 220/294] Use new truncate --- OracleCollection.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index e176c4b13..77e68ca35 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1234,10 +1234,12 @@ export default class OracleCollection { // Error: DPI-1050: Oracle Client library is at version 19.8 but version 20.1 or higher is needed // for now, do it the old fashioned way with collection.find.remove let localConn = null; + console.log('Truncate collection ' + this._name); return this.getCollectionConnection() .then(conn => { localConn = conn; - return this._oracleCollection.find().remove(); + return this._oracleCollection.truncate(); +// return this._oracleCollection.find().remove(); }) .finally(() => { if (localConn) { From aeb67dfac3bda3d672e5e8a7f1dd7d7a3b12652c Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 14:26:20 -0500 Subject: [PATCH 221/294] Kick It --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2d5eeb3f..b845c4b28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Kick it"; + echo "Fix Truncate"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 276bc5609ae33ba70ad1326885b1fb007c78eb9b Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 15:07:34 -0500 Subject: [PATCH 222/294] All Specs --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b845c4b28..512f1887d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Fix Truncate"; + echo "All Specs"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From aea0cf42c5be5a04a354de5de17cf525453e8bd2 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 21 Feb 2024 16:20:22 -0500 Subject: [PATCH 223/294] Audience Router --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 512f1887d..0e88f2dc0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "All Specs"; + echo "Audience Router"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 982aba612ea2591ded911f22b427805821f3a65d Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 22 Feb 2024 08:39:25 -0500 Subject: [PATCH 224/294] Original set of tests for segv --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e88f2dc0..ecfb3b3e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,7 +71,7 @@ jobs: repository: ddrechse/parse-server-database-adapter-template ref: '' path: parse-server-database-adapter-template - - name: Move package.json + - name: Move package.json, OracleStorageAdapter and OracleCollection run: ls; ls -la parse-server-database-adapter-template; cp parse-server-database-adapter-template/package.json parse-server; From 006a1808b028c2b3df524062beae026874686bcd Mon Sep 17 00:00:00 2001 From: ddrechse Date: Thu, 22 Feb 2024 09:49:53 -0500 Subject: [PATCH 225/294] BLOB Type --- OracleCollection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index 77e68ca35..2729b6323 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -28,7 +28,7 @@ export default class OracleCollection { // To support backwards compatibility with instant clients const mymetadata = { keyColumn: { name: 'ID', assignmentMethod: 'UUID' }, - contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'JSON' }, + contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'BLOB' }, versionColumn: { name: 'VERSION', method: 'UUID' }, lastModifiedColumn: { name: 'LAST_MODIFIED' }, creationTimeColumn: { name: 'CREATED_ON' }, From 9549b9afacac72128cc4d6a77276cc00deaf1873 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Thu, 22 Feb 2024 10:05:06 -0500 Subject: [PATCH 226/294] Remove diagnostic logging --- OracleCollection.js | 4 ++-- OracleStorageAdapter.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OracleCollection.js b/OracleCollection.js index 2729b6323..e6bae247d 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1234,7 +1234,7 @@ export default class OracleCollection { // Error: DPI-1050: Oracle Client library is at version 19.8 but version 20.1 or higher is needed // for now, do it the old fashioned way with collection.find.remove let localConn = null; - console.log('Truncate collection ' + this._name); +// console.log('Truncate collection ' + this._name); return this.getCollectionConnection() .then(conn => { localConn = conn; @@ -1279,7 +1279,7 @@ export default class OracleCollection { async _createIndex(indexSpec) { let localConn = null; - console.log('_createIndex index spec is ' + JSON.stringify(indexSpec)); +// console.log('_createIndex index spec is ' + JSON.stringify(indexSpec)); logger.verbose('_createIndex index spec is ' + JSON.stringify(indexSpec)); return await this.getCollectionConnection() .then(async conn => { diff --git a/OracleStorageAdapter.js b/OracleStorageAdapter.js index 3b572d052..7a2a0b651 100644 --- a/OracleStorageAdapter.js +++ b/OracleStorageAdapter.js @@ -349,8 +349,8 @@ export class OracleStorageAdapter implements StorageAdapter { // logger.error('Received unauthorized error', { error: error }); // } logger.error('in handleError with error =' + error); - console.log('in handleError with error =' + error); - console.trace(); +// console.log('in handleError with error =' + error); +// console.trace(); // What to throw? Maybe need to map ORA msgs to Parse msgs // throw error.message; throw error; From 3b754c947fbf2a3f0f899cd1f68359a68d8fecd5 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 22 Feb 2024 10:28:54 -0500 Subject: [PATCH 227/294] SEGV for BLOB? --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ecfb3b3e7..b34a56243 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Audience Router"; + echo "SEGV"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 28b3a4ab50edb00bee5be9472943d3af8428e0d7 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Thu, 22 Feb 2024 11:05:10 -0500 Subject: [PATCH 228/294] All the way back line 19.22 but w 23.4 --- OracleCollection.js | 4 ++-- OracleStorageAdapter.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OracleCollection.js b/OracleCollection.js index e6bae247d..8c2de170d 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1238,8 +1238,8 @@ export default class OracleCollection { return this.getCollectionConnection() .then(conn => { localConn = conn; - return this._oracleCollection.truncate(); -// return this._oracleCollection.find().remove(); +// return this._oracleCollection.truncate(); + return this._oracleCollection.find().remove(); }) .finally(() => { if (localConn) { diff --git a/OracleStorageAdapter.js b/OracleStorageAdapter.js index 7a2a0b651..7cfdbcb9b 100644 --- a/OracleStorageAdapter.js +++ b/OracleStorageAdapter.js @@ -925,13 +925,13 @@ export class OracleStorageAdapter implements StorageAdapter { // TODO: This code made maxLength = 1 which caused all kinds of breakage // Determine the better way to do this but for now, default to 2000 which is what the JSON console did // const maxLength = indexCreationRequest[Object.keys(indexCreationRequest)[0]]; -// const maxLength = 2000; + const maxLength = 2000; const indexRequest = { name: fieldName, fields: [ { path: fieldName, -// maxlength: maxLength, + maxlength: maxLength, }, ], unique: true, @@ -966,13 +966,13 @@ export class OracleStorageAdapter implements StorageAdapter { // TODO: This code made maxLength = 1 which caused all kinds of breakage // Determine the better way to do this but for now, default to 2000 which is what the JSON console did // const maxLength = indexCreationRequest[Object.keys(indexCreationRequest)[0]]; -// const maxLength = 2000; + const maxLength = 2000; const indexRequest = { name: fieldName, fields: [ { path: fieldName, -// maxlength: maxLength, + maxlength: maxLength, }, ], unique: true, From 7b7fc9ef37eb9d00474085c82571a6049ba82236 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Thu, 22 Feb 2024 11:33:11 -0500 Subject: [PATCH 229/294] set type to JSON --- OracleCollection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index 8c2de170d..8496cd75f 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -28,7 +28,7 @@ export default class OracleCollection { // To support backwards compatibility with instant clients const mymetadata = { keyColumn: { name: 'ID', assignmentMethod: 'UUID' }, - contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'BLOB' }, + contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'JSON' }, versionColumn: { name: 'VERSION', method: 'UUID' }, lastModifiedColumn: { name: 'LAST_MODIFIED' }, creationTimeColumn: { name: 'CREATED_ON' }, From 57b2629ee7556153d087c442a3a055772a21f218 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Thu, 22 Feb 2024 11:50:33 -0500 Subject: [PATCH 230/294] Log createIndex spec --- OracleCollection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index 8496cd75f..358e94d7c 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1279,7 +1279,7 @@ export default class OracleCollection { async _createIndex(indexSpec) { let localConn = null; -// console.log('_createIndex index spec is ' + JSON.stringify(indexSpec)); + console.log('_createIndex index spec is ' + JSON.stringify(indexSpec)); logger.verbose('_createIndex index spec is ' + JSON.stringify(indexSpec)); return await this.getCollectionConnection() .then(async conn => { From 0b13f75f7158af386eaec324d0113976e2f20f9e Mon Sep 17 00:00:00 2001 From: ddrechse Date: Thu, 22 Feb 2024 12:06:13 -0500 Subject: [PATCH 231/294] remove maxLength --- OracleStorageAdapter.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OracleStorageAdapter.js b/OracleStorageAdapter.js index 7cfdbcb9b..7a2a0b651 100644 --- a/OracleStorageAdapter.js +++ b/OracleStorageAdapter.js @@ -925,13 +925,13 @@ export class OracleStorageAdapter implements StorageAdapter { // TODO: This code made maxLength = 1 which caused all kinds of breakage // Determine the better way to do this but for now, default to 2000 which is what the JSON console did // const maxLength = indexCreationRequest[Object.keys(indexCreationRequest)[0]]; - const maxLength = 2000; +// const maxLength = 2000; const indexRequest = { name: fieldName, fields: [ { path: fieldName, - maxlength: maxLength, +// maxlength: maxLength, }, ], unique: true, @@ -966,13 +966,13 @@ export class OracleStorageAdapter implements StorageAdapter { // TODO: This code made maxLength = 1 which caused all kinds of breakage // Determine the better way to do this but for now, default to 2000 which is what the JSON console did // const maxLength = indexCreationRequest[Object.keys(indexCreationRequest)[0]]; - const maxLength = 2000; +// const maxLength = 2000; const indexRequest = { name: fieldName, fields: [ { path: fieldName, - maxlength: maxLength, +// maxlength: maxLength, }, ], unique: true, From e8258c14a95ebca77e04dd55bd7c478a1dbcec3d Mon Sep 17 00:00:00 2001 From: ddrechse Date: Thu, 22 Feb 2024 12:09:19 -0500 Subject: [PATCH 232/294] Removed maxlength and set to BLOB --- OracleCollection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index 358e94d7c..d07bfc2c4 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -28,7 +28,7 @@ export default class OracleCollection { // To support backwards compatibility with instant clients const mymetadata = { keyColumn: { name: 'ID', assignmentMethod: 'UUID' }, - contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'JSON' }, + contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'BLOB' }, versionColumn: { name: 'VERSION', method: 'UUID' }, lastModifiedColumn: { name: 'LAST_MODIFIED' }, creationTimeColumn: { name: 'CREATED_ON' }, From dce1cc40918e8970d6005a0ab2bac44149b27935 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Thu, 22 Feb 2024 12:31:03 -0500 Subject: [PATCH 233/294] Set type back to JSON with MaxLength fix --- OracleCollection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index d07bfc2c4..358e94d7c 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -28,7 +28,7 @@ export default class OracleCollection { // To support backwards compatibility with instant clients const mymetadata = { keyColumn: { name: 'ID', assignmentMethod: 'UUID' }, - contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'BLOB' }, + contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'JSON' }, versionColumn: { name: 'VERSION', method: 'UUID' }, lastModifiedColumn: { name: 'LAST_MODIFIED' }, creationTimeColumn: { name: 'CREATED_ON' }, From 0a5c1cb207f9f168335c600c44af470e7af7f8b5 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Thu, 22 Feb 2024 13:08:38 -0500 Subject: [PATCH 234/294] turn logging off --- OracleCollection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index 358e94d7c..8496cd75f 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1279,7 +1279,7 @@ export default class OracleCollection { async _createIndex(indexSpec) { let localConn = null; - console.log('_createIndex index spec is ' + JSON.stringify(indexSpec)); +// console.log('_createIndex index spec is ' + JSON.stringify(indexSpec)); logger.verbose('_createIndex index spec is ' + JSON.stringify(indexSpec)); return await this.getCollectionConnection() .then(async conn => { From 9efb50cf944122f0181f788583c115e24e96c35e Mon Sep 17 00:00:00 2001 From: ddrechse Date: Thu, 22 Feb 2024 13:27:07 -0500 Subject: [PATCH 235/294] use truncate and JSON --- OracleCollection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OracleCollection.js b/OracleCollection.js index 8496cd75f..43e3d48bc 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1238,8 +1238,8 @@ export default class OracleCollection { return this.getCollectionConnection() .then(conn => { localConn = conn; -// return this._oracleCollection.truncate(); - return this._oracleCollection.find().remove(); + return this._oracleCollection.truncate(); +// return this._oracleCollection.find().remove(); }) .finally(() => { if (localConn) { From 50fa503dbc06bc7a38f2aeaaea379769dad9235d Mon Sep 17 00:00:00 2001 From: ddrechse Date: Thu, 22 Feb 2024 13:40:08 -0500 Subject: [PATCH 236/294] BLOB with 23c truncate --- OracleCollection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index 43e3d48bc..5c3cf223a 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -28,7 +28,7 @@ export default class OracleCollection { // To support backwards compatibility with instant clients const mymetadata = { keyColumn: { name: 'ID', assignmentMethod: 'UUID' }, - contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'JSON' }, + contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'BLOB' }, versionColumn: { name: 'VERSION', method: 'UUID' }, lastModifiedColumn: { name: 'LAST_MODIFIED' }, creationTimeColumn: { name: 'CREATED_ON' }, From 0e7900fff2a7e15ce2f198f66924cdabc93420b5 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Thu, 22 Feb 2024 15:02:28 -0500 Subject: [PATCH 237/294] set type to JSON --- OracleCollection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index 5c3cf223a..43e3d48bc 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -28,7 +28,7 @@ export default class OracleCollection { // To support backwards compatibility with instant clients const mymetadata = { keyColumn: { name: 'ID', assignmentMethod: 'UUID' }, - contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'BLOB' }, + contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'JSON' }, versionColumn: { name: 'VERSION', method: 'UUID' }, lastModifiedColumn: { name: 'LAST_MODIFIED' }, creationTimeColumn: { name: 'CREATED_ON' }, From 8eba658bb4255df2d489a7a34e0cc7c5ea803f0c Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 22 Feb 2024 16:31:00 -0500 Subject: [PATCH 238/294] Commented out all failed tests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b34a56243..714687e8c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "SEGV"; + echo "Commented out all failed tests"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 8da69603e994c1edd9bbb4b21fb59f8fad8c6bda Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 23 Feb 2024 09:19:10 -0500 Subject: [PATCH 239/294] Commented out validation failed tests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 714687e8c..61beb118e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Commented out all failed tests"; + echo "Commented out Validation failed tests"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From fe28a028c4adc62e7be6934ea1068808c087aabd Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 23 Feb 2024 09:53:20 -0500 Subject: [PATCH 240/294] Debug indexing --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61beb118e..890ccdf6e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Commented out Validation failed tests"; + echo "Debug indexing"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From fe5f674f11731327dfe6ae76079b24e65ba8683d Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 23 Feb 2024 10:07:46 -0500 Subject: [PATCH 241/294] Turn on Verbose --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 890ccdf6e..d5e9b05da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,6 +103,7 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.3.0; + export PARSE_SERVER_LOG_LEVEL=verbose; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; From 80e3f8dd4819facd1fba09d51f2290de32510315 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Fri, 23 Feb 2024 10:23:25 -0500 Subject: [PATCH 242/294] remove last maxLength --- OracleStorageAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleStorageAdapter.js b/OracleStorageAdapter.js index 7a2a0b651..0ad03e9b0 100644 --- a/OracleStorageAdapter.js +++ b/OracleStorageAdapter.js @@ -1126,7 +1126,7 @@ export class OracleStorageAdapter implements StorageAdapter { Object.keys(index).forEach(key => { paths.push({ path: key, - maxlength: 2000, +// maxlength: 2000, }); }); return paths; From 8bc4cfaf68a970f3ce242f57e39e270e8a40cd28 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 23 Feb 2024 10:40:56 -0500 Subject: [PATCH 243/294] All schema tests on --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5e9b05da..8ad66495b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Debug indexing"; + echo "All Schema tests on"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From a2425627bd58d61f08c1630cd891540224de8b58 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 23 Feb 2024 10:48:29 -0500 Subject: [PATCH 244/294] Turn verbose off --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ad66495b..df7cb7ae5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,7 +103,6 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.3.0; - export PARSE_SERVER_LOG_LEVEL=verbose; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; From 8b9dfcfe9bae081f654e1b2d6efa241ca43de489 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 23 Feb 2024 10:59:30 -0500 Subject: [PATCH 245/294] Run all test suites --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df7cb7ae5..dafcb5ef4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "All Schema tests on"; + echo "Run all test suites"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From bf529a9113ef9868b97b25f2c372415ac2ede977 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 23 Feb 2024 11:33:41 -0500 Subject: [PATCH 246/294] Disable 2 test failures --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dafcb5ef4..b6e50265c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Run all test suites"; + echo "disable 2 test failures"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 1adf86d0fa2dad03288a3b4d80ae274c16e55d4f Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 23 Feb 2024 12:05:23 -0500 Subject: [PATCH 247/294] ParseQuery tests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6e50265c..9beb3b7af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "disable 2 test failures"; + echo "ParseQuery"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 1911d017132d067fecb5e6fbeb2c613242229c13 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 23 Feb 2024 12:17:13 -0500 Subject: [PATCH 248/294] Turn verbose on --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9beb3b7af..8bccd8e35 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,6 +103,7 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.3.0; + export PARSE_SERVER_LOG_LEVEL=verbose; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; From 0c24b29485877277a2ad2d9ea555db5be47b5307 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 23 Feb 2024 12:43:28 -0500 Subject: [PATCH 249/294] Kick It --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8bccd8e35..d8be33e51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "ParseQuery"; + echo "Kick It"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 981c2dc34c18820119ee4aa243226b7058c0484d Mon Sep 17 00:00:00 2001 From: ddrechse Date: Fri, 23 Feb 2024 14:13:44 -0500 Subject: [PATCH 250/294] Add insertOne logging --- OracleCollection.js | 4 ++++ OracleStorageAdapter.js | 2 ++ 2 files changed, 6 insertions(+) diff --git a/OracleCollection.js b/OracleCollection.js index 43e3d48bc..863259548 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1186,11 +1186,15 @@ export default class OracleCollection { async insertOne(object) { let localConn = null; try { + console.log('CDD Collection insertOne before getConnection'); localConn = await this.getCollectionConnection(); + console.log('CDD Collection got connection calling insertOne for object ' + JSON.stringify(object)); await this._oracleCollection.insertOne(object); + console.log('CDD Collection insertOne returned successfully'); return object; } catch (error) { logger.error('error during insertOne = ' + error); + console.log('CDD error during insertOne = ' + error); throw error; } finally { if (localConn) { diff --git a/OracleStorageAdapter.js b/OracleStorageAdapter.js index 0ad03e9b0..0c5988579 100644 --- a/OracleStorageAdapter.js +++ b/OracleStorageAdapter.js @@ -496,7 +496,9 @@ export class OracleStorageAdapter implements StorageAdapter { schema = convertParseSchemaToOracleSchema(schema); const oracleObject = parseObjectToOracleObjectForCreate(className, object, schema); const collection = this._adaptiveCollection(className); + console.log("CDD StorageAdapter create Object calling insert One for className + " + className); const result = await collection.insertOne(oracleObject, transactionalSession); + console.log('CDD StorageAdapter createObject insertOne returns: ' + JSON.stringify(result)); logger.verbose('StorageAdapter createObject insertOne returns: ' + result); return { ops: [oracleObject] }; } catch (error) { From d874edae438db37f6942a426b90afd4505c4df80 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 23 Feb 2024 14:28:06 -0500 Subject: [PATCH 251/294] Turn verbose off --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8be33e51..55b81b50d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,7 +103,6 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.3.0; - export PARSE_SERVER_LOG_LEVEL=verbose; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; From 6e21de012c34691bde692724a6d5795ffc72e4b1 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Fri, 23 Feb 2024 15:00:25 -0500 Subject: [PATCH 252/294] Up Min Connections --- OracleCollection.js | 8 ++++---- OracleStorageAdapter.js | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/OracleCollection.js b/OracleCollection.js index 863259548..a06fd5ba3 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1186,15 +1186,15 @@ export default class OracleCollection { async insertOne(object) { let localConn = null; try { - console.log('CDD Collection insertOne before getConnection'); +// console.log('CDD Collection insertOne before getConnection'); localConn = await this.getCollectionConnection(); - console.log('CDD Collection got connection calling insertOne for object ' + JSON.stringify(object)); +// console.log('CDD Collection got connection calling insertOne for object ' + JSON.stringify(object)); await this._oracleCollection.insertOne(object); - console.log('CDD Collection insertOne returned successfully'); +// console.log('CDD Collection insertOne returned successfully'); return object; } catch (error) { logger.error('error during insertOne = ' + error); - console.log('CDD error during insertOne = ' + error); +// console.log('CDD error during insertOne = ' + error); throw error; } finally { if (localConn) { diff --git a/OracleStorageAdapter.js b/OracleStorageAdapter.js index 0c5988579..87f4b2751 100644 --- a/OracleStorageAdapter.js +++ b/OracleStorageAdapter.js @@ -304,7 +304,7 @@ export class OracleStorageAdapter implements StorageAdapter { connectString: tnsname, poolIncrement: 5, poolMax: 100, - poolMin: 3, + poolMin: 25, poolTimeout: 10, // Use default of 60000 ms // queueTimeout: 10, @@ -496,9 +496,9 @@ export class OracleStorageAdapter implements StorageAdapter { schema = convertParseSchemaToOracleSchema(schema); const oracleObject = parseObjectToOracleObjectForCreate(className, object, schema); const collection = this._adaptiveCollection(className); - console.log("CDD StorageAdapter create Object calling insert One for className + " + className); +// console.log("CDD StorageAdapter create Object calling insert One for className + " + className); const result = await collection.insertOne(oracleObject, transactionalSession); - console.log('CDD StorageAdapter createObject insertOne returns: ' + JSON.stringify(result)); +// console.log('CDD StorageAdapter createObject insertOne returns: ' + JSON.stringify(result)); logger.verbose('StorageAdapter createObject insertOne returns: ' + result); return { ops: [oracleObject] }; } catch (error) { From 0cf383534a3a701b445a757157a0bfae5d6b8688 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Fri, 23 Feb 2024 15:12:04 -0500 Subject: [PATCH 253/294] set minConnections back to 3 --- OracleStorageAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleStorageAdapter.js b/OracleStorageAdapter.js index 87f4b2751..c69da918f 100644 --- a/OracleStorageAdapter.js +++ b/OracleStorageAdapter.js @@ -304,7 +304,7 @@ export class OracleStorageAdapter implements StorageAdapter { connectString: tnsname, poolIncrement: 5, poolMax: 100, - poolMin: 25, + poolMin: 3, poolTimeout: 10, // Use default of 60000 ms // queueTimeout: 10, From 3e8d28e5d61b190ce93585b62667b18151645644 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 23 Feb 2024 15:42:11 -0500 Subject: [PATCH 254/294] Try Instant Client 21.13 --- .github/workflows/ci.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55b81b50d..366876330 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,25 +34,25 @@ jobs: path: parse-server/src/Adapters/Storage/Oracle - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; - - name: Upload 23 Instant Client - run: pip install gdown; - gdown --id 1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh; - ls -la; - chmod 777 basic.zip; - unzip basic.zip; - ls -la; - ls -la instantclient_23_4; +# - name: Upload 23 Instant Client +# run: pip install gdown; +# gdown --id 1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh; +# ls -la; +# chmod 777 basic.zip; +# unzip basic.zip; +# ls -la; +# ls -la instantclient_23_4; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip; ./sqlcl/bin/sql -V; -# - name: Install Instant Client -# run: uname -m; -# wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; -# unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; -# ls -la; -# ls -la $PWD/instantclient_21_13; -# ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; + - name: Install Instant Client + run: uname -m; + wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; + unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; + ls -la; + ls -la $PWD/instantclient_21_13; + ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; - name: Install libaio1 run: sudo apt-get install libaio1; - name: Checkout OraSepcs @@ -95,7 +95,7 @@ jobs: - name: Run Tests run: echo $PWD; echo "Before setting LIB PATH"; - export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; + export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; echo "Kick It"; From 800c0dcb015c2788d030f44f3674acf788993cce Mon Sep 17 00:00:00 2001 From: ddrechse Date: Fri, 23 Feb 2024 15:54:27 -0500 Subject: [PATCH 255/294] Back to BLOB for 21 Instant Client --- OracleCollection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index a06fd5ba3..25614f2f1 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -28,7 +28,7 @@ export default class OracleCollection { // To support backwards compatibility with instant clients const mymetadata = { keyColumn: { name: 'ID', assignmentMethod: 'UUID' }, - contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'JSON' }, + contentColumn: { name: 'JSON_DOCUMENT', sqlType: 'BLOB' }, versionColumn: { name: 'VERSION', method: 'UUID' }, lastModifiedColumn: { name: 'LAST_MODIFIED' }, creationTimeColumn: { name: 'CREATED_ON' }, From 2881e3ded598fb8856f09436cbb76ecfbd756608 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 26 Feb 2024 12:43:38 -0500 Subject: [PATCH 256/294] Node version --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 366876330..99016f8b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,6 +94,7 @@ jobs: ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - name: Run Tests run: echo $PWD; + node --version; echo "Before setting LIB PATH"; export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; echo "This is LD LIBRARY PATH"; From a37634ba5a16a08acc74b12368879720e1c2e7ba Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 26 Feb 2024 13:25:09 -0500 Subject: [PATCH 257/294] 1 sec sleep in beforeEach --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99016f8b9..35d2f0ef6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Kick It"; + echo "1 second sleep in before each"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From a7dcc07de0554d314df7e8a2aa90f5dac6bda604 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 26 Feb 2024 14:38:19 -0500 Subject: [PATCH 258/294] Go back to instantclient_23_4 --- .github/workflows/ci.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35d2f0ef6..990edc6e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,25 +34,25 @@ jobs: path: parse-server/src/Adapters/Storage/Oracle - name: Validate Oracle Dir run: ls -la parse-server/src/Adapters/Storage/Oracle; -# - name: Upload 23 Instant Client -# run: pip install gdown; -# gdown --id 1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh; -# ls -la; -# chmod 777 basic.zip; -# unzip basic.zip; -# ls -la; -# ls -la instantclient_23_4; + - name: Upload 23 Instant Client + run: pip install gdown; + gdown --id 1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh; + ls -la; + chmod 777 basic.zip; + unzip basic.zip; + ls -la; + ls -la instantclient_23_4; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip; ./sqlcl/bin/sql -V; - - name: Install Instant Client - run: uname -m; - wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; - unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; - ls -la; - ls -la $PWD/instantclient_21_13; - ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; +# - name: Install Instant Client +# run: uname -m; +# wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; +# unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; +# ls -la; +# ls -la $PWD/instantclient_21_13; +# ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; - name: Install libaio1 run: sudo apt-get install libaio1; - name: Checkout OraSepcs @@ -96,7 +96,7 @@ jobs: run: echo $PWD; node --version; echo "Before setting LIB PATH"; - export LD_LIBRARY_PATH=${PWD}/instantclient_21_13; + export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; echo "1 second sleep in before each"; From 2b0d40b42b96fec96e7b6dad94928258ca9d0b05 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 26 Feb 2024 14:49:26 -0500 Subject: [PATCH 259/294] NODE_ORACLEDB_DEBUG_PACKETS=1 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 990edc6e8..897ceb877 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,6 +104,7 @@ jobs: npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.3.0; + export NODE_ORACLEDB_DEBUG_PACKETS=1; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; From 73a9d969aab3fa259edf2d09b832d69fbf9716b6 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 26 Feb 2024 15:06:30 -0500 Subject: [PATCH 260/294] Comment out 2 tests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 897ceb877..228b2641a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "1 second sleep in before each"; + echo "Comment out 2 tests, remove BeforeEach sleep"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 5dcf3b3f1724bdfdc6122db536f4d989cf1842f4 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 26 Feb 2024 15:14:05 -0500 Subject: [PATCH 261/294] Again --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 228b2641a..96512a8fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Comment out 2 tests, remove BeforeEach sleep"; + echo "Again"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From b84c7c8d6da792b57ee46bc512d6a5b8ec22988e Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 26 Feb 2024 16:51:52 -0500 Subject: [PATCH 262/294] 120 to 600 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96512a8fc..3729c9141 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,7 @@ jobs: docker ps -a; docker info; - name: Wait for container - run: sleep 120; + run: sleep 600; docker ps -a; ./sqlcl/bin/sql -V; - name: Enable SODA in image From 1edebd9b17e98d94f772783587bd485e6afe58fd Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Mon, 26 Feb 2024 17:24:54 -0500 Subject: [PATCH 263/294] Back to 120 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3729c9141..96512a8fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,7 @@ jobs: docker ps -a; docker info; - name: Wait for container - run: sleep 600; + run: sleep 120; docker ps -a; ./sqlcl/bin/sql -V; - name: Enable SODA in image From de7254fe95062b0c061338e4fca7d0183179ac30 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Tue, 27 Feb 2024 14:57:43 -0500 Subject: [PATCH 264/294] Turn off Threading --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9a90009e4..9ad1f110e 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "test:mongodb:7.0.1": "npm run test:mongodb --dbversion=7.0.1", "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017", "testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine", - "testoracle": "export UV_THREADPOOL_SIZE=128 && cross-env PARSE_SERVER_TEST_DB=oracle PARSE_SERVER_TEST_TIMEOUT=60000 ORACLEDB_VERSION=${ORACLEDB_VERSION:=19.3.0.0} TESTING=1 jasmine", + "testoracle": "cross-env PARSE_SERVER_TEST_DB=oracle PARSE_SERVER_TEST_TIMEOUT=60000 ORACLEDB_VERSION=${ORACLEDB_VERSION:=19.3.0.0} TESTING=1 jasmine", "test": "npm run testonly", "posttest": "cross-env mongodb-runner stop --all", "coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 nyc jasmine", From 0c5aa43256c027fbadc62e7b2891f452b961216c Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 27 Feb 2024 15:52:15 -0500 Subject: [PATCH 265/294] Cooment out ParseQuery test --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96512a8fc..9912f15da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Again"; + echo "Comment out Test"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 7367562c402245a2ee306b3d3b9b51c7c8270257 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 27 Feb 2024 16:03:29 -0500 Subject: [PATCH 266/294] Again --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9912f15da..96512a8fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Comment out Test"; + echo "Again"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 0d5d2cdf071203a86a608860f89dd74210079235 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 27 Feb 2024 16:13:23 -0500 Subject: [PATCH 267/294] Disable Another --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96512a8fc..cbbc7a6e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Again"; + echo "Disable another"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From b62bc57cacccff88b2e06244e7eab8eada01c465 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 27 Feb 2024 16:23:34 -0500 Subject: [PATCH 268/294] Disable two more --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbbc7a6e3..8d2171ca4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Disable another"; + echo "Disable two more"; cd parse-server; npm install; npm install --save @parse/fs-files-adapter; From 4a1e3e344bc3f9242c02a55ba749529738ced35d Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 27 Feb 2024 16:30:39 -0500 Subject: [PATCH 269/294] cat package.json --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d2171ca4..47ff5c589 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,6 +94,7 @@ jobs: ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - name: Run Tests run: echo $PWD; + cat package.json; node --version; echo "Before setting LIB PATH"; export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; From 438674dcadbfae424749d59fe563d7973e7ec0cf Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 27 Feb 2024 16:36:25 -0500 Subject: [PATCH 270/294] correct directory --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47ff5c589..a1142c5f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,14 +94,14 @@ jobs: ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - name: Run Tests run: echo $PWD; - cat package.json; node --version; echo "Before setting LIB PATH"; export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; echo "Disable two more"; - cd parse-server; + cd parse-server; + cat package.json; npm install; npm install --save @parse/fs-files-adapter; npm install oracledb@6.3.0; From 408db363dfcad9a605beeb24ae9e27fd9e28676a Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 27 Feb 2024 16:45:57 -0500 Subject: [PATCH 271/294] Disable 2 more --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1142c5f1..2d5c53c98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Disable two more"; + echo "Disable two more again"; cd parse-server; cat package.json; npm install; From b6c07fc47d5aa7f38a02150a934bedcf2a0fb911 Mon Sep 17 00:00:00 2001 From: ddrechse Date: Wed, 28 Feb 2024 10:25:25 -0500 Subject: [PATCH 272/294] fix for ORA-00054 --- OracleCollection.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OracleCollection.js b/OracleCollection.js index 25614f2f1..5d3a98478 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1283,11 +1283,19 @@ export default class OracleCollection { async _createIndex(indexSpec) { let localConn = null; + + const plsql = ` + BEGIN + EXECUTE IMMEDIATE (' + alter session set ddl_lock_timeout=300 + '); + END;`; // console.log('_createIndex index spec is ' + JSON.stringify(indexSpec)); logger.verbose('_createIndex index spec is ' + JSON.stringify(indexSpec)); return await this.getCollectionConnection() .then(async conn => { localConn = conn; + await conn.execute(plsql); await this._oracleCollection.createIndex(indexSpec); return Promise.resolve; }) From 26e38886c85eaa37b0c9429e327d077cae884407 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 28 Feb 2024 10:57:20 -0500 Subject: [PATCH 273/294] Try 1000 --- OracleCollection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index 5d3a98478..9cdb8f700 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1287,7 +1287,7 @@ export default class OracleCollection { const plsql = ` BEGIN EXECUTE IMMEDIATE (' - alter session set ddl_lock_timeout=300 + alter session set ddl_lock_timeout=1000 '); END;`; // console.log('_createIndex index spec is ' + JSON.stringify(indexSpec)); From 6194dc3e216ecf4fff2660be1c8bbb709112c5bd Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 28 Feb 2024 11:16:08 -0500 Subject: [PATCH 274/294] log createIndex error --- OracleCollection.js | 1 + 1 file changed, 1 insertion(+) diff --git a/OracleCollection.js b/OracleCollection.js index 9cdb8f700..91e74a847 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1345,6 +1345,7 @@ export default class OracleCollection { logger.verbose('Index' + JSON.stringify(indexSpec) + ' already exists'); } else { logger.error('createIndex throws ' + error); + console.log('createIndex throws ' + error); throw error; } }); From 451f9878e04e12389d159bd0343415c82bce971a Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 28 Feb 2024 11:25:44 -0500 Subject: [PATCH 275/294] AGAIN --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d5c53c98..f93fa45cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Disable two more again"; + echo "AGAIN"; cd parse-server; cat package.json; npm install; From d1a241696a22ca0c7c19580a18c0dc7709d09503 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 28 Feb 2024 13:13:00 -0500 Subject: [PATCH 276/294] I thin its insertOne --- OracleStorageAdapter.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OracleStorageAdapter.js b/OracleStorageAdapter.js index c69da918f..56726e6d7 100644 --- a/OracleStorageAdapter.js +++ b/OracleStorageAdapter.js @@ -518,6 +518,8 @@ export class OracleStorageAdapter implements StorageAdapter { } this.handleError(err); } + console.log("Error = " + error); + console.trace(); this.handleError(error); } } From 814ea4ac5dadad2a007937c824f77dfae82853a0 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 28 Feb 2024 13:26:27 -0500 Subject: [PATCH 277/294] Fix insertOne --- OracleCollection.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/OracleCollection.js b/OracleCollection.js index 91e74a847..83fbad354 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1185,9 +1185,18 @@ export default class OracleCollection { async insertOne(object) { let localConn = null; + + const plsql = ` + BEGIN + EXECUTE IMMEDIATE (' + alter session set ddl_lock_timeout=300 + '); + END;`; + try { // console.log('CDD Collection insertOne before getConnection'); localConn = await this.getCollectionConnection(); + const result1 = await localConn.execute(plsql); // console.log('CDD Collection got connection calling insertOne for object ' + JSON.stringify(object)); await this._oracleCollection.insertOne(object); // console.log('CDD Collection insertOne returned successfully'); From 49a83d5434f72ef949710d2a0b9c60b5f7385679 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 28 Feb 2024 14:26:37 -0500 Subject: [PATCH 278/294] Insert One fix again --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f93fa45cb..175b7dced 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "AGAIN"; + echo "InsertOne fix"; cd parse-server; cat package.json; npm install; From cbfb3a9ecfa5cdb248b8f9886fcb634d4b853243 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 28 Feb 2024 15:10:16 -0500 Subject: [PATCH 279/294] Again --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 175b7dced..923ac31a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "InsertOne fix"; + echo "Looking Good?"; cd parse-server; cat package.json; npm install; From cba96c5878f2eee020bab9b361192cd47ba46cda Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 28 Feb 2024 16:06:02 -0500 Subject: [PATCH 280/294] All Suites --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 923ac31a4..83eeda18a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "Looking Good?"; + echo "All Suites"; cd parse-server; cat package.json; npm install; From 385c36bb66558a7c27c3e6e7f76de2d14b5bd5f0 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 28 Feb 2024 16:43:07 -0500 Subject: [PATCH 281/294] insertOneAndGet --- OracleCollection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index 83fbad354..7b3482eb7 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1198,7 +1198,7 @@ export default class OracleCollection { localConn = await this.getCollectionConnection(); const result1 = await localConn.execute(plsql); // console.log('CDD Collection got connection calling insertOne for object ' + JSON.stringify(object)); - await this._oracleCollection.insertOne(object); + const result = await this._oracleCollection.insertOneAndGet(object); // console.log('CDD Collection insertOne returned successfully'); return object; } catch (error) { From 45512df1524fc5b5c076ed00406eeeb4fe36a6a3 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Thu, 29 Feb 2024 09:32:01 -0500 Subject: [PATCH 282/294] All Suites again --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83eeda18a..7adf95507 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "All Suites"; + echo "All Suites Again"; cd parse-server; cat package.json; npm install; From e5e6e484786a662be7b6177e9dedfe0f92bad0e4 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 1 Mar 2024 12:02:56 -0500 Subject: [PATCH 283/294] All Suites --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7adf95507..83eeda18a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "All Suites Again"; + echo "All Suites"; cd parse-server; cat package.json; npm install; From bebd61a3e0d75cb5fe110c608156668ebbe819d8 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 5 Mar 2024 11:59:49 -0500 Subject: [PATCH 284/294] All Suites Again --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83eeda18a..7adf95507 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "All Suites"; + echo "All Suites Again"; cd parse-server; cat package.json; npm install; From 3a8575fd4e27e642bf1ae6546dd10613b5fb6d59 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 5 Mar 2024 16:12:35 -0500 Subject: [PATCH 285/294] Await on close --- OracleCollection.js | 54 ++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/OracleCollection.js b/OracleCollection.js index 7b3482eb7..edde709ff 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -369,9 +369,9 @@ export default class OracleCollection { return 'retry'; } }) - .finally(() => { + .finally(async () => { if (localConn) { - localConn.close(); + await localConn.close(); localConn = null; } }) @@ -444,9 +444,9 @@ export default class OracleCollection { return 'retry'; } }) - .finally(() => { + .finally(async () => { if (localConn) { - localConn.close(); + await localConn.close(); localConn = null; } }) @@ -485,9 +485,9 @@ export default class OracleCollection { localConn = conn; return this._oracleCollection.find().key(key).version(version).remove(); }) - .finally(() => { + .finally(async () => { if (localConn) { - localConn.close(); + await localConn.close(); localConn = null; } }) @@ -528,9 +528,9 @@ export default class OracleCollection { localConn = conn; return this._oracleCollection.find().key(key).version(version).remove(); }) - .finally(() => { + .finally(async () => { if (localConn) { - localConn.close(); + await localConn.close(); localConn = null; } }) @@ -648,9 +648,9 @@ export default class OracleCollection { return 'retry'; } }) - .finally(() => { + .finally(async () => { if (localConn) { - localConn.close(); + await localConn.close(); localConn = null; } }) @@ -695,9 +695,9 @@ export default class OracleCollection { return 'retry'; } }) - .finally(() => { + .finally(async () => { if (localConn) { - localConn.close(); + await localConn.close(); localConn = null; } }) @@ -836,10 +836,10 @@ export default class OracleCollection { localConn = conn; findOperation = this._oracleCollection.find(); }) - .catch(error => { + .catch(async error => { logger.error('Error getting connection in _rawFind, ERROR =' + error); if (localConn) { - localConn.close(); + await localConn.close(); localConn = null; } throw error; @@ -917,7 +917,7 @@ export default class OracleCollection { //query should not match on array when searching for null if (y === '$all' && Array.isArray(json[y]) && json[y][0] == null) { if (localConn) { - localConn.close(); + await localConn.close(); localConn = null; } return []; @@ -964,7 +964,7 @@ export default class OracleCollection { typeof json[y][0] == 'object' ) { if (localConn) { - localConn.close(); + await localConn.close(); localConn = null; } return []; @@ -974,7 +974,7 @@ export default class OracleCollection { if (json[y].length == 0) { if (y === '$in' || y === '$all') { if (localConn) { - localConn.close(); + await localConn.close(); localConn = null; } return []; @@ -1143,9 +1143,9 @@ export default class OracleCollection { } return localDocs; }) - .finally(() => { + .finally(async () => { if (localConn) { - localConn.close(); + await localConn.close(); localConn = null; } }) @@ -1153,9 +1153,9 @@ export default class OracleCollection { logger.error('Error running findOperation GetDocuments, ERROR =' + error); throw error; }); - } catch (error) { + } catch (async error) { if (localConn) { - localConn.close(); + await localConn.close(); localConn = null; } logger.error('Error running _rawfind, ERROR =' + error); @@ -1229,9 +1229,9 @@ export default class OracleCollection { } return result; }) - .finally(() => { + .finally(async () => { if (localConn) { - localConn.close(); + await localConn.close(); localConn = null; } }) @@ -1254,9 +1254,9 @@ export default class OracleCollection { return this._oracleCollection.truncate(); // return this._oracleCollection.find().remove(); }) - .finally(() => { + .finally(async () => { if (localConn) { - localConn.close(); + await localConn.close(); localConn = null; } }) @@ -1386,9 +1386,9 @@ export default class OracleCollection { const result = await this._oracleCollection.dropIndex(indexName); return result; }) - .finally(() => { + .finally(async () => { if (localConn) { - localConn.close(); + await localConn.close(); localConn = null; } }) From 93c53efdf8e8746551dc4d8936dac7e33a6659c0 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 5 Mar 2024 16:19:22 -0500 Subject: [PATCH 286/294] Update OracleCollection.js --- OracleCollection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index edde709ff..3094778f9 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1153,7 +1153,7 @@ export default class OracleCollection { logger.error('Error running findOperation GetDocuments, ERROR =' + error); throw error; }); - } catch (async error) { + } catch (error) { if (localConn) { await localConn.close(); localConn = null; From bf54e323b14365e9c3994b95f45d798019eb186e Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 5 Mar 2024 16:50:06 -0500 Subject: [PATCH 287/294] refactor insertOne --- OracleCollection.js | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/OracleCollection.js b/OracleCollection.js index 3094778f9..6917d5bea 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1192,8 +1192,27 @@ export default class OracleCollection { alter session set ddl_lock_timeout=300 '); END;`; + + return this.getCollectionConnection() + .then(conn => { + localConn = conn; + const result1 = await localConn.execute(plsql); + const result = await this._oracleCollection.insertOne(object); + return result; + }) + .finally(async () => { + if (localConn) { + await localConn.close(); + localConn = null; + } + }) + .catch(error => { + console.log('CDD error during insertOne = ' + error); + logger.error('error during insertOne = ' + error); + throw error; + }); - try { +/* try { // console.log('CDD Collection insertOne before getConnection'); localConn = await this.getCollectionConnection(); const result1 = await localConn.execute(plsql); @@ -1209,7 +1228,7 @@ export default class OracleCollection { if (localConn) { await localConn.close(); } - } + }*/ } async drop() { From 94942c44ad56f8f62af9ccbc92db8b0bdac3a101 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 5 Mar 2024 16:59:03 -0500 Subject: [PATCH 288/294] Update OracleCollection.js --- OracleCollection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OracleCollection.js b/OracleCollection.js index 6917d5bea..ba8a9e7ef 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1196,8 +1196,8 @@ export default class OracleCollection { return this.getCollectionConnection() .then(conn => { localConn = conn; - const result1 = await localConn.execute(plsql); - const result = await this._oracleCollection.insertOne(object); + const result1 = localConn.execute(plsql); + const result = this._oracleCollection.insertOne(object); return result; }) .finally(async () => { From 9e28b1037344690e4189ffe1223ee980c3fbdbac Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Tue, 5 Mar 2024 17:36:31 -0500 Subject: [PATCH 289/294] All Suites --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7adf95507..83eeda18a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "All Suites Again"; + echo "All Suites"; cd parse-server; cat package.json; npm install; From d62ce13c51cb3d7ed6151c4c8f4268426ef561e2 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 6 Mar 2024 08:35:38 -0500 Subject: [PATCH 290/294] Again --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83eeda18a..7adf95507 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "All Suites"; + echo "All Suites Again"; cd parse-server; cat package.json; npm install; From 251fdb4e8b5b980214b0e7c0c4c89deee219178b Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 6 Mar 2024 09:49:35 -0500 Subject: [PATCH 291/294] Update OracleCollection.js --- OracleCollection.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OracleCollection.js b/OracleCollection.js index ba8a9e7ef..42cd5e395 100644 --- a/OracleCollection.js +++ b/OracleCollection.js @@ -1207,7 +1207,10 @@ export default class OracleCollection { } }) .catch(error => { - console.log('CDD error during insertOne = ' + error); + if (error.errorNum !== 1) { + console.log('CDD error during insertOne = ' + error + " for Object " + JSON.stringify(object)); + console.trace(); + } logger.error('error during insertOne = ' + error); throw error; }); From f331a7e657f59312dc03395650e4638c5940c5c0 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 6 Mar 2024 10:24:04 -0500 Subject: [PATCH 292/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7adf95507..83eeda18a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "All Suites Again"; + echo "All Suites"; cd parse-server; cat package.json; npm install; From 0f9f919a2698a7a17c688ea2e9c6489403b1952f Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 6 Mar 2024 10:37:50 -0500 Subject: [PATCH 293/294] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83eeda18a..e5c4ac467 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: run: ls -la parse-server/src/Adapters/Storage/Oracle; - name: Upload 23 Instant Client run: pip install gdown; - gdown --id 1PxhDHyT0VfUT7WV3I4_dvV7TrrRg3zvh; + gdown --id 1wMQjFXGQz8LnWiZCMuqTi2l_8YP1Aqtt; ls -la; chmod 777 basic.zip; unzip basic.zip; From a30411b77494fbfe8a1460ed8054cb2326cafa90 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Fri, 26 Apr 2024 08:30:58 -0400 Subject: [PATCH 294/294] The new and improved ci.yml --- .github/workflows/ci.yml | 121 ++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 66 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5c4ac467..e7a4a106b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,14 +14,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: -# version: ['5.6.0', '6.3.1'] - version: ['alpha'] + version: ['7.0.0'] steps: - name: Checkout parse-server ${{ matrix.version }} uses: actions/checkout@v2 with: - repository: ddrechse/parse-server - ref: realDBAdapterLoader + repository: parse-community/parse-server + ref: 7.0.0 path: parse-server - name: Create Oracle Storage Adapter Dir run: mkdir parse-server/src/Adapters/Storage/Oracle; @@ -33,104 +32,94 @@ jobs: ref: '' path: parse-server/src/Adapters/Storage/Oracle - name: Validate Oracle Dir - run: ls -la parse-server/src/Adapters/Storage/Oracle; - - name: Upload 23 Instant Client - run: pip install gdown; - gdown --id 1wMQjFXGQz8LnWiZCMuqTi2l_8YP1Aqtt; - ls -la; - chmod 777 basic.zip; - unzip basic.zip; - ls -la; - ls -la instantclient_23_4; + run: echo $PWD; + ls -la parse-server/src/Adapters/Storage; + ls -la parse-server/src/Adapters/Storage/Oracle; + cd parse-server/src/Adapters/Storage/Oracle; + rm -rf .git; - name: Install Sqlcl run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; unzip sqlcl-23.3.0.270.1251.zip; ./sqlcl/bin/sql -V; -# - name: Install Instant Client -# run: uname -m; -# wget https://download.oracle.com/otn_software/linux/instantclient/2113000/instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; -# unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip; -# ls -la; -# ls -la $PWD/instantclient_21_13; -# ls -la /home/runner/work/parse-server-database-adapter-template/parse-server-database-adapter-template/instantclient_21_13; + - name: Install Instant Client + run: uname -m; + wget https://download.oracle.com/otn_software/linux/instantclient/1923000/instantclient-basic-linux.x64-19.23.0.0.0dbru.zip; + unzip instantclient-basic-linux.x64-19.23.0.0.0dbru.zip; + ls -la; + ls -la $PWD/instantclient_19_23; - name: Install libaio1 run: sudo apt-get install libaio1; - - name: Checkout OraSepcs + - name: Checkout templateSpecs uses: actions/checkout@v2 with: - repository: ddrechse/parse-server - ref: oraSpecs - path: ora-specs - - name: Validate oraSpecs - run: ls -la ora-specs; - cp -R ./ora-specs/spec ./parse-server; - ls -la parse-server/spec; - - name: Checkout package.json - uses: actions/checkout@v2 - with: - repository: ddrechse/parse-server-database-adapter-template + repository: ddrechse/privateAdapterTemplate ref: '' - path: parse-server-database-adapter-template + path: privateAdapterTemplate - name: Move package.json, OracleStorageAdapter and OracleCollection run: ls; - ls -la parse-server-database-adapter-template; - cp parse-server-database-adapter-template/package.json parse-server; - cp parse-server-database-adapter-template/OracleStorageAdapter.js parse-server/src/Adapters/Storage/Oracle; - cp parse-server-database-adapter-template/OracleCollection.js parse-server/src/Adapters/Storage/Oracle; - cat parse-server/src/Adapters/Storage/Oracle/OracleCollection.js; - ls -la parse-server; - cat parse-server/spec/helper.js + echo $PWD; + ls -la $PWD; + cp privateAdapterTemplate/package.json parse-server; + rm -rf parse-server/spec; + mv privateAdapterTemplate/spec parse-server; + cat parse-server/spec/helper.js - name: Run Free23c run: docker run --name free23c -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; docker ps -a; - docker info; + docker images; - name: Wait for container run: sleep 120; docker ps -a; ./sqlcl/bin/sql -V; - name: Enable SODA in image - run: echo "alter system set pga_aggregate_limit=4G scope=memory;alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; + run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; cat soda; ./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda - name: Run Tests run: echo $PWD; + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash; + export NVM_DIR="$HOME/.nvm"; + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"; + nvm install v20.12.0; + nvm list; node --version; echo "Before setting LIB PATH"; - export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; + export LD_LIBRARY_PATH=${PWD}/instantclient_19_23; echo "This is LD LIBRARY PATH"; echo $LD_LIBRARY_PATH; - echo "All Suites"; + echo "Again"; cd parse-server; cat package.json; npm install; npm install --save @parse/fs-files-adapter; - npm install oracledb@6.3.0; - export NODE_ORACLEDB_DEBUG_PACKETS=1; + npm install oracledb@6.4.0; + npm ci; + export ORACLEDB_VERSION=19; export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; echo $PARSE_SERVER_DATABASE_ADAPTER; ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH} npm run testoracle; - mkdir oralogs; +# mkdir oralogs; # docker cp free23c: