Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/devel' into CB-5045-service-conf…
Browse files Browse the repository at this point in the history
…igurations-are-too-intertwined

# Conflicts:
#	server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/config/CBServerConfig.java
#	server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/WebServiceUtils.java
#	server/bundles/io.cloudbeaver.service.admin/src/io/cloudbeaver/service/admin/impl/WebServiceAdmin.java
#	server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/EmbeddedSecurityControllerFactory.java
  • Loading branch information
yagudin10 committed Sep 4, 2024
2 parents d8f47e0 + 7b5c10b commit 49ccff1
Show file tree
Hide file tree
Showing 1,109 changed files with 15,478 additions and 8,435 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/backend-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ jobs:
sudo chmod 777 ../
shell: bash

- name: Determine branches
id: determine-branch
run: |
echo "pr_branch=${{ github.head_ref }}" >> $GITHUB_ENV
echo "base_branch=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
- name: Clone dbeaver/dbeaver
id: clone-repo
run: |
git clone -b ${{ env.pr_branch }} https://github.com/dbeaver/dbeaver.git ../dbeaver || git clone -b ${{ env.base_branch }} https://github.com/dbeaver/dbeaver.git ../dbeaver
- name: Run build script
run: ./build-backend.sh
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/backend-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- uses: dbelyaev/action-checkstyle@master
with:
github_token: ${{ secrets.github_token }}
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
filter_mode: diff_context
checkstyle_config: ./dbeaver-checkstyle-config.xml
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dist/

*.iml
/idea/
.idea/


