Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/pip/web/regression/gssapi-eq-1.…
Browse files Browse the repository at this point in the history
…9.star
  • Loading branch information
akshay-joshi authored Nov 4, 2024
2 parents e6f539c + 25c3142 commit 53fcc9f
Show file tree
Hide file tree
Showing 71 changed files with 14,047 additions and 14,086 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/run-python-tests-pg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ jobs:
psql postgres -p 59${{ matrix.pgver }} -c 'CREATE ROLE postgres SUPERUSER LOGIN;'
# Pin the python version to v3.12 till pgAdmin supports latest versions.
- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Python dependencies on Linux and macOS
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' }}
run: make install-python-testing
Expand Down
17 changes: 12 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ FROM postgres:13-alpine AS pg13-builder
FROM postgres:14-alpine AS pg14-builder
FROM postgres:15-alpine AS pg15-builder
FROM postgres:16-alpine AS pg16-builder
FROM postgres:17-alpine AS pg17-builder

FROM alpine:latest AS tool-builder

Expand Down Expand Up @@ -154,6 +155,11 @@ COPY --from=pg16-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-16/
COPY --from=pg16-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-16/
COPY --from=pg16-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-16/

COPY --from=pg17-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-17/
COPY --from=pg17-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-17/
COPY --from=pg17-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-17/
COPY --from=pg17-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-17/

#########################################################################
# Assemble everything into the final container.
#########################################################################
Expand All @@ -165,12 +171,12 @@ COPY --from=env-builder /venv /venv

# Copy in the tools
COPY --from=tool-builder /usr/local/pgsql /usr/local/
COPY --from=pg16-builder /usr/local/lib/libpq.so.5.16 /usr/lib/
COPY --from=pg16-builder /usr/lib/libzstd.so.1.5.6 /usr/lib/
COPY --from=pg16-builder /usr/lib/liblz4.so.1.9.4 /usr/lib/
COPY --from=pg17-builder /usr/local/lib/libpq.so.5.17 /usr/lib/
COPY --from=pg17-builder /usr/lib/libzstd.so.1.5.6 /usr/lib/
COPY --from=pg17-builder /usr/lib/liblz4.so.1.9.4 /usr/lib/

RUN ln -s libpq.so.5.16 /usr/lib/libpq.so.5 && \
ln -s libpq.so.5.16 /usr/lib/libpq.so && \
RUN ln -s libpq.so.5.17 /usr/lib/libpq.so.5 && \
ln -s libpq.so.5.17 /usr/lib/libpq.so && \
ln -s libzstd.so.1.5.6 /usr/lib/libzstd.so.1 && \
ln -s liblz4.so.1.9.4 /usr/lib/liblz4.so.1

Expand All @@ -191,6 +197,7 @@ COPY DEPENDENCIES /pgadmin4/DEPENDENCIES
# Install runtime dependencies and configure everything in one RUN step
RUN apk add --no-cache \
python3 \
bash \
py3-pip \
postfix \
krb5-libs \
Expand Down
4 changes: 2 additions & 2 deletions Make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ REM Main build sequence Ends
%TMPDIR%\rcedit-x64.exe "%BUILDROOT%\runtime\pgAdmin4.exe" --set-product-version "%APP_VERSION%""

