[ 
https://issues.apache.org/jira/browse/KNOX-3440?focusedWorklogId=1040135&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1040135
 ]

ASF GitHub Bot logged work on KNOX-3440:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 08/Sep/26 08:31
            Start Date: 08/Sep/26 08:31
    Worklog Time Spent: 10m 
      Work Description: smolnar82 opened a new pull request, #1382:
URL: https://github.com/apache/knox/pull/1382

   [KNOX-3440](https://issues.apache.org/jira/browse/KNOX-3440) - Remove HSQLDB 
completely from Knox
   
   ## What changes were proposed in this pull request?
   
   As part of [KNOX-3401](https://issues.apache.org/jira/browse/KNOX-3401), H2 
became the new OOTB embedded database in Knox. HSQLDB was originally introduced 
(#567 ) only because Apache Derby lacks `IF NOT EXISTS`. H2 supports `IF NOT 
EXISTS`, so HSQLDB is now redundant and can be removed, including the test-only 
dependency it was kept around for.
   
   This PR removes HSQLDB entirely:
   
   - **Main code**: dropped the `HSQL` value from `DatabaseType`, removed its 
branch in `DataSourceProvider`, deleted `HsqlDataSourceFactory`, and updated a 
stale comment in `KnoxDatabase`.
   - **Maven**: removed the `hsql.db.version` property and the 
`org.hsqldb:hsqldb` managed dependency in the root POM; removed the `provided` 
hsqldb dependency from `gateway-server`; swapped the hsqldb test dependency in 
`gateway-shell` for H2.
   - **Tests**: converted every HSQLDB-backed test to H2 (`KnoxShellTableTest`, 
`KnoxDatabaseTest`, `RemoteConfigDatabaseTest`, `JDBCTokenStateServiceTest`). 
The two KnoxIDF schema tests (`DelegationPolicySchemaTest`, 
`TrustedOidcIssuersSchemaTest`) that previously ran the same standard DDL 
against both H2 and HSQLDB were consolidated onto a single H2 connection; the 
delegation schema test gained a child-first `@After` truncate so the "empty 
after DDL" assertion stays independent of JUnit method order.
   - **Docs**: removed `hsql`/`HSQL` from the supported database types, the SSL 
caveat, and the bundled-drivers note in `config_knox_token.md`.
   
   Note: `gateway.database.type=hsql` was a user-facing 
(embedded/test-oriented) option, so this removes a supported type - consistent 
with the KNOX-3401/KNOX-3440 direction of making H2 the OOTB embedded backend.
   
   ## How was this patch tested?
   
   - `mvn -pl gateway-server,gateway-shell -am test-compile` — both modules 
compile.
   - Ran all affected unit tests (all pass):
     - `gateway-server`: `DataSourceProviderTest` (20), `KnoxDatabaseTest` (5), 
`RemoteConfigDatabaseTest` (6), `JDBCTokenStateServiceTest` (9), 
`DelegationPolicySchemaTest` (11), `TrustedOidcIssuersSchemaTest` (2).
     - `gateway-shell`: `KnoxShellTableTest` (32).
   - Verified `grep -rniI "hsql"` over source, build files, and docs returns no 
live references (only historical `CHANGES`/Hadoop changelog entries remain, 
which are intentionally left untouched).
   
   ## Integration Tests
   
   No new integration tests required: this is a dependency/backend removal 
fully covered by the existing unit tests, which were converted from HSQLDB to 
H2 in this PR. Existing end-to-end suite already exercises paths where the new 
H2 DB is tested.
   
   ## UI changes
   
   N/A




Issue Time Tracking
-------------------

            Worklog Id:     (was: 1040135)
    Remaining Estimate: 0h
            Time Spent: 10m

> Drop HSQL DB
> ------------
>
>                 Key: KNOX-3440
>                 URL: https://issues.apache.org/jira/browse/KNOX-3440
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 3.1.0
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Major
>             Fix For: 3.1.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> As part of KNOX-3401, we are introducing H2 DB as the new OOTB embedded 
> database in Knox.
> [~amagyar] introduced HSQL DB in the scope of KNOX-2738, because Derby does 
> not support {{{}IF NOT EXISTS{}}}. H2 does, therefore we can switch to it in 
> our tests and get rid of a test-only dependency (HSQL).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to