## Mac OS
.DS_Store
Expand Down
19 changes: 4 additions & 15 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,16 @@
}
},
{
"label": "Generate dev proprties for CBCE",
"label": "Generate Eclipse PDE CloudBeaver",
"type": "shell",
"command": "mvn",
"osx": {
"args": [
"package",
"-q",
"exec:java",
"-Dexec.args= -eclipse.version ${eclipse-version} -config ${workspaceFolder}/../idea-workspace-dbeaver/rcp-gen.properties -productFile ${workspaceFolder}/server/product/web-server/CloudbeaverServer.product -projectsFolder ${workspaceFolder}/../ -eclipse ${workspaceFolder}/../dbeaver-workspace/dependencies -output ${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product"
]
"command": "./generate_workspace.sh"
},
"windows": {
"args": [
"package",
"-q",
"exec:java",
"-Dexec.args= -eclipse.version ${eclipse-version} -config ${workspaceFolder}/../idea-workspace-dbeaver/rcp-gen.properties -productFile ${workspaceFolder}/server/product/web-server/CloudbeaverServer.product -projectsFolder ${workspaceFolder}/../ -eclipse ${workspaceFolder}/../dbeaver-workspace/dependencies -output ${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product"
]
"command": "./generate_workspace.cmd"
},
"options": {
"cwd": "${workspaceFolder}/../idea-rcp-launch-config-generator"
"cwd": "${workspaceFolder}/../cloudbeaver"
},
"presentation": {
"reveal": "silent",
Expand Down
55 changes: 26 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,32 @@ You can see live demo of CloudBeaver here: https://demo.cloudbeaver.io

## Changelog

### 24.1.0. 2024-06-03
### Changes since 24.0.0:
### 24.2.0. 2024-09-02
### Changes since 24.1.0:
- General:
- Added the ability to back up the internal database before schema migration (for H2 and PostgreSQL)
- The process of application update has improved - you can track the application update process now;
- Added the ability for users to configure personal settings for the interface, SQL editor, and data viewer through the settings panel
- All popup dialogs became available for screen readers, including JAWS, to improve the experience for users with disabilities;
- User authorization:
- Security for unauthorized access enhanced;
- Added LDAP authentication;
- Data viewer and SQL editor:
- Added support for manual and automatic modes for committing changes to the database
- Large text values (more than 100 Kb) are now automatically opened in the Value panel;
- Row count calculation in the grid can be canceled for Data Editor and SQL Editor;
- Added the ability to set null values for BLOB and GIS data via the cell's context menu in the table;
- Added spatial data visualization for DuckDB;
- Aliases autocompletion fixed for DuckDB;
- Procedure creation query recognition fixed for DB2i.
- Connection settings:
- Implemented support for utilizing environment variables within connection configurations;
- Data transfer:
- Added the ability to import data to the database from CSV file;
- Added the ability to select a case for column names for export to CSV;
- French language support was added (thanks to @matthieukhl)
- Added the ability to close editor tabs with the middle mouse button
- Added right-click support to open the context menu in the Metadata Editor
- The list of forbidden characters for naming and renaming resource manager files has been updated, and now it includes the following characters: / : " \ ' <> | ? *
- Application cookies security was improved
- Authentication:
- Improved LDAP authentication: added the ability to filter users via service account parameters and ability to specify custom unique user identifiers
- Data Editor:
- Added additional notifications about the restricted operations
- Enhanced IPv6 and DateTime32 data representation for Clickhouse
- Data editing was fixed for DuckDB
- SQL Editor:
- SQL Editor auto-completion was enhanced to get column, table, and function names faster
- Fixed the dollar-quoted string parsing in the SQL Editor for PostgreSQL
- Improved display of the long error messages in the SQL Editor and Log viewer
- Changed the save script icon to a floppy disk for better recognition
- Improved application behavior when closing a connection - open editors won't be closed on disconnect
- Administration:
- Redesigned administration navigation panel - now it is more compact and clear
- Added the ability to change the default commit mode for each connection separately
- Added the ability to configure the server property rootURI parameter (thanks to @arioko)
- Databases:
- Added a new Apache Kyuubi driver (thanks to @pan3793);
- Enhanced security for connection through H2 driver;
- DuckDB driver updated to version 0.10.2;
- Oracle driver updated to version 23.2.0.0;
- SQLite driver updated to version 3.44.1.0;
- Clickhouse driver updated to version 0.6.0-patch2;
- Trino driver updated to version 438 (thanks to @alaturqua).
- Added the "Keep alive" setting for Db2 LUW and IMB i, Apache Kyuubi, Clickhouse, Firebird, and Trino
- Updated Firebird driver to version 5.0.4
- DDL generation for Oracle Tablespaces was added (thanks to @pandya09)

2 changes: 1 addition & 1 deletion apps/h2-query-executor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.2.220</version>
<version>2.1.214</version>
</dependency>
</dependencies>
<build>
Expand Down
19 changes: 11 additions & 8 deletions config/sample-databases/DefaultConfiguration/cloudbeaver.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

sslConfigurationPath:"${CLOUDBEAVER_SSL_CONF_PATH:workspace/.data/ssl-config.xml}",

rootURI: "/",
rootURI: "${CLOUDBEAVER_ROOT_URI:/}",
serviceURI: "/api/",

productSettings: {
Expand Down Expand Up @@ -47,14 +47,17 @@
},

database: {
driver: "h2_embedded_v2",
url: "jdbc:h2:${workspace}/.data/cb.h2v2.dat",
initialDataConfiguration: "conf/initial-data.conf",
driver: "${CLOUDBEAVER_DB_DRIVER:h2_embedded_v2}",
url: "${CLOUDBEAVER_DB_URL:jdbc:h2:${workspace}/.data/cb.h2v2.dat}",
schema: "${CLOUDBEAVER_DB_SCHEMA:''}",
user: "${CLOUDBEAVER_DB_USER:''}",
password: "${CLOUDBEAVER_DB_PASSWORD:''}",
initialDataConfiguration: "${CLOUDBEAVER_DB_INITIAL_DATA:conf/initial-data.conf}",
pool: {
minIdleConnections: 4,
maxIdleConnections: 10,
maxConnections: 100,
validationQuery: "SELECT 1"
minIdleConnections: "${CLOUDBEAVER_DB_MIN_IDLE_CONNECTIONS:4}",
maxIdleConnections: "${CLOUDBEAVER_DB_MAX_IDLE_CONNECTIONS:10}",
maxConnections: "${CLOUDBEAVER_DB_MAX_CONNECTIONS:100}",
validationQuery: "${CLOUDBEAVER_DB_VALIDATION_QUERY:SELECT 1}"
},
backupEnabled: "${CLOUDBEAVER_DB_BACKUP_ENABLED:true}"
}
Expand Down
19 changes: 11 additions & 8 deletions config/sample-databases/SQLiteConfiguration/cloudbeaver.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
contentRoot: "web",
driversLocation: "drivers",

rootURI: "/",
rootURI: "${CLOUDBEAVER_ROOT_URI:/}",
serviceURI: "/api/",

productSettings: {
Expand All @@ -32,14 +32,17 @@
enableSecurityManager: false,

database: {
driver:"h2_embedded_v2",
url: "jdbc:h2:${workspace}/.data/cb.h2v2.dat",
initialDataConfiguration: "conf/initial-data.conf",
driver: "${CLOUDBEAVER_DB_DRIVER:h2_embedded_v2}",
url: "${CLOUDBEAVER_DB_URL:jdbc:h2:${workspace}/.data/cb.h2v2.dat}",
schema: "${CLOUDBEAVER_DB_SCHEMA:''}",
user: "${CLOUDBEAVER_DB_USER:''}",
password: "${CLOUDBEAVER_DB_PASSWORD:''}",
initialDataConfiguration: "${CLOUDBEAVER_DB_INITIAL_DATA:conf/initial-data.conf}",
pool: {
minIdleConnections: 4,
maxIdleConnections: 10,
maxConnections: 100,
validationQuery: "SELECT 1"
minIdleConnections: "${CLOUDBEAVER_DB_MIN_IDLE_CONNECTIONS:4}",
maxIdleConnections: "${CLOUDBEAVER_DB_MAX_IDLE_CONNECTIONS:10}",
maxConnections: "${CLOUDBEAVER_DB_MAX_CONNECTIONS:100}",
validationQuery: "${CLOUDBEAVER_DB_VALIDATION_QUERY:SELECT 1}"
},
backupEnabled: "${CLOUDBEAVER_DB_BACKUP_ENABLED:true}"
},
Expand Down
1 change: 0 additions & 1 deletion deploy/build-backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ mkdir ./cloudbeaver
mkdir ./cloudbeaver/server
mkdir ./cloudbeaver/conf
mkdir ./cloudbeaver/workspace
mkdir ./cloudbeaver/web

echo "Pull cloudbeaver platform"

Expand Down
2 changes: 2 additions & 0 deletions deploy/build-frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ set -Eeuo pipefail

echo "Build static content"

mkdir ./cloudbeaver/web

cd ../../cloudbeaver/webapp

yarn
Expand Down
3 changes: 3 additions & 0 deletions generate_workspace.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SET mypath=%~dp0

.\..\idea-rcp-launch-config-generator\runGenerator.cmd -f %mypath%
1 change: 1 addition & 0 deletions generate_workspace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./../idea-rcp-launch-config-generator/runGenerator.sh -f "$PWD"
28 changes: 28 additions & 0 deletions osgi-app.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
workspaceName=cloudbeaver-ce
featuresPaths=\
dbeaver/features;\
cloudbeaver/server/features;
bundlesPaths=\
dbeaver-common/modules;\
dbeaver/plugins;\
cloudbeaver/server/bundles;
repositories=\
https://p2.dev.dbeaver.com/eclipse-repo/;\
https://download.eclipse.org/releases/${eclipse-version}/;
testBundles=\
org.junit;\
org.mockito.mockito-core;\
junit-jupiter-api;\
org.opentest4j
productsPaths=\
dbeaver/product/community/DBeaver.product;\
cloudbeaver/server/product/web-server/CloudbeaverServer.product:../../opt/cloudbeaver;
ideaConfigurationFilesPaths=\
dbeaver/.ide/.idea;
testBundlePaths=\
dbeaver/test;\
cloudbeaver/server/test;
additionalModuleRoots=\
opt;
optionalFeatureRepositories=\
dbeaver/product/repositories
5 changes: 3 additions & 2 deletions server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Model
Bundle-SymbolicName: io.cloudbeaver.model;singleton:=true
Bundle-Version: 1.0.55.qualifier
Bundle-Release-Date: 20240624
Bundle-Version: 1.0.61.qualifier
Bundle-Release-Date: 20240923
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down Expand Up @@ -42,6 +42,7 @@ Export-Package: io.cloudbeaver,
io.cloudbeaver.service.admin,
io.cloudbeaver.service.security,
io.cloudbeaver.service.sql,
io.cloudbeaver.test,
io.cloudbeaver.utils,
io.cloudbeaver.utils.file
Automatic-Module-Name: io.cloudbeaver.model
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.model</artifactId>
<version>1.0.55-SNAPSHOT</version>
<version>1.0.61-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import graphql.GraphQLError;
import graphql.language.SourceLocation;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.DBPDataSource;
import org.jkiss.dbeaver.model.sql.SQLState;
import org.jkiss.dbeaver.utils.GeneralUtils;
import org.jkiss.utils.CommonUtils;

Expand All @@ -38,6 +38,7 @@ public class DBWebException extends DBException implements GraphQLError {

public static final String ERROR_CODE_SESSION_EXPIRED = "sessionExpired";
public static final String ERROR_CODE_ACCESS_DENIED = "accessDenied";
public static final String ERROR_CODE_SERVER_NOT_INITIALIZED = "serverNotInitialized";
public static final String ERROR_CODE_LICENSE_DENIED = "licenseRequired";
public static final String ERROR_CODE_IDENT_REQUIRED = "identRequired";
public static final String ERROR_CODE_AUTH_REQUIRED = "authRequired";
Expand Down Expand Up @@ -65,12 +66,8 @@ public DBWebException(String message, String errorCode, Throwable cause) {
this.webErrorCode = errorCode;
}

public DBWebException(Throwable cause, DBPDataSource dataSource) {
super(cause, dataSource);
}

public DBWebException(String message, Throwable cause, DBPDataSource dataSource) {
super(makeMessage(message, cause), cause, dataSource);
public DBWebException(Throwable cause) {
super(null, cause);
}

public String getWebErrorCode() {
Expand Down Expand Up @@ -128,14 +125,14 @@ public Map<String, Object> getExtensions() {
//stString = stString.substring(divPos + 1).trim();
}
extensions.put("stackTrace", stString.trim());
int errorCode = getErrorCode();
int errorCode = SQLState.getCodeFromException(this);
if (errorCode != ERROR_CODE_NONE) {
extensions.put("errorCode", errorCode);
}
if (!CommonUtils.isEmpty(webErrorCode)) {
extensions.put("webErrorCode", webErrorCode);
}
String databaseState = getDatabaseState();
String databaseState = SQLState.getStateFromException(this);
if (databaseState != null) {
extensions.put("databaseState", databaseState);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public void setAuthProfiles(@NotNull Collection<DBAAuthProfile> profiles) {
}

@Override
public void removeAuthProfile(DBAAuthProfile profile) {
public void removeAuthProfile(@NotNull DBAAuthProfile profile) {
dataSourceRegistry.removeAuthProfile(profile);
}

Expand Down
Loading

0 comments on commit 49ccff1

Please sign in to comment.