ECHO Attempting to sign the pgAdmin4.exe...
CALL "%PGADMIN_SIGNTOOL_DIR%\signtool.exe" sign /tr http://timestamp.digicert.com "%BUILDROOT%\runtime\pgAdmin4.exe"
CALL "%PGADMIN_SIGNTOOL_DIR%\signtool.exe" sign /fd certHash /tr http://timestamp.digicert.com /td SHA256 "%BUILDROOT%\runtime\pgAdmin4.exe"
IF %ERRORLEVEL% NEQ 0 (
ECHO.
ECHO ************************************************************
Expand Down Expand Up @@ -376,7 +376,7 @@ REM Main build sequence Ends

:SIGN_INSTALLER
ECHO Attempting to sign the installer...
CALL "%PGADMIN_SIGNTOOL_DIR%\signtool.exe" sign /fd certHash /tr http://timestamp.digicert.com "%DISTROOT%\%INSTALLERNAME%"
CALL "%PGADMIN_SIGNTOOL_DIR%\signtool.exe" sign /fd certHash /tr http://timestamp.digicert.com /td SHA256 "%DISTROOT%\%INSTALLERNAME%"
IF %ERRORLEVEL% NEQ 0 (
ECHO.
ECHO ************************************************************
Expand Down
Binary file modified docs/en_US/images/editgrid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en_US/images/geometry_viewer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en_US/images/query_execute_query.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en_US/images/query_execute_script.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en_US/images/query_output_data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en_US/images/query_tool.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en_US/images/query_tool_editable_columns.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/en_US/oauth2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ and modify the values for the following parameters:
"OAUTH2_AUTHORIZATION_URL", "Endpoint for user authorization"
"OAUTH2_SERVER_METADATA_URL", "Server metadata url for your OAuth2 provider"
"OAUTH2_API_BASE_URL", "Oauth2 base URL endpoint to make requests simple, ex: *https://api.github.com/*"
"OAUTH2_USERINFO_ENDPOINT", "User Endpoint, ex: *user* (for github) and *useinfo* (for google)"
"OAUTH2_USERINFO_ENDPOINT", "User Endpoint, ex: *user* (for github) and *userinfo* (for google)"
"OAUTH2_SCOPE", "Oauth scope, ex: 'openid email profile'. Note that an 'email' claim is required in the resulting profile."
"OAUTH2_ICON", "The Font-awesome icon to be placed on the oauth2 button, ex: fa-github"
"OAUTH2_BUTTON_COLOR", "Oauth2 button color"
Expand Down
18 changes: 16 additions & 2 deletions docs/en_US/release_notes_8_13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Version 8.13
************

Release date: 2024-10-17
Release date: 2024-11-14

This release contains a number of bug fixes and new features since the release of pgAdmin 4 v8.12.

Expand All @@ -14,26 +14,40 @@ Supported Database Servers

Bundled PostgreSQL Utilities
****************************
**psql**, **pg_dump**, **pg_dumpall**, **pg_restore**: 16.4
**psql**, **pg_dump**, **pg_dumpall**, **pg_restore**: 17.0


New features
************

| `Issue #1780 <https://github.com/pgadmin-org/pgadmin4/issues/1780>`_ - Replace infinite scrolling with pagination in query tool data output for better UX and performance.
| `Issue #2874 <https://github.com/pgadmin-org/pgadmin4/issues/2874>`_ - Alternate the background color of rows to enhance readability.
| `Issue #5869 <https://github.com/pgadmin-org/pgadmin4/issues/5869>`_ - Allow to pass PGADMIN_CONFIG_CONFIG_DATABASE_URI from docker secrets.
| `Issue #7393 <https://github.com/pgadmin-org/pgadmin4/issues/7393>`_ - Added support for auto-detecting and setting the End-of-line character (LF/CRLF) in the query tool editor.
| `Issue #7863 <https://github.com/pgadmin-org/pgadmin4/issues/7863>`_ - Make the background color for the serial number and header cells distinct.
Housekeeping
************

| `Issue #8061 <https://github.com/pgadmin-org/pgadmin4/issues/8061>`_ - Updated the react-menu library from v2 to v4.
| `Issue #8077 <https://github.com/pgadmin-org/pgadmin4/issues/8077>`_ - Remove bootstrap from the runtime code.
Bug fixes
*********

| `Issue #5307 <https://github.com/pgadmin-org/pgadmin4/issues/5307>`_ - Fixed an issue to allow the Enter key to save data in the result grid text editor.
| `Issue #7289 <https://github.com/pgadmin-org/pgadmin4/issues/7289>`_ - Move 'About pgAdmin 4' to app menu on macOS.
| `Issue #7655 <https://github.com/pgadmin-org/pgadmin4/issues/7655>`_ - Fixed an issue where the query tool was crashing when an empty geometry was being rendered.
| `Issue #7837 <https://github.com/pgadmin-org/pgadmin4/issues/7837>`_ - Fixed an issue where role properties were not loading.
| `Issue #7883 <https://github.com/pgadmin-org/pgadmin4/issues/7883>`_ - Fix multiple issues related to debugger params dialog input.
| `Issue #7907 <https://github.com/pgadmin-org/pgadmin4/issues/7907>`_ - Ensure server connection is successful for sslrootcert=system in server configuration.
| `Issue #7919 <https://github.com/pgadmin-org/pgadmin4/issues/7919>`_ - Fixed an issue where the dock layout was not saved upon closing a tab.
| `Issue #7920 <https://github.com/pgadmin-org/pgadmin4/issues/7920>`_ - Fixed an issue where the copy shortcut CTRL +C was not working in the Query Tool data grid.
| `Issue #7955 <https://github.com/pgadmin-org/pgadmin4/issues/7955>`_ - Fixed an issue where Dashboard tab showing 'Something went wrong'.
| `Issue #7957 <https://github.com/pgadmin-org/pgadmin4/issues/7957>`_ - Fixed an issue where cursor selection is not visible in the PSQL tool.
| `Issue #7965 <https://github.com/pgadmin-org/pgadmin4/issues/7965>`_ - Allow OAuth2 params OAUTH2_NAME, OAUTH2_DISPLAY_NAME, OAUTH2_ICON, OAUTH2_BUTTON_COLOR to be optional.
| `Issue #7988 <https://github.com/pgadmin-org/pgadmin4/issues/7988>`_ - Add appropriate minimum width and height setting for desktop apps to avoid app accidentally going below visibility levels.
| `Issue #7993 <https://github.com/pgadmin-org/pgadmin4/issues/7993>`_ - Fixed an issue where graphical explain keeps the node details open even after plan changed.
| `Issue #8007 <https://github.com/pgadmin-org/pgadmin4/issues/8007>`_ - Fixed an issue in the debugger where function arguments of the character data type were being truncated.
| `Issue #8013 <https://github.com/pgadmin-org/pgadmin4/issues/8013>`_ - Fix the issue where rows do not retain shading when scrolling.
| `Issue #8022 <https://github.com/pgadmin-org/pgadmin4/issues/8022>`_ - Use PG17 as the default in the container.
41 changes: 31 additions & 10 deletions pkg/docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash

# Fixup the passwd file, in case we're on OpenShift
if ! whoami > /dev/null 2>&1; then
Expand All @@ -9,6 +9,33 @@ if ! whoami > /dev/null 2>&1; then
fi
fi

# usage: file_env VAR [DEFAULT] ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
# "$XYZ_DB_PASSWORD" from a file, for Docker's secrets feature)
function file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
printf >&2 'error: both %s and %s are set (but are exclusive)\n' "$var" "$fileVar"
exit 1
fi
local val="$def"
if [ "${!var:-}" ]; then
val="${!var}"
elif [ "${!fileVar:-}" ]; then
val="$(< "${!fileVar}")"
fi
export "$var"="$val"
unset "$fileVar"
}

# Set values for config variables that can be passed using secrets
if [ -n "${PGADMIN_CONFIG_CONFIG_DATABASE_URI_FILE}" ]; then
file_env PGADMIN_CONFIG_CONFIG_DATABASE_URI
fi
file_env PGADMIN_DEFAULT_PASSWORD

# Populate config_distro.py. This has some default config, as well as anything
# provided by the user through the PGADMIN_CONFIG_* environment variables.
# Only update the file on first launch. The empty file is created during the
Expand All @@ -19,7 +46,8 @@ CA_FILE = '/etc/ssl/certs/ca-certificates.crt'
LOG_FILE = '/dev/null'
HELP_PATH = '../../docs'
DEFAULT_BINARY_PATHS = {
'pg': '/usr/local/pgsql-16',
'pg': '/usr/local/pgsql-17',
'pg-17': '/usr/local/pgsql-17',
'pg-16': '/usr/local/pgsql-16',
'pg-15': '/usr/local/pgsql-15',
'pg-14': '/usr/local/pgsql-14',
Expand All @@ -40,7 +68,7 @@ fi
# Check whether the external configuration database exists if it is being used.
external_config_db_exists="False"
if [ -n "${PGADMIN_CONFIG_CONFIG_DATABASE_URI}" ]; then
external_config_db_exists=$(cd /pgadmin4/pgadmin/utils && /venv/bin/python3 -c "from check_external_config_db import check_external_config_db; val = check_external_config_db(${PGADMIN_CONFIG_CONFIG_DATABASE_URI}); print(val)")
external_config_db_exists=$(cd /pgadmin4/pgadmin/utils && /venv/bin/python3 -c "from check_external_config_db import check_external_config_db; val = check_external_config_db("${PGADMIN_CONFIG_CONFIG_DATABASE_URI}"); print(val)")
fi

if [ ! -f /var/lib/pgadmin/pgadmin4.db ] && [ "${external_config_db_exists}" = "False" ]; then
Expand All @@ -59,7 +87,6 @@ if [ ! -f /var/lib/pgadmin/pgadmin4.db ] && [ "${external_config_db_exists}" = "
ALLOW_SPECIAL_EMAIL_DOMAINS=${PGADMIN_CONFIG_ALLOW_SPECIAL_EMAIL_DOMAINS}
fi
email_config="{'CHECK_EMAIL_DELIVERABILITY': ${CHECK_EMAIL_DELIVERABILITY}, 'ALLOW_SPECIAL_EMAIL_DOMAINS': ${ALLOW_SPECIAL_EMAIL_DOMAINS}}"
# email_config="{'CHECK_EMAIL_DELIVERABILITY': ${CHECK_EMAIL_DELIVERABILITY}}"
echo "email config is ${email_config}"
is_valid_email=$(cd /pgadmin4/pgadmin/utils && /venv/bin/python3 -c "from validation_utils import validate_email; val = validate_email('${PGADMIN_DEFAULT_EMAIL}', ${email_config}); print(val)")
if echo "${is_valid_email}" | grep "False" > /dev/null; then
Expand All @@ -69,12 +96,6 @@ if [ ! -f /var/lib/pgadmin/pgadmin4.db ] && [ "${external_config_db_exists}" = "
# Switch back to root directory for further process
cd /pgadmin4

# Read secret contents
if [ -n "${PGADMIN_DEFAULT_PASSWORD_FILE}" ]; then
PGADMIN_DEFAULT_PASSWORD=$(cat "${PGADMIN_DEFAULT_PASSWORD_FILE}")
export PGADMIN_DEFAULT_PASSWORD
fi

# Set the default username and password in a
# backwards compatible way
export PGADMIN_SETUP_EMAIL="${PGADMIN_DEFAULT_EMAIL}"
Expand Down
11 changes: 6 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ Flask-Babel==4.0.*
Flask-Security-Too==5.5.*; python_version >= '3.10'
Flask-Security-Too==5.4.*; python_version <= '3.9'
Flask-SocketIO==5.4.*
WTForms==3.1.*
WTForms==3.2.*; python_version >= '3.10'
WTForms==3.1.*; python_version <= '3.9'
passlib==1.*
pytz==2024.*
speaklater3==1.*
sqlparse==0.*
psutil==6.0.*
psutil==6.1.*
psycopg[c]==3.2.3
python-dateutil==2.*
SQLAlchemy==2.*
Expand All @@ -41,13 +42,13 @@ pywinpty==2.0.*; sys_platform=="win32"
Authlib==1.3.*
pyotp==2.*
qrcode==7.*; python_version <= '3.8'
qrcode==8.*; python_version >= '3.9'
qrcode[pil]==8.*; python_version >= '3.9'
boto3==1.35.*
urllib3==1.26.*
azure-mgmt-rdbms==10.1.0
azure-mgmt-resource==23.1.1
azure-mgmt-resource==23.2.0
azure-mgmt-subscription==3.1.1
azure-identity==1.18.0
azure-identity==1.19.0
google-api-python-client==2.*
google-auth-oauthlib==1.2.1
keyring==25.*
Expand Down
1 change: 0 additions & 1 deletion runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
},
"dependencies": {
"axios": "^1.7.7",
"bootstrap": "^4.5.3",
"electron-context-menu": "^4.0.4",
"electron-store": "^10.0.0"
}
Expand Down
Loading

0 comments on commit 53fcc9f

Please sign in to comment.