Compare commits

...
Author SHA1 Message Date
dependabot[bot] 7082a984ee Javascript dependency: Bump the web-javascript-minor-and-patch group across 1 directory with 4 updates
Bumps the web-javascript-minor-and-patch group with 4 updates in the /web directory: [@tanstack/react-virtual](https://github.com/TanStack/virtual/tree/HEAD/packages/react-virtual), [chart.js](https://github.com/chartjs/Chart.js), [marked](https://github.com/markedjs/marked) and [webpack](https://github.com/webpack/webpack).


Updates `@tanstack/react-virtual` from 3.14.13 to 3.14.22
- [Release notes](https://github.com/TanStack/virtual/releases)
- [Changelog](https://github.com/TanStack/virtual/blob/main/packages/react-virtual/CHANGELOG.md)
- [Commits](https://github.com/TanStack/virtual/commits/@tanstack/react-virtual@3.14.22/packages/react-virtual)

Updates `chart.js` from 4.5.1 to 4.6.1
- [Release notes](https://github.com/chartjs/Chart.js/releases)
- [Commits](https://github.com/chartjs/Chart.js/compare/v4.5.1...v4.6.1)

Updates `marked` from 18.0.14 to 18.1.1
- [Release notes](https://github.com/markedjs/marked/releases)
- [Commits](https://github.com/markedjs/marked/compare/v18.0.14...v18.1.1)

Updates `webpack` from 5.112.0 to 5.112.1
- [Release notes](https://github.com/webpack/webpack/releases)
- [Changelog](https://github.com/webpack/webpack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack/compare/v5.112.0...v5.112.1)

---
updated-dependencies:
- dependency-name: "@tanstack/react-virtual"
  dependency-version: 3.14.22
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: web-javascript-minor-and-patch
- dependency-name: chart.js
  dependency-version: 4.6.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: web-javascript-minor-and-patch
- dependency-name: marked
  dependency-version: 18.1.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: web-javascript-minor-and-patch
- dependency-name: webpack
  dependency-version: 5.112.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: web-javascript-minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-26 10:27:39 +00:00
Dave Page 2551643aa1 chore: Add pgEdge Starfleet cloud deployment to the 9.19 release notes. 2026-10-26 08:56:33 +00:00
Ashesh Vashi b939b85ecb chore: Bump the version to 9.19.
Update APP_REVISION and APP_VERSION_INT in web/version.py, and the
Helm chart's version and appVersion.
2026-10-26 12:30:38 +05:30
Ashesh Vashi 4581fddd8d chore: Add the 9.19 security release notes and the release date.
One entry per tracking issue (#10645-#10676), with the CVE identifiers
for the 15 vulnerabilities.

Also set the release date to 2026-10-29, and add the upgrade guidance
for the SSH agent, Flask-Security-Too, non-administrator shares and
SERVER_MODE_ALLOWED_SERVICES.
2026-10-26 12:30:38 +05:30
Ashesh Vashi e13b12c492 chore: Add the release notes for the changes since 26a7d92b0 to 9.19. 2026-10-26 12:30:38 +05:30
Dave Page f4b5309267 chore: Add the release notes for 9.19. 2026-10-26 12:30:38 +05:30
Ashesh Vashi 9e985fef5b Updated message catalogs for v9.19 2026-10-25 23:26:24 +05:30
Ashesh Vashi 5ecdcd7201 Document the authentication behaviour changes for 9.19: separate accounts per source, lockout, session invalidation, and the user-management command examples.
Add a shared "Accounts from different authentication sources" section to the
user management docs and link to it from the LDAP, Kerberos, OAuth2 and
Webserver pages. It explains that an account is identified by its username
and its authentication source together, that an external login is never
logged in to an account from another source, and that a password reset acts
only on the internal account. It also describes the account-lockout
behaviour: MAX_LOGIN_ATTEMPTS applies only to internal accounts, pgAdmin
never locks an account from another source, a failed sign-in for a shared
username counts towards the internal account's lockout, and a locked internal
account stops only internal sign-in without disclosing the lock while another
source is configured.

The LDAP page also notes that, with internal and LDAP both enabled, a shared
username is tried against both sources in the configured order, and that
accounts whose usernames differ only in case should not be created when
LDAP_DN_CASE_SENSITIVE is off.

Note on the Change pgAdmin Password page that changing the password, or an
administrator resetting it, signs out the user's other sessions.

Fix the setup.py examples: add-external-user and update-external-user take
the authentication source through --auth-source, not as a positional
argument; update-user and update-external-user do not take a password
positionally; the built-in role is "User", not "Users"; and a user added
without a role gets the "User" role.
2026-10-25 21:44:28 +05:30
Ashesh Vashi f88596f90c Reject a backslash or null byte in a schema, table or column name in Import/Export Data. #10663
A schema, table or column name is wrapped with qtIdent() and interpolated
into psql's \copy command. qtIdent() doubles an embedded double quote but
leaves a backslash untouched, while psql's \copy parser (strtokx) treats a
backslash inside a double-quoted identifier as an escape. A name such as
one ending in a backslash therefore becomes "name\", which psql reads as
an unterminated identifier that runs past its intended end, the same
command-injection class (CWE-78) that the query guard already blocks for
query exports. A null byte can truncate the C string so Python's
validation and psql's parse disagree. The column lists reach the \copy
command's FORCE_* options even for a query export, so they are affected
too.

Reject a backslash or null byte in any of these names outright, as the
query path does; pgAdmin never needs to name an object containing one.
The check inspects the names columns_to_string() would pass to qtIdent()
whatever JSON type they arrive as (a list's items, a dict's keys, or a
bare string iterated character by character), so a column value sent as a
string or object cannot slip a backslash through.
2026-10-25 19:52:48 +05:30
Ashesh Vashi 602c3c165f chore: Update third-party dependencies and fix two feature-test helper issues.
JavaScript: @tanstack/react-query, @tanstack/react-table, dompurify,
lossless-json, rc-dock, react, react-dom, react-dropzone,
react-virtualized-auto-sizer, html-react-parser, zustand,
@mui/x-date-pickers, core-js, webpack, postcss, typescript-eslint,
eslint-plugin-jest, globals, @testing-library/user-event.

The postcss resolution override is raised along with the direct
dependency, so installs actually resolve to 8.5.31.

Python (python_version > '3.9' rows only): Authlib, certifi,
Flask-SocketIO, urllib3 and selenium.

Held back: @tanstack/react-virtual (3.14.13) and marked (18.0.14) break
the Jest suite in later releases, and pickr stays at ~1.9.1 because
1.10.x breaks the production bundle.

Feature tests:
- Backup and Restore clicked their Tools menu item while it was still
  disabled, because the menus are refreshed asynchronously after a
  database gets connected. Wait for the item to be enabled first.
- check_if_element_exists_with_scroll() never terminated when it reached
  the bottom of the tree and the node it looked for was above the visible
  area. Stop scrolling down at that point.
2026-10-25 17:49:29 +05:30
Ashesh Vashi d25a38fe62 Give users added by setup.py the User role when no role is given. #10675
add-user and add-external-user defaulted --role to None, so without
--role or --admin they looked up a role named None and exited with
"Role 'None' does not exists." Default --role to 'User', the role
pgAdmin gives every user it creates itself. --admin still takes
precedence, and an unknown --role still fails.
2026-10-25 16:10:08 +05:30
Ashesh Vashi d92fb68b22 Make the LDAP login scenarios independent of each other and of their order. #10675
The 'LDAP Authentication with Auto Create User' scenario logged in
ldap_user, creating an LDAP account that was never deleted, and the
'without Auto Create User' scenario only passed because that account was
already there; run on its own it failed.

The 'without' scenario now adds the LDAP account it logs in to with
add_user(), which deletes it with the rows the login created when the
test ends, and every auto-create scenario deletes the account its login
created.
2026-10-25 16:10:08 +05:30
Ashesh Vashi 2bca0b3cc9 Show the user just added by setup.py add-external-user. #10675
After adding a user, setup.py looked the new account up for display by
its email together with the auth source. For an external user the email
is not the username, so without --email every user of that auth source
was listed, and with --email nothing was shown at all.

Look the account up by the username it was created with and its auth
source instead, and add tests that run setup.py add-user and
add-external-user against a copy of the test database and check that
only the new account is shown.
2026-10-25 16:10:08 +05:30
Ashesh Vashi 2fc4b1f3d4 Fix logins and user management when an account shares its username or email with one from another source. #10675
- Webserver login and auto-creation looked the account up by username
  alone. An internal account with the same username was found first, so
  the Webserver user was refused, or never created.
- LDAP auto-creation, when LDAP_DN_CASE_SENSITIVE is off, compared the
  stored username with the lower-cased login name, so an LDAP user whose
  username has capitals was not found after their first login, and the
  attempt to create them again failed, so they could not log in. It now
  compares both lower-cased.
- setup.py update-user and update-external-user failed with a KeyError
  unless --role or --admin was given, so an account could not be
  deactivated on its own, as the LDAP documentation describes.

A test also checks that a password reset requested with the email in
another case is sent for the internal account.
2026-10-25 16:10:08 +05:30
Ashesh Vashi c6ef41a951 Refuse sign-in, password change and password reset requests that skip pgAdmin's own checks. #10676
Flask-Security registers views of its own next to pgAdmin's: /login,
/verify, /change, /reset and /reset/<token>. Submitting to them logged a
user in without the failed login count or the lock, checked a signed-in
user's password without limit, changed a password without pgAdmin's
change password permission or re-encrypting the saved server passwords,
and sent or applied a password reset for an account that is not
internal or is locked. pgAdmin does all of these through views of its
own, so a submission to Flask-Security's is now refused with 405
Method Not Allowed. A GET still renders the page, as GET /login renders
pgAdmin's login page, whose form is posted to /authenticate/login. The
refusal is not logged as an error, as anyone can send one.

The test uses server mode only views and is excluded in desktop mode.
2026-10-25 16:01:14 +05:30
Ashesh Vashi 35c9235d17 Count every failed internal login, and lock only internal authentication. #10676
The limit on failed logins (MAX_LOGIN_ATTEMPTS) could be got round, and
its lock reached accounts it does not protect:

- The internal account was looked up by its exact username, while
  Flask-Security matches the email ignoring case, so a username typed in
  another case was neither counted nor checked for the lock. It is now
  looked up as Flask-Security does.
- With LDAP or Webserver authentication also configured, the login form
  always passed validation, so a wrong internal password was never
  counted. It is now counted whenever no source authenticates the user
  and internal authentication was tried.
- A login that posts a password no longer falls back to Kerberos, OAuth2
  or Webserver authentication, which do not check it: with them listed,
  a guess was answered by the Kerberos challenge, or silently logged in
  the user the web server named, without being counted.
- The account is locked on the failed login that reaches the limit, and
  the user is told so, rather than at the next login.
- A login through another source no longer resets the internal
  account's failed logins.

The lock is the internal account's. A locked internal account only stops
internal authentication: the other sources are still tried and only ever
log in an account of their own, so a user of another source with the
same name is not locked out by it. The password is not checked against
the locked account. When another source refuses the user, one neutral
message is shown whatever the password, saying a pgAdmin account may be
locked; with no other source to try, the account locked message is shown
as before. The skip is logged.

The new tests use server mode only features and are excluded in desktop
mode. The Kerberos login test now posts no password, as a Kerberos login
does.
2026-10-25 16:01:14 +05:30
Ashesh Vashi 58c531d831 Act only on the internal account when accounts from other sources share its email or username. #10676
The same email or username may belong to accounts from several auth
sources. Flask-Security looks the account up by email alone, and took
whichever row came first:

- Internal login checked the password against that row, so an internal
  user could not log in when an LDAP or OAuth2 account with the same
  email was found first. Flask-Security's lookup now prefers the internal
  account; ignoring case, it prefers the one matching exactly, then the
  oldest. A missing email or username identifies no account.
- A password reset was sent for whichever account had the email, and a
  reset token for an account from another source was accepted, giving it
  a local password and logging it in. Reset instructions are now sent
  for the internal account, and a token for any other account is
  refused.
- The About box showed the configuration to any user whose email was
  that of an administrator's account, whatever its source. It now checks
  the user's own role.

The test runner excluded every test module whose name started with one
on its desktop mode list, so excluding test_reset_password also excluded
test_reset_password_auth_source. Each entry now excludes only the module
it names, and the server mode only modules are listed.
2026-10-25 16:01:14 +05:30
Ashesh Vashi b39f1a8d79 Give the File Manager save tests an absolute path in desktop mode, where there is no storage directory. #10674
In desktop mode get_storage_directory() returns None and a path is
absolute, so check_access_permission() returns it unchanged. These tests
patch in a storage directory in either mode and passed a path relative
to it, which in desktop mode named a file at the root of the filesystem,
so the save failed. They now pass a path inside the storage directory in
desktop mode, as a desktop user would.
2026-10-25 11:43:20 +05:30
Ashesh Vashi d91a2745f0 Run the shared storage write-target tests fully in server mode, so they pass in desktop mode too. #10650
The tests patched the application's SERVER_MODE setting but not
config.SERVER_MODE, which get_locale() reads. In desktop mode the refusal
message's gettext() then took the desktop branch and read
current_user.is_authenticated from the stand-in user, which has no such
attribute, so the "non-admin cannot write" scenario failed. Patch
config.SERVER_MODE as well in the three tests that use this setup.
2026-10-25 11:43:20 +05:30
Ashesh Vashi ad6c028cff Make the File Manager and storage-path tools act on the path that was checked. #10674
In server mode, check_access_permission() validated a path into the
user's storage directory, but several callers then acted on a path built
differently, so the path checked and the path used could name different
files:

- Opening a file in the Query Tool, saving a file, the Google client
  secret and, on Windows, Import/Export Data, Backup and Restore joined
  the path to the storage directory after stripping leading separators,
  so a path checked as inside storage could name any file the pgAdmin
  account can read, or on Windows write outside it.
- Listing a folder decoded the path again after the check, so a folder
  named like an encoded ".." listed any directory on the host.
- Download, delete, rename and the file-exists check appended the path
  to the storage directory without a separator, so where one user's
  storage directory name was a prefix of another's, that user's files
  could be read, deleted or moved; download also checked the path
  appended to itself.
- Creating a folder checked the parent rather than the folder created,
  and upload wrote to a path that was not checked.

check_access_permission() now returns the absolute path it checked, and
every caller acts on that path. Folder paths are decoded once, rename
checks the new name where it is created, and download returns a 404
without the server path for a missing file.

In server mode on POSIX, download, delete, rename and file loads now
open files relative to directories opened from the storage directory
without following symbolic links, as upload and save already did, so a
parent directory swapped for a symbolic link after the check is refused.
The walk follows the path as written: a ".." goes back up past a
directory the walk opened, rather than being collapsed in the text to a
different file from the one the check resolved. It keeps open only the
directories a later ".." can still go back up to, so a path holds at
most two more file descriptors than it has ".." segments, and working
out which to keep takes time linear in the length of the path.

Also:
- The storage directory itself can no longer be deleted.
- In desktop mode, a download refuses a FIFO or other non-regular file
  instead of blocking on it; symbolic links are still followed there.
- A symbolic link refusal is recognised as ELOOP, or EMLINK only where
  O_NOFOLLOW uses it.
- The File Manager sends the selected storage when checking whether a
  file exists, so the overwrite prompt sees files in a shared storage.
- get_closest_parent() tested whether the storage directory existed
  rather than the remembered folder; it now finds the closest existing
  folder inside storage.
- A refused or failed download now shows the server's message.
- check_file_for_bom_and_binary() reports a read error in its result.
2026-10-25 11:03:55 +05:30
Ashesh Vashi 269e32d5ee Ensure Kerberos and internal authentication only log in the account of the user they authenticated. #10675
The same username may exist under several auth sources. Kerberos uses
the shared login(), which looked the account up by username alone, so a
Kerberos principal matching an internal account's username was logged in
as that internal account, including the initial administrator. login()
now looks the account up by the authenticated username and the source
that authenticated it.

form.user is no longer used by any source but internal. Flask-Security's
validation, run for internal authentication, sets it to the account whose
email was typed, whether or not its password matched. With internal
authentication listed first, a Kerberos user could type another Kerberos
user's principal and be logged in as them, and an LDAP user could do the
same with an LDAP account whose email is their username. Internal login
logs in form.user, whose password was verified, only if it is an
internal account, and otherwise nothing.

The LDAP + Internal login test relied on an LDAP bind that accepted the
internal test account's credentials logging in that internal account,
which is the behaviour fixed here. LDAP now refuses those credentials in
that scenario, and new scenarios check that an LDAP login whose username
matches an internal account is not logged in as it, with LDAP or
internal authentication tried first. A further test logs in through the
login endpoint as a Kerberos user who types another Kerberos user's
principal. The LDAP documentation's add-external-user example passed the
source as an argument; it is given with --auth-source.
2026-10-24 19:36:14 +05:30
Dave Page 7378060e5c Ensure LDAP authentication only logs in LDAP-sourced accounts. #10675
LDAPAuthentication.login() looked up the user to log in by username
alone, or accepted the form.user set by Flask-Security's internal
validation, without checking its auth source. Because the same username
may exist under several auth sources, an LDAP user whose username matched
an Internal account (such as the initial administrator created at setup)
was logged in as that Internal account, with its roles.

Only use form.user if it is LDAP-sourced, and restrict the fallback
lookups to auth_source=LDAP, matching the existing guard in Webserver
authentication.

Document that the initial administrator is always an Internal account,
and recommend deactivating it in favour of an LDAP administrator when
using LDAP authentication only.

Reported-by: Yves Soete of Blacksight LLC
2026-10-24 19:36:14 +05:30
Kundan d52fe4740e Stop SSH tunnels using the pgAdmin service account's own SSH identity. #10662
sshtunnel was given neither host_pkey_directories nor ssh_config_file, so it
always loaded the unencrypted private keys in ~/.ssh of the account pgAdmin
runs as, and read that account's ~/.ssh/config (IdentityFile, User, HostName,
ProxyCommand) for the tunnel host. In server mode any user could therefore
configure a tunnel to a host reachable by that account, with no credentials
or an identity file that does not exist in their storage, and authenticate
with the service account's key. The ssh-agent of that account could also be
used.

In server mode the tunnel no longer reads those keys or that configuration,
and does not use the agent. An identity file that cannot be found in the
user's storage is reported instead of silently falling back to ~/.ssh.
Desktop mode is unchanged.

Compatibility: in server mode, SSH tunnels that relied on the service
account's own key, ~/.ssh/config or ssh-agent will stop working; the
identity file or password must be configured on the server instead.
2026-10-24 19:36:14 +05:30
hiteshjambhale 67eab1ba89 Invalidate a user's other sessions when their password is changed. #10646
Rotate fs_uniquifier on a password change (self-service and admin reset), so
every other session of that user is logged out. The changing session is
re-logged in, and its database connections are kept.

Re-encrypt saved passwords, including shared-server ones, under the new key.
Passwords that can't be decrypted are cleared, and the user is told. If
re-encryption fails, the sessions are still revoked and all saved passwords
are cleared rather than returning an error.

Reported-by: Zohaib
2026-10-24 19:36:13 +05:30
Kundan 9e95d9a721 Reject SHARED_STORAGE paths in the utility binary-path guard. #10656
does_utility_exist() and /misc/validate_binary_path only rejected a
binary path under STORAGE_DIR, so a user could point the binary path of
a server type at a SHARED_STORAGE directory that ordinary users can
write to, and have pgAdmin execute whatever file was placed there
(CWE-426).

The check is now made by is_reserved_storage_path(), shared by both call
sites and extended to every SHARED_STORAGE entry. It expands $DIR and
collapses '..' before resolving symlinks, so it judges the directory the
utilities actually run from, compares directories with samefile() so
that a different spelling on a case-insensitive filesystem cannot get
past it, and refuses a path containing a NUL. An empty STORAGE_DIR is
treated as unreserved instead of being resolved against the working
directory. The guard is enforced inside get_binary_path_versions(), so
no caller can skip it, and the PSQL tool now goes through
does_utility_exist() too.

Reported-by: Harsh Singh
2026-10-24 19:36:13 +05:30
hiteshjambhaleandDave Page 9be31a019f Reject a backslash in a double-quoted identifier in the Import/Export Data query export. #10663
_is_query_parens_balanced() rejected a backslash inside a single-quoted
string but not inside a double-quoted identifier, where it treated the
next quote as closing the token. psql does not: strtokx in
parse_slash_copy takes its escape character from the connection's
standard_conforming_strings setting and applies it to whichever quote
opened the token, so with standard_conforming_strings off the \" in
"a\"b" is an escaped quote and the identifier runs on to the next quote.

That desynchronises our quote state from psql's in the opposite
direction to the case fixed in 1496fabe2, and a query export such as
SELECT "a\"b"c) TO PROGRAM 'cmd' x" therefore passed the balance check
whilst the ) it hid closed the wrapping \copy (...) context, exposing a
live TO PROGRAM clause. psql calls popen() for a client-side
\copy ... TO PROGRAM before the backend sees the statement at all, so
the command runs on the pgAdmin host even though the query is then
rejected as a syntax error. An ordinary PostgreSQL role can set
standard_conforming_strings on itself, and a non-administrator pgAdmin
account holds tools_import_export_data by default, so no privileged
access of either kind is needed.

Apply the same treatment as the single-quoted branch and reject any
backslash encountered whilst scanning a double-quoted identifier, since
the correct interpretation still depends on a server setting we cannot
reliably know at validation time.

Co-authored-by: Dave Page <dpage@pgadmin.org>
Reported-by: Yonghwa Lee of Xint by Theori
2026-10-24 19:36:13 +05:30
145e511f05 Stop libpq using the pgAdmin service account's Kerberos credentials in server mode. #10655
When a connection was not meant to use a Kerberos user's delegated
credentials, pgAdmin removed KRB5CCNAME from its environment, so the
Kerberos library fell back to the default credential cache of the account
pgAdmin runs as. libpq then answered any server that asked for GSSAPI
authentication with that account's ticket, whatever user name the
pgAdmin user gave, so any user could connect as the service account's
principal; gssencmode=disable does not prevent this. A client keytab for
that account had the same effect, even with no cache, as the library
fills the cache from it. On Windows, SSPI used the service account's
logon in the same way. psql was also started with a copy of pgAdmin's
environment, which could hold another user's credential cache whilst that
user was connecting, and the connection made to list a publisher's
publications was not made under the lock that guards it.

In server mode KRB5CCNAME and KRB5_CLIENT_KTNAME now always point at a
file that cannot exist, except whilst a user who logged in with Kerberos
connects to a server with Kerberos authentication enabled, when
KRB5CCNAME is that user's delegated cache as before. Because environment
isolation alone does not stop SSPI or gssproxy, every other connection
also gets require_auth=!gss,!sspi and gssencmode=disable, merged with the
server's own require_auth, which is refused if it allowed only GSS or
SSPI. A Kerberos-allowed connection forces gsslib=gssapi, so libpq uses
the delegated cache rather than the Windows logon. psql and the utilities
receive the same settings as PGREQUIREAUTH, PGGSSENCMODE and PGGSSLIB;
background processes now pass the server's own kerberos_conn instead of
always assuming a Kerberos connection, and the publication lookup
connects under the lock. Desktop mode is unchanged.

The forced require_auth, gssencmode and gsslib are serialised last, so
they win over any value a crafted connection parameter key places before
them, and the final connection string is parsed and refused if any of
them differs from the value forced (or is present where it is left to
the environment), so a smuggled value cannot steer the PSQL tool or a
utility to GSSAPI or SSPI however the parameters were serialised.

A pg_service.conf entry ranks above the PG* environment variables, so
only a service the administrator lists in SERVER_MODE_ALLOWED_SERVICES
can override these settings for the utilities; the documentation says
such an entry must not set them.

Compatibility: in server mode, connecting with the service account's
Kerberos ticket, client keytab or Windows logon (SSPI) no longer works;
only users who log in to pgAdmin with Kerberos can use GSSAPI, with their
own delegated credentials, as the documentation already described. A
server whose require_auth lists only gss or sspi is refused unless the
user logged in with Kerberos (SSPI-only is never usable). require_auth
needs libpq 16 or later; with an older libpq only the KRB5CCNAME and
KRB5_CLIENT_KTNAME isolation applies, which does not cover Windows SSPI
or gssproxy.

Co-authored-by: Dave Page <dpage@pgadmin.org>
Co-authored-by: hiteshjambhale <hitesh.jambhale@enterprisedb.com>
2026-10-24 19:36:12 +05:30
a0c8f4857f Restrict connection services to an administrator's allowlist in server mode. #10654
libpq looks a service up in the connection service file of the account
pgAdmin runs as, and an entry there can hold a password or name a
password file or client certificate. In server mode any user could set a
server's service, or a 'service' connection parameter, to one of those
entries and connect with its credentials. Likewise, a PGPASSWORD or
PGSERVICE variable set for that account was used by libpq for every
connection that had no value of its own, and passed on to the utilities.

In server mode a service may now only be used if it is listed in the new
SERVER_MODE_ALLOWED_SERVICES setting, which is empty by default. Creating
or updating a server, an ad hoc workspace connection or a servers.json
import that names any other service is refused, and connecting to an
existing server, or running psql or a utility for it, fails with a
message that names the setting. The 'servicefile' connection parameter is
refused in server mode, and PGPASSWORD and PGSERVICE are removed from
pgAdmin's environment at startup, with a warning. PGSERVICEFILE and
PGSYSCONFDIR are kept, since they locate the listed services. Desktop
mode is unchanged.

The allowlist is checked again on the final connection string, as libpq
will parse it, so a service smuggled in through a crafted parameter key
is refused however the parameters were serialised. pg_dumpall expands a
--database value containing "=" as a connection string, so the
maintenance database name of Backup Server and Globals is wrapped in one
and a name such as "service=name" no longer selects a service from the
service account's service file. client_files_isolated() treats a missing
PGADMIN_RUNTIME as "not the desktop runtime", so "setup.py load-servers"
no longer fails on any servers.json containing a Service and still
enforces the allowlist in server mode.

The tests run the real job-creation path of every tool that starts a
utility, and check that a service that is not listed is refused before
the utility starts, a listed one is exported as PGSERVICE, and a service
or servicefile connection parameter, or a database name that looks like
a connection string, never selects a service.

Compatibility: in server mode, servers that use a service stop
connecting until the administrator lists it in
SERVER_MODE_ALLOWED_SERVICES, and a PGPASSWORD or PGSERVICE set in the
environment pgAdmin starts with is ignored. "setup.py load-servers" now
refuses a servers.json whose Service is not in
SERVER_MODE_ALLOWED_SERVICES (exit status 1) instead of printing an
error and exiting 0.

Co-authored-by: Dave Page <dpage@pgadmin.org>
Co-authored-by: hiteshjambhale <hitesh.jambhale@enterprisedb.com>
2026-10-24 19:36:12 +05:30
KundanandDave Page 0eefa38f77 Stop leaving server passwords in pgAdmin's own process environment. #10653
To pass a server's password to psql and to the utilities run as background
processes, ServerManager.export_password_env() wrote it into os.environ:
as PGPASSWORD for psql, and under the process ID for a utility. Nothing
removed it again, and pgAdmin's environment is shared by every user's
requests and copied into every process it starts, so another user's later
psql session or utility inherited the password, and libpq read PGPASSWORD
for any connection made without one of its own. In server mode that let
one user connect with another user's saved password.

The password now goes only into the environment built for the process
that needs it: export_password_env() fills in a dict it is given, the
background process adds it to the environment of that process alone, and
psql is started with a copy of pgAdmin's environment plus its password,
rather than with os.environ itself, which get_user_env() also modified by
setting the user's psqlrc and history paths in it. The process executor
removes the variable it reads the password from, so the utility only
sees PGPASSWORD.

There is no compatibility impact: psql and the utilities receive the same
password in the same variable as before.

Co-authored-by: Dave Page <dpage@pgadmin.org>
2026-10-24 19:36:12 +05:30
KundanandDave Page 32db693198 Stop libpq using the pgAdmin service account's own client files in server mode. #10652
When a server had no password file, client certificate or client key
configured, or the configured one could not be found, pgAdmin left the
parameter out of the connection and libpq fell back to ~/.pgpass,
~/.postgresql/postgresql.crt and ~/.postgresql/postgresql.key (or
PGPASSFILE, PGSSLCERT and PGSSLKEY) belonging to the account pgAdmin runs
as. In server mode that let any user connect with the service account's
saved passwords or client certificate, and supplying a copy of its public
certificate was enough for libpq to pair it with the service account's
private key.

In server mode each of these parameters is now always given a value:
the user's own file if one is configured, otherwise a path that can never
be opened, so libpq neither uses nor looks for a default. This applies to
the connection string, to the PGPASSFILE, PGSSLCERT and PGSSLKEY variables
passed to the utilities, and to the direct connection made to list a
publisher's publications. A configured file that does not exist is now
passed on as configured instead of being dropped, so a missing root
certificate or CRL no longer quietly falls back to root.crt or root.crl,
and a CRL directory is now passed on in server mode. The trust settings
(sslrootcert, sslcrl, sslcrldir) are still left to libpq when they are not
configured, as they hold no secret, and "system" is no longer mistaken for
a file name in the subscription connection. Desktop mode is unchanged.

libpq ranks a pg_service.conf entry above the PG* environment variables,
so a service entry that set passfile, sslcert or sslkey still won for
pg_dump, pg_restore, psql and the maintenance tools. In server mode the
three settings are therefore also passed in the --dbname connection
string, which libpq ranks above the service file; pg_dumpall takes them
in a separate --dbname argument so that its per-database pg_dump
processes inherit them. pg_dumpall's --database, the maintenance database
name passed raw, is now wrapped as a connection string too, so a name
such as "passfile=..." cannot bring the service account's files back. The
file settings are chosen from the same source as the environment
variables, so that the two cannot disagree.

Compatibility: server mode deployments that relied on the service
account's ~/.pgpass, PGPASSFILE, default client certificate and key,
PGSSLCERT or PGSSLKEY, or on a passfile, sslcert or sslkey in a
pg_service.conf entry, will need to configure those files on each server
instead. In server mode a pg_dump, pg_restore or psql older than
PostgreSQL 10 fails on the passfile keyword, and a server configured with
an sslcert but no sslkey now fails with "certificate present, but not
private key file" instead of silently using the service account's key.
The container is not affected, as its entrypoint already copies
PGPASS_FILE into the user's storage and sets the password file
explicitly. Passwords in a pg_service.conf entry chosen through the
service setting are not addressed here.

The tests now cover a server whose user password file is held only on
the server row. The auth gating test restores the provider modules it
re-imports, so later OAuth2 tests no longer fail depending on test
order.

Co-authored-by: Dave Page <dpage@pgadmin.org>
2026-10-24 19:36:12 +05:30
KundanandDave Page d761942d0b Restrict sharing a server to administrators in the server API and the servers.json import. #10651
The server dialog only shows the Shared switch to administrators, and
the servers.json import only honoured it for them, but the create and
update endpoints stored whatever 'shared' and 'shared_username' they
were sent. Any user able to register a server could therefore share one
with every other user of a server mode installation. The import had a
similar gap: validate_json_data() removed a non-administrator's "Shared"
entries only after its loop, so an early validation error left them in
the data, and the web path ignored that error, so selecting a shared
entry in a file that also held an invalid one created a shared server.

A non-administrator's request that would share a server is now refused
with a 403. A 'shared' value that changes nothing is still accepted, so
editing a private server is unaffected, and 'shared_username' is dropped
rather than refused because the dialog sends it whenever the username
changes. The import prunes a non-administrator's shared entries before
validating and skips them again for each imported entry, only a JSON
true counts as shared, and validation errors are reported on the web
path too. Copy Server no longer sends shared for a non-administrator
owner.

The existing servers are cleared for "replace" only after the file has
validated, so a refused file no longer deletes them. Servers shared by
non-administrators before the upgrade stay shared until the owner
un-shares them or an administrator changes them; pgAdmin warns about
them at server-mode startup, and the documentation describes this.

Compatibility: a servers.json import in server mode that fails
validation is now refused as a whole on the web path, as it already was
in setup.py.

Co-authored-by: Dave Page <dpage@pgadmin.org>
2026-10-24 19:36:12 +05:30
2afe505ef4 Prevent connection file paths and parameter keys escaping the user's storage directory. #10650
In server mode, get_complete_file_path() joined the user's storage
directory with the path they supplied after stripping only leading
slashes, so a password file, SSL certificate, key, CRL or SSH tunnel
identity file set to "../<another user>/.pgpass" (through the server
dialog, the API or a servers.json import) would connect with another
user's credentials or key. The sslkeylogfile parameter was copied into
the connection string unchanged, so a traversal path let libpq create or
append a file as the pgAdmin service account.

The resolved path, with symbolic links followed, must now stay inside
the user's storage directory, or inside the named shared storage
directory for a "Name:/file" path, as the file manager already requires.
sslkeylogfile is confined the same way, is refused in a shared storage
directory that is read-only for the user, and is no longer inherited by
non-owners of a shared server. A path that escapes, or whose storage
directory cannot be determined, raises PermissionError rather than
letting libpq fall back to its default file, and the message says where
the file has to live. Desktop mode is unchanged.

make_conninfo() quotes connection-parameter values but not their keys,
so a key such as 'sslmode=require passfile' smuggled its own
keyword=value pairs past these checks. Only exact libpq keywords, read
from the linked libpq at runtime, are now accepted as connection
parameter keys: when a server is created, updated, imported from
servers.json or used for an ad-hoc connection, and again when the
connection string is built, for rows saved earlier.

Connecting, the SSH tunnel and the utilities' job creation report a
refused path or key instead of proceeding, and a job whose environment
cannot be resolved is removed rather than left in the Processes list. A
server with a refused path or key can still be listed and edited to
correct it. On Windows, the short path of a not-yet-existing file is
resolved via its parent directory instead of being dropped.

Co-authored-by: Dave Page <dpage@pgadmin.org>
Co-authored-by: hiteshjambhale <hitesh.jambhale@enterprisedb.com>
2026-10-24 19:36:12 +05:30
hiteshjambhale 730d1e783c Refuse hard links and FIFOs in the symlink-race fixes, and stop leaking storage paths in errors. #10649
Follow-up to the Import/Export Servers, File Manager and utility-file
symlink-race fixes.

- Hard links: O_NOFOLLOW refuses only symbolic links, so a second name
  for a file outside the storage directory was still opened.
  _open_upload_target(), _open_read_target() and open_utility_file() now
  refuse a file whose link count is not 1, reporting a file unlinked
  after the open separately from one with several links. For writes,
  O_TRUNC is applied only after that check (via ftruncate), so a
  hard-linked file is never emptied before it is refused.

- FIFOs on write: _open_upload_target() opens non-blocking and accepts
  only a regular file, so a FIFO planted at the path can no longer hang
  an upload, save or export waiting for a reader. _open_beneath()
  reports the ENXIO of a reader-less FIFO as "Not a regular file", so
  Backup, Restore and Import/Export Data get the same message.

- Errors: the Import/Export Servers, save_file, Backup, Restore and
  Import/Export Data handlers return the reason (strerror) rather than
  str(e), which included the absolute storage path, and fall back to the
  exception's text for errors without an errno, so a non-UTF-8
  servers.json is reported instead of failing with a 500.
  load_database_servers() keeps the file path in its messages only for
  the setup.py CLI, and the upload response returns the
  storage-relative name instead of the on-disk path.

Tests cover the hard-link refusal (target left intact), reader-less
FIFOs on the upload and utility-write paths, the non-UTF-8 servers.json
and the handlers' path-free errors.
2026-10-24 19:36:11 +05:30
hiteshjambhale c4321b9968 Fix symlink races in the files handed to Backup, Restore and Import/Export Data. #10648
Backup, Restore and Import/Export Data checked the user's file path
against their storage directory with filename_with_file_manager_path()
and then passed the path to pg_dump, pg_dumpall, pg_restore or psql,
which opened it by name later. A symbolic link swapped in at the leaf or
a parent directory in between redirected the utility outside the storage
directory, so a backup could overwrite, or a restore or \copy read,
another file that pgAdmin's OS user can reach.

In server mode pgAdmin now opens the file itself through the File
Manager's descriptor-relative O_NOFOLLOW walk from the storage directory,
accepts only a regular file, and hands the utility /dev/fd/N.
BatchProcess.start() gains pass_fds and launch-only arguments so the
descriptor is inherited by the process executor and the utility, whilst
the job details stored and shown to the user keep the real path.

Descriptors are only passed on Linux; on macOS and the BSDs the file is
still opened and checked safely but the utility reopens it by name
afterwards. Desktop mode and Windows are unchanged.
2026-10-24 19:36:11 +05:30
hiteshjambhale 99f5606e2e Fix symlink races in Import/Export Servers and File Manager file opens. #10647
dump_database_servers() validated the servers.json path against the
user's storage directory with filename_with_file_manager_path(), then
wrote it with a plain open(), so a symbolic link swapped in at the leaf,
or at any parent directory of it, between the check and the write let the
export overwrite a file outside the storage directory.
load_database_servers() and the import file-listing endpoint had the same
gap on the read side.

A new _open_beneath() opens the storage directory and then walks down to
the file one component at a time, each open relative to the descriptor of
the directory above it and made with O_NOFOLLOW, so the kernel refuses a
symbolic link wherever it appears below the storage root. New files are
created 0o600, and reads accept only a regular file, opened non-blocking
so that a FIFO cannot hang the request. Desktop mode, Windows and the
setup.py CLI path are unchanged.

Reported-by: MUTED CYBERSECURITY S.L.
2026-10-24 19:36:11 +05:30
hiteshjambhale a1a43e8c28 Stop the materialized view refresh redirecting its connection via a crafted database name. #10645
MViewNode.refresh_data() passed the target database's name straight to
psql's --dbname argument. libpq treats a --dbname value containing "="
(or a postgresql:// URI) as a full connection string, so a database
named e.g. 'host=attacker port=5432 dbname=postgres' - creatable by any
role with only CREATEDB - redirects the spawned psql to an attacker host,
leaking the connecting user's saved server password.

Route the name through database_conninfo(), the same helper already used
for backup, restore, maintenance and import/export, so libpq treats it
strictly as a database name and never as connection directions.

Reported-by: Bae Seung-won of Ajou University
2026-10-24 19:36:11 +05:30
Kundan ea293b335e Fix the Statistics node failing to list its children in Object Explorer. #10310 (#10639)
pgAdmin renders its templates with trim_blocks, which removes the newline
after a block tag. nodes.sql ended its WHERE clause with a conditional, so
with neither a statistics id nor schema_diff set, which is what expanding
the Statistics collection sends, the SQL ran into "::oidORDER BY" and the
server rejected it.

Give each condition its own line ending in plain text, and add a test that
renders the template for every parameter combination and runs it.
2026-10-22 18:18:27 +05:30
dependabot[bot] a623526cb7 Javascript dependency: Bump electron-store in /runtime (#10627)
Bumps [electron-store](https://github.com/sindresorhus/electron-store) from 11.0.2 to 12.0.0.
- [Release notes](https://github.com/sindresorhus/electron-store/releases)
- [Commits](https://github.com/sindresorhus/electron-store/compare/v11.0.2...v12.0.0)

---
updated-dependencies:
- dependency-name: electron-store
  dependency-version: 12.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-22 13:30:16 +02:00
dependabot[bot] 39aed6083b Javascript dependency: Bump electron (#10626)
Bumps the runtime-javascript-minor-and-patch group in /runtime with 1 update: [electron](https://github.com/electron/electron).


Updates `electron` from 44.5.1 to 44.7.0
- [Release notes](https://github.com/electron/electron/releases)
- [Commits](https://github.com/electron/electron/compare/v44.5.1...v44.7.0)

---
updated-dependencies:
- dependency-name: electron
  dependency-version: 44.7.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: runtime-javascript-minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-22 13:29:52 +02:00
dependabot[bot] 05b2864d32 Python dependency: Update flask-socketio requirement (#10628)
Updates the requirements on [flask-socketio](https://code.miguelgrinberg.com/miguelgrinberg/flask-socketio) to permit the latest version.

---
updated-dependencies:
- dependency-name: flask-socketio
  dependency-version: 5.7.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-22 13:29:19 +02:00
dependabot[bot] 8c5dd5eadb Javascript dependency: Bump follow-redirects in /web (#10638)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.16.0 to 1.16.1.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.16.0...v1.16.1)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-22 13:29:15 +02:00
dependabot[bot] b345337ddc Javascript dependency: Bump follow-redirects in /runtime (#10637)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.16.0 to 1.16.1.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.16.0...v1.16.1)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-22 13:29:10 +02:00
Dave Page b8afe34fbb Keep external pages out of the desktop runtime's privileged windows and confine non-prompted downloads to the downloads directory. #10614 (#10616) 2026-10-16 09:38:54 +01:00
Dave Page 7f21dc4610 Reconnect a lost Query Tool connection as the user and role it was changed to. #10613 (#10622) 2026-10-16 03:21:58 +01:00
Dave Page ac76a81ad2 Revert the Query Tool execute option checkboxes when changing an option fails. #10600 (#10621) 2026-10-16 02:29:02 +01:00
Dave Page 5f9909e109 Free Query Tool autocomplete objects when an idle session's connections are released. #10612 (#10625) 2026-10-16 02:26:16 +01:00
Dave Page 31a5c5418c Keep the Query Tool execute options when its transaction is re-created. #10598 (#10599) 2026-10-16 01:07:38 +01:00
Dave Page cc1e1ef184 Remove the dead tree 'loadfail' handler from browser.js. #10601 (#10620) 2026-10-16 00:59:08 +01:00
Dave Page 1402f7d9cd Fix the Jest addNewDatagridRow helper so schema UI specs actually add a row. #10602 (#10624) 2026-10-16 00:46:52 +01:00
Dave Page 6594977cc3 Fix Schema Diff treating a function whose input argument was renamed as two unrelated functions. #10597 (#10623) 2026-10-16 00:30:56 +01:00
Dave Page b98470f327 Allow shift + click to extend the cell range selection in the Query Tool results grid. #8647 (#10617) 2026-10-15 22:27:56 +01:00
Dave Page 35307612fc Fix formatting a view's SQL being treated as a column change that drops and re-creates the view. #9838 (#10591) 2026-10-15 22:21:26 +01:00
Dave Page 8b381912a8 Fix Azure and Google authentication in the cloud deployment wizard. #9921 (#10609) 2026-10-15 21:25:00 +01:00
Dave Page ab749c630c Report a failed autocomplete reconnect in the Query Tool instead of ignoring it. #10604 (#10606) 2026-10-15 20:53:26 +01:00
Dave Page 1cac42d986 Keep Query Tool execution disabled until a restored tab's execute options reach the server. #10618 (#10619) 2026-10-15 20:49:10 +01:00
Dave Page f73b51f912 Fix modal dialogs being hidden from assistive technology by aria-hidden on the application root. #9865 (#10587) 2026-10-15 19:40:21 +01:00
Dave Page 733cd5ba5e Allow the emailed MFA code to be re-entered after an invalid code is entered. #6671 (#10589) 2026-10-15 19:30:20 +01:00
Dave Page 8877330705 Fix Query Tool autocomplete objects being shared between sessions that use the same transaction id. #10607 (#10608) 2026-10-15 18:20:52 +01:00
Dave Page 8d8bcf3748 Fix the Query Tool not re-running the query after reconnecting at a password prompt. #10603 (#10605) 2026-10-15 18:02:30 +01:00
Dave Page 7828c9b2a1 Restore the per-tab toolbar options when Query Tool tabs are restored on relaunch. #9603 (#10593) 2026-10-15 17:29:43 +01:00
Dave Page 09afc34c0e Fix Schema Diff treating functions that differ only in OUT arguments or return type as unrelated objects. #6652 (#10595) 2026-10-15 17:23:43 +01:00
Dave Page 2477a94b32 Fix a flaky Jest test for the connection parameter value dropdown. (#10610) 2026-10-15 15:06:27 +01:00
Dave Page bbb5cc250b Connect the server when changing the Query Tool connection after it was disconnected. #8144 (#10588) 2026-10-15 14:50:25 +01:00
Dave Page 33fab95a73 Fix a database's label staying at '[Disconnecting...]' when disconnecting it fails. #9624 (#10590) 2026-10-15 14:49:51 +01:00
Dave Page 755cfec19e Show fill factor, toast tuple target and parallel workers in the table Properties panel. #9212 (#10594) 2026-10-15 12:34:34 +01:00
Dave Page 5711c4dd5a Keep the AI Assistant's intermediate responses instead of replacing them with placeholder messages. #9818 (#10592) 2026-10-15 12:20:18 +01:00
Dave Page a6374d1ccd Re-sort renamed server groups and other nodes in the Object Explorer instead of waiting for a reload. #8015 (#10586) 2026-10-15 11:45:52 +01:00
Dave Page 78afe89752 Fix Query Tool autocomplete running as the wrong user, or failing, after changing the connection to a different user. #7619 (#10582) 2026-10-15 10:42:16 +01:00
Dave Page 70c6777b5e Fix ERD tables becoming immovable after a Shift-drag selection. #9890 (#10581) 2026-10-15 10:38:55 +01:00
Dave Page 7c5b0b7da7 Fix modal dialogs losing keyboard focus to a tool iframe loading in the background. #9784 (#10583) 2026-10-15 10:38:39 +01:00
Dave Page 472965ec40 Fix the server context menu showing database options after the tree state is restored. #7612 (#10580) 2026-10-15 10:38:24 +01:00
Dave Page 610cad0e0e Select the adjacent tab when the active tab is closed, rather than the left-most. #9130 (#10578) 2026-10-15 10:38:10 +01:00
Dave Page 72ab768b94 Fix the parameter value dropdown keeping stale options when the parameter name is changed. #9630 (#10579) 2026-10-15 10:37:52 +01:00
Sanskar Kharya 5063c76a06 Preserve explicit 24-hour mode in date-time picker popups. #10584 (#10596) 2026-10-15 10:36:29 +01:00
Dave Page 607c9eccbf Remove unused Google API documents, Babel locale data and packaging tools from the packages. #9331 (#10576) 2026-10-14 18:20:56 +01:00
Dave Page e8f7a18c98 Allow the login page to be skipped when OAuth2 is the only authentication source. #9975 (#10575) 2026-10-14 17:19:12 +01:00
Dave Page a00cd1dd43 Fix Query Tool state save/restore failing on installations with a legacy SECRET_KEY. #10573 (#10574) 2026-10-14 17:17:46 +01:00
Dave Page b6a4c7fe15 Document running the container with rootless Podman, and the PUID and PGID environment variables. #9524 (#10572)
* Document running the container with rootless Podman, and the PUID and PGID environment variables. #9524

* Note that the U volume option is recursive and does not relabel for SELinux.
2026-10-14 15:44:33 +01:00
Dave Page d699acab0b Clarify the configuration files documentation. #5369 (#10571)
* Document that config_local.py is lost on upgrade on macOS. #5369

* Retitle the config_py docs page to 'Configuration Files', as it covers all four configuration files. #5369
2026-10-14 14:27:01 +01:00
Hari Prasad 5f6d72c686 Add numpad zoom shortcuts to the Desktop View menu. #10503 (#10533) 2026-10-14 13:24:34 +01:00
Dave Page 50209794d7 Require SSL for pgEdge Starfleet hosts and warn when libpq cannot connect to them. (#10569)
Starfleet endpoints drop SSL connections that arrive without SNI, which
libpq only sends from version 14, and never answer a non-SSL connection.
The cloud wizard now warns when pgAdmin's libpq is older than 14, and
the Register Server dialog defaults sslmode to require for *.pgedge.cloud
hosts, since with prefer any failed SSL attempt is retried without SSL
and reported only as a timeout.
2026-10-14 12:57:08 +01:00
Sanskar Kharya 5515b54d53 Move the 'Returns a set?' option to the Definition tab in the Function dialog. #9264 (#10565)
Also update the documentation and screenshots to match.
2026-10-14 12:08:07 +01:00
Dave Page a0b4c09772 Fix server update ignoring the connected-server check, and Connection.reset() never reconnecting. (#10567) 2026-10-14 11:37:03 +01:00
Dave Page 0389ee789a Bundle Python 3.13.16 in the Windows and macOS packages. (#10566)
Python 3.14 has to wait: the Windows build needs pywinpty, which is held
at 2.0.x for andfoy/pywinpty#545, and 2.0.x cannot be built for 3.14.
Note that beside both pins.
2026-10-14 10:45:54 +01:00
Dave Page 26a7d92b0b Fix the Linux packages shipping a stray copy of Python as venv/bin/𝜋thon. #10414 (#10564)
Python 3.14's venv module creates a "𝜋thon" symlink next to python,
python3 and python3.X (CPython gh-119535). The hash bang fixup runs
"sed -i" over venv/bin/*, which replaces every symlink with a regular
copy of its target; the python* links are recreated afterwards, but the
new alias was not, so packages built against Python 3.14 shipped a full
copy of the interpreter under that name, and dpkg on Ubuntu 26.04 fails
to unpack it. Nothing uses the alias, so remove it when the venv is
created.
2026-10-13 14:56:32 +01:00
Sanskar Kharya e02150e634 Fix the Dashboard Logs tab failing on multi-byte characters split across read chunks. #10511 (#10526)
The Logs tab reads the current log file in fixed-size byte ranges with
pg_read_file(), which raises 'invalid byte sequence' (SQLSTATE 22021)
when a range boundary falls inside a multi-byte character, so Tabular
format failed on logs containing non-ASCII text. The ranges are now read
with pg_read_binary_file(), transported as hex and decoded in pgAdmin
using the server encoding. Tabular reads fetch a few bytes of overlap so
a character split at a page boundary is shown whole on one page, and
genuinely invalid bytes are shown as replacement characters rather than
raising an error. For the EUC family of server encodings a page boundary
can still garble one character, as lead and trail bytes share ranges.

- Keep valid text after an invalid byte near the end of the file, trimming only a character still being written.
- Treat a truncated character in the CJK codecs as incomplete rather than invalid.
- Correct the encoding limitation comment, as GBK and GB18030 are not server encodings.
2026-10-13 13:23:44 +01:00
Dave Page 3e6f0c0703 Make server tests restore the shared test fixture after themselves. #10553 (#10562)
Several tests changed the server dict that the runner shares between all
tests (shared, service, SSH tunnel settings and so on) and never put it
back, so later tests inherited those settings; running the whole server
test package locally made the non-owner tests in
test_server_data_isolation.py fail with HTTP 428.

Move restore_server_fixture_on_cleanup() into servers/tests/utils.py and
call it from every test that modifies the fixture, including the sqleditor
new connection tests that added a password key, and stop the SSH mock
connect test relying on a tunnel_password key leaked by test_add_server.
2026-10-13 13:14:19 +01:00
Dave Page 1b05065eb0 Fix changing an identity column's START value also restarting its sequence. #10550 (#10561)
The column ALTER emitted RESTART SET START whenever START changed,
rewinding the identity sequence so the next generated value could
collide with existing rows; Schema Diff hit this too when only START
differed. RESTART is now emitted only when the sequence is still pending
at its old START with nothing generated since, or when its current value
would fall outside a new MINVALUE or MAXVALUE (which PostgreSQL refuses
without it). To decide, the column update reads last_value and is_called
from the sequence itself when START is set, since
pg_sequence_last_value() is NULL after any RESTART WITH.
2026-10-13 12:57:17 +01:00
Dave Page 8f24dc378d Add a test for Reset discarding pending SQL editor values in dialogs. #10552 (#10560)
The fix for #10357 remounts the dialog form on Reset so that SQL editor
values still waiting to come back through SchemaView are discarded. This
spec types into an SQL field, removes the edit, types again and presses
Reset before SchemaView has passed those values back, then checks that the
original value is shown. Without the remount the editor keeps the last
typed value.
2026-10-13 12:11:02 +01:00
Dave Page f4337dc8c7 Fix the cursor jumping to the start of SQL fields in dialogs after a quick edit and undo. #10551 (#10559)
When an edit and its undo (or a key, Backspace and the same key again) were
all reported before SchemaView passed the first value back, the editor's
pending values held the same text twice. Matching the newest copy dropped the
value in between, which then replaced the document when it came back. Values
come back in order, so InputSQL now matches the earliest copy; if some are
skipped, the leftover entries are cleared by later changes.
2026-10-13 12:10:01 +01:00
Dave Page fd4b47788b Fix column properties reporting an arbitrary parent for columns merged from several parents. #10554 (#10563)
The inherited-columns CTE joins on column name, so a column merged from
more than one parent produced a row per parent, and DISTINCT ON then
kept whichever came first. Order by the inheritance sequence number so
the first parent in inheritance order is always reported.
2026-10-13 12:07:32 +01:00
Dave Page 74003c19dc Fix Schema Diff not removing a column comment that exists only in the target. #10549 (#10556)
A source column without a comment has a description of None, which the
column update template skips, so the comment was reported as a difference
but never dropped. Send an empty string in that case, as the column dialog
does when a comment is cleared, so COMMENT ON COLUMN ... IS '' is
generated.
2026-10-13 12:06:01 +01:00
Dave Page a11fc0b921 Fix valid escapes below U+0100 being rewritten in SQL_ASCII data and names. #10547 (#10558)
The SQL_ASCII codec unescaped every valid \uXXXX and \UXXXXXXXX
sequence, so a value or column name containing '\u0041' was shown as
'A', and saving the row wrote 'A' back.

Decode each byte as latin-1 and only unescape escapes for code points
from U+0100 to U+10FFFF, which are the only ones pgAdmin writes when
encoding. Lower escapes and invalid sequences are kept as their literal
bytes. Encoding is unchanged.

- Decode long runs of backslashes in linear time in the SQL_ASCII codec.
2026-10-13 12:02:55 +01:00
Dave Page 5811f55b08 Fix negative identity column options being dropped from the generated SQL. #10548 (#10557)
The column and table templates only emitted an identity option when its
value was greater than -1, which was meant to skip unset options but
also dropped every negative one. So on a descending identity column,
changing INCREMENT to -2 in the column dialog or a MINVALUE difference
in Schema Diff produced no ALTER at all, and the table's CREATE SQL lost
its INCREMENT, START, MINVALUE and MAXVALUE. Test for an unset option
explicitly instead.
2026-10-13 12:02:05 +01:00
Dave Page d1374536d8 Fix flaky test_windows_pty_failures counting psql emits from other tests. #10546 (#10555)
The tests patch psql.sio.emit globally, so a psql session from another
test that is still running can emit pty-output into the same mock. Only
count the emit calls sent to the test's own room.
2026-10-13 12:01:47 +01:00
Dave Page 04684e798a Fix View/Edit Data failing on SQL_ASCII databases when a name contains a backslash followed by 'u' or 'U'. #5940 (#10545)
pgAdmin uses raw_unicode_escape as the Python codec for SQL_ASCII
connections, and psycopg decodes column names and query text with it.
A name such as "C:\User\te" contains '\U' that is not a valid
\UXXXXXXXX escape, so decoding raised "truncated \UXXXXXXXX escape".

Register a pgAdmin codec that behaves like raw_unicode_escape but keeps
invalid escape sequences as their literal bytes, and use it for
SQL_ASCII. Encoding is unchanged.
- Give the SQL_ASCII codec incremental support, and keep invalid escapes in server errors.
2026-10-13 08:18:24 +01:00
Dave Page 8df5306ebd Fix debugger messages from successive steps running together on one line. #8664 (#10544)
Each poll of the debugger returns its own batch of notices without a
trailing newline, so appending them directly ran messages from separate
steps together. Start each appended batch on a new line.
- Clarify that debugger message batches only usually lack a trailing newline.
2026-10-13 08:03:35 +01:00
Dave Page ab632646ed Fix the cursor jumping to the start of SQL fields in dialogs when keys are pressed together. #10357 (#10543)
SchemaView passes a field's value back a render or two after the change,
so when two keys are pressed almost at once the SQL editor could be handed
the value from the first key whilst already holding the second. Applying
that older value replaced the whole document, which moved the cursor to
the start. InputSQL now remembers the values the editor has reported and
ignores one that is older than the editor's current content.
- Remount the dialog form on Reset so pending SQL editor values are discarded.
2026-10-13 07:07:43 +01:00
Dave Page 43d1d59e00 Fix Schema Diff reporting identical tables as different when a foreign key's referenced table has a dropped column. #10446 (#10542)
pg_constraint.confkey holds the attribute numbers of a foreign key's
referenced columns, which differ between databases when a column has been
dropped from the referenced table in only one of them. The referenced
columns are already compared by name, so ignore confkey as conkey already
is.

A foreign key whose referenced columns differ is now dropped and
recreated, rather than being reported as different with an empty diff.
2026-10-13 06:31:01 +01:00
Dave Page 149170195d Fix the generated SQL to use a single GRANT statement for roles with identical privileges. #6231 (#10541)
parse_priv_to_db() now merges ACL entries that grant exactly the same
privileges, from the same grantor, into one entry listing every grantee,
so the templates for all object types produce
'GRANT ... TO role1, role2;' rather than one statement per role.

A privilege whose grantee is changed away from PUBLIC now also revokes
PUBLIC's privileges, rather than leaving them in place.
2026-10-13 05:36:19 +01:00
Dave Page e0a2d2138e Fix Schema Diff repeating unchanged column comments and identity options. #10422 (#10540)
Schema Diff passes a changed column with all of its properties, but the
column update template emitted COMMENT ON COLUMN and every identity
sequence option without comparing them with the column as it stands.
So any difference in an identity column repeated its unchanged comment,
and repeated START as RESTART SET START, which rewinds the identity
sequence on the target. Only emit those that actually differ.
2026-10-13 05:15:06 +01:00
Dave Page b10718d616 Fix Reset Layout dropping Query Tool tabs from the saved application state. #10424 (#10539)
resetLayout() re-opened the non-default tabs without their metaData, so
the layout saved straight afterwards stored them as bare ids and loadTab()
had nothing to rebuild them from on the next load. Their group is now
carried over as well, rather than falling back to 'default'.
2026-10-13 04:13:55 +01:00
Dave Page 3ec0aafa36 Fix UNLOGGED handling for partitioned tables and their partitions. #9057, #9836 (#10538)
PostgreSQL 18 rejects UNLOGGED on a partitioned table, in both CREATE
TABLE and ALTER TABLE ... SET UNLOGGED/LOGGED, so on PG18 and later
the Unlogged switch is now disabled for partitioned tables (including
a partitioned partition) and the generated CREATE, ALTER and reverse
engineered SQL no longer include it. Leaf partitions can still be
unlogged, and older servers are unchanged.

The Partitions SQL section of a partitioned table's script also now
keeps UNLOGGED for partitions that are unlogged, which it previously
dropped.
2026-10-13 04:03:21 +01:00
Dave Page 6a90e4f837 Remove the dead usr key from sqleditor.connect_server URLs. #10418 (#10536)
The route has no user placeholder, so url_for() always dropped it and
the backend never read it; the now-unused user argument is removed
from the connect-server helpers too.
2026-10-13 02:44:28 +01:00
Dave Page ccdb1f6271 Fix the Query Tool saving files that were loaded as latin-1 back as UTF-8. #10531 (#10537)
The latin-1 read fallback now records the encoding, and encodings are
tracked per resolved file path rather than by basename, and only after
a save succeeds.
2026-10-13 02:35:01 +01:00
Dave Page 3d5661ed87 Refresh a stale ServerManager when a server id is reused. #6090 (#10312)
A cached manager whose server definition no longer matches is rebuilt,
and the owner's settings are deep-copied before being overlaid for
shared-server users.
2026-10-13 02:14:07 +01:00
Dave Page 6404865bd5 Restore SCHEMA_VERSION 53, reverted by mistake when squashing #10330.
The #10330 branch added and then dropped a schema version bump; replayed
on top of #10506, which also took version 53, the squash set it back to
52 even though the server_passexec_name migration remains.
2026-10-13 01:26:42 +01:00
Dave Page e28b84ed67 Restore tags for standard users on shared servers, and never inherit the owner's passfile. #10136 (#10330)
Tags are copied to a user's shared server entry, whilst passfile is
treated like passwords, SSH keys and SSL client files and is never
copied from or overlaid with the owner's value.
2026-10-13 01:26:15 +01:00
Dave Page fc12b2e36b Pass every supported connection parameter to the utilities. (#10450)
Connection parameters with a libpq environment variable are exported to
pg_dump, pg_restore, psql and the other utilities, PGSERVICE comes from
the per-user server manager, and boolean parameters stored as strings
are normalised consistently with the main connection path.
2026-10-13 01:21:49 +01:00
Dave Page 34908c4093 Spawn psql directly on Windows instead of via cmd.exe. (#10453)
psql is launched directly through pywinpty, read errors end the session
cleanly, spawn failures are reported to the terminal, and the pty is
closed when the session ends.
2026-10-13 00:58:14 +01:00
Dave Page 5a56a3f3dc Allow editing data through simple auto-updatable views. #2363 (#10322)
Views with a single base table, all of its primary key columns exposed,
no INSTEAD OF triggers and no rules other than _RETURN can be edited in
View/Edit Data. Updates and deletes are checked row by row, and adding
rows is disabled because inserts through views are not supported.
2026-10-13 00:56:35 +01:00
Dave Page bee294a373 Normalise the dashboard TPS graph by the measured time between samples. #10273 (#10324) 2026-10-13 00:30:24 +01:00
Dave Page 224c486c58 Exclude non-editable alias and expression columns from Query Tool UPDATE saves. #10103 (#10329) 2026-10-12 23:51:08 +01:00
Dave Page 2a952d678d Fix the UI language not persisting beyond the request that set it in server mode. #10347 (#10351)
The chosen language is now kept in the session and cookie, and any
value not in config.LANGUAGES is ignored.
2026-10-12 23:46:37 +01:00
Dave Page 3a6f86a711 Fix OpenAI streaming tool calls being split into two entries. #10348 (#10352)
Accumulate Responses API function calls by item, treating output_index
and the item id as names for the same call, and use
response.output_item.done for the final name, call_id and arguments.
2026-10-12 23:29:25 +01:00
Dave Page e85db0fb8b Allow ADMIN OPTION holders to manage Group Role membership. #9450 (#10315)
Users holding ADMIN OPTION on a role, directly or through an inherited
membership as PostgreSQL itself allows, can now change its members,
whilst all other property changes still require CREATEROLE.
2026-10-12 23:23:48 +01:00
Dave Page 0cbddf21ba Fix the hardcoded table OID in the column properties query. #10534 (#10535)
The inherited-columns CTE compared pg_inherits.inhrelid with a fixed
OID instead of the table being queried, so inherited columns were never
reported as such on PostgreSQL 14 and later.
2026-10-12 23:15:52 +01:00
Dave Page e2e588c324 Skip virtualisation for small DataGridView grids to avoid a re-measure on tab show. #10143 (#10331) 2026-10-12 22:58:30 +01:00
Dave Page 6302a70316 Drop the scaffolding default partition after Schema Diff rebuilds a partitioned table. #10301 (#10316)
The temporary default partition is dropped when empty and is not created
at all for hash-partitioned tables, which cannot have one.
2026-10-12 22:17:59 +01:00
Dave Page c41b606795 Replace free-text server-mode password exec commands with an administrator allowlist. (#10506)
In server mode, users choose a password exec command by name from
SERVER_PASSEXEC_COMMANDS rather than entering a command line. Existing
commands are converted on upgrade once the allowlist is configured; if
it is empty the conversion is postponed and a warning is logged.
2026-10-12 21:56:11 +01:00
Dave Page d924c15e79 Pass the target database to utilities as a connection string. #10463 (#10464)
The database is passed as a dbname= connection string, quoted when
needed, so service files and unusual names work, and backup and
import/export require a database for object-level jobs.
2026-10-12 21:47:33 +01:00
Dave Page 1530b3551d Don't refuse symlinks or force 0o600 permissions when saving files in desktop mode. #10482 (#10529)
O_NOFOLLOW and the 0o600 mode are only applied in server mode, and the
symlink refusal message is only reported when O_NOFOLLOW was set.
2026-10-12 21:34:38 +01:00
Dave Page 32f9b4a8f6 Fix Schema Diff scripts that convert a column to or from SERIAL. #10292 (#10318)
Converting a plain column to SERIAL now creates the sequence with the
source sequence's own type, moves it past existing values and restores
the nextval() default; converting away from SERIAL drops the default
before the owned sequence.
2026-10-12 20:50:45 +01:00
Dave Page 6b8394fe31 Write cloud wizard credentials through to the session store for AWS, Azure and Google. #10527 (#10528)
The providers keep credentials and authentication state in nested dicts
in the Flask session, which ManagedSession does not detect as modified,
and FileBackedSessionManager may also defer the disk write. Add a
write_session_through() helper that sets both session.modified and
session.force_write, and call it wherever a provider stores or clears
state that a later request depends on.
2026-10-12 20:08:22 +01:00
Dave Page a9f2cb5405 Fix the Object Explorer shortcut not moving keyboard focus into the tree. (#10294)
The shortcut called focus() on the rc-dock tab pane, a plain div that
cannot take focus, so focus stayed where it was. Focus the react-aspen
tree inside the panel instead, which is already focusable, and draw its
focus indicator with the theme's activeBorder colour on :focus-visible.
2026-10-12 20:05:50 +01:00
Dave Page 7c974c005c Restore remembering the last visited directory in Desktop file dialogs. #10226 (#10327)
Electron 43 deliberately stopped remembering the last folder used by the
native open and save dialogs, so they always opened in Downloads. Track the
last visited directory in the runtime's config store and pass it as
defaultPath whenever the caller has not specified a location.
2026-10-12 17:17:52 +01:00
Dave Page b3a941c469 Add JSON and XML export, output encoding, BOM and copy-with-headers options to the Query Tool results. #3205, #4128, #4129, #6695 (#10062)
Results can now be saved as JSON or XML as well as CSV, with preferences
for the output file encoding, prepending a byte order mark to CSV/TXT
files, and the default state of the grid's copy-with-headers toggle.
2026-10-12 17:17:43 +01:00
Dave Page 4682025f0c Fix BEGIN, COMMIT and ROLLBACK silently failing in the Query Tool under server cursor mode. #8991 (#10321)
execute_void() reused the cached server-side cursor, whose execute() cannot
run a transaction-control statement, and the resulting exception was
swallowed, so the statement never reached the database. Run such statements
through a throwaway plain cursor instead, and guard poll()'s error path
against a cursor with no query.
2026-10-12 17:16:32 +01:00
Dave Page e5b6728fa9 Improve keyboard shortcuts for tab switching, line duplication in the SQL editor, and Enter/Escape in dialogs. #3834, #5691, #7167, #7232 (#10067)
Tab switching now works when focus is inside a tool and defaults to
Ctrl+Alt+PageUp/PageDown, Ctrl/Cmd+Shift+D duplicates the current line or
selection in the SQL editor, and dialogs handle Enter and Escape
consistently.
2026-10-12 17:16:28 +01:00
Dave Page fad01ed776 Add the PostgreSQL 18 options to the Backup, Backup Server and Restore dialogs. #9064, #9066 (#10060)
Add --statistics-only, --no-policies, --no-data, --no-schema,
--no-statistics, --statistics and --sequence-data where the utilities
support them, gated on server version 18, and suppress combinations that
pg_dump, pg_dumpall and pg_restore would reject. The pg_dumpall --format
and pg_restore --exclude-database/--globals-only options were reverted
before PostgreSQL 18.0 and so are not included.
2026-10-12 17:16:24 +01:00
Dave Page d5bd079593 Fix index and constraint columns not being shown when their names require quoting. #6481 (#10039)
The expression check compared pg_get_indexdef() output, which is quoted,
with the raw attname, so such columns were treated as expressions and
dropped. Compare against quote_ident(attname) instead, and replace the
.strip('"') calls with an unquote_ident() helper that also unescapes
doubled inner quotes.
2026-10-12 17:16:20 +01:00
Dave Page 5fc540af73 Fix the collation and ctype query error for databases with a non-default LC_COLLATE. #9798 (#10040)
get_ctypes.sql wrapped a multi-row UNION in a scalar subquery, which failed
when a libc database's collation and ctype differed. Rewrite it as a flat
UNION, add a 15_plus variant, and read datlocale for ICU and builtin
providers on PostgreSQL 17+.
2026-10-12 17:16:17 +01:00
Dave Page 1058f34c52 Return False instead of raising when the external config database is unreachable. (#10052)
check_external_config_db() let connection failures and malformed URIs
propagate as exceptions. Create the engine inside the try block, return
False on any failure, and dispose of the engine in a finally block.
2026-10-12 17:16:13 +01:00
Dave Page 3d3eb8feb9 Disable the SSH agent when an SSH tunnel identity file or password is provided. #9814 (#10044)
SSHTunnelForwarder defaults allow_agent to True, so pgAdmin probed the
agent even when it had a credential of its own. Disable the agent in that
case, keeping it enabled when neither is configured.
2026-10-12 17:16:10 +01:00
Dave Page 125cb3007f Fix the OAuth2 userinfo request crashing when the endpoint is configured as None. #10349 (#10353)
The shipped OAUTH2_CONFIG template sets OAUTH2_USERINFO_ENDPOINT to None,
but get_user_profile() only checked whether the key was present, so it
called client.get(None). Check whether the value is set instead, apply the
same check to OAUTH2_LOGOUT_URL and OAUTH2_ADDITIONAL_CLAIMS, and clear a
stored logout URL when the provider has none or the callback fails.
2026-10-12 17:16:06 +01:00
Dave Page fa9762f345 Fix the MAINTAIN privilege being silently dropped for views and materialised views on PostgreSQL 17+. #10350 (#10354)
The PG17+ allowed_privs.json files for views and materialised views were
placed directly in the 17_plus bucket rather than under its sql/
subdirectory, so the versioned template loader fell back to the default
list, which lacks MAINTAIN. Move them under sql/ and add tests covering
the template path and granting MAINTAIN through RE-SQL.
2026-10-12 17:16:02 +01:00
Dave Page d24b946909 Remove the SonarQube scan workflow. 2026-10-12 17:11:46 +01:00
Yousif Wael bdb652b772 Remove inherited columns from the Columns tab when their parent table is removed after reopening a table. #10470 (#10504)
get_formatted_columns() copied the parent table name onto inherited columns
loaded from a saved table's properties, but not the parent's OID, so the
table dialog could not match those columns when the parent was removed from
'Inherited from'. Keep the first parent's OID, matching what the dialog does
when parents are added interactively.
2026-10-12 17:06:12 +01:00
dev-hari-prasad aaa0c8f14d Fix duplicated content when opening large non-UTF-8 files in the Query Tool. #10462 (#10508)
Files are streamed to the Query Tool in 4 MB chunks. If a byte that is not
valid UTF-8 appeared after the first chunk, the resulting UnicodeDecodeError
caused the file to be re-read from the start as latin-1, after earlier chunks
had already been sent, so they were delivered twice.

Check that the whole file decodes with the detected encoding before streaming
anything, falling back to latin-1 up front if it does not. Also replace the
deprecated codecs.open() with open(..., newline='') to preserve line endings.
2026-10-12 17:04:27 +01:00
Sanskar Kharya 641173d0fd Show default privileges in the Database properties panel. #10401 (#10502) 2026-10-12 17:03:10 +01:00
Dave Page ebe4617c00 Add a macOS 26 layered app icon with dark, clear and tinted variants. (#10530)
* Add a macOS 26 layered app icon with dark, clear and tinted variants.

The new pgAdmin4.icon Icon Composer document splits Slonik into body and
line layers over the existing light gradient, using the system dark fill
in dark mode. It is compiled ahead of time into Assets.car, so the build
does not need Xcode 26, and pgAdmin4.icns remains the icon on older
releases.

Closes #10473

* Match the macOS 26 icon's Slonik to the old icon's size and drop its glow.

Remove the thick white silhouette from the body layer, soften the group
shadow, and scale and position Slonik to match pgAdmin4.icns.

* Thin the macOS 26 icon's white lines to match pgAdmin4.icns.
2026-10-12 16:43:22 +01:00
Dave Page a4bdcff7dc Add pgEdge Starfleet to the cloud deployment wizard. (#10499)
* Add a pgEdge Starfleet API client for cloud deployment.

* Add a pgacloud provider for pgEdge Starfleet.

* Add the pgEdge Starfleet cloud deployment blueprint.

* Return the generated pgEdge Starfleet password once on deployment and allow saving it.

* Add pgEdge Starfleet to the Deploy Cloud Instance wizard.

* Test the Starfleet password is fetched once and validate the save request body.

* Show the generated pgEdge Starfleet password once after deployment.

* Document pgEdge Starfleet cloud deployment.

* Show the Starfleet password dialog at most once per job and handle copy failures.

* Wait for the Starfleet instance schema before rendering its form.

The schema is built after an asynchronous client IP lookup, but SchemaView
takes its initial data from the first schema it receives, so mounting it
early left the deployment type unset and hid the managed-only fields.

* Keep the Starfleet token for each deployment job until it completes.

The wizard clears its cloud session as soon as the deployment starts, so
the token was gone by the time the job finished and the generated
password could never be fetched. Copy the token for the job when it is
started, read the password with that copy, and discard it on completion.

* Show the reason a cloud deployment failed.

pgacloud prints the provider's error as JSON before it exits, but the
failure path ignored it, so the user saw only a generic process failure
whilst the server quietly vanished from the tree. Pass the message
through update_server and show it once per job as a plain-text error.

* Keep the cloud deployment failure message until it is dismissed.

* Explain an empty Starfleet BYOC cluster list.

* Wait for Starfleet connection details before finishing a deployment.

* Handle malformed Starfleet responses without a server error.

* Clear the Starfleet PostgreSQL version when the deployment type changes.

* Show the Starfleet size label in the deployment summary.

* Stop logging the values of a background process's environment.

* Use the official pgEdge logo for the Starfleet provider.

* Only mount the selected provider's credentials form in the cloud wizard.

* Require HTTPS and handle malformed pgEdge Starfleet responses.

Addresses CodeRabbit review on #10499: the API client refuses a non-HTTPS
URL before sending credentials, a 2xx body that is not JSON or lacks an
access token raises StarfleetError, and the provider and credential check
report an unexpected response shape instead of failing with a traceback.

* Reject an empty or non-string pgEdge Starfleet access token.

* Note that the pgEdge Starfleet API URL must use HTTPS.

* Add screenshots to the pgEdge Starfleet deployment documentation.

* Update the cloud provider screenshot to include pgEdge Starfleet.

* Remove pgEdge Starfleet BYOC support from the cloud deployment wizard.

Only Managed databases are now offered, so the Deployment type selector,
the cluster list, the BYOC PostgreSQL version list and the BYOC capability
probe are gone, along with the --kind and --cluster-id options of
pgacloud's starfleet create-instance command.

* Regenerate the Starfleet instance and review screenshots without the deployment type.

* Retry transient pgEdge Starfleet polling errors and write job tokens through.

A network error, rate limit or server error whilst waiting for a new
database no longer ends the deployment, leaving the database running in
Starfleet but removed from pgAdmin; polling now retries until its
deadline, failing at once only on other client errors.

The job's copy of the access token is now written to the session store
immediately, so a status poll handled by another worker can still fetch
the generated password.

* Write the pgEdge Starfleet wizard token through, and warn that a failed deployment may leave the database behind.
2026-10-12 14:28:49 +01:00
dependabot[bot] d082e8db27 Javascript dependency: Bump postcss-selector-parser in /web (#10523)
Bumps [postcss-selector-parser](https://github.com/postcss/postcss-selector-parser) from 7.1.5 to 7.1.6.
- [Release notes](https://github.com/postcss/postcss-selector-parser/releases)
- [Changelog](https://github.com/postcss/postcss-selector-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss-selector-parser/compare/7.1.5...7.1.6)

---
updated-dependencies:
- dependency-name: postcss-selector-parser
  dependency-version: 7.1.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-12 09:17:48 +01:00
dependabot[bot] a3ec78d30c Javascript dependency: Bump source-map-js from 1.2.1 to 1.2.2 in /web (#10522)
Bumps [source-map-js](https://github.com/7rulnik/source-map-js) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/7rulnik/source-map-js/releases)
- [Changelog](https://github.com/7rulnik/source-map-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/7rulnik/source-map-js/compare/v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: source-map-js
  dependency-version: 1.2.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-12 09:17:22 +01:00
dependabot[bot] 2b7a331896 Javascript dependency: Bump handlebars from 4.7.9 to 4.7.10 in /web (#10525)
Bumps [handlebars](https://github.com/handlebars-lang/handlebars.js) from 4.7.9 to 4.7.10.
- [Release notes](https://github.com/handlebars-lang/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/v4.7.10/release-notes.md)
- [Commits](https://github.com/handlebars-lang/handlebars.js/compare/v4.7.9...v4.7.10)

---
updated-dependencies:
- dependency-name: handlebars
  dependency-version: 4.7.10
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-12 09:16:57 +01:00
Dave Page 79d138867a Require Flask-Security-Too 5.8.3 or later for the open redirect fix. (#10524)
5.8.3 fixes an open redirect in Flask-Security's default configuration
(GHSA-ccgp-pv8r-95wm). The fix is also in 5.9.1, but 5.9 needs Python
3.11 or later and removes get_post_login_redirect(), which pgAdmin
imports, so raise the lower bound within the 5.8 series instead.
2026-10-09 21:43:55 -04:00
dependabot[bot] 9712467844 Javascript dependency: Bump @mui/x-date-pickers in /web (#10519)
Bumps [@mui/x-date-pickers](https://github.com/mui/mui-x/tree/HEAD/packages/x-date-pickers) from 8.29.3 to 9.15.0.
- [Release notes](https://github.com/mui/mui-x/releases)
- [Changelog](https://github.com/mui/mui-x/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mui/mui-x/commits/v9.15.0/packages/x-date-pickers)

---
updated-dependencies:
- dependency-name: "@mui/x-date-pickers"
  dependency-version: 9.15.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-09 19:23:16 -04:00
dependabot[bot] 347312d8f7 Python dependency: Bump the regression-python-minor-and-patch group (#10513)
Bumps the regression-python-minor-and-patch group in /web/regression with 3 updates: [azure-identity](https://github.com/Azure/azure-sdk-for-python), [google-auth-oauthlib](https://github.com/googleapis/google-cloud-python) and [selenium](https://github.com/SeleniumHQ/Selenium).


Updates `azure-identity` from 1.25.3 to 1.26.0
- [Release notes](https://github.com/Azure/azure-sdk-for-python/releases)
- [Commits](https://github.com/Azure/azure-sdk-for-python/compare/azure-identity_1.25.3...azure-identity_1.26.0)

Updates `google-auth-oauthlib` from 1.4.1 to 1.5.0
- [Release notes](https://github.com/googleapis/google-cloud-python/releases)
- [Changelog](https://github.com/googleapis/google-cloud-python/blob/main/packages/gcp-sphinx-docfx-yaml/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-cloud-python/compare/google-auth-oauthlib-v1.4.1...google-auth-oauthlib-v1.5.0)

Updates `selenium` from 4.49.0 to 4.50.0
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.49.0...selenium-4.50.0)

---
updated-dependencies:
- dependency-name: azure-identity
  dependency-version: 1.26.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: regression-python-minor-and-patch
- dependency-name: google-auth-oauthlib
  dependency-version: 1.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: regression-python-minor-and-patch
- dependency-name: selenium
  dependency-version: 4.50.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: regression-python-minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-09 19:16:15 -04:00
dependabot[bot] 5065de5ac3 Javascript dependency: Bump the runtime-javascript-minor-and-patch group (#10512)
Bumps the runtime-javascript-minor-and-patch group in /runtime with 3 updates: [electron](https://github.com/electron/electron), [eslint](https://github.com/eslint/eslint) and [globals](https://github.com/sindresorhus/globals).


Updates `electron` from 44.4.5 to 44.5.1
- [Release notes](https://github.com/electron/electron/releases)
- [Commits](https://github.com/electron/electron/compare/v44.4.5...v44.5.1)

Updates `eslint` from 10.11.0 to 10.12.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.11.0...v10.12.0)

Updates `globals` from 17.12.0 to 17.13.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.12.0...v17.13.0)

---
updated-dependencies:
- dependency-name: electron
  dependency-version: 44.5.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: runtime-javascript-minor-and-patch
- dependency-name: eslint
  dependency-version: 10.12.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: runtime-javascript-minor-and-patch
- dependency-name: globals
  dependency-version: 17.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: runtime-javascript-minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-09 19:15:36 -04:00
Dave Page a5aa42843c Fix invalid SQL from Maintenance dialog REINDEX ... CONCURRENTLY. #10251 (#10314) 2026-10-09 18:51:04 -04:00
Dave Page ecb6446c31 Remove unused JavaScript and Python dependencies, and correct the dependency groups. (#10500) 2026-10-02 17:41:15 +01:00
dependabot[bot] ca21e94436 Javascript dependency: Bump webpack-cli from 6.0.1 to 7.2.3 in /web (#10495)
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 6.0.1 to 7.2.3.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@6.0.1...webpack-cli@7.2.3)

---
updated-dependencies:
- dependency-name: webpack-cli
  dependency-version: 7.2.3
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-02 16:20:48 +01:00
dependabot[bot] a3ffb577ae Javascript dependency: Bump react-dropzone from 15.0.0 to 20.1.2 in /web (#10494)
Bumps [react-dropzone](https://github.com/react-dropzone/react-dropzone) from 15.0.0 to 20.1.2.
- [Release notes](https://github.com/react-dropzone/react-dropzone/releases)
- [Commits](https://github.com/react-dropzone/react-dropzone/compare/v15.0.0...v20.1.2)

---
updated-dependencies:
- dependency-name: react-dropzone
  dependency-version: 20.1.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-02 16:20:08 +01:00
dependabot[bot] c711abe98e Javascript dependency: Bump the web-javascript-minor-and-patch group (#10493)
Bumps the web-javascript-minor-and-patch group in /web with 3 updates: [ip-address](https://github.com/beaugunderson/ip-address), [postcss](https://github.com/postcss/postcss) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `ip-address` from 10.5.0 to 10.7.2
- [Release notes](https://github.com/beaugunderson/ip-address/releases)
- [Commits](https://github.com/beaugunderson/ip-address/compare/v10.5.0...v10.7.2)

Updates `postcss` from 8.5.26 to 8.5.28
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.5.26...8.5.28)

Updates `typescript-eslint` from 8.70.1 to 8.71.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.71.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: ip-address
  dependency-version: 10.7.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: web-javascript-minor-and-patch
- dependency-name: postcss
  dependency-version: 8.5.28
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: web-javascript-minor-and-patch
- dependency-name: typescript-eslint
  dependency-version: 8.71.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: web-javascript-minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-02 16:19:17 +01:00
dependabot[bot] b8dcd80ae1 Python dependency: Update pycodestyle requirement in /web/regression (#10492)
Updates the requirements on [pycodestyle](https://github.com/PyCQA/pycodestyle) to permit the latest version.
- [Release notes](https://github.com/PyCQA/pycodestyle/releases)
- [Changelog](https://github.com/PyCQA/pycodestyle/blob/main/CHANGES.txt)
- [Commits](https://github.com/PyCQA/pycodestyle/compare/2.14.0...2.15.0)

---
updated-dependencies:
- dependency-name: pycodestyle
  dependency-version: 2.15.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-02 16:19:12 +01:00
dependabot[bot] 0360a223a4 Javascript dependency: Bump electron (#10489)
Bumps the runtime-javascript-minor-and-patch group in /runtime with 1 update: [electron](https://github.com/electron/electron).


Updates `electron` from 44.4.3 to 44.4.5
- [Release notes](https://github.com/electron/electron/releases)
- [Commits](https://github.com/electron/electron/compare/v44.4.3...v44.4.5)

---
updated-dependencies:
- dependency-name: electron
  dependency-version: 44.4.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: runtime-javascript-minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-02 16:19:06 +01:00
Dave Page 53ccc753e3 Align the cloud provider icons and labels in the deployment wizard. (#10498) 2026-10-02 16:03:13 +01:00
Murtuza ZabuawalaandDave Page 9f9bb553c4 Add a Statistics node for managing extended statistics. #2018 (#10310)
Adds browser support for PostgreSQL 14+ extended statistics objects
(CREATE STATISTICS), with the create/edit dialog, reverse engineered SQL,
the computed values ANALYZE collected where the role may see them, and
schema diff support. Completes Murtuza Zabuawala's #9748.

Co-authored-by: Dave Page <dpage@pgadmin.org>
2026-10-02 11:23:44 +01:00
Bea SteersandDave Page a807c99daf Allow an OAuth2 claim to restrict which shared servers a user can see. #9704 (#10234)
Adds OAUTH2_SERVER_GROUP_CLAIM and OAUTH2_SERVER_GROUP_CLAIM_MAPPING. When
the claim is configured for a provider, shared servers owned by other users
are only visible and accessible if their server group's name appears in the
(optionally mapped) claim values; if the claim is missing, none are. The
user's own servers, and users of other authentication methods, are
unaffected. The claim is resolved at login and only stored once the login
has been authorised.

Co-authored-by: Dave Page <dpage@pgadmin.org>
2026-10-02 09:26:27 +01:00
Rohit BhatiandDave Page 86f164d60c Fixed View/Edit Data not handling generated columns properly. #9672 (#9761)
Co-authored-by: Dave Page <dpage@pgadmin.org>
2026-10-02 09:06:51 +01:00
dependabot[bot] dee788c581 Javascript dependency: Bump devalue from 5.9.2 to 5.9.4 in /web (#10488) 2026-10-02 09:00:46 +01:00
dev-hari-prasadandDave Page 7d3a170b9e Fix Kerberos login failures returning a 500 JSON response, and first-time auto-created Kerberos logins being rejected. #10419 (#10455)
When SPNEGO negotiation failed, the exception object was passed to flash(), so the session could not be serialised and the login page was replaced by a 500 JSON response. A generic message is now flashed; the detail is already logged.

Also fix a redirect to a non-existent 'authenticate.kerberos_login' endpoint (it is 'kerberos.login'), which had caused every Kerberos mock test to skip unconditionally, and return the username from Kerberos auto-creation so a user's first login is not rejected with "Incorrect username or password".

Co-authored-by: Dave Page <dpage@pgadmin.org>
2026-10-01 17:01:38 +01:00
Kundan Sable 467a200ca4 Fix 'Cannot have two HTML5 backends at the same time' in DataGridView. #10485 (#10487)
Share one explicit react-dnd manager between DataGridView and PgTreeView. react-arborist bundles react-dnd 14, which stores its manager under the same global key as react-dnd 16 but keeps a separate reference count, so unmounting one provider could drop the manager while its HTML5 backend was still attached to window.
2026-10-01 16:53:57 +01:00
dependabot[bot] cf2c096c4f Update @tanstack/react-table to 9.2.4 and migrate to the v9 API. (#10338)
Moves table construction to useTable() with a shared tableFeatures() registry (filtering, sorting, selection, expanding, sizing/resizing, visibility, row models, sort and filter functions), renames sortingFn to sortFn, adapts to v9 state access, prototype-bound row/cell methods and getRowCanExpand, feeds the DataGridView search state through table state instead of setOptions(), and lets Jest transform the ESM-only @tanstack packages.
2026-10-01 16:42:32 +01:00
dependabot[bot] e64b766ca3 Javascript dependency: Bump brace-expansion from 5.0.9 to 5.0.12 in /runtime (#10480)
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 5.0.9 to 5.0.12.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v5.0.9...v5.0.12)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 5.0.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-01 14:37:47 +01:00
dependabot[bot] cd82c8e4ec Javascript dependency: Bump the web-javascript-minor-and-patch group across 1 directory with 30 updates (#10486)
Also points the react-checkbox-tree webpack alias at lib/index.js, the 2.1 ESM build, as lib/index.esm.js is a stale 2.0.2 build that leaves the app blank.
2026-10-01 14:33:42 +01:00
Dave Page 25aec55eb2 Parse react-frame-component as CommonJS so 5.3 bundles correctly (#10467)
* Parse react-frame-component as CommonJS so 5.3 bundles correctly

react-frame-component 5.3 added "type": "module" to its package.json
whilst mapping the "require" condition of its exports to a UMD build.
Babel compiles our imports to require(), so webpack resolves the UMD
file and, honouring the package type, parses it as an ES module. With no
exports object in scope, the UMD wrapper falls through to its browser
global branch and the module exports nothing, so <Frame> is undefined.
Opening the Query Tool then throws React error #130 and unmounts the
whole app, which is why every feature test timed out with the 5.3.2
bump in #10460. Node shows the same packaging fault: require() of the
package returns an empty object.

Tell webpack to parse the package as javascript/auto so the UMD takes
its CommonJS branch. Jest is unaffected, as it loads the UMD as CommonJS.

* Bump react-frame-component to 5.3.2.

Take the version the webpack rule exists for in the same change, so CI
exercises the rule against it.
2026-10-01 11:41:47 +01:00
Matt Van Horn c83e0750c4 Explain Docker Compose quoting for PGADMIN_CONFIG_* values in the container docs. #10364 (#10465)
YAML consumes the quotes around a Compose scalar, so a value such as
PGADMIN_CONFIG_MAIL_SERVER: "mail.example.com" reaches config_distro.py
as a bare name and fails with NameError at startup. Document the nested
quoting needed in map syntax and env_file, how the list form differs,
escaping $ as $$, when config_distro.py is regenerated, and add a Compose
example.
2026-10-01 10:10:03 +01:00
Regina Obe 19a41432ac Add support for pg_timetable chains and tasks. #10148 (#10152)
Adds a pgTimeTable Chains node under Servers when pg_timetable is
installed in the maintenance database, with Tasks beneath each chain.
Chains and tasks can be created, edited and deleted, a chain can be
triggered with Run Now, and both have statistics tabs. Includes
regression tests, CI installation of pg_timetable, and documentation.
2026-09-30 17:28:49 +01:00
Guiorgy 7314f5069b Rewrite the container entrypoint using bash features, and pass values to embedded Python safely (#9510)
Reformat pkg/docker/entrypoint.sh to use bash conditionals, arithmetic and
parameter expansion instead of the workarounds needed for BusyBox ash.

The email validation settings and PGADMIN_DEFAULT_EMAIL are now read from
the environment inside Python rather than interpolated into the Python
source, so an address containing an apostrophe works, and a Python error
during validation stops the container instead of passing silently.
2026-09-30 15:58:59 +01:00
耗子andClaude Opus 5.5 5f58828e49 Fix mistranslations in the Chinese (Simplified) translation (#10454)
Correct 162 entries in the zh_Hans_CN catalogue: strings that are wrong
rather than merely worded differently, plus terminology aligned with
the Chinese PostgreSQL documentation.

- Restore the order of positional %s placeholders in three strings.
  The JavaScript gettext fills %s strictly left to right, so the
  reordered translations garbled the update notice, the preference
  load error and the user password length error.
- Keep the half-width colons in ': error: ', which ProcessDetails.jsx
  matches with a regex to highlight error lines, and the SQL comment
  marker in '-- missing definition'.
- Fix strings whose meaning was wrong or reversed, e.g. the ERD drag
  and drop message, relhassubclass, RESTART IDENTITY, ENABLE REPLICA,
  COLLATABLE, CREATE TABLE ... LIKE, and the DBMS Scheduler
  "Schedule" object being called a task.
- Give distinct labels to adjacent fields that shared one, and remove
  leftovers such as "表(s)", "会话token" and an untranslated
  "date/time".
- Use the established Chinese terms where the translation picked the
  wrong sense, e.g. Dependents (previously given the word for
  dependencies), local variables and the package body.
- Follow the terminology of the Chinese PostgreSQL documentation:
  注释 (comment), 字符分类 (LC_CTYPE), 操作符 (operator), 聚簇
  (CLUSTER), 提供者 (provider), 流复制 (streaming replication),
  预备事务 (prepared transaction), 载荷 (NOTIFY payload) and 过滤
  (filter).
- Translate Tab as 标签页 throughout, and the month-day options
  1st-31st as 1 日-31 日.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:24:11 +01:00
Ian 9d63ea91e2 Preserve database errors from index metadata queries (#10476)
When an index metadata query failed, the Properties and SQL handlers
could replace the original database error with 'string indices must be
integers', or with an error about using a Response as index metadata.
get_column_details() read rset['rows'] before checking the query status,
and get_column_details(), get_include_details() and get_sql() returned
HTTP responses where their callers expect data.

Raise ExecuteError instead, as get_reverse_engineered_sql() already
does, so the original database error reaches the user. Adds regression
tests covering Properties, SQL, modified SQL and update.
2026-09-30 15:23:56 +01:00
dependabot[bot] a0723f9db8 Javascript dependency: Bump brace-expansion in /web (#10479)
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.18 to 1.1.21.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v1.1.18...v1.1.21)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.21
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-30 14:38:42 +01:00
dependabot[bot] 2a65e506a6 Javascript dependency: Bump moment from 2.30.1 to 2.31.0 in /web (#10478)
Bumps [moment](https://github.com/moment/moment) from 2.30.1 to 2.31.0.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.30.1...2.31.0)

---
updated-dependencies:
- dependency-name: moment
  dependency-version: 2.31.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-30 14:38:23 +01:00
dependabot[bot] a100b86ff2 Javascript dependency: Bump ip-address from 10.5.0 to 10.7.1 in /web (#10477)
Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.5.0 to 10.7.1.
- [Release notes](https://github.com/beaugunderson/ip-address/releases)
- [Commits](https://github.com/beaugunderson/ip-address/compare/v10.5.0...v10.7.1)

---
updated-dependencies:
- dependency-name: ip-address
  dependency-version: 10.7.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-30 14:38:06 +01:00
Sanskar Kharya bdd3282c49 Honour the pgpass file in the Change Server Password dialog (#10451)
The dialog hardcoded the pgpass flag to false, so it always demanded the
current password even when the connection authenticates via a passfile.
Pass the flag from check_pgpass through to the schema instead.

check_pgpass and change_password also disagreed about when a passfile is
in use: the former treated a password entered at connect but not saved
as a passfile connection, which would now disable the Current Password
field whilst the endpoint still required it. Both now use a shared
is_using_passfile() helper.

Fixes #10449
2026-09-30 13:29:14 +01:00
dev-hari-prasad f6a2c1037e Resolve the packaged Electron version from runtime/yarn.lock (#10413)
The Windows, Linux and macOS builds now read the Electron version from
runtime/yarn.lock using 'yarn info electron --json' inside runtime/,
rather than querying the npm registry or using the lower bound of the
range in runtime/package.json. This needs no network access or
node_modules, and packages exactly the version that yarn install
resolves. The build stops with an error if the lockfile is missing or
does not yield a valid version.
2026-09-30 13:27:56 +01:00
dependabot[bot] 3515541320 Javascript dependency: Bump undici from 7.29.0 to 7.30.0 in /runtime (#10471)
Bumps [undici](https://github.com/nodejs/undici) from 7.29.0 to 7.30.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v7.29.0...v7.30.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 7.30.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-30 10:35:09 +01:00
dependabot[bot] 369c12c1b2 Javascript dependency: Bump fast-uri from 3.1.6 to 3.1.8 in /web (#10469)
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.6 to 3.1.8.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.6...v3.1.8)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-29 09:24:45 +01:00
dependabot[bot] 88b599e98f Javascript dependency: Bump fast-uri from 3.1.6 to 3.1.8 in /runtime (#10468)
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.6 to 3.1.8.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.6...v3.1.8)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-29 09:24:40 +01:00
dependabot[bot] 4671d2f221 Javascript dependency: Bump electron-context-menu in /runtime (#10457)
Bumps [electron-context-menu](https://github.com/sindresorhus/electron-context-menu) from 4.1.2 to 5.1.0.
- [Release notes](https://github.com/sindresorhus/electron-context-menu/releases)
- [Commits](https://github.com/sindresorhus/electron-context-menu/compare/v4.1.2...v5.1.0)

---
updated-dependencies:
- dependency-name: electron-context-menu
  dependency-version: 5.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-28 12:50:32 +01:00
dependabot[bot] 8f487ac666 Javascript dependency: Bump the runtime-javascript-minor-and-patch group (#10456)
Bumps the runtime-javascript-minor-and-patch group in /runtime with 2 updates: [electron](https://github.com/electron/electron) and [eslint](https://github.com/eslint/eslint).


Updates `electron` from 44.4.2 to 44.4.3
- [Release notes](https://github.com/electron/electron/releases)
- [Commits](https://github.com/electron/electron/compare/v44.4.2...v44.4.3)

Updates `eslint` from 10.10.0 to 10.11.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.10.0...v10.11.0)

---
updated-dependencies:
- dependency-name: electron
  dependency-version: 44.4.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: runtime-javascript-minor-and-patch
- dependency-name: eslint
  dependency-version: 10.11.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: runtime-javascript-minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-28 12:25:05 +01:00
dependabot[bot] 6e22b29770 Python dependency: Bump psycopg (#10459)
Bumps the regression-python-minor-and-patch group in /web/regression with 1 update: [psycopg](https://github.com/psycopg/psycopg).


Updates `psycopg` from 3.3.5 to 3.3.6
- [Changelog](https://github.com/psycopg/psycopg/blob/master/docs/news.rst)
- [Commits](https://github.com/psycopg/psycopg/compare/3.3.5...3.3.6)

---
updated-dependencies:
- dependency-name: psycopg
  dependency-version: 3.3.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: regression-python-minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-28 12:24:53 +01:00
dependabot[bot] ad3ba69ca5 Python dependency: Bump psycopg in the python-minor-and-patch group (#10458)
Bumps the python-minor-and-patch group with 1 update: [psycopg](https://github.com/psycopg/psycopg).


Updates `psycopg` from 3.3.5 to 3.3.6
- [Changelog](https://github.com/psycopg/psycopg/blob/master/docs/news.rst)
- [Commits](https://github.com/psycopg/psycopg/compare/3.3.5...3.3.6)

---
updated-dependencies:
- dependency-name: psycopg
  dependency-version: 3.3.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-28 12:24:41 +01:00
Dave Page fd7b462f3d Run the scheduled snapshot only on pgadmin-org/pgadmin4 (#10452)
A fork with Actions enabled inherits the nightly schedule but none of the
signing secrets or self-hosted runners, so its snapshot fails at the macOS
certificate import and leaves the Windows job queued for a day. The
location job now skips a scheduled run anywhere else, and every build job
waits on it so that the whole run skips with it. A manual dispatch still
runs anywhere.
2026-09-24 08:04:59 +01:00
Dave Page efa8ac7948 Fix TestHeaderOnLiveLogoutRequest failing in desktop mode
The test asserted that no X-Remote-User header is sent on the request
after a logout, which only holds in server mode. In desktop mode the
before_request hook logs the desktop user straight back in, so the
header is reported again, and every run-python-tests-pg job (which runs
in desktop mode) has failed on it since #10410. Assert the mode-specific
behaviour instead.
2026-09-23 15:05:04 +01:00
Dave Page 0dc122cb2e Sign Windows builds with SHA-256 file digests
The one-step "signtool sign /fd sha256" fails on the build host with
0xc0000225 before the PIN is asked for, because crypt32 converts the
legacy CryptoAPI key handle to a CNG one for SHA-2 digests, and no CNG
provider is registered under the name of Certum's crypto3 CSP. Rebinding
to cryptoCertum3 KSP is not an option, as it cannot see the Common
profile's code-signing key.

signtool's split flow avoids the conversion, so pkg/win32/sign-files.bat
now does the signing in /dg, /ds, /di, timestamp and verify steps, with
one PIN prompt per call as before. Make.bat's :SIGN_FILES and Inno
Setup's SignTool both go through it, the latter via cmd /c.

Also default PGADMIN_SIGNTOOL_DIR to SDK 10.0.26100.0, the one installed
on the host, and match the PIN dialog on "Logowanie do profilu zwyk" so
that a Secure profile prompt is never answered with the Common PIN.
SIGNING.md gains the full setup procedure, the root cause and the split
signing flow.
2026-09-23 14:10:10 +01:00
Dave Page c8ae16d13f Document adding and retiring Linux build platforms
A new Debian, Ubuntu, Fedora or EL release is named in seven places across
the build matrices, the snapshot and release workflows, the acceptance tests
and the publishing wrapper, and missing the wrapper leaves the packages built
and uploaded but never indexed. pkg/linux/PLATFORMS.md lists them all, with
the steps for adding a platform, retiring one and the server-side follow-up.

The platform lists in the Debian and Red Hat READMEs had drifted (Ubuntu
25.04, Fedora 40 and 41, RHEL 8), so they now point at the build matrices
instead.
2026-09-23 10:53:09 +01:00
Dave Page dd0d8ac533 Revert Windows code signing to SHA-1 file digests
#10355 moved signtool to /fd sha256 on the assumption that the key
provider repair described in pkg/win32/SIGNING.md made SHA-256 possible.
It does not: that repair binds the certificate to the Certum card's
legacy CryptoAPI provider, crypto3 CSP, which fails a SHA-256 file digest
in SignerSign() with 0xc0000225 before the PIN is requested, whilst
/fd sha1 signs and verifies. SHA-1 is what every previous release has
shipped with, so go back to it for both the component and the installer
signatures, and document why.

The timestamp digest stays at SHA-256, which works. Rebinding the
certificate to Certum's CNG provider is the likely route to SHA-256 file
digests, but is untested and is left for later.
2026-09-23 10:26:37 +01:00
Dave Page d0315c58ec Fix the Windows environment check, which cmd could not parse
The messages that report a missing prerequisite were changed from !VAR!
to %VAR% in commit afa0c773a, since the file does not enable delayed
expansion and they printed the variable name rather than the path. That
made them correct and unparseable at the same time: cmd expands %VAR%
when it parses a parenthesised block rather than when it runs it, and
PGADMIN_INNOTOOL_DIR defaults to "C:\Program Files (x86)\Inno Setup 6",
whose closing parenthesis then ended the IF block early. Every Windows
build has failed at "Checking the environment..." since, with "\Inno was
unexpected at this time", whether or not Inno Setup was installed, which
took the nightly snapshot with it.

The four checks move into a :REQUIRE_DIR subroutine that takes the
directory and the hint, and echoes both outside any block, where a
parenthesis is just a character. Enabling delayed expansion would also
have worked, but only by making ! a metacharacter for the whole file.
The other uses of these two paths are all inside double quotes, which
the parser does respect, so they were never affected.
2026-09-23 09:01:54 +01:00
Dave Page 43d8b3fabf Rename the server 'Change Password' option to 'Change Server Password' (#10035)
The 'Change Password...' option on a server node was ambiguous, because it
changes the password of the PostgreSQL role that pgAdmin connects with, yet
read as though it might change the pgAdmin login password instead. The menu
option and its dialog are now called 'Change Server Password', with the
connected role name in the dialog title, and the equivalent option in the
user menu becomes 'Change pgAdmin Password', so that the two can no longer
be confused with one another.

The dialog's own 'User' field was always blank, since the userName prop that
showChangeServerPassword passes was never accepted by ChangePasswordContent;
it is now wired through, which also makes the existing documentation of that
field accurate. The documentation for both dialogs has been updated to match
the new names, along with a couple of button names that had drifted.

Fixes #9230.
2026-09-22 17:15:12 +01:00
dev-hari-prasad e78c7fe020 Fix Query Tool tabs auto-running their query after a session restore (#10055)
Typing in the editor of a View/Edit Data tab promotes it to a Query Tool, but
that promotion only ever updated the component's own state: the tab's saved
metadata kept the original tool URL, with is_query_tool=false in its query
string. On the next start-up the tab was therefore restored as a View/Edit Data
tab, and View/Edit Data tabs execute their query as soon as the connection is
made, so whatever SQL the user had left in the editor ran unprompted. A
restored DELETE or UPDATE running by itself is not a pleasant way to start the
day.

toggleQueryTool now rewrites is_query_tool in the panel's stored toolUrl and
saves the layout, so a promoted tab comes back as a Query Tool and no longer
takes the auto-execute path. The URL is kept relative, because in Desktop mode
the runtime picks a fresh port on every launch and an absolute URL would point
the restored tab at a dead origin.

is_query_tool and restore are also normalised to real booleans up front rather
than compared against the string 'true' in each place they are read, and a
failed restore no longer leaves the editor disabled with nothing logged.

Fixes #10031
2026-09-22 17:11:02 +01:00
Dave Page 2ba68de777 Add Caddy reverse proxy configuration examples (#10344)
Adds Caddy examples alongside the existing NGINX ones for hosting pgAdmin with
Gunicorn or uWSGI, both at the root of a server and under a sub-directory,
mirroring the structure of the NGINX sections. Caddy does not speak the native
uwsgi protocol, so its uWSGI examples run uWSGI in HTTP mode instead.

Documents the two things that must line up for a sub-directory deployment
behind any reverse proxy: the proxy forwarding the request path unmodified
with an X-Script-Name header, and a SCRIPT_NAME environment variable on the
pgAdmin process itself, which is read at startup to set APPLICATION_ROOT and
SESSION_COOKIE_PATH. The missing environment variable is what caused the
"login succeeds then bounces back to the login page" report in #10334.

Also notes that pgAdmin trusts X-Script-Name and X-Scheme unconditionally,
unlike the X-Forwarded-* headers, so every example now either overwrites or
clears both rather than passing on whatever the client sent; warns that the
systemd unit shipped with Caddy sets PrivateTmp=true, which hides a socket
created in the system /tmp; and refreshes the stale python3.7 paths.
2026-09-22 17:03:47 +01:00
Dave Page afa0c773ad Sign the bundled PostgreSQL binaries in the Windows build (#10355)
The PostgreSQL and Kerberos utilities and libraries we ship in the
Windows package are not signed, whilst the installer, the uninstaller
and pgAdmin4.exe are. Nothing verifies an Authenticode signature when
these run, so this is not a security fix, but it does make life easier
for organisations running application allow-listing under WDAC or
AppLocker, where publisher rules are simpler and more durable than path
or hash based ones, and it cuts down on antivirus false positives.

The signtool invocation moves into a :SIGN_FILES subroutine, and a new
:SIGN_COMPONENTS step signs everything we build ourselves once
:CREATE_RUNTIME_ENV has staged it. Names are matched through DIR /B so
the optional libraries are skipped when absent, and the whole thing is a
no-op when PGADMIN_WINDOWS_CSC is unset, so unsigned developer builds
are unaffected. The Electron, Python and VC++ runtime components are
deliberately left alone, being third party binaries whose own signatures
ours would replace. Everything goes through a single signtool call,
since the hardware token prompts for a PIN on the first signature of a
session.

The file digest moves from SHA-1 to SHA-256 for both the runtime and the
installer. SHA-1 was never a deliberate choice: it dates from the move
to the Certum token, at a point where the certificate in the machine
store had no key provider link, which limits signing to SHA-1. The
buildfarm now repairs that link with certutil when it provisions the
host.

The four optional PostgreSQL libraries were copied without checking the
result; they now abort the build like the others do.

PGADMIN_POSTGRES_DIR and PGADMIN_KRB5_DIR defaulted to an EDB PostgreSQL
installation and an MIT Kerberos for Windows installation respectively,
whereas both sets of binaries have come from winpgbuild for some time
and the buildfarm points at C:\build64\postgresql and C:\build64\krb5.
The four "does not exist" messages that report a missing prerequisite
used !VAR!, but the SETLOCAL at the top of the file does not enable
delayed expansion, so they printed the variable name rather than the
path that was looked for.

Finally, the acceptance test now verifies the signatures on everything
:SIGN_COMPONENTS signs, walking the same list of names where the files
land: none of them exist outside the installer until the installer has
run, so that is the only place a published build can be checked. The
expected publisher is taken from the installer itself rather than hard
coded, so a component signed by somebody else is caught without the
workflow needing an edit when the certificate is renewed.
2026-09-22 17:02:38 +01:00
dev-hari-prasad 351376af7f Enforce --immutable on every yarn install, in CI and the release builds (#10389)
In the four GitHub Actions workflows the flag is documentation only, since
Yarn's enableImmutableInstalls already defaults to true whenever CI is set in
the environment, but making it explicit means the intent is visible in the
workflow rather than implied by the runner.

The six installs that run outside CI are where this actually changes
behaviour: the Makefile, the Dockerfile, and the pip, Linux, macOS and Windows
packaging builds all run with yarn.lock beside them, and until now any of them
would quietly rewrite the lockfile rather than fail. A release build that
rewrites the lockfile is shipping something other than what we reviewed, so
failing loudly there is the point of the exercise.
2026-09-22 16:50:39 +01:00
Domenico Sgarbossa 91e7747226 Updated message catalogs for v9.18 (#10448) 2026-09-22 16:43:37 +01:00
Dave Page 84a76baa8e Pin against pgbuild's immutable releases, now that they exist
The lock was written against the rolling tags because the per-version
releases did not exist when it was generated, and the refresh tool assumed
PostgreSQL was tagged by major, which it is not: the release that never
changes is postgresql-18.6, whilst only the rolling one says 18. The tool
now resolves a major to the version pgbuild's manifest names, and a tag that
does not exist is an error rather than something to fall back from, since a
lock recording an archive nobody can fetch is worse than no lock at all.
2026-09-22 16:17:05 +01:00
Dave Page c603393827 Run the Windows and macOS build checks when the dependency lock changes
A lock change decides which PostgreSQL, OpenSSL and Kerberos binaries end up
inside the installer, so it is exactly the kind of change those checks exist
for, and without this it was the one packaging input that could move without
either of them running.
2026-09-22 14:31:45 +01:00
Dave Page ce6c049dbc Pin and verify the pgbuild build dependencies
The install-pgbuild-deps action fetched PostgreSQL, OpenSSL, Kerberos, zstd
and lz4 from pgbuild release tags ending in -latest, whose assets are
replaced in place on every rebuild, and unpacked them with no checksum or
signature check anywhere in between. Since the resulting build is
Authenticode signed on Windows and Developer ID signed and notarised on
macOS, that made write access to pgbuild equivalent to write access to what
pgAdmin ships, and it meant a build was not reproducible either, the same
commit producing different binaries depending on the day it was built. This
is pgadmin-org/pgbuild issue 1.

pkg/pgbuild-deps.lock now records, for every dependency the action can
fetch on either macOS architecture and on Windows, the per-version release
tag to download from and the SHA-256 its archive must hash to. The action
fetches that tag, checks the digest before unpacking, and fails on a
mismatch or on a dependency the lock does not mention, since an unpinned
dependency reaching a signing build is the thing this is meant to prevent.
pgbuild publishes a .sha256 beside each archive, which is deliberately not
consulted: whoever rebuilds an archive rebuilds that too, so the lock is
the only thing here that pins anything.

Being out of date is a different matter from being wrong, so once an
archive is verified the action asks pgbuild what it has published since,
and warns rather than fails when the pinned build is no longer the newest.
That check is best effort and never fails a build whose downloads have
already been verified.

tools/refresh_pgbuild_lock.py rewrites the lock, taking the version to pin
from pgbuild's own manifest.json and working one package at a time so that
bumping OpenSSL does not restate every other digest. The diff it produces,
with the upstream version visible in the tag column, is the audit trail the
previous arrangement had none of.

The digests were taken from the archives pgbuild publishes today, which are
the same archives its per-version releases will carry, but those releases
do not exist yet, so the tags in the lock cannot be fetched until pgbuild's
own change lands.
2026-09-22 14:30:43 +01:00
Dave Page bccef24bf7 Drop from= from the authorized_keys templates, which do not carry it
The deployed files are generated rather than hand written, and that option is
not one we can set there, so the templates described a restriction production
does not have. What a key may do is still bounded by restrict and the forced
command, which is the part that matters; what is lost is the second answer to
where it may be used from.
2026-09-22 13:07:19 +01:00
Dave Page e543aaa6f9 Bring install-repo-readme.py up to the project's pep8 settings
It has been failing check-python-style since it landed: five lines over the
limit, and two breaks before a binary operator, which count here because
.pycodestyle sets an explicit ignore list and so loses pycodestyle's own
default exemption for W503.
2026-09-22 11:40:50 +01:00
Dave Page 720dd3714f Ship the docs tarball with its versioned directory, as releases always have
The web server unpacks this into the documentation root and then hands
docloader the directory name pgadmin4-<version>-docs, so a flat archive would
have scattered several hundred HTML files across that root and then failed on
a directory that was never created. Every published tarball carries that top
level; the one assembled here did not, and the first release to notice would
have been the next one.
2026-09-22 11:25:32 +01:00
Dave Page af5fd2acc3 Move the archive sync and release purge scripts into the publishing tooling
sync-ftp-to-s3.py and purge_pgadmin_releases.sh have been living in the
pgaweb checkout under tools/, which was never where they belonged: neither
touches Django, the site database or Varnish, and both work on the download
tree at /var/ftp/pgadmin4, so they are part of publishing rather than part of
the website. They move here, renamed to match the hyphenated names of the
scripts already in this directory, and the README gains them in the file
table, in the install line and in the prose that explains what lives where.

The sync-s3 verb now runs sync-ftp-to-s3.py out of PUBLISH_DIR instead of
TOOLS_DIR, which makes this a deployment-ordering change: the wrapper and the
copy of the script it names must both be installed on the download server
before the pgaweb side deletes its own copy, and the comment on the verb says
so. The three verbs that remain genuinely website operations, create-release,
load-docs and purge-cache, still reach into TOOLS_DIR and are untouched.

purge-pgadmin-releases.sh deliberately gets no verb. It is a by-hand
operation that deletes published content, it defaults to a dry run that
somebody is expected to read before re-running with --live, and the rebuild
scripts it pairs with are already documented as standalone; handing a
compromised runner the ability to delete releases would undo most of what the
wrapper is for.

Both scripts are otherwise unchanged apart from the filename in the purge
script's own header comment, and four lines in the Python rewrapped to 79
columns because pkg/ is covered by check-pep8 and the originals were not.
2026-09-22 11:19:39 +01:00
Dave Page 2343f60f04 Select the publishing runner by role rather than by its hostname
The runner has carried both labels all along, so this is the last of the
machine names out of the tree; roadie can stay on the runner until these have
run green, and then go.
2026-09-22 11:06:25 +01:00
Dave Page 5f102aa36c Do not claim the PIN helper was shipped as a compiled executable 2026-09-22 11:03:40 +01:00
Dave Page 1b392caa0f Say how the PIN helper is installed and started
The section named the script and left the reader to work out the rest: where
AutoHotkey comes from, where the script should live given the runner deletes
its own workspace, how it starts in the interactive session alongside the
runner, and how to tell whether it is running at all.
2026-09-22 10:46:59 +01:00
Dave Page 8bca7e0c57 Retry the notarisation wait rather than failing the build
xcrun notarytool wait polls Apple for as long as the notarisation takes, and
exits non-zero if any single poll fails, so a runner losing its route for a few
seconds failed a notarisation that was proceeding perfectly well: the 22nd
September snapshot died twenty six minutes into waiting for a DMG Apple had
already accepted, with "The Internet connection appears to be offline".

The wait is now retried ten times at a minute apart, without resubmitting,
since the submission is still queued under the same ID. Each failure asks for
the status directly, because the wait also exits non-zero when a submission
genuinely ends as Invalid or Rejected, and any terminal status ends the loop
and leaves the existing check to decide what it means.
2026-09-22 10:40:08 +01:00
Dave Page 475b864e7f Stop the publishing pipeline overwriting what it has already published
Every one of these is a way that a verb meant only to add something would
quietly change something already published, which is the failure the wrapper
exists to prevent, so they are worth having together.

Snapshot retention kept the newest five directories, and a directory is
something either key can create: five dated today with high suffixes filled
the keep set and every genuine snapshot was deleted. It now keeps every
directory whose date is among the newest five that are not in the future, so
retention is counted in days, and the intended consequence is that a day with
several builds keeps all of them.

release-fetch required only that v<VERSION> existed, and shutil.move onto an
existing file replaces it, so a release published months ago could be
overwritten and autoupdate-publish and sync-s3 would then carry the
replacement to the auto-updater and into an archive that has no undo. The
single-shot guarantee that release-create made for the first verb now covers
the whole sequence: it refuses before moving anything if .incoming exists or
if a content directory holds more than its maintainer marker, and refuses each
individual move whose destination is already there.

packages-fetch pulled with no --ignore-existing, so a staging package whose
filename matched a published one replaced it and the following rebuild signed
the new bytes. It now leaves the live copy alone and reports what it skipped,
since a collision during a real promotion means two builds have produced one
filename.

autoupdate-publish deleted the live archives before moving the new ones in,
which left a window with nothing there at all; the order is reversed and only
archives this release did not replace are removed, and once every move has
succeeded. --delay-updates leaves .~tmp~ behind in the live trees when a
transfer is interrupted, and both indexers descend into it, so the holding
directories are swept immediately before indexing rather than moved out of the
tree with --partial-dir, which would make the final rename a copy across
filesystems. DATESTAMP_RE and VERSION_RE gain re.ASCII, because \d matches any
Unicode decimal digit and int() parses those, so a fullwidth datestamp on the
filesystem read back as an ordinary date.

In the workflows, the repository variables naming the SSH target and the key
paths reached option positions, as the first positional argument to ssh and
inside the -e string rsync splits on whitespace. Only an administrator can set
those, so this is defence in depth: they are validated against a conservative
pattern in the step that already checks the keys are present, and the target
is passed after --. snapshot.yml passed the raw inputs.location to its publish
step rather than the validated output of the location job, which agreed only
by coincidence, and it now carries a flag for whether a location was named so
that an empty input still means the assembled directory name.
check-container-build.yml gains the top-level permissions: contents: read the
other workflows have, leaving the publish job's packages: write alone, and
promote-release.yml verifies the wheel's detached signature against the
published signing key before uploading it to PyPI, the mirror having been
trusted on TLS alone until now.

The README and the download server's key annotations are updated to match: the
guarantees they stated about single-shot publication and about retention were
overstated, and are now true.
2026-09-22 10:31:40 +01:00
Dave Page d04e39cc65 Describe the signing host without naming whose rack it is in 2026-09-22 10:24:53 +01:00
Dave Page b7789be4af Bring the Certum PIN handler into the repository
The script that answers the signing card's PIN prompt lived only in the
buildfarm repository, as an Ansible template with the PIN itself interpolated
into it. That repository is going away, and the template could not come with it
as it stood, so this is the same script with the secret taken out and the two
faults that cost a build this morning fixed.

The PIN now comes from a file in the build user's local application data, read
once at startup, so neither this repository nor the compiled executable carries
it; the helper says so and exits if the file is missing or empty, rather than
sitting in the tray looking healthy whilst answering nothing.

The build was lost to a race. The original waited for the dialog and then
activated it as two separate operations, and when the activate lost that race
and threw "Target window not found", AutoHotkey put up its default error dialog
on a machine with nobody to dismiss it, so one transient fault became an
indefinite hang. So the work now happens on a timer rather than in a loop that
can end, activation is retried for a couple of seconds and addressed by window
handle rather than by title, a window that vanishes mid-operation is a log line
and a return rather than an error, and an OnError handler makes it impossible
for anything to put a dialog on the screen at all.

Whilst there, the PIN is sent with SendText rather than Send, which would have
read {, +, ^, ! and # in it as modifiers, and it is only sent once WinActive
confirms the card's own dialog has the focus, because a blind send on a build
machine is a good way to type a PIN into a console whose output gets uploaded.
The title is matched on its leading unaccented substring, which keeps the file
to plain ASCII and survives proCertum wording changes.

SIGNING.md gains the operator's half of that: where the PIN file goes, the
icacls to lock it down, where the log is, and what each thing the log can say
means when a signed build hangs.
2026-09-22 10:24:02 +01:00
Dave Page 97a7e55b96 Close the review's remaining findings in the workflows
The promotion validated its inputs in the promote job, which the registries
scope skips, so under that scope the typed-twice confirmation did not cover
the step that moves the latest tag; validation moves to a job both paths
depend on. The container tag loops no longer glob against the workspace, and
check-container-build validates the location it interpolates into a push tag
in a job holding the Docker Hub credentials.

The acceptance test built its apt sources line with sh -c, which re-parsed the
expanded base URL as source: the one place in the pipeline where a
caller-supplied value reached a shell. The outer shell writes the file now,
and the URL is checked once, against a host allowlist, before any job
downloads and installs what that host serves as root.

The actions in jobs holding registry or trusted-publishing credentials are
pinned by commit rather than by a movable tag, as the SonarQube action already
was, and so is the helm installer piped into a shell beside them.

Also: the README understated the signing verbs, which select by extension
across the tree rather than by anything tied to a build.
2026-09-22 10:00:17 +01:00
Dave Page ff9819e222 Make snapshot retention safe, and stop packages-fetch importing staging's indices
snapshot-purge sorted directory names and kept the last five, so a name that
merely sorted late survived and everything real fell off the end: five
snapshot-create calls with a future datestamp, which the verb accepts up to
two days ahead, were enough to have the next purge delete every genuine
snapshot. Anything dated after today is now left out of the retention set
entirely, and the ordering is by date and then by suffix as a number, which
also fixes 2026-09-22-10 sorting before 2026-09-22-2 and so a day with more
than nine builds keeping the older ones.

packages-fetch pulled staging's Packages files and repodata into the live
tree, whilst the signed Release, Release.gpg and InRelease they are checked
against live a directory further up and were left as they were. Every live
apt repository therefore failed on a hash sum mismatch from the moment the
fetch landed until that codename's rebuild caught up, which with five
sequential rebuilds each taking the lock is minutes. The docstring already
claimed the indices were left behind; now they are.

The pull key is renamed to pga-pull to match the other two.
2026-09-22 09:58:02 +01:00
Dave Page 355d6d099f Name the publishing hosts by role rather than by hostname
The machine names were only ever in comments and two filenames, but the
repository is public and the buildfarm never was, so there is no reason to hand
a reader the mapping from internal name to public service. The two
authorized_keys templates become .staging and .download, and the prose refers
to the staging server, the download server and the runner.

The pull key the download server uses is renamed to match, so it needs moving
on that host: ~pgaupload/.ssh/id_ed25519_paxsor_pull -> id_ed25519_pull. The
runner's own key paths come from repository variables, so the defaults here
changing affects nothing.
2026-09-22 09:49:07 +01:00
Dave Page da0bc3ecd9 Say which platforms read pkg/python-version.txt
Only the Windows and macOS packaging does, those being the two that ship an
interpreter; the Linux packages use the distribution's Python.
2026-09-22 09:38:49 +01:00
Dave Page db2030e9c0 Describe where aptftp.conf lives rather than telling the reader to move it 2026-09-22 09:23:31 +01:00
Dave Page 34cb0be9a2 Make a scheduled snapshot actually publish
Both publishing steps were gated on inputs.publish, which exists so that a
dispatched test run builds without uploading. A schedule event carries no
inputs, so that expression was null rather than false and the nightly built
everything, assembled the tree and threw it away, reporting success. Publish
unconditionally on a schedule, and keep the input for dispatches.
2026-09-22 09:06:35 +01:00
Dave Page ca275cbc8d Let the registry half of a promotion be rehearsed on its own
The container re-tag and the chart push need no download server and touch
nothing that cannot be deleted, but they were reachable only through a real
promotion, which is the one thing we cannot practise. A "registries" scope
skips the promote job entirely and runs just those two, leaving the PyPI
upload out since a rehearsal has no published wheel to upload.
2026-09-21 21:49:13 +01:00
Dave Page c28362013f Give the container publish its own job, on the publishing environment
The Docker Hub credentials are environment secrets, and an environment
secret is not available to a job that does not name the environment.
secrets: inherit passes repository secrets, so the login failed with
'Username and password required' and would have done the same in a real
candidate run.

Splitting it also keeps the credentials away from the build check, which
runs on every pull request and has no business being able to push.
2026-09-21 16:26:02 +01:00
Dave Page b2d1362b8a Let the container build be dispatched with its publish inputs
They were only on workflow_call, so the push path could not be exercised
without running an entire release candidate to reach it.
2026-09-21 16:24:51 +01:00
Dave Page 24a1f24e48 Add a button for purging the website cache
The last thing in the release process still needing Jenkins. Promotion
purges the cache, but the website edits that follow a release happen
afterwards and are all cached, so there has to be a way to purge it on
its own.

No arguments: the verb behind it clears everything, and there is nothing
for a caller to choose.
2026-09-21 16:11:13 +01:00
Dave Page e1915c7dc0 Publish the container, chart and wheel from Actions
The last three things still running from Jenkins, and the reason the
buildfarm could not be switched off.

The container is built for both architectures and pushed under the
candidate's location, then re-tagged at promotion with buildx imagetools
rather than rebuilt, so what ships is the manifest the acceptance test
ran against. It goes to Docker Hub and to GHCR: Docker Hub stays
canonical because every tutorial and compose file in the world names
dpage/pgadmin4, whilst GHCR is organisation owned, needs no stored
credential and is not subject to Docker Hub's anonymous pull limits.

The Helm chart moves to GHCR outright. Its version comes from Chart.yaml
so there is no candidate copy to re-tag, its install base is a fraction
of the container's, and oci://docker.io/dpage was an odd home for a
chart.

The wheel is fetched from the published release rather than rebuilt, so
what reaches PyPI is the file the acceptance test installed, and it goes
up by trusted publishing, which exchanges the workflow's own identity for
a short-lived credential rather than holding an API token.

All three run in their own job on a hosted runner. They need none of the
publishing keys, so the machine that holds those never handles registry
credentials, and a registry outage cannot leave a half-finished
promotion on the download server.
2026-09-21 16:10:13 +01:00
Dave Page 89bb92dc44 Read the staging server's name from the server
It was the last SITE value the repository had to get right, and it was a
fully qualified internal hostname in a public tree.

It is read here rather than accepted from the caller, which is the part
that matters: the client names a verb and a datestamp and never a host,
a path, a binary or a signing key, and that is what stops a compromised
runner asking for a signature over something it fetched from a source of
its own choosing. A workflow variable would put it on the wrong side of
that line. It is validated as a hostname on the way in, since it becomes
part of an rsync remote specification.
2026-09-21 15:35:59 +01:00
Dave Page 42d2e55bcd Write the maintainer marker into published directories
Every directory under a release carries a CURRENT_MAINTAINER naming the
support address, which the PostgreSQL mirror network expects and which
the buildfarm wrote with an echo in each of nine job definitions. The
rehearsal produced a release directory without them.

It is a file beside the scripts now, so changing the support address is
one reviewed commit.
2026-09-21 15:30:49 +01:00
Dave Page f57e46c7c4 Fetch the release downloads, and keep the rehearsal confined
Two faults the first working rehearsal exposed.

rsync without -r reports 'skipping directory .' and transfers nothing,
so release-fetch created the directory, sorted no files and reported
success. The comment claiming -r was omitted on purpose was simply
wrong; the trees are excluded by pattern instead.

The auto-updater archives were being moved by release-fetch, which
writes them outside v<VERSION>. That contradicted the whole point of the
release-directory scope, which is that deleting one directory undoes it.
They are now autoupdate-publish's job, and it runs with the packages,
where the promotion stops being reversible anyway.
2026-09-21 15:28:58 +01:00
Dave Page 9a68105260 Name the staging server in full
PULL_HOST carried the short name, one of the SITE values never confirmed
against the servers, and the first real release-fetch failed on it. The
firewall now permits the pull and the host key is recorded on the
download server under both names; the fully qualified one is used here so
that what this file names and what known_hosts records cannot drift.
2026-09-21 15:27:06 +01:00
Dave Page 299a767b1f Make the promotion scope an explicit choice
Three settings rather than a boolean, because the steps differ in how
undoable they are and that is what somebody needs to choose between.

release-directory writes only /var/ftp/pgadmin4/v<VERSION>, so deleting
that directory undoes it completely; it is the only setting that leaves
the live repositories alone, and so the only one that can be rehearsed.
files goes on to copy packages into the production trees and re-sign
every index clients read. everything adds the website and the S3
archive, neither of which can be undone.

The default is the safe one, on the grounds that a full promotion should
be a deliberate choice rather than what happens if nobody reads the
form.
2026-09-21 15:09:03 +01:00
Dave Page fc6815ae70 Allow a promotion to stop after the files
The website update and the S3 archive are the two steps with no undo:
one writes to the website database, the other copies into a bucket whose
sync carries no --delete. files-only skips both, so a promotion can be
rehearsed against a throwaway version and the files deleted again before
the hourly sync carries them to the mirrors.
2026-09-21 15:06:24 +01:00
Dave Page 456b2ddefa Promote a tested candidate to the download server
The last piece, replacing pgadmin4-all-publish-qa-to-prod and the deb
and rpm promotion jobs, plus update-download-archive and
pgadmin4-website-create-release.

It builds nothing. It takes a candidate that already exists on the
development server, having been built, signed, indexed and installed
from by the acceptance test, and moves it across: the release directory,
the downloads sorted into it, the packages into the live repository
trees, then the indices, the READMEs, the website and finally the S3
archive. The order is deliberate, since an interruption before the
indices leaves packages nothing points at, which is recoverable, whereas
the reverse is a repository describing packages that are not there.

Two changes to the wrapper it depends on.

release-fetch assumed the staging build was divided into docs, macos,
pip, source and windows. It is not: a staging build is flat, and it is
promotion that sorts the downloads into those directories, which the
buildfarm did with a series of scp commands carrying shell globs. That
sorting is now a table, the destination comes from each file's own name,
and an unrecognised file stops the publication rather than being dropped
silently. It also handles the auto-updater ZIPs, which replace the
previous release's rather than accumulating beside them, and which
nothing here had carried across at all.

rebuild-readme is new, and closes the gap left when the README generator
went in: nothing regenerated the production platform tables, only the
staging and snapshot ones. Those carry the release history, so they
change with every release.
2026-09-21 15:04:21 +01:00
Dave Page 9039065ee0 Check Gatekeeper before codesign --strict on the disk image
The macOS jobs failed on 'Disallowed xattr com.apple.FinderInfo', which
is not a signature problem: _create_dmg runs SetFile -a E on the bundle
to hide the .app extension in the disk image window, and that writes the
attribute --strict refuses to see.

What decides whether a user can open the application is Gatekeeper, so
spctl and stapler run first and are the pass or fail. --strict still
runs, and reports rather than fails, so that a future signature problem
is still visible and distinguishable from the attribute we put there
deliberately.
2026-09-21 14:53:08 +01:00
Dave Page 620f7b8064 Check the Windows, macOS and direct downloads too
The apt and yum halves proved a user can install from the repositories.
These cover everything else a user can download.

Windows is the most valuable, because it closes a gap rather than
confirming something already checked: nothing had ever run the installer,
and nothing verified the Authenticode signature on the pgAdmin4.exe
inside it. Make.bat's own check tested a stale %ERRORLEVEL%, and the
workflow step that claimed to cover it re-verified the installer instead.
That binary does not exist outside the installer until the installer has
run, so this is the only place it can be verified.

macOS mounts the published disk image rather than inspecting the bundle
that was just built, with the quarantine attribute a browser would set so
Gatekeeper is actually consulted. It also runs otool over the bundled
client binaries and fails if any still points at /opt/pgbuild, Homebrew
or /usr/local, which is what a dependency that was linked but not
relocated looks like.

The rest is deliberately shallow: the wheel is installed into a venv and
imported, the tarballs are checked for a couple of known paths, the PDF
and ePub are checked to be those formats and not truncated, and every
detached signature is verified from the published URL rather than on the
server, since that is the copy a user actually fetches.
2026-09-21 14:48:54 +01:00
Dave Page 3cd04b405e Do not use grep -q under pipefail
Both halves installed correctly and then failed the assertion that they
had: grep -q exits on the first match, dpkg -L and rpm -ql die of
SIGPIPE, and pipefail reports the pipeline as failed. The packages do
ship files under /usr/pgadmin4, as dpkg-deb -c on the published .deb
confirms.
2026-09-21 14:43:08 +01:00
Dave Page 8057624259 Correct two faults in the acceptance test itself
setup-web.sh ships in pgadmin4-web, not pgadmin4-server, so the apt jobs
installed correctly and then failed on an assertion about a file that
package never contained. The check is now that the package delivered
files under /usr/pgadmin4, which cannot be wrong about which package
owns what.

The yum jobs never got as far as installing: dnf install curl conflicts
with the curl-minimal already in those images, and curl was not needed
in the first place.
2026-09-21 14:40:47 +01:00
Dave Page 750d0630e0 Run the acceptance test steps under bash
The containers default to sh, which has no pipefail, so every step died
on its first line with 'Illegal option -o pipefail' before testing
anything.
2026-09-21 14:38:16 +01:00
Dave Page c23172af37 Install from the candidate, as a user would
Everything else checks that files exist, that indexes parse and that
signatures validate. All three can be true of a repository apt still
refuses, and both bugs the migration turned up were that shape: packages
one directory too deep, and noarch RPMs filed where no dnf client looks.
Neither failed a build.

So this inspects nothing. It follows the instructions in the repository
README, in a clean container, on all five apt platforms and all four yum
ones, and installs the package. No --allow-unauthenticated, no
--nogpgcheck, no pinning, so a wrong signature or an architecture missing
from Release fails the job.

It runs against a candidate rather than a snapshot because the
development server publishes its tree immediately, whilst the download
server sits behind an hourly sync to the mirrors that would otherwise be
most of what the test measured.

Promotion stays a human decision, so this gates nothing automatically; a
red result is simply a candidate that must not be promoted.
2026-09-21 14:36:09 +01:00
Dave Page 458b24b5f8 Do not write a literal ${{ }} in a comment
GitHub evaluates workflow expressions inside run blocks before the shell
sees them, comments included, so an empty one is a parse error: the
whole file is rejected with 'An expression was expected' and the
workflow cannot be dispatched or scheduled at all.

snapshot.yml has carried this since the review fixes landed, which would
have failed tonight's nightly, and release-candidate.yml inherited it.
2026-09-21 14:32:45 +01:00
Dave Page 4dc7a7bd7b Add release candidate builds, publishing to the development server
Phase one of moving the release pipeline off the buildfarm, replacing
the pgadmin4-*-build jobs. The same builds as the nightly snapshot,
calling the same workflows, but published to procyon through the
wrapper's staging verbs rather than to the download server.

The difference is what the tree is for. A snapshot is finished when it
is published; a candidate is published so that it can be tested, and
promoted afterwards. developer.pgadmin.org serves the staging tree over
HTTP the moment it is written, so a candidate's repositories can be
added and installed from immediately, whereas the download server sits
behind an hourly sync to the mirrors.

Never scheduled, and publishing is off unless asked for, because a
candidate exists only because somebody decided to make one.

Needs a STAGING_SSH_TARGET variable on the publishing environment; the
keys and the wrapper are already deployed on procyon.
2026-09-21 14:32:45 +01:00
Regina Obe 6312baa34e Fix dynamic type function not receiving correct state for collection row fields (#10398)
When a schema field uses a dynamic type function (type as a function)
and is rendered inside a collection (e.g. chain tasks), the function
always received the top-level schema data instead of the row-level
data. This caused the field to fall through to its default type,
ignoring the actual field values in the row.

Resolve the type callback's state against the field's own container
instead, mirroring what cell() already gets via its row argument: for a
field inside a collection row that is the row, and for a top-level
field the parent path is empty, so the whole schema data comes back as
before. Nested tabs and fieldsets carry no id, so they do not extend
the access path and are unaffected.

As well as the pg_timetable case that prompted this, it repairs the
expanded-row Definition forms that were already relying on row state
and silently getting the table's: the foreign key 'Referencing'
column list, the partition name control's attach/create switch, and
the column dialog's identity/generated constraint options.
2026-09-21 13:15:33 +01:00
Hari Prasad 5f56805162 Stop the Query Tool spinner whilst a password prompt is open (#10436)
When restoring saved Query Tool tabs, or switching to a connection with no
saved password, the backend replies with HTTP 428 and the 'Connect to server'
dialog opens, but obtaining_conn was left set to true whilst waiting for the
user. ConnectionBar renders MUI's CircularProgress from that flag, so every
affected tab kept two infinite CSS animations running at the display refresh
rate, costing around 30-35% CPU whilst completely idle.

obtaining_conn is now cleared when the 428 arrives and set again only whilst a
connection request is actually in flight, with a promptCallback threaded
through connectServer() so that password retries behave the same way. Along the
way this also fixes cancellation leaving obtaining_conn stuck on with the
Promise never settling, the New Connection dialog closing itself on a failed
connection rather than reporting the error, and duplicate entries being added
to the connection list when a role was an empty string rather than null.

Fixes #10386
2026-09-21 13:15:03 +01:00
Dave Page 7242be8be6 Do not write a literal ${{ }} in a comment
GitHub evaluates workflow expressions inside run blocks before the shell
sees them, comments included, so an empty one is a parse error: the file
is rejected with 'An expression was expected' and the workflow cannot be
dispatched or scheduled at all. Tonight's nightly would not have run.
2026-09-21 13:01:42 +01:00
dependabot[bot] e419d45930 Javascript dependency: bump html-react-parser from 5.2.17 to 6.1.7 in /web (#10336)
html-react-parser 6 is ESM only, and although webpack handles that without
complaint, Jest runs the suite as CommonJS and only transforms the packages
named in the allowlist in transformIgnorePatterns, so every suite that
reached a dialog died with "Must use import to load ES Module" from
domhandler. Add domhandler, domelementtype and htmlparser2 to the allowlist,
which is the smallest set that untangles the chain.

The allowlist approach fails closed and will keep catching us out on each
ESM-only bump; #10443 covers inverting it properly.
2026-09-21 12:58:44 +01:00
Dave Page 7c6fb89b82 Keep Make.bat stored with CRLF
.gitattributes normalises everything to LF, which rewrote the whole file
the first time this branch touched it and turned a two-line merge into a
whole-file conflict. Make.bat has been stored with CRLF since long before
that rule, so it is marked -text to leave it that way.
2026-09-21 12:51:22 +01:00
Dave Page a2439b78f5 Merge remote-tracking branch 'upstream/master' into worktree-qa-builds-on-actions
# Conflicts:
#	Make.bat
#	pkg/win32/README.md
2026-09-21 12:49:27 +01:00
Dave Page 14a796c427 Trigger the new build checks on master alone
The buildfarm-to-actions trigger existed so the branch could be tested
before it landed, which it no longer needs to be.

The four that filter on web/** also gain the message catalogue exclusion
that #10441 applied to the workflows already on master, for the same
reason: a .po change cannot break a package build, and check-translations
compiles the catalogues anyway.
2026-09-21 12:47:07 +01:00
Grégoire Bellon-Gervais 53729372a7 Include the authenticated user in the access log on logout (#10410)
Flask-Login has already cleared current_user by the time after_request
runs on a logout, so the X-Remote-User header, and with it the username
in the HTTP access log, was missing for exactly the requests that record
someone leaving. Stash the name on flask.g in before_request whilst it is
still available, and fall back to it when setting the header.

Signed-off-by: Grégoire Bellon-Gervais <gregoire.bellon-gervais@docaposte.fr>
2026-09-21 12:31:06 +01:00
dependabot[bot] 08f643e619 Javascript dependency: bump electron from 43.4.0 to 44.4.2 in /runtime (#10359) 2026-09-21 12:29:04 +01:00
Marvin A. Ruder 2bb59c0b10 Prefer the user's email address as the Gravatar identifier (#10416)
The user menu avatar was always hashed from the local pgAdmin username,
so a user whose Gravatar profile is registered against their email
address (commonly the case when the account came from an OAuth2
provider) got a default avatar, or worse, the avatar belonging to
somebody else who happens to share that username. The email address is
now used where one is known, falling back to the username otherwise.

Fixes #10415
2026-09-21 12:24:16 +01:00
dependabot[bot] e1ad058990 Javascript dependency: bump qs from 6.15.2 to 6.16.0 in /web (#10375)
The lockfile is regenerated here; Dependabot bumped only the resolutions entry, which left the lockfile inconsistent and failed every install.
2026-09-21 12:22:58 +01:00
dependabot[bot] 4e23684096 Javascript dependency: bump @xmldom/xmldom from 0.8.13 to 0.8.15 in /web (#10377)
The lockfile is regenerated here; Dependabot bumped only the resolutions entry, which left the lockfile inconsistent and failed every install.
2026-09-21 12:22:58 +01:00
dependabot[bot] c5e67bdc67 Javascript dependency: bump bignumber.js from 10.0.2 to 11.1.5 in /web (#10337) 2026-09-21 12:22:58 +01:00
dependabot[bot] 07d2f4dbc5 Javascript dependency: bump postcss-selector-parser from 7.1.1 to 7.1.5 in /web (#10369) 2026-09-21 12:22:58 +01:00
dependabot[bot] ca4fe9d08a Javascript dependency: bump fast-uri from 3.1.5 to 3.1.6 in /web (#10374) 2026-09-21 12:22:58 +01:00
dependabot[bot] 2d2402c822 Javascript dependency: bump browserslist from 4.28.2 to 4.28.8 in /web (#10376) 2026-09-21 12:22:58 +01:00
dependabot[bot] 9195037213 Javascript dependency: bump @humanfs/node from 0.16.7 to 0.16.8 in /web (#10378) 2026-09-21 12:22:58 +01:00
dependabot[bot] 9e31eebe26 Javascript dependency: bump js-yaml from 3.15.1 to 3.15.2 in /web (#10405) 2026-09-21 12:22:58 +01:00
dependabot[bot] ebbe4e36d8 Javascript dependency: bump baseline-browser-mapping from 2.10.16 to 2.11.21 in /web (#10406) 2026-09-21 12:22:58 +01:00
dependabot[bot] aca8796178 Javascript dependency: bump devalue from 5.8.1 to 5.9.2 in /web (#10431) 2026-09-21 12:22:58 +01:00
dependabot[bot] 27809a95ef Javascript dependency: bump the runtime-javascript-minor-and-patch group across 1 directory with 3 updates (#10411)
Bumps axios from 1.19.0 to 1.20.0, eslint from 10.8.1 to 10.10.0 and globals from 17.11.0 to 17.12.0.
2026-09-21 12:22:58 +01:00
dependabot[bot] 211f9bf1f3 Javascript dependency: bump @humanfs/node from 0.16.7 to 0.16.8 in /runtime (#10379) 2026-09-21 12:22:58 +01:00
dependabot[bot] df39657d6d Javascript dependency: bump fast-uri from 3.1.5 to 3.1.6 in /runtime (#10373) 2026-09-21 12:22:58 +01:00
dependabot[bot] 79f5bdfb40 Python dependency: bump the regression-python-minor-and-patch group in /web/regression with 2 updates (#10433)
Bumps psycopg from 3.3.4 to 3.3.5 and selenium from 4.48.0 to 4.49.0.
2026-09-21 12:22:58 +01:00
rlbxku1r 5c7f0bdb05 Update Japanese translation for v9.18 (#10423)
Bring the ja catalogue up to full coverage against the current message
template, taking it from 3313 to 3684 translated strings, and refine
eleven existing translations. The compiled catalogue is included and
matches the source exactly.
2026-09-21 12:17:53 +01:00
ShiPing 5060cd8bc0 Update Chinese (Simplified) translation (#10439)
Refresh the zh_Hans_CN catalogue against the current message template,
taking it from 2681 to 3684 translated strings, so every message in
messages.pot is now covered. A further 1419 existing translations were
revised for consistency and accuracy, including a handful that were
plainly wrong ("Drop Table/Relation" rendered as "add table/relation").
2026-09-21 12:14:02 +01:00
Dave Page d7a6a89df3 Do not run the whole matrix for a translation update (#10441)
Message catalogues live under web/, so every workflow filtering on web/**
fires for a .po change: both feature test suites, all three database test
suites, the container build and the tarball and wheel builds. None of them
can be broken by a translation, and check-translations already runs
msg-compile, which is the check that would catch a malformed catalogue.

The two JavaScript workflows need no change, their filters being narrow
enough to miss .po files already.
2026-09-21 12:05:05 +01:00
Dave Page 7dc7292d53 fix(pkg): stage the Windows Kerberos runtime next to libpq (#10440)
PostgreSQL 18 and later are now built with GSSAPI support, so the
libpq.dll we ship has a load-time dependency on gssapi64.dll where it
previously had none. The installer staged the MIT Kerberos runtime into
the python directory only, which left two problems.

pg_dump.exe, pg_dumpall.exe, pg_restore.exe and psql.exe live in the
runtime directory next to libpq.dll, and could no longer load it, so
backup and restore failed with a complaint that gssapi64.dll could not
be found. Adding the python directory to PATH worked around it.

Connections crashed with "exception: access violation writing
0x0000000000000000" against any server that accepts GSSAPI encryption,
which is most Linux and cloud builds, whilst servers that decline it
carried on working. We never staged krbcc64.dll, and on Windows krb5
statically defaults krb5_cc_dfl_ops to the CCAPI credential cache and
only switches away from it if that DLL loads, so its entry points were
left null and the first use of the default credential cache called
address zero. libpq asks for a credential cache on every connection
under the default gssencmode of prefer, and because psycopg falls back
to its ctypes binding on Windows, CPython caught the access violation
and reported it in the Connect to Server dialog rather than taking the
process down.

Stage the Kerberos runtime into the runtime directory instead, once,
adding krbcc64.dll and the ccapiserver.exe it drives. That serves the
client binaries directly, and serves libpq loaded by psycopg too, since
the runtime directory is prepended to PATH before Python is spawned and
a DLL's own directory is searched for its dependencies. Nothing is left
behind on upgrade, because the installer already deletes the python
directory before it installs. Whilst here, correct the build
instructions, which still claimed that the PostgreSQL build has no
Kerberos support, and fix a stray "L%" on the end of the pg_dumpall.exe
copy, which stopped a failure there aborting the build.

Issue #10428
2026-09-21 11:18:12 +01:00
Dave Page 6f322ea160 Address the pre-merge review
Ten fixes from a review pass with fresh eyes. The ones that mattered:

rebuild-yum-repo.sh signed repomd.xml with no -u, so it used whatever
the keyring's default key resolved to. That is the packaging key today
only because there is one secret key in it. A repository whose metadata
is signed by the wrong key is one every client with gpgcheck=1 rejects,
produced by a run that exits 0.

The snapshot publish gate required only deb and rpm, whilst its comment
justified exactly one exception. A failed docs, tarball or wheel job
published a snapshot missing those files, and a failed repo-rpm job was
worse: install-repo-readme.py then fails after the packages are uploaded
and signed, leaving half a snapshot on the download server.

The location input was interpolated into shell on the runner holding both
publishing keys. It now travels through the environment, and is validated
against the shape of a datestamp before anything downstream sees it, so a
bad one fails in five seconds rather than after an hour of building.

Make.bat tested %ERRORLEVEL% inside a parenthesised block, where it is
expanded at parse time, so a failed Authenticode signature on
pgAdmin4.exe was undetectable; the handler was PAUSE, which on a headless
signing host either returns at once or blocks until the job times out.
Both sites now fail the build.

A called workflow inherits the caller's ref, so once this is on master an
ordinary push would have shared a concurrency group with the nightly
snapshot's builds and cancelled them.

And PULL_KEY named a file that does not exist on the download server,
which would have failed the first release promotion.

The rest: if-no-files-found on every build artefact, so a build that
produces nothing fails rather than silently shipping a snapshot without
it; pinned syft and helm installers, which were piping a default branch
into a shell as root in the container that builds signed packages; the
Helm chart no longer built and discarded; and the comments that had
stopped describing the code.

The self-test grows from 56 cases to 70, covering the verbs that delete
things, arguments that look like options, and the SSH_ORIGINAL_COMMAND
entry point rather than only the dry-run path.
2026-09-21 09:30:46 +01:00
Dave Page b8ac3485ad Give rpmsign the key identity rather than relying on a dotfile
rpmsign refuses to run without %_gpg_name, and the buildfarm satisfied
that with a ~/.rpmmacros on each build agent. Signing has moved to the
download server, which has never signed an RPM and has no such file, so
the first real snapshot-sign failed there.

Passing it explicitly suits this better than adding the dotfile: the key
is already a constant in this file, for the same reason the client cannot
name one, and the result no longer depends on whose home directory the
wrapper runs in.
2026-09-18 14:36:30 +01:00
Dave Page 1a2bbac26e Clear the staging directory before assembling into it
roadie's workspace persists between jobs, so yesterday's aborted run
left stage/2026-09-17-2 behind and today's run found two dated
directories where it expected one. The guard caught it and refused to
guess, which is the right outcome, but the tree should not have been
there to find.

The merged assemble job begins with a checkout, which cleans the
workspace as a side effect, and this does not depend on that.
2026-09-18 11:40:55 +01:00
Dave Page 67086aabff Filter the branch's own build checks too
The path filters that just landed on master cover the workflows that
exist there. These five are new on this branch and were still firing on
every push, which is what starved the macOS runners repeatedly today:
each documentation or workflow commit started two macOS appbundle builds
that no change could possibly have affected.

Each now lists what it builds from. The two that consume pgbuild also
list the composite action that fetches it, since a change to how the
dependencies are installed changes the build as surely as the packaging
does.
2026-09-18 11:35:18 +01:00
Dave Page d6262db305 Merge remote-tracking branch 'upstream/master' into worktree-qa-builds-on-actions 2026-09-18 11:34:31 +01:00
Dave Page d317a93019 Only run each CI workflow when something it tests has changed (#10427)
* Only run each CI workflow when something it tests has changed

Every workflow fired on every push and every pull request, so a commit
touching nothing but documentation or a workflow file started the whole
matrix: two macOS jobs, the EPAS and PostgreSQL feature tests, the
container build and the rest. That is slow for the contributor waiting
on a green tick and wasteful of the hosted runners, and macOS capacity
in particular is the one resource we can actually exhaust.

Each workflow now lists the paths it depends on, and its own file, so
editing it still runs it. The scope is deliberately per workflow rather
than shared: eslint and Jest care about the JavaScript and the files
that configure it, pycodestyle cares about Python anywhere in the tree,
the documentation build cares about docs plus the version and branding
it renders, and the packaging checks care about their own pkg
subdirectory alongside the application.

sonarqube-scan is left alone deliberately, being a whole-repository
quality scan rather than a test of any particular thing.

* Widen the path filters to inputs I had missed

All eight review findings check out against the tree, so all eight are
applied:

- The container build copies docs into the image, and .dockerignore
  decides what the build context contains at all.
- The documentation build imports web/config.py from conf.py.
- make install-python runs tools/setup-python-env.sh, so it belongs in
  every workflow that calls it, which is eight of them.
- pkg/pip/build.sh packages LICENSE and README.md and builds the docs;
  pkg/src/build.sh does much the same for the tarball.
- The Yarn and Babel configuration, web/.yarnrc.yml and
  web/babel.config.json, change what eslint and Jest do, and the
  JavaScript workflows filter on JavaScript rather than all of web/.
- tools/get_sb_package.py is fetched by the PostgreSQL and EPAS Python
  test workflows.

One deviation: get_sb_package.py goes to run-python-tests-pg and
run-python-tests-epas, which use it, rather than to server-mode, which
does not.
2026-09-18 11:33:50 +01:00
Dave Page 992ce03b43 Assemble on roadie, alongside the publishing
Splitting the two meant assembling a tree of several hundred megabytes
on a hosted runner, uploading it as an artifact, and immediately
downloading it again on roadie, which is where it was going anyway. The
hosted runner also has to be waited for: the second end-to-end run had
every build finished and then sat queued for assemble behind nine
unrelated master workflows.

Roadie is dedicated and nothing else queues for it, so the job now runs
there start to finish. Only the publishing steps are guarded by the
publish input, so a dispatch without it still proves the tree assembles,
which was the other reason for keeping them apart.

What goes is the assembled tree as a downloadable artifact. It was a
copy of something that ends up on the download server, where it can be
looked at directly.
2026-09-18 11:23:08 +01:00
Dave Page 14b3137ef1 Refuse a public key where a private one is needed
The pre-flight check tested only that the key file was readable, which a
.pub file also is, so a variable naming the wrong half of the pair passed
here and failed later inside ssh with a message that does not say which
file it objected to. Both halves live in one directory with names a
suffix apart, so it is an easy thing to get wrong and a cheap thing to
catch.
2026-09-18 09:18:44 +01:00
Dave Page 1f6076f888 Put every RPM in its distribution's tree, noarch included
The first end-to-end run assembled yum/redhat/rhel-9-noarch and three
more like it, because the architecture was taken from each package's own
filename. pgadmin4 and pgadmin4-web are noarch, so on a real publish the
metapackage and the web package would have been missing from every
repository: dnf asks for <name>-<version>-$basearch and never looks in a
noarch directory. The live snapshots have them in rhel-9-x86_64
alongside the rest, which is what this now produces.

x86_64 is a constant here because that is the whole RPM matrix today; it
becomes a property of the build when aarch64 arrives.

Found by diffing the assembled tree against a snapshot the buildfarm
produced, rather than by the build failing, which it would not have.
2026-09-17 16:58:09 +01:00
Dave Page 2a4492ea5d Bring the platform build READMEs up to date
The Windows one still pointed at dpage/winpgbuild and told people to dig
a binaries asset out of a workflow run. pgbuild publishes proper releases
now, each tagged *-latest, so both platforms get a predictable URL and
the same binaries CI uses. syft is added to the Chocolatey list, the
build having needed it since the SBOM step went in.

The macOS one claimed Python 3.6+, which has not been true for a while
and is now doubly confusing given the build downloads the interpreter it
bundles: the two are separated, and the version that ships is pointed at
pkg/python-version.txt. It also never mentioned syft or wget, both of
which the build needs, or that Homebrew's PostgreSQL lacks the zstd and
lz4 support ours is built with.
2026-09-17 15:14:09 +01:00
Dave Page f703f10d83 Give each workflow its own concurrency group
github.workflow in a reusable workflow is the CALLER's name, so every
build Snapshot calls landed in one group, 'Snapshot @ <ref>', with
cancel-in-progress set. Each called build therefore cancelled the one
before it: the first dispatched run finished with deb, rpm, docs,
tarball, wheel and helm all cancelled, and only the two jobs defined
inline in the orchestrator surviving.

Each workflow now names its own group literally.

Also restores snapshot-macos.yml, which the previous commit truncated to
its trigger block: the expression used to strip the push trigger matched
across the rest of the file and took the concurrency settings, the
permissions and the entire appbundle job with it.
2026-09-17 15:07:32 +01:00
Dave Page f7cd7f4d63 Run snapshots nightly rather than on push
A push trigger was never the intent; it was there because a workflow off
the default branch has no dispatch button, and it is what caused the
orchestrator to run alongside the standalone signing workflows it calls.

Nightly at 01:01, which is when pgadmin4-all-snapshot ran, plus
workflow_dispatch for testing and reruns.
2026-09-17 15:06:05 +01:00
Dave Page 6f7685a111 Stop the signing workflows firing on push as well
They each had a push trigger, added when they were standalone and there
was no dispatch button for a workflow off the default branch. Now that
the orchestrator calls them, a push touching pkg/mac or pkg/win32 starts
them twice: once directly and once through Snapshot. The first push
after they became callable did exactly that, and the resulting contention
for the macOS runners and the one Windows signing host left the real
dispatched run queued behind its own duplicate.

They keep workflow_dispatch, so either can still be run alone.
2026-09-17 14:58:21 +01:00
Dave Page 2d8479feab Build the repository configuration RPMs for the snapshot
Every snapshot on the download server carries
pgadmin4-fedora-repo-2-1.noarch.rpm and its redhat counterpart at the
root of yum/, and the README tells people to install one before anything
else. Nothing in the new flow produced them, so install-repo-readme.py
could not name them and snapshot-index-yum would have failed.

They are not a build of pgAdmin, which is why no QA workflow makes them:
each is a single .repo file pointing at the tree it ships in. That is
also why the destination has to be known before they are built, and why
the directory name is now decided once by its own job rather than by
each job calling date. Two jobs calling date independently would, on a
run straddling midnight, have shipped a repository configuration
pointing at a snapshot that does not exist.

They are left unsigned here and signed on the server with everything
else, since they land under yum/ where snapshot-sign finds them.
2026-09-17 14:50:34 +01:00
Dave Page e46d9cb08e Match the layout the servers actually use
Verifying against paxsor and procyon before the first run turned up that
the flow had the wrong shape, which would have produced a snapshot
nobody could install from.

A staging build and a snapshot are flat: apt/, yum/, and the
downloadable files loose beside them. It is only a published release
that is divided into docs/, macos/, pip/, source/ and windows/, and the
promotion job sorts files into those on the way to v<VERSION>. We had
the release layout applied to all three, so stage-create and
snapshot-create made directories nothing uses, the assembled tree put
every file one level too deep, and sign_packages looked for things to
sign in directories that would have been empty. A snapshot would have
gone out unsigned.

Signing is now driven by extension and location rather than by a list of
directories, so it is right for both layouts: RPMs under yum/ signed in
place, and detached signatures for the tarball, wheel, documentation
tarball, PDF and ePub wherever they sit. Debs are left alone, apt
verifying them through the signed Release file, as are the disk images,
ZIPs and installer, which carry signatures of their own.

The documentation also gets versioned filenames, the build leaving them
as pgadmin4.pdf and pgAdmin4.epub whilst the download site has always
carried pgadmin4-<version>.pdf and .epub.
2026-09-17 14:45:37 +01:00
Dave Page df76b1ba34 Build the RPMs against PostgreSQL 18
pkg/redhat/build.sh bundles postgresqlNN-libs into the yum trees,
choosing NN from the highest /usr/pgsql-1* on the build host rather than
from a constant, so the version that ships is decided by what the build
environment installs. Ours installed postgresql17-devel, so the
repositories carried postgresql17-libs alongside a libpq5 from 18.

pkg/redhat/setup.sh was staler again at postgresql15-devel, in all three
of its distribution branches.
2026-09-17 14:45:37 +01:00
Dave Page 6920a58d91 Do not enforce snapshot retention on a test run
snapshot-purge ran at the end of every publish, so the first test run
would have deleted the older snapshots the buildfarm put on the download
server, which is exactly what we agreed a test must not touch. A run
that names its own directory is a test by definition, so that is the
signal to leave retention alone.

Also fails rather than guessing when the artefact does not contain
exactly one dated directory, and checks for ssh and rsync up front.
2026-09-17 14:16:56 +01:00
Dave Page 1545bcc91c Send snapshots to the download server, not to staging
I had the two flows conflated. Release candidates are staged on the
development server and promoted; snapshots are published straight to the
download server under snapshots/<date>, which is what every
*-snapshot job in the buildfarm targets.

So the publish job talks to the download server, the wrapper grows the
snapshot verbs it needed and loses snapshot-fetch, which existed only to
copy a staging build that is never made, and the variable is named for
the server it actually names.

It also reverses my advice about the upload key on the download server,
which I had said to drop on the reasoning that publication always pulls
from procyon. It does not, for snapshots. The key comes back, confined
to the snapshots tree, which is the right root on two counts: it is
where snapshots belong, and it is the one part of the download site that
the S3 sync excludes, so nothing written through it can reach the
archive or the mirrors.

snapshot-purge replaces the buildfarm's ls | tail | xargs rm. It is the
only verb that deletes anything, so it takes no argument: it cannot be
asked to remove a particular snapshot, only to enforce the retention the
server already has, and it ignores directories that do not look like a
snapshot.
2026-09-17 13:25:06 +01:00
Dave Page e4eb334599 Reference the publishing keys by path rather than copying them
They are already on roadie. Putting copies in the secret store would
mean two places to rotate them and two places to leak them from, so the
workflow names the paths and never handles key material.

What changes with it is where the boundary sits. An environment secret
is gated by a deployment branch policy; a file on disk is gated by which
workflows may run on that machine. This repository is public, so roadie
needs to be in a runner group restricted to these workflows, with
nothing triggered by pull_request targeting it. That is the same bargain
the Windows signing host already makes with the Certum token, but it is
now load-bearing in a second place, so it is written down.

The environment stays for the branch policy and the deployment record.
2026-09-17 13:19:13 +01:00
Dave Page 9f7dff40f1 Publish the assembled snapshot to the staging server
The last missing link: assemble produced a tree and nothing carried it
anywhere. The publish job uploads it over the rrsync-confined key and
then asks pga-publish to sign and index it, so the runner names a verb
and a datestamp rather than a command, and the signing happens where the
key is.

The staging directory can be named explicitly, because the buildfarm
writes <date> on that same server and a test run has no business landing
on the directory Jenkins is still filling. Publication is off by default
for the same reason: it takes an explicit input, so a dispatch that only
wants to know whether everything builds cannot reach the servers at all.

Also adds the deployment notes, which is where the four files go on each
host, what the two configuration files hold, and why no key gets a
shell.
2026-09-17 13:13:04 +01:00
Dave Page 596396acaf Move the publishing wrapper into pkg/publish and correct it
It was drafted from the Jenkins job definitions before anybody had
looked at the servers, and most of what it assumed about them was wrong.

The apt layout is per distribution release, with the packages sitting
directly in binary-<arch> and no shared pool, so packages-fetch and
stage-create were writing to paths that do not exist. The allowlists
were stale in both directions: plucky and RHEL 8 are not built, whilst
resolute, Fedora 43 and 44 were missing. sync-ftp-to-s3.py takes the
CloudFront distribution to invalidate rather than a choice of what to
sync, so that verb loses its argument entirely and reads the identifier
from the server, since the client has nothing to choose.

The indexing is no longer implemented here. It calls the scripts in this
directory instead, which are the same ones an administrator runs by hand
after purging old releases, so there is one implementation rather than
the four the buildfarm had. That also settles the doubled signing the
draft worried about: the scripts sign as part of indexing.

New verb: stage-sign. With the GPG key staying on the servers rather
than moving into Actions secrets, the workflow uploads unsigned
artefacts and asks for them to be signed here. A compromised workflow
can therefore ask for a signature over something it just uploaded, which
is real and acknowledged; what it cannot do is hold the key, sign out of
band, or sign with any other key.

The self-test covers 56 cases and passes.
2026-09-17 13:10:13 +01:00
Dave Page 3c038f8fd5 Add the snapshot orchestrator, calling the build workflows
Replaces pgadmin4-all-snapshot and the dozen per-artefact snapshot jobs
it drove. Those were separate job definitions carrying the same commands
as their QA counterparts, which is how a snapshot comes to differ from
what QA tested; here the build workflows gain a workflow_call trigger
and the orchestrator calls them, so there is one definition of each
build.

Nothing in it signs anything beyond the macOS notarisation and the
Windows signature, which have to happen where their credentials are. The
GPG key that signs RPMs and repository metadata stays on the servers, so
the workflow assembles the tree and uploads it, and procyon indexes and
signs it. A compromised run can ask for a signature; it cannot make one.

The assembled layout is the one the publishing scripts and the download
site expect. Debian architectures come from the package filenames, since
dpkg encodes them there; the codename does not follow from the build
name, so that mapping is explicit and fails loudly on an unknown one.

The Helm chart is built but not assembled: it goes to an OCI registry
rather than the download tree.
2026-09-17 12:49:54 +01:00
Dave Page f149cf4b81 Derive the repository README platform tables
The support matrix was maintained by hand in five Jenkins heredocs,
which is exactly why the published one had drifted: it stops at Noble
and still lists Mantic, whilst the job that writes it goes up to
Resolute.

It is now derived, and the two sources are deliberately different. Which
platforms are supported comes from the repositories present in the tree
being written, since that is what a user can actually install from.
Which releases each platform carried comes from the S3 archive rather
than the download server, because old releases are purged from the
server as they age: bookworm reads as 7.8 there against 7.0 in the
archive, so deriving history from the server would quietly rewrite it
every time somebody tidied up. The sync has no --delete, so the bucket
keeps everything.

Platforms that are no longer supported get their own table with the last
release each carried, which turns the standing note about the archive
into something a user on an old distribution can act on. For snapshot
and pre-release trees --no-archive drops that section and the release
columns with it, since every package there is from the one build.

Cross-checked against the hand-written tables: every value they assert
is reproduced, including bookworm 7.0, jammy 6.9, bullseye 4.30 to 9.14
and fedora-42 9.3 to 9.17. Two they got wrong come out right, RHEL 10
having been copied from the RHEL 9 row as 6.12 when it is 9.6.

Two traps worth naming. aws s3 sync follows symlinks, so the EL
compatibility links exist in the bucket as full copies and would
otherwise invent platforms like fedora-31Client. And Debian versions
carry a packaging revision now, as in 9.16-1.resolute, which sorts below
9.3 unless it is stripped first.
2026-09-17 12:41:22 +01:00
Dave Page 7ea9a6bb35 Bring aptftp.conf across from the download server
It lived unversioned in pgaupload's home directory on paxsor, which also
made it writable by the account the publishing scripts run as, despite
being an input to what gets indexed and therefore to what gets signed.

Taking it here settles both: changing the repository's Origin, Label or
architectures becomes a reviewed commit, and the copy on the server can
become root owned.

The default architecture list drops i386 to match. apt-ftparchive has
been writing dists/pgadmin4/main/binary-i386/Packages for years, but
Architectures in the Release file has only ever said 'amd64 all', so no
client has been able to reach that index through the signed metadata.
Nothing that works today stops working.
2026-09-17 12:21:38 +01:00
Dave Page 2db86f9d0a Drop the bash step from the pgbuild dependency action
The action ran a final step whose only job was to publish whichever of
the two platform steps' outputs had been set, and it did that in bash.
The hosted Windows image has bash by way of Git for Windows; the signing
host does not, so the Windows snapshot build failed with 'bash: command
not found' before it reached anything interesting.

An expression does the same job without needing a shell to exist.
2026-09-17 12:14:14 +01:00
Dave Page 5a694d2f48 Add pkg/publish: one implementation of the repository indexing
The sequence that indexes and signs an APT repository existed in four
places that differed only in which directory they ran against: inline in
the pgadmin4-deb-build, pgadmin4-deb-snapshot and
pgadmin4-deb-publish-qa-to-prod Jenkins jobs, and in rebuild-apt-repo.sh
in the pgaweb repository. The YUM equivalent existed in five, and the
repository READMEs were heredocs in five more jobs.

These are those sequences, once each, with the tree root as an argument
so that the staging, snapshot and production trees share one
implementation, and with the architecture parameterised rather than
x86_64 spliced into the paths, since we will want to publish for arm64
before long. The APT script passes the architecture list to
apt-ftparchive as an override rather than letting it come from
aptftp.conf, so the set indexed and the set advertised in the signed
Release file cannot drift apart; a package whose architecture is missing
from Release is ignored by every client, silently.

Run with no options they behave exactly as the pgaweb copies did, so
rebuilding a repository by hand after purging old releases is unchanged.

aptftp.conf still needs to be brought across from the download server.
2026-09-17 12:13:32 +01:00
Dave Page 432d74bf1b Decide the Python version in one file rather than three places
Which Python pgAdmin builds against and ships has until now been settled in
three unrelated places. On Windows, Make.bat used whatever %PGADMIN_PYTHON_DIR%
pointed at, which the buildfarm's Jenkins node configuration injected, and then
derived the embeddable distribution it actually ships from that interpreter's
own sys.version. On macOS, pkg/mac/build.sh defaulted to a version of its own
whilst the workflows overrode it with a third, copied from the buildfarm's
DEFAULT_PYTHON_VERSION. Locally it was whatever the developer happened to have.
A single commit could therefore ship different interpreters on different
platforms with nothing anywhere announcing it, which nearly happened: a workflow
that discovered Python from the PATH would have shipped 3.14 on Windows against
3.13 on macOS.

The version now lives in pkg/python-version.txt, which every platform's
packaging reads. It is a file in the tree rather than a GitHub variable because
a local build has to read it too, and because a change of interpreter should
arrive as a commit somebody can review rather than as a settings change made on
an agent. The format is KEY=value with # comments, dull on purpose: it has to be
parsed by a batch file, by a shell script and occasionally by a person, and
anything richer would need a parser in at least one of those. It carries both
the exact CPython version and the python-build-standalone release tag, since
that project's releases are dated rather than versioned and the archive names
embed both.

Make.bat no longer depends on an installed Python at all. It downloads the
relocatable distribution named in that file, unpacks it into the build tree and
installs virtualenv into it, then fetches the matching embeddable distribution
from python.org for what actually ships, so the two can no longer disagree.
python-build-standalone suits the signing host particularly well, being a plain
tarball rather than an installer and so raising no UAC prompt, which matters
because an elevation dialog in that machine's auto-logged-in session waits
forever for somebody who is not there. curl.exe and tar.exe have shipped in
Windows since 1803, so nothing needs installing to bootstrap it. Both Windows
workflows consequently lose their Python setup, and the signing host needs
neither a Python, nor a virtualenv installed into it, nor the
PGADMIN_PYTHON_DIR repository variable.

macOS only reads the version. It still builds its framework with
relocatable-python, because python-build-standalone's relocatable distributions
are not framework-shaped and replacing what is shipped there would mean
reworking the codesigning and the @loader_path rewriting in _fixup_imports,
which is a job of its own.

The version itself is unchanged: 3.13.15 is what the released installers
already carry, and this makes that existing choice explicit rather than a
different one.
2026-09-17 10:16:50 +01:00
Dave Page 892681f78d Queue rather than cancel concurrent macOS signing builds
Copied from the QA builds without thinking, where cancelling an in-flight run
on a new push is exactly right: the tip is what matters and a superseded build
is wasted effort.

A signing build is not that. Cancelling one throws away forty minutes of work,
and worse, it can abandon a notarisation already submitted to Apple, leaving a
request in their queue for a build nobody will ever collect. The Windows
snapshot already queues rather than cancels, for the related reason that there
is one hardware token, so this brings the two into line.

Found by cancelling my own in-flight Intel notarisation with an unrelated push.
2026-09-16 15:48:23 +01:00
Dave Page ad5b6ae2c7 Extract the pgbuild dependency install into a composite action
Four workflows fetch these — the QA and snapshot builds on each of macOS and
Windows — and the duplication has already cost something: the first version
used the gh CLI, which turned out not to exist on the self-hosted Windows
runner, and the same fix had to be made in two places. There will be more of
them as the snapshot and release builds fill in.

The action carries the parts that are easy to get wrong and tedious to
rediscover. On macOS the archives must land in /opt/pgbuild precisely, because
the install names inside are absolute and _fixup_imports copies from those
paths whilst rewriting the references. On Windows the location only has to
avoid the C:\build64 that the buildfarm's Jenkins worker deletes and
re-extracts, hence the runner's temp directory. Downloads are plain HTTPS
rather than a CLI, since pgbuild is public and its URLs are predictable, and
both curl --fail and Invoke-WebRequest fail on a 404 rather than writing an
error page to disk and failing later at the unpack.

Deliberately not reusable workflows, which was the first idea. The signed
builds need environment: signing and the QA builds must not have it, and there
is no clean way to express "no environment" as an input, so factoring at that
level would have meant either handing the QA builds access to the signing
certificate or contorting around it. The duplication that actually hurt was the
steps rather than the workflows.
2026-09-16 15:47:46 +01:00
Dave Page 5326c1524f Take the signing credentials from a "signing" environment
"snapshot" was the wrong name for the boundary. The same Developer ID and
notarisation credentials serve both the snapshot and the release builds, so
naming the environment after one occasion would have meant either duplicating
the secrets or referring to "snapshot" from a release workflow. Naming it for
what it holds rather than when it runs avoids both.

Worth knowing that the old environment was never created deliberately: GitHub
creates one the first time a workflow references it, so an environment
appearing in the settings is not evidence that anyone intended it.
2026-09-16 14:57:50 +01:00
Dave Page 96b72d76f1 Fetch the Windows build dependencies without the gh CLI
The signed build failed with CommandNotFoundException on gh. Hosted runners
ship the GitHub CLI; a plain Windows machine does not, and the signing host is
the one machine in the pipeline that cannot be rebuilt, so the fewer things it
must have installed the better.

pgbuild is public and its asset URLs are predictable, so this needs neither a
CLI nor authentication. Invoke-WebRequest throws on a 404, so a missing release
still fails immediately rather than writing an error page to disk and failing
later at Expand-Archive, which was the reason for preferring gh in the first
place.

The hosted QA build changes the same way, though it has gh and did not need to.
One mechanism for the same job is worth more than the small convenience,
particularly if that build ever moves to a self-hosted runner.

ProgressPreference is silenced because Invoke-WebRequest otherwise spends most
of a 90 MB download rendering a progress bar into a log nobody will read.
2026-09-16 13:58:09 +01:00
Dave Page d37e8fe798 State which Python the Windows build uses rather than discovering it
The previous attempt took whatever python was on PATH, which was wrong in a way
that would not have announced itself. The signing host has 3.14 on PATH, whilst
the buildfarm's Jenkins job injects PGADMIN_PYTHON_DIR pointing at 3.13, so the
two systems would have built the same commit against different interpreters and
shipped different runtimes, with nothing failing to indicate it.

Which Python we ship is a decision. It now comes from a repository variable,
set to match Jenkins, so it is stated once rather than inherited from whichever
Python was installed on a machine most recently. The build fails if the
variable is unset rather than falling back to something plausible, because a
plausible fallback is exactly how this went unnoticed in the first place.

This is the interim arrangement. The version belongs in a file in this
repository, with each platform fetching a private Python of that version at
build time, so that local builds cannot drift either and the Windows host needs
no system Python at all. That wants doing before the system Python goes rather
than after, and deserves its own change rather than being done in the middle of
getting signing working.
2026-09-16 13:52:30 +01:00
Dave Page b60ac47346 Use Windows PowerShell rather than pwsh on the signing host
The second run failed immediately with "pwsh: command not found". PowerShell 7
is not on that machine: GitHub's hosted Windows images ship it, a self-hosted
Windows box has only Windows PowerShell 5.1 unless somebody installed it, and
nothing should be installing it on this machine to suit a CI job.

Nothing here needs PowerShell 7, so the steps use the shell that is present.
One thing does change with it, and it is the sort of difference that produces a
baffling failure rather than an obvious one: Out-File in 5.1 defaults to
UTF-16, so writing to GITHUB_ENV without an explicit encoding produces a file
the runner cannot parse and every variable set that way silently goes missing.
Hence -Encoding utf8 on each, which is what GitHub's own documentation
prescribes for this shell.

The hosted Windows QA build keeps using pwsh, since hosted images have it and
it is the better shell where there is a choice.
2026-09-16 12:59:27 +01:00
Dave Page 5dcf165a0a Use the signing host's own Python rather than actions/setup-python
The first run on the self-hosted runner hung on setup-python for thirty
minutes, against eleven seconds for setup-node, and had to be cancelled. On
Windows that action installs Python rather than unpacking it, and anything
raising a UAC prompt in the auto-logged-in session waits forever with nobody to
answer it. Which is the PIN dialog problem wearing different clothes, and worth
remembering as a property of this machine: anything that might prompt will hang
rather than fail.

The machine has a Python already, which is what the buildfarm's Jenkins job
uses, so the workflow finds it on PATH and derives PGADMIN_PYTHON_DIR from
that. It is also closer to what we are actually testing here, since the point
of building on this box rather than a hosted runner is to exercise its
environment.

virtualenv is checked rather than installed, consistent with the other
prerequisites: a CI job should not be modifying the one machine in the pipeline
that cannot be rebuilt, so it stops with the command to run instead.
2026-09-16 12:57:57 +01:00
Dave Page b6ed164952 Document the Windows signing host in pkg/win32
The signing host is about to become the only machine in the release pipeline
that cannot be rebuilt from something. Everything else either disappears or
becomes an ephemeral runner described entirely by a workflow file; this one is
configured by hand and holds a certificate on a hardware card that cannot be
copied or exported.

What documentation existed lived in the buildfarm repository, which is being
retired, and was written for the Jenkins arrangement. It also opened by saying
it was "preserved for reference only" because the configuration was "now
managed by Ansible roles", which was never true of this machine.

So this consolidates both notes into one document next to the build they serve,
rewritten for the GitHub Actions arrangement: the runner in an interactive
session rather than as a service, the Startup folder shortcut, the PIN helper,
the prerequisites the workflow checks for, and the PGADMIN_WINDOWS_CSC
repository variable.

The Certum material is preserved largely as it was, because it is hard-won and
none of it changes: CSP mode rather than Minidriver, importing to the machine
store, and above all the certificate-to-key repair via keyprov.inf, which the
card's own registration does not do correctly and without which signing either
fails or quietly degrades to SHA1. The troubleshooting section is kept for the
same reason, particularly that NTE_KEYSET_NOT_DEF almost always means someone
is on Remote Desktop.

Everything specific to an individual, a machine or a certificate stays out:
subject names, thumbprints, container IDs and passwords are placeholders, as
they were in the originals.
2026-09-16 12:25:27 +01:00
Dave Page 68536e70ec Add the signed Windows snapshot build
Replaces the buildfarm's pgadmin4-windows-x64-snapshot job, and it is the one
workflow that cannot use a hosted runner: the certificate is on a Certum
hardware token, reached through the machine certificate store, with a PIN
handler answering the prompt from the interactive desktop session. None of that
can move to a runner GitHub provides.

Setting PGADMIN_WINDOWS_CSC is the whole of what makes Make.bat sign, so the
build fails immediately if the variable is absent rather than quietly producing
an unsigned installer that looks like a successful snapshot. It is a repository
variable rather than a value in the tree: it is a person's name, and a
certificate renewal should be a settings change rather than a commit.

Three things differ from the QA build beyond the signing.

Nothing is installed. The hosted build runs choco; this machine is provisioned
by the buildfarm's Ansible and a CI job has no business mutating it, so the
prerequisites are checked and the build stops with a useful message if one is
missing.

Visual Studio, the VC++ redistributable and signtool are discovered rather than
hardcoded. The buildfarm pins all three in its Jenkins node configuration,
which then needs editing every time Visual Studio or the Windows SDK updates,
and signtool in particular lives at a versioned path.

Concurrency is a fixed group with cancel-in-progress off. There is one hardware
token, Jenkins may also be using it, and two builds signing through it at once
is a good way to discover what proCertum does under contention.

The verification step checks the executable inside the installer as well as the
installer itself. Make.bat verifies only the latter, and the former is the
thing users actually run.
2026-09-16 12:20:46 +01:00
Dave Page 65557f1814 Trigger the new workflows on the working branch
These all trigger on pushes to master, which means that on a working branch
they never run and the branch cannot be tested at all. So the branch is named
alongside master in the triggers, to be removed when it merges.

The snapshot build needs different treatment. workflow_dispatch only offers a
"Run workflow" button for workflows that are on the default branch, so whilst
it lives on a branch there is no way to trigger it by hand at all. A plain push
trigger would mean signing and notarising on every commit, which is both
wasteful and rude to Apple's notary service, so it fires only on changes to
itself or to pkg/mac, which is to say only when the thing under test changes.
2026-09-16 12:04:32 +01:00
Dave Page c436287365 Remove the DMG diagnostic spike
Its own header said to delete it once the cause was understood, and it is: the
unmount cost scales with the bundle, hdiutil's 120 second DiskArbitration
timeout cannot be raised, and detach -force waits on DiskArbitration exactly as
the polite detach does. The build now creates the image with hdiutil create
-srcfolder and never mounts a volume at all.

What the spike established is recorded where it will actually be read, in the
comments on _create_dmg and in the commit that replaced create-dmg, rather than
in a workflow nobody will run again: create-dmg's flags, the volume size, the
file count, Gatekeeper, Spotlight and the choice of runner image were each
tested and each exonerated.
2026-09-16 12:03:47 +01:00
Dave Page 473fe47895 Pass --deep when signing ad-hoc
The first ad-hoc run failed on the very first binary:

    Contents/MacOS/pgAdmin 4: replacing existing signature
    Contents/MacOS/pgAdmin 4: code object is not signed at all
    In subcomponent: Contents/LICENSE

The Developer ID path passes --deep on every codesign call and the ad-hoc one
did not. These are bundles with nested code, and without --deep codesign will
not replace the signature on one whose nested code is unsigned. Matching the
existing path is both the fix and the smaller surprise for anyone reading the
two branches side by side.
2026-09-16 12:03:20 +01:00
Dave Page c76fd6b3ee Add the signed, notarised macOS snapshot build
Replaces the buildfarm's pgadmin4-appbundle-snapshot job. Where the QA build
proves the bundle assembles, this produces something distributable: signed with
the Developer ID, notarised by Apple, stapled, and with a ZIP alongside the DMG
because the Electron auto-updater consumes the ZIP whilst the DMG is the
download people click.

The buildfarm keeps the Developer ID in the worker's login keychain and unlocks
it with devkeys/unlock-csc.sh. A hosted runner has no such keychain, so one is
created for the job and destroyed with it, under a generated password that
never outlives the run. set-key-partition-list matters more than it looks:
without it codesign asks permission to use the key, and on a headless runner
asking means hanging until the job times out.

The credentials sit on a "snapshot" environment rather than loose on the
repository, so only workflows that ought to be signing can reach them, and the
cleanup step runs even on failure, since neither a keychain holding a Developer
ID key nor a conf file holding an app-specific password should survive a failed
build.

Nothing is uploaded yet. This proves the signed build works; publishing is the
next piece. It is also workflow_dispatch only rather than nightly, so it cannot
start signing things before we intend it to.

Requires six secrets on the snapshot environment: MACOS_CERTIFICATE (the
Developer ID .p12, base64 encoded), MACOS_CERTIFICATE_PASSWORD,
MACOS_DEVELOPER_ID, APPLE_ID, APPLE_APP_SPECIFIC_PASSWORD and APPLE_TEAM_ID.
2026-09-16 12:03:20 +01:00
Dave Page 01cd0454a3 Unpack the Windows build dependencies under the runner's temp directory
C:\build64 was the obvious place to put them and the wrong one. It is what the
buildfarm's winpgbuild-update job manages on the Windows worker, where it
deletes and re-extracts postgresql and krb5 inside that directory.

That does not matter whilst these builds only run on hosted runners, which are
ephemeral and have no Jenkins on them. It matters a great deal as soon as the
signing builds run on that same machine as a self-hosted runner, because the
two systems would then take turns overwriting each other's dependencies, and
the Jenkins-side failures would look nothing like their cause: a build that
worked yesterday, with a PostgreSQL that is subtly not the one it was given.

So the path is derived from RUNNER_TEMP and passed on through GITHUB_ENV rather
than being a fixed constant. Nothing else changes, and QA stays on the hosted
runner.
2026-09-16 12:03:20 +01:00
Dave Page 778e00fc3b Sign the macOS bundle ad-hoc when there is no Developer ID
Without codesign.conf the build skipped signing entirely, which leaves a bundle
that cannot be run rather than merely one that cannot be distributed.

_fixup_imports rewrites install names across several hundred binaries, which
invalidates whatever signatures they arrived with, Electron's included. On
Apple Silicon the kernel refuses to execute a binary whose signature is broken
or absent, so an unsigned bundle will not launch at all there, even once the
quarantine attribute has been removed. On Intel it is less severe but no more
correct: every binary ends up carrying a signature that no longer matches its
contents.

So with no Developer ID we now sign ad-hoc. This is not a substitute for a real
signature and is not meant to be: the result is still refused by Gatekeeper and
still cannot be notarised, and the build says so. It just means an unsigned
build is something a developer can actually open after allowing it, which is
the entire point of producing one.

The signing arguments move into a helper so the two paths cannot drift, and the
dylib loop stops using find -exec so it can share them. Signing the disk image
ad-hoc would achieve nothing, since a signature there is about distribution, so
that one still does nothing without a Developer ID.

Worth noting this path had never run anywhere before: the buildfarm's macOS QA
job signs properly, because it runs on a machine with the certificate, so the
unsigned branch existed only in principle. The same was true of the Windows
installer's unsigned path until last week.
2026-09-16 12:03:20 +01:00
Dave Page 6a287fdb87 Stop installing the Python dependencies twice in the macOS build
_create_python_env installs the whole of requirements.txt into the framework
that gets shipped, and then _build_docs created a fresh venv and installed all
hundred-odd packages again. Both installs show up in every build log as
identical "Successfully installed Authlib-1.8.0 Babel-2.18.0 ..." lines a few
hundred lines apart.

The second install was not gratuitous: the doc build imports pgAdmin itself,
since docs/en_US/build_code_snippet.py pulls in config, pgadmin.utils,
pgadmin.browser.utils and the driver abstractions, so the dependencies have to
be importable. But they already are, in the framework populated moments
earlier, so the venv can inherit them instead. Sphinx still goes into the venv
rather than the framework, which is the reason the venv exists at all: it must
not end up in the shipped bundle.

--system-site-packages is safe here in a way it is not in the Linux build,
which deliberately avoids it. There the parent is a shared system Python that
may carry other packages' stale .pth files, and one of those corrupted sys.path
badly enough to break pip's own bootstrap on the el-10 builder. Here the parent
is a framework we built ourselves in this run, containing only our
dependencies. The comment says so, to save someone importing the Linux
workaround into a situation that does not call for it.

Windows already avoided the duplication by adding sphinx to the same
environment, though without the separation that keeps it out of the shipped
files.
2026-09-16 12:03:20 +01:00
Dave Page 5b1d7ec954 Build the Windows QA installer against pgbuild's dependencies
pgadmin-org/pgbuild supersedes dpage/winpgbuild, and now that a full
build-all-windows run has published the Windows artefacts, this points at them
instead. Both platforms then build against a single manifest of pinned
versions, which is the main reason for merging the two repos in the first
place: until now the macOS and Windows dependency versions were kept in step by
hand, in two places, with nothing enforcing it.

Verified against what Make.bat actually needs before switching. The krb5
archive unpacks to krb5/ and carries kinit.exe, krb5_64.dll, comerr64.dll,
k5sprt64.dll and gssapi64.dll; the PostgreSQL one unpacks to postgresql/ and
carries libpq.dll, zlib1.dll, the client binaries, libcrypto-3-x64.dll and
libssl-3-x64.dll, along with the optional liblz4.dll, libzstd.dll, libintl-8.dll
and libiconv-2.dll. So the directory layout the workflow already assumed is
unchanged and every file the build copies is present.

Downloads now go through gh rather than Invoke-WebRequest, which keeps the tag
and the asset name in one place and fails loudly if a release is missing rather
than writing an error page to disk and failing later at Expand-Archive.
2026-09-16 12:03:20 +01:00
Dave Page 346e4deff4 Build the macOS QA appbundle against pgbuild's dependencies
Homebrew's PostgreSQL was only ever a stand-in for the build check, and a poor
one: it has no zstd or lz4 support, which is issue #9425, it links Homebrew's
OpenSSL rather than the one we ship, and it carries whatever minimum macOS
Homebrew happened to build for. So the QA build proved that the bundle
assembles, but not that the binaries in it are the ones we intend to ship.

The dependencies now come from pgadmin-org/pgbuild, which builds OpenSSL,
Kerberos, zstd, lz4 and PostgreSQL against each other with a 14.0 deployment
target, matching the support policy. That makes the QA build the same thing the
release build will produce, minus the signing, and it exercises those artefacts
continuously rather than discovering a problem with them at release time.

They are unpacked into /opt/pgbuild specifically, because the install names are
absolute: pg_dump asks for /opt/pgbuild/zstd/lib/libzstd.1.dylib and libpq for
/opt/pgbuild/krb5/lib/libgssapi_krb5.2.2.dylib, among others. _fixup_imports
copies from those paths into the bundle and rewrites the references, so they
have to resolve during the build.

Which is also why /opt/pgbuild joins the prefixes _verify_bundle_linkage
rejects. An unrewritten reference to it is precisely the defect that check
exists to catch, no different from a dangling Homebrew path, and it would
otherwise pass unnoticed: the shipped binary would look fine on the build
machine and fail on a user's.

OPENSSL_DIR now points at our OpenSSL too, so the Intel cryptography build,
which compiles from source because there is no x86_64 wheel, statically links
the same OpenSSL as everything else in the bundle.
2026-09-16 12:03:20 +01:00
Dave Page c049488a11 Build the macOS disk image without mounting it, and drop create-dmg
The DMG was built by mounting a read/write volume, populating it, unmounting it
and converting the result. The unmount is the step that does not survive
contact with a slow machine: hdiutil waits on DiskArbitration with a fixed 120
second timeout that nothing exposes a way to raise, and the cost scales with the
bundle. Measured on GitHub's hosted runners with an identical payload it takes
around 20 seconds on arm64, 41 on macos-26-intel and 90 on macos-15-intel, and
with the real bundle it exceeds 120 on both Intel images every time. It has been
seen intermittently on developers' own machines for the same reason.

`hdiutil detach -force` is no help, which was worth finding out the hard way
since it is usually described as the escape hatch: it waits on DiskArbitration
as well, times out identically, and the conversion then fails with "Resource
temporarily unavailable" because the image is still attached.

`hdiutil create -srcfolder` builds the image directly from a directory and never
mounts a volume, so none of this can happen. Verified on both architectures
against a real Electron bundle: the image is created and verifies, and mounting
it read-only afterwards shows the volume named correctly with the .DS_Store,
the background directory, the volume icon and the Applications symlink all
present. hdiutil preserves that symlink rather than following it. Creation takes
107 seconds on arm64 and 312 on macos-26-intel, slower than before, but with no
fixed wall anywhere in it.

That also disposes of create-dmg, which was cloned unpinned from its default
branch on every build and run against the signed bundle. Since we passed
--skip-jenkins, none of its Finder automation ran and everything it did for us
was staging, all of which is now done directly. Its EULA template is vendored
into pkg/mac/ rather than cloned for one XML file, and the licence is attached
with udifrez exactly as create-dmg did.

Ruled out before arriving here: create-dmg's flags, the volume size, the file
count, Gatekeeper, Spotlight and the choice of runner image. A 400 MB image of
30,000 text files and one holding Electron and a Python framework unmount in
comparable time, so only the speed of the machine and the size of the bundle
move the number.

One thing CI cannot check is whether the volume icon and background actually
render, since that needs Finder. The DMG is kept as a build artefact so it can
be opened and looked at.
2026-09-16 12:03:20 +01:00
Dave Page cde8851993 Prototype replacing create-dmg with hdiutil create -srcfolder
The recovery added earlier does not work, and the run proved it plainly:

    Forcing detach of /dev/disk22...
    hdiutil: detach: timeout for DiskArbitration expired
    hdiutil: detach: drive not detached
    hdiutil: convert failed - Resource temporarily unavailable

So hdiutil detach -force waits on DiskArbitration exactly as the polite detach
does, same 120 seconds and same message, contrary to how it is usually
described, and the convert then fails because the image is still attached. That
was the one assumption I could not verify beforehand, the spike having never
reproduced the failure and its diagnostics therefore never having run.

hdiutil create -srcfolder builds the image directly from a directory and never
mounts a volume, so DiskArbitration is never involved and there is nothing to
detach. Since we pass --skip-jenkins, create-dmg does no Finder automation for
us anyway: what it actually provides is the volume name, an Applications
symlink, the background directory, the pre-built .DS_Store and a hidden
extension, all of which are staging. The two that are not are the volume icon,
which needs the custom-icon flag on the volume root, and the EULA, which is
attached to the finished image rather than placed inside it.

Rather than learn which of those survive through forty minute Intel builds,
test F stages a directory exactly as the replacement would and creates the
image from it, then mounts the result read-only to confirm the styling is
really there. Mounting a finished compressed image briefly is cheap; it is
unmounting a large populated read/write volume that is not.

The dead recovery code in _create_dmg stays put until this proves out, so it is
replaced in one change rather than reverted and then rewritten.
2026-09-16 12:03:20 +01:00
Dave Page 4d76b6190e Recover the macOS DMG build when hdiutil's unmount times out
create-dmg builds a read/write image, mounts it, populates it, unmounts it, and
only then converts it to the compressed image we ship. The unmount is the
fragile step: hdiutil waits on DiskArbitration with a fixed 120 second timeout
that nothing exposes a way to raise, and the cost of unmounting scales with the
bundle.

Measured on GitHub's hosted runners with an identical payload, unmount to "Disk
image done" takes about 20 seconds on arm64, 41 on macos-26-intel and 90 on
macos-15-intel; with the real bundle it exceeds 120 on both Intel images, every
time rather than occasionally. It has also been seen intermittently on
developers' own machines, which is the same problem with a smaller multiplier.

Retrying create-dmg would achieve nothing, since a deterministic failure just
recurs. What matters is that by the time the unmount fails the working image is
fully populated, and the only step create-dmg did not reach is the conversion.
So on failure we force the volume off, which does not wait on DiskArbitration,
and perform that last step ourselves. The result is verified rather than
assumed, because this path only runs when something has already gone wrong.

The successful path is untouched: when create-dmg returns 0 we return
immediately and none of this executes.

A fair amount was ruled out before landing here. create-dmg's flags, the volume
size, the file count, Gatekeeper, Spotlight and the choice of runner image were
each tested and each exonerated: a 400 MB image of 30,000 text files and one of
the same size holding Electron and a Python framework unmount in comparable
time, and only the speed of the machine and the size of the bundle move the
number.
2026-09-16 12:03:20 +01:00
Dave Page e49593d005 Actually remove the Spotlight step
The previous commit message said this was going and then didn't remove it.
Spotlight was ruled out two runs ago: the step demonstrably disabled indexing
and the detach failed exactly as before, so the comment above it claimed a
cause that had already been disproved.
2026-09-16 12:03:20 +01:00
Dave Page e7027e2186 Test file count as the driver of the DMG detach cost, and move Intel to macos-26
Tests C and D pinned the cost to something about a real bundle and, more
usefully, showed how differently the three runners handle it. Unmount to "Disk
image done", identical payloads: 19s on arm64, 41s on macos-26-intel, 82s on
macos-15-intel, against hdiutil's 120 second timeout, and that was with a
lighter stand-in than the real thing.

So the Intel QA job moves to macos-26-intel, which has roughly double the
headroom and is the newer image we would end up on anyway, macOS 15 being the
first to retire. The mdutil step goes at the same time: Spotlight was ruled out
two runs ago and leaving a step behind whose comment claims it fixes something
is worse than not having it.

What C and D could not separate is content type from file count, and the second
looks the more likely of the two. Test B held ~409 MB in 201 files and test D
~415 MB in a few thousand; the real bundle holds a comparable amount of data
across far more files, since web/ alone is 4,626 of them, 2,043 being .sql
templates, with docs/ adding 773 and site-packages and the Python stdlib on top.
Thirty thousand is a conservative estimate.

Test E therefore puts the same ~400 MB into 30,000 small text files with no
Mach-O content at all. If the unmount climbs, the driver is the number of files,
not Gatekeeper or LaunchServices inspecting binaries, and no amount of signing
or scanning policy would have helped. It also tells us whether macos-26-intel
survives a realistic file count, which decides whether the runner change above
is a fix or merely a stay of execution.
2026-09-16 12:03:20 +01:00
Dave Page 2d7e8aedb1 Bisect the macOS DMG detach failure down to the bundle
The first pass of the spike came back clean on all three runners, which is more
informative than it sounds. Bare hdiutil detached a 100 MB image in six seconds
and a 1.5 GB one in under a second, and create-dmg with pgAdmin's exact flags
and real assets over a 409 MB payload exited 0 in forty-four seconds, on the
very runner label where the real build has now failed three times out of three.

So it is not the runner image, not hdiutil, not create-dmg's invocation and not
the size of the volume. What is left is the bundle. Test B's stand-in was a
random blob in Contents/MacOS with no Info.plist and no Mach-O, which the system
does not regard as an application at all, whereas a genuine bundle landing on a
freshly mounted volume gets picked up by LaunchServices and Gatekeeper in ways a
folder of noise does not.

Test C is therefore a real Electron.app, which is precisely what the real build
starts from, and test D adds a relocatable Python framework on top, that being
the other symlink-heavy thing the build layers on and the reason
_prune_dangling_symlinks exists. Neither installs anything through pip, so this
stays in the region of ten minutes rather than the forty the real build needs on
Intel to compile cryptography.

If C fails we have it narrowed to real app bundles; if C passes and D fails, to
the Python framework.
2026-09-16 12:03:20 +01:00
Dave Page d5c71d7063 Add a spike workflow to diagnose the macOS DMG detach failure
Three Intel appbundle runs have now failed identically, always exactly 120
seconds after create-dmg starts unmounting, with the bundle otherwise complete
and verified; arm64 has passed four times through the same code, and disabling
Spotlight changed nothing. Reproducing it through `make appbundle` costs forty
minutes a go, nearly all of it compiling cryptography on Intel, which is a
miserable way to test a hypothesis.

So this reproduces the failing step directly, in a couple of minutes, and
answers three questions at once: whether plain hdiutil fails or only create-dmg
does, whether it depends on image size, and whether it is specific to the
macos-15-intel image. arm64 is included as the control that is known to work.

When something fails it captures evidence rather than leaving us guessing:
hdiutil's own view of what is attached, lsof against the volume, the processes
that typically hold one, the diskarbitrationd and hdiutil unified log for the
preceding few minutes, and whether a forced detach succeeds where the polite
one timed out. That last one should be the most telling, since it distinguishes
something holding a reference from DiskArbitration itself not answering.

The mdutil step added to check-macos-build.yml stays for now so the two runs
remain comparable; it should come out once we know the real cause.
2026-09-16 12:03:20 +01:00
Dave Page 68a5f7781f Disable Spotlight indexing for the macOS build checks
The Intel appbundle build fails at the very last step, every time rather than
intermittently: the bundle is assembled, _verify_bundle_linkage passes, the SBOM
is written, the disk image is created and populated, and then create-dmg cannot
unmount it.

    Unmounting disk image...
    hdiutil: detach: timeout for DiskArbitration expired
    hdiutil: detach: drive not detached

Two runs, identical failure, and the gap between the unmount starting and the
timeout is exactly 120 seconds, so something is waiting out a timeout rather
than racing. Spotlight indexing the freshly mounted volume is the usual cause,
holding a DiskArbitration reservation that the detach then sits behind, and
nothing on a build runner wants a Spotlight index anyway.

arm64 has never shown this, so the step is harmless there rather than needed.
If this doesn't settle it, the next thing to try is macos-26-intel, and after
that a retry around the detach, which would mean changing pkg/mac rather than
the workflow.
2026-09-16 12:03:20 +01:00
Dave Page 35f3615644 Restore yum-utils to the RPM build container
Dropped by accident when the compiler packages were added, and pkg/redhat's
build.sh shells out to yumdownloader at line 229, near the very end. So the
container built the docs, ran webpack, produced the RPMs, and only then died
with a bare exit 127 about twelve minutes in, which is a slow and unhelpful way
to learn that a package is missing.

Also check for yumdownloader explicitly once the packages are installed, so the
same class of mistake fails immediately and says what is wrong. That matters
beyond this one slip: the dnf5 distributions (EL 10, Fedora 41 and later) get
yumdownloader via yum-utils' compatibility shims rather than from yum itself,
which is the sort of thing that changes under us without warning.
2026-09-16 12:03:20 +01:00
Dave Page c82e8038ee Fix the unsigned Windows installer build, and install syft for it
Two problems, one of them in the packaging rather than the workflow.

installer.iss.in has always carried an unconditional `SignTool=pgAdminSigntool`,
but Make.bat only defines that SignTool when PGADMIN_WINDOWS_CSC is set. So the
unsigned path, which Make.bat explicitly supports and announces ("Skipping code
signing"), cannot actually produce an installer: ISCC aborts with "Value of
[Setup] section directive SignTool is invalid". It has presumably never been
exercised, because the Jenkins Windows job runs on the box with the token
plugged in, where the variable is always set.

Both signing directives are now inside `#ifdef SIGNED`, and the signing branch
of Make.bat passes /DSIGNED next to the existing /SpgAdminSigntool=. The signed
build emits exactly what it emitted before; the unsigned build now works.

Second, and more mundane, syft isn't on the hosted image. That one was silent:
:GENERATE_SBOM redirects syft's output into sbom.json and returns 0 whatever
happens, so a machine without syft ships an empty SBOM rather than failing. The
buildfarm's Windows worker installs it via Chocolatey, so this does too.
2026-09-16 12:03:20 +01:00
Dave Page 997b6c52f9 Statically link OpenSSL into cryptography for the Intel macOS build
cryptography publishes arm64-only macOS wheels (checked against 50.0.1), so on
macos-15-intel pip builds it from the sdist and its openssl-sys crate links
whatever OpenSSL it finds on the build host, which on a hosted runner is
Homebrew's. _fixup_imports deliberately skips _rust.abi3.so, so the reference
survives into the bundle and _verify_bundle_linkage stops the build:

    ERROR: .../cryptography/hazmat/bindings/_rust.abi3.so links against
    build-host libraries:
        /usr/local/opt/openssl@3/lib/libssl.3.dylib
        /usr/local/opt/openssl@3/lib/libcrypto.3.dylib

That's issue #10123 reproducing exactly, and the release build already guards
against it by setting OPENSSL_DIR and OPENSSL_STATIC against its own OpenSSL.
This does the same against Homebrew's, which leaves no external reference at
all. The arm64 job was unaffected throughout, since it gets a wheel.

Worth noting for scheduling: the Rust compile makes the Intel build roughly
twice the length of the arm64 one, 50 minutes against 27.
2026-09-16 12:03:20 +01:00
Dave Page b6627315b4 Install wget for the Windows build check
wget isn't on the hosted Windows image, and Make.bat's Electron download is an
unbounded retry loop (Make.bat:316), so the build doesn't fail, it just spins on
error 9009 until the job hits its timeout. The buildfarm's Windows worker has
wget from the same Chocolatey line in pkg/win32/README.md, which is where this
one now gets it too.
2026-09-16 12:03:20 +01:00
Dave Page f1681d78d3 Fix the DEB and RPM container builds
Two faults from the first run, neither of them deep.

All nine jobs would have hit the git ownership check: the container runs as
root whilst the workspace is owned by the runner user, so git refuses to touch
it, and `yarn run bundle` shells out to git for the commit hash and dies with
exit 128. The DEB builds got all the way through webpack before falling over on
that, which at least confirms the rest of the environment is sound. Marking the
workspace as a safe directory after checkout is the usual remedy.

The RPM builds failed earlier and more prosaically, with no compiler in the
container: psycopg-c and gssapi are both built from source, since
pkg/linux/build-functions.sh passes --no-binary psycopg, and rpmbuild wants
redhat-rpm-config. The buildfarm picks these up from the @development-tools
group; they're listed individually here to keep the container small. The DEB
side already had build-essential, which is why it got so much further.
2026-09-16 12:03:20 +01:00
Dave Page b55f5997dd Update the GitHub Actions to their latest major versions
The runner has started warning about Node.js 20 actions being deprecated, which
covers every first-party action we use, since v4 of checkout and upload-artifact
still run on the Node 20 runtime.

So: checkout v4 to v7, upload-artifact v4 to v7, setup-node v4 to v7,
setup-python v5 to v7 and docker/build-push-action v6 to v7. Nothing behavioural
changes for us. The intervening majors are almost entirely the Node 24 runtime
move, with checkout v6 persisting credentials to a separate file, checkout v7
refusing to check out a fork's head for pull_request_target and workflow_run
(neither of which we use), and upload-artifact v7 adding an opt-in unzipped
single-file upload.

One thing to be aware of before we stand up a self-hosted runner for the signing
builds: checkout v5 and later need runner 2.327.1 or newer, so that host will
have to be reasonably current.

The SonarQube action is left pinned to its commit hash, which is deliberate.
2026-09-16 12:03:20 +01:00
Dave Page d0ce7ad552 Add DEB, RPM, macOS, Windows and Helm build checks
These are the five QA builds that the Jenkins buildfarm still owns, and between
them they're the last thing standing in the way of retiring the QA half of it:
the container, tarball, wheel and documentation checks already run here.

The DEB and RPM builds run in a container per distribution on a hosted runner
rather than on a dedicated EC2 VM per distribution, which is the same build in
a reproducible environment and nine fewer machines to look after. The package
lists come from the buildfarm's own Ansible packages_build role. PGDG is
mandatory for RPM, because pkg/redhat/build.sh opens by globbing /usr/pgsql-1*
under `set -e` and dies without it; the DEB build is happy with the distro's
libpq-dev.

macOS builds on both architectures and is already proven: an earlier spike ran
it on macos-15 in 22 minutes with webpack peaking at 2991 MB against its 4096 MB
ceiling and no swap used at all, so the 7 GB arm64 runners have adequate
headroom. That spike workflow is removed here, superseded by the real one.

Windows runs on a hosted runner too, which wasn't obvious: signing in Make.bat
is conditional on PGADMIN_WINDOWS_CSC, so an unsigned build check needs neither
the Certum hardware token nor the machine it's plugged into, and only the
signing release builds need a self-hosted runner. Its dependencies come from
dpage/winpgbuild, the same place the buildfarm's winpgbuild-update job gets
them. This one hasn't had a successful run yet and should be expected to need a
few passes.

All five trigger on master and by hand, not on pull requests, matching what the
Jenkins jobs do today; whether the full matrix should also gate PRs is a
separate question.
2026-09-16 12:03:20 +01:00
Dave Page d486241b06 Add a throwaway spike workflow for the macOS appbundle build
We're assessing a move of the buildfarm to GitHub Actions, and the one thing
that isn't already proven by the existing workflows is whether the appbundle
build fits inside a hosted macOS runner. The arm64 images have 3 vCPU and 7 GB
of RAM against the 8 cores and 16 GiB of the mac2.metal worker they'd replace,
and pkg/mac/build-functions.sh:320 records webpack being OS-OOM-killed inside
TerserPlugin at a 3 GB old-space ceiling, with 6 GB then starving the earlier
steps. Nothing we currently run on macOS builds a production bundle, so that
history is untested on hosted hardware.

The workflow is workflow_dispatch only, builds unsigned (build.sh skips signing
and notarisation when the two conf files are absent, so it needs no secrets),
and samples resident set sizes and swap every ten seconds so the logs show
whether the machine actually ran out of headroom rather than just whether the
build happened to pass. The runner image, the Python version and the webpack
memory ceiling are all inputs, so the ceiling can be bisected across images.

To be deleted once the question is answered.
2026-09-16 12:03:20 +01:00
Ashesh Vashi f09776c22d test(backup, restore): fix stale XSS check after PGDATABASE dbname fix
Backup/restore now pass the target database via PGDATABASE instead of
a CLI/positional argument, so the XSS regression test's check against
the displayed command string could never find the db name (escaped or
not) and always failed. Point Backup's check at the message field,
where the db name is still interpolated; for Restore, where the db
name no longer surfaces anywhere (command shows an always-empty
--dbname, message omits it entirely), assert its absence instead.
2026-09-15 18:11:25 +05:30
Ashesh Vashi d64bc8c24c Updated message catalogs for v9.18
Also drop the fuzzy marker from the Korean catalog header. Babel skips a
catalog whose header is fuzzy, and ko's header still carried the
unfilled template placeholders that make babel mark it so, with the
result that ko/LC_MESSAGES/messages.mo had not been regenerated since
November 2025 -- 83KB against the 263KB the .po compiles to, so most of
the 89% of Korean strings that are translated never reached users.
2026-09-15 17:19:11 +05:30
Ashesh Vashi 1c66edd12d docs: cite a GitHub issue for every 9.18 release note entry
The file mixed issue-backed entries with commit-id ones. Make every
entry issue-backed:

  - The LLM API redirect hardening had no issue, and its entry was the
    only record of Ziya Abdullayev's report outside the commit message.
    It gets #10420, written up with the mechanism, the affected range
    (>= 9.15, since ALLOWED_LLM_API_URLS did not exist before then) and
    the fix commit, and noting that it is hardening rather than an
    exploitable flaw, so no CVE was requested.

  - The Table dialog fix closed two issues, #10179 and #10180, so it
    becomes two entries. That also covers the Definition-tab type
    restriction, which the single commit-id entry had omitted.

  - The remaining commit-id entries are dropped.
2026-09-15 17:02:00 +05:30
Ashesh Vashi 36e08d6d8a fix(maintenance): drop a duplicated comment block above the database guard
The four-line comment explaining why an empty database must be rejected
was pasted twice above the guard in create_maintenance_job(). Comment
only; no behaviour change.
2026-09-14 23:08:27 +05:30
hiteshjambhale 59f8d82aa9 fix(restore, maintenance): reject empty/missing database to close role-name fallback
The PGDATABASE fix only set the env var when the database value was
truthy, so an empty string left both PGDATABASE and --dbname unset.
libpq then falls back down its chain to a database named after the
login role, silently restoring into / vacuuming the wrong database
instead of failing. Reject an empty or missing database with a 400
before any args are built, in both tools, and add regression tests
covering the empty-value path.
2026-09-14 17:33:20 +00:00
hiteshjambhale 3922cdfcbf test(restore, maintenance): harden arg-injection guards per review
- Scan every argv token for the forbidden value (forbidden_arg_substr)
  instead of list-membership only, so a value smuggled into a single
  token (e.g. "--dbname=host=...") is caught.
- Assert pg_restore keeps the required "--dbname=" flag, guarding against
  a regression that drops it (pg_restore errors without -d/--dbname).
2026-09-14 17:33:20 +00:00
hiteshjambhale 038a2619fa test(restore, maintenance): add arg-injection regression tests; fix pg_restore --dbname display
- Add regression scenarios asserting the database value is absent from
  argv and carried in PGDATABASE (maintenance: 1, restore: 2). They fail
  if the fix is reverted.
- Use the attached form "--dbname=" (a single argv token) for pg_restore
  instead of ['--dbname', ''] so the process-details command renders
  correctly -- an empty standalone token was dropped from the display.
2026-09-14 17:33:20 +00:00
hiteshjambhale e3a10c53cb fix(restore, maintenance): pass database via PGDATABASE to close connection-string injection
The restore and maintenance tools passed the user-controlled database
value to --dbname. libpq expands a --dbname value containing "=" (e.g.
"host=evil port=5433 dbname=postgres") into a connection string, letting
a user redirect the connection -- and the exported PGPASSWORD credential
-- to an arbitrary server, regardless of the --host/--port pgAdmin sets.

Pass the target database via the PGDATABASE environment variable instead
(libpq treats it as a literal name and never expands it):
- maintenance (psql) and restore plain/SQL (psql): drop --dbname; the
  tool connects using PGDATABASE.
- restore custom/tar/directory (pg_restore): pg_restore requires
  -d/--dbname, so pass an empty --dbname '' (no "=", not expanded) while
  the real database name comes from PGDATABASE.
2026-09-14 17:33:20 +00:00
Ashesh Vashi cf22515efc Merge remote-tracking branch 'origin/master' into cve-9.18 2026-09-14 22:52:21 +05:30
Ashesh Vashi 81edb68b27 fix(deps): pin psycopg[c] back to 3.3.4 (#10399)
The macOS x64 packaging job fails while installing requirements.txt:

    Preparing metadata (pyproject.toml): finished with status 'error'
    error: subprocess-exited-with-error
    exit code: -10

Exit code -10 is SIGBUS. The only output before the crash is
setuptools' own `[tool.setuptools.ext-modules] in pyproject.toml is
still experimental` warning, so it dies while setuptools reads the
project config, well before pg_config is ever invoked.

psycopg-c ships no wheels, so every platform compiles it from the
sdist. The only build-tooling change between 3.3.4 and 3.3.5 is the
strictly pinned build requirement:

    3.3.0 - 3.3.4    setuptools == 80.3.1
    3.3.5            setuptools == 83.0.0

Because that pin is an equality, PIP_CONSTRAINT cannot override the
version inside the isolated build environment - the only ways to keep
3.3.5 are --no-build-isolation with a pre-seeded setuptools (which
would fork the macOS build procedure from Linux's) or an upstream
fix. Linux builds 3.3.5 fine, so this looks specific to the
relocatable-python framework the macOS bundle is built against.

Pin to 3.3.4 to unblock the build. The encoding.py rewrite that
shipped alongside the 3.3.5 bump stays untouched: it reads the
derived py_codecs/pg_codecs dicts, which are plain dicts in both
versions.

One test expectation was 3.3.5-specific. psycopg 3.3.5 added an
ISO88591 alias to its encoding table, so inverting py_codecs resolves
iso8859-1 to ISO88591; on 3.3.4 only LATIN1 exists, so
get_encoding('LATIN1') returns ['LATIN1', 'iso8859-1'] instead of
['ISO88591', 'iso8859-1']. Both are valid PostgreSQL names for the
same encoding, so the scenario now accepts either and the test passes
on 3.3.4 and 3.3.5 alike.
2026-09-14 22:46:45 +05:30
dev-hari-prasad fd9179f25a chore: configure 3-day release age gate for npm packages (#10390)
Set npmMinimalAgeGate to 3d in web/.yarnrc.yml and runtime/.yarnrc.yml to prevent immediately installing freshly-published packages, providing a grace period against npm supply-chain compromises.
2026-09-10 16:10:12 +01:00
dev-hari-prasad 6acbf875ae chore(security): restore checksumBehavior to throw in web and runtime (#10395)
Revert checksumBehavior from update back to Yarn's default (throw) in web/.yarnrc.yml and runtime/.yarnrc.yml to restore tamper detection and ensure builds fail if downloaded package checksums do not match lockfiles.
2026-09-10 16:10:05 +01:00
dev-hari-prasad 809e812a17 chore(security): disable install scripts by default and narrow approved git repos in /web (#10391)
Revert global enableScripts in web/.yarnrc.yml to Yarn's secure default (false) to prevent arbitrary lifecycle scripts from running on install. Allowlist only ttf2woff2 and unrs-resolver via dependenciesMeta.built in web/package.json, keeping promotional/unneeded scripts blocked. Narrow approvedGitRepositories to pgadmin-org/react-data-grid.
2026-09-10 16:09:54 +01:00
dev-hari-prasad d84d3ce9e3 chore(deps): pin and bump @fortawesome/fontawesome-free to 7.3.1 in /web (#10372)
Replace 'latest' with exact '7.3.1' in web/package.json and update web/yarn.lock.
2026-09-10 16:09:43 +01:00
Ashesh Vashi 155ebe5c28 docs: add assigned CVE numbers to the 9.18 release notes
Fill in the identifiers allocated by the PostgreSQL CNA for the three
security entries that carried a placeholder:

  #10383  webserver Remote-User auth bypass      CVE-2026-86863
  #10384  backup argument/conninfo injection     CVE-2026-86864
  #10385  File Manager save_file symlink follow  CVE-2026-86861

Add the missing entry for #10388, connection-string injection in the
Restore and Maintenance tools (CVE-2026-86862). The fix was written but
never got a release-note line.

Move the release date out to 2026-09-17.
2026-09-10 09:03:59 +05:30
Dave Page 153e3273d8 Fix inherited-column read-only state and Definition-tab type restriction in the Table dialog (#10332)
Backend properties fetch marks a column already inherited from a
parent table with inheritedfromtable, while a column fetched
interactively via 'Inherited from table(s)' carries inheritedfrom
instead and has no attnum yet. inSchemaWithColumnCheck only checked
inheritedfrom, and did so after an isNew() short-circuit that treated
the attnum-less interactive rows as new, so inherited columns ended up
editable and deletable in both cases. Check both fields, and check
them before the isNew() short-circuit, and extend
canEditDeleteRowColumns the same way so the row's edit/delete buttons
are disabled too.

Fix: restrict Definition-tab Data type options to edit_types (#10180)

The expanded row's Definition tab and the inline grid-cell editor each
defined their own copy of the edit_types filter for the 'cltype'
field, but the tab's version received the whole table's data as
'state' rather than the row, since MappedControl resolves a field's
'type' callback against the top-level schema, not the field's own row
(unlike 'cell', which already gets the full row). That made isNew()
and edit_types resolve against the wrong object, so the filter always
no-opped and the tab showed every type instead of the restricted set.

Have MappedControl also resolve a field's declared 'deps' against its
own row (listenDepChanges already does this correctly for 'cell') and
forward them as a 2nd argument to 'type', mirroring what 'cell'
already receives. column.ui.js declares 'edit_types'/'attnum' as deps
on 'cltype' and factors the filter into one shared editTypesFilter()
used by both 'cell' and 'type', so the two stay in sync by
construction.

Fx: honour inheritedfromtable in attlen/attprecision editable checks

The Length/Precision and Scale grid-cell editors only checked
inheritedfrom when deciding whether to allow editing, so a column
loaded with only inheritedfromtable set (i.e. already inherited when
the table was opened) could be left incorrectly editable, unlike the
other inherited-column checks in this schema. Add a shared
isInheritedColumn() helper covering both fields and reuse it in both
editable callbacks and in inSchemaWithColumnCheck.
2026-09-09 15:45:50 +05:30
Dave Page 6c70d7ccb8 fix(pkg): stop shipping the JavaScript build configuration (#10403)
The Windows installer and the pip wheel were both shipping web/yarn.lock,
web/package.json and the rest of the JavaScript build configuration into
the installed tree, even though none of it is used at runtime: only the
webpack output under pgadmin/static/js/generated is. Because node_modules
is stripped, the lockfile that remains describes packages that are not
present, so vulnerability scanners run against an installation report the
whole build-time dependency tree, devDependencies included, as findings
that cannot be acted on and will recur on every release no matter how
current the versions are.

The Linux, macOS and Docker builds already removed these files, so this
brings Windows and pip into line with them, and adds webpack.* to the
Linux and macOS lists so that all of the packagers now strip the same
set. For pip the cleanup runs before syft, so the SBOM describes what
actually ships.

Verified by assembling a web tree with the cleanup applied and starting
pgAdmin from it: /misc/ping and /browser/ both return 200 and every
generated bundle is served.
2026-09-09 14:37:38 +05:30
Dave Page 9d0a61a828 test: drop proc1 from the Schema Diff KNOWN_DIFFERENCES list
The whitespace-only difference that CREATE OR REPLACE left in procedure
bodies was fixed in abf926428, so proc1 now settles once the generated
script has been applied and the test fails on the stale entry, exactly
as it is designed to: the list fails when something on it starts working
so that it cannot quietly rot. Take the entry off.
2026-09-07 22:40:55 +01:00
dev-hari-prasad 50d76765a1 perf: defer the cloud SDK imports until a cloud wizard is used (#10362)
boto3, azure.*, googleapiclient and google_auth_oauthlib were imported at
the top of the AWS RDS, Azure and Google Cloud modules, so every pgAdmin
start paid for all three SDKs whether or not anyone went near the cloud
deployment wizards. Move those imports into the functions that need them,
leaving the blueprints, their menu entries and the exposed endpoint map
eagerly registered, which is the property that makes this viable where
the earlier lazy-blueprint idea was not; repeat calls cost nothing, since
sys.modules caches each module after the first import.

The modules with several call sites get a small _azure_sdk() or
_google_sdk() helper handing back the symbols in a namespace, whilst the
one and two site cases carry a plain inline import with a comment saying
why it sits there. The oauth2client sentinel stays at the top of the
Google module, where it still runs before anything can import
googleapiclient, and _google_sdk() now carries a note pointing back at it
so that a later tidy-up does not move it and quietly reintroduce #10110.

Deferring the imports moves the failure mode for a broken or missing SDK
from startup, where it is obvious, to the first click in a wizard, so
each affected path now fails cleanly rather than leaking a traceback into
the UI: the Google and Azure lookups return their usual (data, error)
tuple, or an empty list with the reason logged; Google.callback() reports
a missing google_auth_oauthlib as a verification error; and the RDS
client helper logs the ImportError and lets its callers answer with empty
metadata instead of a 500.

Also fixes a pre-existing bug in the Google instance_types endpoint,
which assigned the (instance_types, error) tuple returned by
Google.get_instance_types() to a single name and then called .get() on
it, raising AttributeError for anyone who got that far in the wizard.

Measured on Linux with a warm page cache, timing create_app() in desktop
mode over five runs and taking the median, this takes application startup
from around 1567 ms to around 1354 ms; on Windows the saving was reported
as larger, at around 2131 ms down to around 1515 ms.

Partially addresses #10221.
2026-09-07 15:59:36 +01:00
Ashesh VashiandDave Page 0b8e8db0cc fix(pkg): stop the Windows build overwriting the venv's pip (#10396)
* fix(pkg): stop the Windows build overwriting the venv's pip

CREATE_VIRTUAL_ENV creates a virtualenv and then copies the whole of the
system Python's Lib over it, so that the relocated interpreter has a
standard library to use. That copy includes Lib\site-packages, and XCOPY
/Y overwrites the files that exist on both sides without removing the
ones that only exist in the venv, so the venv's freshly seeded pip ends
up spliced together with whatever pip C:\Python313 happens to have.

That was harmless while the two layouts agreed. pip 26.2 turned
pip/_internal/build_env from a module into a package, so on a builder
whose system pip predates 26.2 the new build_env/ directory survives the
copy whilst utils/misc.py is overwritten by the older one, and every
subsequent pip invocation dies before it does anything:

  File "...\pip\_internal\build_env\installer.py", line 22, in <module>
    from pip._internal.utils.misc import get_runnable_pip
  ImportError: cannot import name 'get_runnable_pip' from
  'pip._internal.utils.misc'

It cannot recover on its own either, since the next line of the script
is the pip invocation that upgrades pip.

Copy the standard library with ROBOCOPY and exclude site-packages, which
the venv is entitled to keep to itself. ROBOCOPY rather than XCOPY
because /XD takes a directory to skip and the existing
:CHECK_ROBOCOPY_ERROR helper already handles its exit codes; /R:3 /W:5
so a locked file fails the build rather than retrying for a million
attempts.

* fix(pkg): make the Windows build's ROBOCOPY failures diagnosable

Follow-up review fixes to the site-packages exclusion.

Exclude site-packages by name rather than by full path. The full path is
built from PGADMIN_PYTHON_DIR, so if that is ever set with a trailing
backslash the source and the /XD argument both gain a doubled separator;
should the match then fail, site-packages is copied over the venv again
and the build fails with the same ImportError this was meant to remove.
No directory inside the standard library is legitimately called
site-packages, so matching by name is both simpler and unconditional.

Drop "> nul" from both ROBOCOPY calls in favour of /NFL /NDL /NP.
ROBOCOPY writes its errors to stdout, so with the redirect in place a
copy that returns 8 or more aborted the build with nothing in the log to
say which file or share was at fault; the switches suppress the per-file
noise whilst keeping the header, the summary and any errors.

Guard the copy of the web directory with "|| EXIT /B 1" as well, since
EXIT /B inside :CHECK_ROBOCOPY_ERROR returns from the label rather than
from the caller and a failed copy was therefore ignored, leaving the
build to package an incomplete tree.

Guard virtualenv.exe likewise: with the standard library now copied by
ROBOCOPY, which creates its destination, a failure there would otherwise
surface later at the activate step instead of where it happened.

---------

Co-authored-by: Dave Page <dpage@pgadmin.org>
2026-09-07 15:02:06 +01:00
Ashesh Vashi 0e9c3eab8f Add the master changes merged since the 9.18 notes were written
Covers the ten commits merged from master: the CSP per-request nonce,
the Object Explorer keyboard shortcut (folded into the existing #9631
entry, since it is the same feature reached another way), the Schema
Diff dependency ordering, function-body whitespace, foreign table and
sequence fixes surfaced by the now-asserting regression test, the
server-cursor prepare TypeError, the partitioned index TABLESPACE
clause, the UDF argument grid, the Helm existingSecret path and the
Validate binary path dialog.

Entries within each section are now ordered by issue number, with the
SHA-keyed ones last.
2026-09-07 16:50:01 +05:30
Ashesh Vashi 7edb9c012c Merge remote-tracking branch 'origin/master' into cve-9.18 2026-09-07 16:47:57 +05:30
Kundan 7c2177241f fix: render Validate binary path modal as HTML instead of raw markup (#10394)
The endpoint returned a pre-built <b>/<br/> HTML string, and the frontend
switched to the escaping alertText() during the XSS hardening pass
(9e370d3cb), so the modal showed literal tags instead of formatted text.
Return structured {utility, version} data from the backend and compose
the modal content as React elements on the frontend, keeping the
untrusted binary version output routed through SafeMessage.

- Fall back to the not-found message on empty version output too

|| instead of ?? — an empty-string version from an unexpected
'--version' output shape should still show the fallback message.
2026-09-07 16:46:41 +05:30
hiteshjambhale fb0ca5c4c8 feat: Use per-request nonce in CSP to remove 'unsafe-inline' / 'unsafe-eval' (#10308)
Harden the default Content-Security-Policy so inline scripts run only via a
per-request nonce instead of a blanket 'unsafe-inline', and drop 'unsafe-eval'.

- Generate a per-request nonce (secrets.token_urlsafe) cached on flask.g so the
  exact same value is emitted in templates and the CSP response header.
- Substitute a {nonce} placeholder in CONTENT_SECURITY_POLICY at runtime.
- Tag inline <script>/<style> tags, and set window.__webpack_nonce__ so webpack's
  dynamically injected assets carry the nonce too.
- New default: script-src 'self' 'nonce-{nonce}' (no 'unsafe-inline'/'unsafe-eval').
- style-src keeps 'unsafe-inline': MUI/React inject un-nonced runtime styles and
  inline style="" attributes that cannot be nonced.
- 'unsafe-eval' is not needed by production bundles; the dev ('eval' devtool)
  bundles add it via config_local.py (documented in config.py).

Setting window.__webpack_nonce__ in HTML is a no-op: webpack only substitutes the __webpack_nonce__ identifier inside compiled modules, and MUI/emotion does not read it either (it requires an explicit createCache nonce). Same-origin webpack chunks are already allowed by script-src 'self', so the block did nothing. Remove it; the resourceBasePath inline script keeps its nonce.

Development bundles are built with webpack's 'eval' devtool, which the strict nonce policy blocks, forcing developers to manually add 'unsafe-eval' via config_local.py. Handle it automatically in get_content_security_policy() (which runs per request and therefore sees a DEBUG value overridden in config_local): when config.DEBUG is set and the policy uses a nonce, append 'unsafe-eval' to the script-src directive, without duplicating it. Production is unaffected and custom (non-nonce) policies pass through untouched.

Adds unit tests covering nonce generation/caching/per-request freshness, {nonce} substitution, pass-through of custom/None/empty policies, header emission, and the dev-mode behaviour (including the no-script-src edge case, exact script-src name matching, and no-duplication).

The dev-mode 'unsafe-eval' behaviour is now implemented, so these are ordinary regression tests. Remove the 'PLANNED'/'EXPECTED TO FAIL until impl' banners (which incorrectly told maintainers not to make the source pass) and an unused MagicMock import.
2026-09-07 16:44:38 +05:30
Dave Page d0210a534d fix: correct existingSecret path in Helm deployment template (#10214) (#10313)
The annotation conditions referenced the non-existent top-level
.Values.existingSecret instead of .Values.auth.existingSecret, so the
secret checksum annotation and the empty-secret gating never worked as
intended when an existing secret wasn't supplied.
2026-09-07 16:42:50 +05:30
Dave Page 006fc6bd88 fix: omit redundant TABLESPACE pg_default from generated index SQL (#10342)
PostgreSQL rejects an explicit TABLESPACE clause naming the database's
own default tablespace when the index is on a partitioned table
('cannot specify default tablespace for partitioned relations'), so
the SQL pgAdmin generated for a new index could not be executed
against a partitioned table whenever no non-default tablespace was
chosen. The index_constraint and exclusion_constraint create.sql
templates already guard against emitting this redundant clause;
extend the same guard to the plain index create.sql templates.

Closes #10341
2026-09-07 16:42:15 +05:30
Dave Page abf926428e fix: stop Schema Diff injecting whitespace into applied function/procedure bodies (#10302) (#10317)
Generating a script for a function or procedure that only exists on the
source ("Source Only") routed through FunctionView.sql(), which always
calls reformat_prosrc_code() to wrap the body with a leading and trailing
newline around $BODY$...$BODY$ purely for readability in the SQL panel.
That reformatted body was then executed verbatim against the target, so
PostgreSQL stored the extra newlines in prosrc: the target's body no
longer matched the source's byte for byte, and re-comparing kept
reporting a whitespace-only difference unless "Ignore whitespace" was
ticked.

Schema Diff's update path (CREATE OR REPLACE against an existing target
object) already suppressed this formatting via allow_code_formatting,
added for #7102; this extends the same guard to the create/"Source
Only" path so Schema Diff never adds whitespace of its own to the SQL
it actually applies.

Added a dedicated regression test covering both the "Source Only" and
"Different" cases for a function and a procedure: applying the
generated script now leaves every object comparing as Identical
without needing "Ignore whitespace".
2026-09-07 16:41:35 +05:30
Dave Page f2fdef5ba5 Schema Diff: reinstate dependency ordering of the generated script (#10319)
dependLevel drove the order in which generateFinalScript() writes
objects, with higher levels emitted first so dependencies land before
whatever needs them, but nothing has assigned it since the React port
deleted schema_diff_dependency.js: every row got Object.keys' default
undefined bucket, so the script came out in whatever order the rows
happened to be in.

computeDependLevels() rebuilds the levels for the full result set from
each row's dependencies, walking the reverse graph so a row that other
rows depend on always ends up with the highest of their levels plus
one, with a cycle guard for the circular dependencies the script header
already warns about.

Fixes #10295.
2026-09-07 16:40:27 +05:30
Dave Page 972332ae59 feat: add a keyboard shortcut for collapsing the Object Explorer (#10296)
#10254 made the Object Explorer collapsible by clicking the current
workspace icon, but left that as the only way to do it. This adds a
shortcut, Ctrl+Alt+B by default, registered as its own
toggle_object_explorer preference so anyone can change it.

Ctrl+Alt+B rather than anything in the Shift+Alt family, which is full: b,
f, o, l, h, q, v, s, n, e, d and g are all taken, b by the existing Object
Explorer shortcut, which keeps its meaning of focusing the tree. Ctrl+Alt+B
is close enough to VS Code's Ctrl+B for the side bar to be guessable, and
keeps a family resemblance to the bracket keys used for tab navigation.
Ctrl+Shift+B would have been the other obvious candidate, but Chrome and
Firefox both use it for the bookmarks bar.

Worth noting for anyone reviewing: on keyboard layouts where AltGr is
Ctrl+Alt, this combination can be swallowed by the layout and produce a
character instead. That is true of any Ctrl+Alt binding, the preference is
user-configurable, and Shift+Ctrl+Alt+B is available if the default turns
out to annoy people.

The shortcut itself only fires an event, since the workspace provider owns
the visibility state, and the provider ignores it in classic layout where
there is no workspace toolbar and the Object Explorer is always shown.

Tested in a browser as well as in the unit tests: from the workspace layout
the key collapses and restores the panel, and the preference is registered
alongside the existing shortcuts.
2026-09-07 16:39:33 +05:30
Dave Page bc04db39d5 fix: stop AsyncDictServerCursor forwarding prepare to the server cursor (#10343)
psycopg's AsyncServerCursor.execute() has never accepted a prepare kwarg
(a server-side DECLARE CURSOR can't be a prepared statement) and raises
TypeError on any unexpected keyword, even one whose value is None.

PR #10030 widened AsyncDictCursor.execute()/_execute() to forward
prepare/binary to whatever cursor it holds, fixing a real
psycopg_pool.ConnectionPool.check_connection breakage. AsyncDictServerCursor
inherits that same execute()/_execute() without overriding it, so every
server-cursor query now unconditionally forwards prepare=None straight into
AsyncServerCursor.execute() and fails with
"TypeError: keyword not supported: prepare".

That TypeError isn't a psycopg.Error, so execute_async()'s
"except psycopg.Error" doesn't catch it. It propagates into the background
QueryThread's generic exception handler, which logs it and builds an
internal_server_error response that is discarded (the thread's return value
goes nowhere) - so the query silently never runs, invisible to the user,
and the async cursor is left with no query having actually executed on it.

Give AsyncDictServerCursor its own _execute() that drops prepare before
delegating, leaving DictCursor/AsyncDictCursor's forwarding for the
pool-checkout case it was written for untouched.

Strengthen test_server_cursor.py's existing scenario to assert the poll
response's actual status/result instead of only the HTTP status code and
the echoed server_cursor flag, and add a fast, DB-less regression test
asserting AsyncDictServerCursor._execute never forwards prepare.
2026-09-07 16:38:46 +05:30
Dave Page 3d310d4656 Fix UDF/procedure argument grid delete (and add) in edit mode (#10333)
`canDeleteRow for the function/procedure Arguments grid checked whether the
whole function was new rather than whether the individual row was new,
so once a function was saved the delete icon was disabled for every
argument row, including ones added but not yet saved (same bug pattern
already fixed for enum values in #8208). canAdd had the same whole-object
gate, hiding the "+" button entirely once a function was saved, so there
was no way to add a row in the first place.

Pre-existing (already persisted) arguments remain non-deletable, since
PostgreSQL has no way to remove an argument from a function via
CREATE OR REPLACE.

Also fixes _update_arguments_for_get_sql, which only merged the
'changed' key of the arguments diff and silently dropped (or, without
a 'changed' key at all, raised a 500) any newly added argument, so a
row added via the now-enabled "+" button actually survives into the
generated SQL.

Closes #10252
2026-09-07 16:37:12 +05:30
Dave Page 8c6fd211a7 Schema Diff: make the regression test assert its generated script, and fix what that found (#10305)
The Schema Diff comparison test wrapped applying its generated script, and
the comparison that follows it, in a bare `except Exception` that discarded
both. It reported a pass whatever the script did, which is why it printed
`syntax error at or near ")"` on every run whilst claiming two tests passed.
It now fails when an object's SQL does not apply, and when applying the lot
leaves the two databases different, with a short list of the differences
that are known not to settle yet so that the list cannot quietly rot.

Objects are applied one at a time and retried rather than as a single
script, because the script is no longer ordered by dependency (#10295), so
an object can fail purely because something it needs comes later on;
retrying tells that apart from SQL that is simply wrong.

Turning the assertions on found the following, each of which is fixed here:

* A range type being dropped and recreated because its kind changed lost
  its subtype, because directory_diff() drops a plain value that only one
  side of the comparison has, and rendered `CREATE TYPE ... AS RANGE ()`.
  Once that was fixed it wrote the catalogue's `-` placeholder out as
  `CANONICAL = -`, which the reverse-engineered SQL path already avoids.
  Both are now handled where the comparison data is built (#10304).

* The constructor functions, casts and multirange types that PostgreSQL
  creates for a range type were compared as though a user had written them,
  so the script tried to recreate objects that come into being with their
  parent type: 47 of 151 objects in the test's fixtures were these.
  Internal dependencies are now excluded alongside extension ones, matching
  what pg_dump does.

* Recreating a foreign table declared any column that also differed twice,
  because a changed column was appended to the table's existing columns
  rather than replacing the entry already there (#10297).

* Raising a sequence's MINVALUE above the value it currently sits at, or
  lowering MAXVALUE below it, generated a statement PostgreSQL rejects
  outright, taking every other change to that sequence with it. Such a
  change is now accompanied by the RESTART it requires (#10298).

* A foreign table column added by Schema Diff lost its collation, because
  get_columns.sql calls it collname whilst the column templates render
  collspcname (#10300).

* A comparison that threw part way through emitted its failure and then
  reported success as well, handing the client a fraction of the databases
  as though it were a complete result (#10303).

Two differences remain listed as known: a rebuilt partitioned table keeps
the default partition used as scaffolding for the data copy (#10301), and
CREATE OR REPLACE wraps a function body in newlines, leaving a
whitespace-only difference (#10302).

Fixes #10293

* Stop the partition rebuild script copying from a temporary table

Asserting that the generated script actually applies turned up a
partitioned table rebuild whose script refers to a relation that has
never existed, along the lines of:

    CREATE TABLE schema.temp_partitioned_2 (
        LIKE schema.temp_partitioned_1 INCLUDING ALL
    ) PARTITION BY RANGE (col1);

so that applying it fails with 'relation "schema.temp_partitioned_1"
does not exist'.

There are two things going on here, and both are fixed.

PgAdminModule.register() is called once per application instance, whilst
the blueprint objects themselves are module level singletons, so each
sub-class that appends its sub-modules from its own register() (most of
them do, TableModule included) leaves a duplicate entry behind every
time a second application is created in the same process. Nothing in
production notices, because production creates a single app, but the
regression suite creates several, and anything walking self.submodules
then does its work once per duplicate: with four copies of the partition
sub-module, get_sql_from_submodule_diff generated the same partition
rebuild four times over. self.submodules is now de-duplicated as the
blueprint registers, and parentmodules likewise only gains an entry it
does not already hold.

The second call was only harmful because PartitionsView.get_sql_from_diff
stashed its temporary names on the caller's own dictionaries, replacing
the table's real name with a temporary one, so a subsequent call read the
first call's temporary name back as the original. It now works on copies
and leaves the comparison data it is handed alone, which makes it safe to
call more than once regardless of how it is reached.

* Take a mutable copy of request.form, and close cursors on a failed chunk

Two things picked up in review.

Sequence update() passed request.form straight through to get_SQL(), and
request.form is immutable, so as soon as _add_restart_for_new_bounds had
a restart to add (which is the whole point of it) a form encoded update
raised TypeError. It now takes a dict copy, as the msql path already
effectively did.

apply_sql_chunks() left the cursor open when a statement failed, and a
failed statement is retried on the next pass, so a run could accumulate
one open cursor per attempt. The cursor is now closed in a finally,
whether the statement worked or not.
2026-09-07 16:35:13 +05:30
Ashesh Vashi de71c83d8d Bump version to 9.18 and add the 9.18 release notes
Update APP_REVISION/APP_VERSION_INT in web/version.py and the Helm
chart's version/appVersion, and add docs/en_US/release_notes_9_18.rst
with a toctree entry.

The notes cover everything merged since REL-9_17 (ee7109d40..bd7cde585)
plus the three CVE fixes on this branch: the Webserver auth header
bypass (#10383), Backup argument and connection-string injection
(#10384) and the File Manager save_file symlink TOCTOU (#10385). The
CVE identifiers are still placeholders (CVE-2026-XXXXX) pending
assignment, and #10388 has no entry because its fix is not on this
branch yet.

Changes with no associated issue are listed under Housekeeping and Bug
fixes keyed by commit SHA, following the 9.15 convention, so the
"Additional changes" wrapper is dropped and Dependencies becomes a
top-level section.
2026-09-07 15:02:01 +05:30
Kundan SableandClaude Sonnet 5 8ed0ecc06b webserver auth: address round-3 review follow-ups
Two non-blocking items from asheshv/pgAdmin4-cve#66's approval review:

- The auth_source lockout remedy was circular for the deployments most
  likely to hit it: telling a locked-out admin to "sign in through
  another authentication source" doesn't help when
  AUTHENTICATION_SOURCES = ['webserver'] and there is no other source.
  Documented the actual way out - temporarily add 'internal' back,
  fix the affected users, remove it again.
- A malformed WEBSERVER_REMOTE_USER (not a non-empty string) was
  demoted to info logging along with the client-triggered rejections
  in the previous round, but it's a static operator misconfiguration,
  not something a client varies per request - at info it would go
  unnoticed while every header-based login silently fails. Moved back
  to warning, consistent with the other config-error checks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 19:06:51 +00:00
Kundan SableandClaude Sonnet 5 c0bd0d8665 webserver auth: fix CI-breaking test isolation bug, address round-2 review items
Round 2 of asheshv/pgAdmin4-cve#66's review:

- test_webserver_remote_user_trust.py bound WebserverAuthentication at
  module-import time. test_auth_gating.py (which sorts and runs first)
  evicts pgadmin.authenticate.webserver from sys.modules to observe its
  re-import and never restores it, so the trust test held a discarded
  copy of the module while patch('...webserver.User') patched the fresh
  one - the patch silently missed and hit a real, unconfigured database.
  Reproduced the reviewer's "27 passed, 3 failed" package-level run, then
  fixed it by importing WebserverAuthentication inside each runTest()
  instead, matching this repo's existing deferred-import convention.
  Full authenticate package now passes 30/30.
- Documented the auth_source lockout: login() refusing any non-webserver
  auth_source protects existing accounts, but a site with pre-existing
  internal-auth users (including the default admin) will find nobody can
  log in after enabling this. Added a warning to webserver.rst with the
  fix (change Authentication source in User Management).
- login()'s user-is-None branch called logger.exception() with no active
  exception, writing a useless NoneType traceback and never naming the
  failed username. Now a plain warning naming it.
- Demoted per-request rejection logging (untrusted peer, secret mismatch,
  misconfigured name) from warning to info, since an unauthenticated
  client can trigger any of them on every request; kept genuine config
  errors (a malformed WEBSERVER_TRUSTED_PROXIES entry, or the whole
  setting not being a list/tuple) at warning.
- Guarded against WEBSERVER_TRUSTED_PROXIES being set to a plain string,
  which iterated character-by-character and logged one warning per
  character while still safely rejecting the request.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 19:06:51 +00:00
Kundan SableandClaude Sonnet 5 90e94da9db webserver auth: address CVE fix review comments
Fixes four issues from asheshv/pgAdmin4-cve#66's review:

- HTTP_-prefixed WEBSERVER_REMOTE_USER names (e.g.
  HTTP_X_FORWARDED_USER) were permanently unresolvable via the header
  path: Werkzeug normalizes '_' to '-' in header lookups but does not
  strip the HTTP_ prefix. Normalize the name to its header form before
  looking it up.
- A non-str/bytes or non-ASCII WEBSERVER_SHARED_SECRET made
  hmac.compare_digest raise, turning every login attempt into an
  unhandled 500. Encode both operands and catch the failure, degrading
  to a rejected match with a logged warning instead.
- Added a test exercising the real ProxyFix/X-Forwarded-For bypass via
  app.test_client(), which the existing scenarios (bare
  test_request_context, no ProxyFix in the stack) could not catch.
- Added positive-path tests for login() (a genuine WEBSERVER user still
  logs in; a header-asserted name with no matching User row fails
  gracefully) plus a few low-priority coverage gaps the review flagged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 19:06:51 +00:00
Kundan SableandClaude Sonnet 5 02e327c1b9 Fix authentication bypass in Webserver auth via client-controlled header
WebserverAuthentication.get_user() fell back to request.headers when the
WSGI environ lookup missed, letting any client set Remote-User (or an
equivalent HTTP_-prefixed/hyphenated name) and log in as an arbitrary
existing user, including an Administrator, with no credential check.

Gate the header fallback behind an explicit opt-in
(WEBSERVER_REMOTE_USER_FROM_HEADER), a trusted-proxy IP/CIDR allow-list
(WEBSERVER_TRUSTED_PROXIES, checked against the raw pre-ProxyFix peer so
X-Forwarded-For can't spoof it), and an optional shared secret
(WEBSERVER_SHARED_SECRET). Also refuse to log a header-asserted identity
into any account whose auth_source isn't webserver, so a forged header
can never take over an internal-auth admin even if the gate above is
misconfigured.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 19:06:51 +00:00
hiteshjambhale 5082834a27 fix(backup): pass database via PGDATABASE env to close connection-string injection
The "--" end-of-options marker (previous commit) stops pg_dump from
reading the database value as an option, but libpq still expands a dbname
containing "=" (e.g. "host=evil port=5433 dbname=postgres") into a
connection string -- letting a user redirect the connection, and the
exported PGPASSWORD credential, to an arbitrary server.

Pass the target database via the PGDATABASE environment variable instead
of as a command-line argument (as import_export already does). libpq
treats PGDATABASE as a literal database name and never expands it, so
both the file-write and connection-redirect vectors are closed. Also
fixes a latent bug where a database name legitimately containing "=" was
broken.

Update the regression tests: assert the database name is absent from
argv and carried in PGDATABASE (order-blind assertIn is insufficient).
2026-09-04 13:57:13 +00:00
hiteshjambhale a14469290e test(backup): add regression tests for database-field argument injection
Adds two scenarios to the object-backup unit test:
- normal dbname lands as the trailing positional after '--'
- a malicious '--file=...' value stays a trailing positional after '--'
  and never overrides the storage-confined '--file'

Uses an order-sensitive assertion on the last args (the existing assertIn
harness is order-blind and would pass even if '--' came after the dbname).
2026-09-04 13:57:13 +00:00
hiteshjambhale 82a88b74f9 fix(backup): prevent argument injection via database field
The object-backup path appended the request 'database' field to the
pg_dump argv as a raw positional argument. Under getopt_long argument
permutation, a value like --file=/absolute/path is parsed as an option
and overrides the storage-confined --file, letting a low-privilege user
write pg_dump output outside their storage sandbox.

Insert the '--' end-of-options marker before the database name so
pg_dump always treats it strictly as the positional dbname.
2026-09-04 13:57:13 +00:00
Ashesh Vashi d773db699f test: make save_file symlink test harness-native, add positive control
Follow-up to the previous commit; the fix itself is unchanged.

The new test called create_app() inside runTest(). That is redundant --
runtests.py already calls setApp()/setTestClient() on every test object,
independent of setUp() -- and expensive: it did not complete in over two
minutes locally, while the two existing tests in this file run in 1.1s
total. It also routes through create_app_data_directory(), which calls
sys.exit(1) on any data-directory problem, surfacing as SystemExit
mid-test. Use the harness's already-authenticated test client instead,
which also removes the save_file.__wrapped__() unwrapping; that worked
only because pga_login_required applies @wraps outermost over
@mfa_required, so reordering those two lines would have silently pointed
__wrapped__ at the MFA wrapper.

The old test also stubbed check_access_permission to a no-op, which
tests the write guard with the containment check absent rather than the
actual threat. Let the real check run and plant the symlink from inside
it, which reproduces the check-to-open race deterministically.

Assert on the error message rather than a bare status code. 500 is also
returned by the check_access_permission branch, and "outside file
unchanged" holds whenever any error occurs, so the previous assertions
would pass even if the write never happened for an unrelated reason.

Add a positive control. Nothing asserted that an ordinary save still
succeeds, so a broken _open_upload_target() would have left the negative
test green while every Query Tool and ERD save failed. It also pins the
0o600 mode so that documented behavioral change cannot regress silently.

Report the leaf-symlink rejection specifically instead of leaking the
raw strerror. A user whose save is refused saw "Error: Too many levels
of symbolic links", which explains nothing. Note this is a real
behavioral change: a symlink inside the storage root pointing at a
target inside the storage root passed check_access_permission and used
to work, and is now refused -- the same tradeoff already accepted for
uploads.

Verified with runtests.py against PostgreSQL 18.6 in desktop mode:

  --pkg misc.file_manager            19/19 pass
  --exclude feature_tests            2037 pass, 491 skipped, 1 failure

The single failure is utils.driver.psycopg3 test_encoding (LATIN1 maps
to the iso8859-1 python codec), which reproduces identically on the
unmodified base commit bd7cde585 and is unrelated to this branch.

Both new tests were confirmed non-vacuous by reverting the
_open_upload_target() call to the bare open(): TestSaveFileRejectsLeafSymlink
then fails with "AssertionError: 200 != 500" (the symlink is followed and
the outside target is overwritten) and TestSaveFileWritesRegularFile with
"AssertionError: 420 != 384" (0o644 vs 0o600).
2026-09-04 05:55:58 +00:00
Dave Page 83a31a350c fix: close save_file() leaf-symlink TOCTOU in File Manager
check_access_permission() resolves symlinks via realpath() and validates
containment (CVE-2026-7813), but save_file() re-joins the path afterwards
and wrote through a bare open(), which follows a symlink planted at the
leaf between the check and the write. The upload endpoint already closed
this exact gap with _open_upload_target()'s O_NOFOLLOW-protected open;
save_file() never got the same treatment.

Route save_file()'s write through _open_upload_target() too, so both
File Manager write sinks share the same kernel-enforced protection.
Reported privately per SECURITY.md.
2026-09-04 05:55:58 +00:00
Ashesh Vashi bd7cde5851 chore(deps): bump third-party JS and Python dependencies (#10370)
JS (yarn, patch/minor only): babel toolchain, MUI, react/react-dom,
testing-library, axios, webpack ecosystem, jest, eslint plugins, and
misc small libs. Excluded @simonwep/pickr (webpack prod-bundle
interop break on 1.10.x), @testing-library/user-event@14.6.7 and
webpack@5.110.3 (both npm-quarantined at bump time).

Python (>3.9 requirements branch only, Python 3.9 pins untouched):
Authlib 1.8, google-auth-oauthlib 1.4.1, gssapi 1.12 (ungated),
psycopg[c] 3.3.5, selenium 4.48.0, testscenarios 0.7.0.

Skipped: paramiko 3->5 (blocked on sshtunnel's paramiko.DSSKey
usage), azure-mgmt-resource 26.0.0 (drops Python 3.9 support and
conflicts with the <26 upper bound kept for Azure CLI distro
packaging, see #10247).

Two bumped packages required source fixes:

- psycopg 3.3.5 restructured the private
  psycopg._encodings._py_codecs attribute from a dict to a tuple of
  alias groups, breaking our monkeypatch in
  pgadmin/utils/driver/psycopg3/encoding.py with TypeError: 'tuple'
  object does not support item assignment. Rewrote get_encoding()/
  configure_driver_encodings() to use the derived py_codecs/
  pg_codecs dicts instead, which stay plain dicts across psycopg
  3.2.x-3.3.5 regardless of _py_codecs's internal shape. Verified
  byte-for-byte identical behavior against 3.3.4 for every
  encode_dict entry (SQL_ASCII, EUC_TW, UNICODE, ascii) plus
  UTF8/LATIN1. Added a DB-free unit test
  (pgadmin/utils/driver/psycopg3/tests/test_encoding.py) so a future
  psycopg internals change fails fast here instead of only surfacing
  as an app-wide import crash in the full regression suite.

- react-frame-component 5.3.2 breaks LayoutIframeTab.jsx (the iframe
  wrapper every tool panel - Query Tool, Debugger, PSQL, ERD, Schema
  Diff - renders into): the panel's iframe never mounts, hanging any
  of those tools indefinitely (React error #130 in the production
  bundle). This caused every run-feature-tests-pg CI job to fail.
  Reverted to 5.2.6.
2026-09-03 14:58:04 +05:30
Dave Page bc58657d3d ci: stop fetching an unpinned Yarn before the pinned one (#10306)
Everywhere we build the JS, we asked Yarn to install itself twice:

    yarn set version berry
    yarn set version <the version from packageManager>

The first call fetches whichever release is "berry" today and the second
immediately replaces it, so every build made two downloads to end up with one
Yarn, and the one that could not be reproduced tomorrow was fetched first.

That first fetch broke CI outright on 17 August 2026, during a GitHub
incident, when it returned an empty body and Yarn 1 died writing it out:

    error TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of
    type string or an instance of Buffer, TypedArray, or DataView
        at writeFile (node:fs:2373:5)

The unpinned call is dropped everywhere it appeared: Make.bat, the macOS and
pip package builds, and the four workflows. The packaging scripts keep their
pinned "yarn set version ${YARN_VERSION}", which still reads packageManager
from package.json, so their behaviour is unchanged beyond losing a download.

The workflows go further and use Corepack, which reads packageManager itself
and provisions exactly that Yarn without writing .yarnrc.yml and
.yarn/releases into the repository root, where the JS project is not. The
Dockerfile already installed and enabled Corepack immediately before both
"set version" calls, so both were redundant there and are simply removed.

CONTRIBUTING.md and README.md already tell contributors to start with
"corepack enable", so this brings the automation in line with the documented
setup. Note that Corepack ships with Node.js only up to (but not including)
25.0.0, so it will need installing explicitly once the runners move past it,
as the Dockerfile already does.
2026-08-21 18:39:32 +05:30
Dave Page 5bd4f3bde6 Javascript dependency: Bump use-resize-observer from 9.1.0 to 10.0.0 (#10265) (#10299)
v10 removes the default export in favour of a named one, so the import in
PgTreeView had to change with it; left as it was, useResizeObserver resolves
to undefined and the Object Explorer dies when the hook is called. The rest of
the v10 changes cost us nothing: it drops the /polyfilled entrypoint and its
@juggle/resize-observer dependency, no longer takes react-dom as a peer, and
requires React >= 18.2, which is comfortably met on React 19. The hook still
returns the { ref, width, height } shape the tree destructures.

Verified by hand in Chrome and Safari with the tree expanded through
databases, schemas, tables and tablespaces, resizing the panel and the window.
2026-08-21 18:37:43 +05:30
Dave Page 9a009fd2b6 Don't follow HTTP redirects on LLM API requests (#10281)
* Don't follow HTTP redirects on LLM API requests

ALLOWED_LLM_API_URLS is checked against the URL pgAdmin is configured
with, but the providers then issued the request through
urllib.request.urlopen(), whose default handler would follow a Location
header on to a destination that check was never applied to.

No legitimate LLM API replies with a redirect, so refuse them outright
rather than re-validating each hop: urlopen_no_redirect() installs a
handler that raises HTTPError instead, and the outbound calls in all
four providers and in the model-refresh endpoints now go through it.

This is hardening rather than a fix for an exploitable flaw, since
returning the redirect in the first place requires control of a host
that is already on the allowlist. Reported by Ziya Abdullayev.

* Handle 308 redirects on Python 3.10 as well

HTTPRedirectHandler only gained http_error_308() in Python 3.11, so on
the 3.9 and 3.10 interpreters we still support (and which CI runs) a 308
was never recognised as a redirect: it bypassed _NoRedirectHandler's
redirect_request() entirely and surfaced from http_error_default() as a
bare 'HTTP Error 308: Permanent Redirect'. The redirect was still not
followed, so this was never a security gap, but the caller got no
explanation of why the request had failed, and the test asserting our
message failed on every CI job as a result.

Mapping http_error_308 onto http_error_301, exactly as 3.11 itself does,
routes 308 back through redirect_request() so that every redirect status
behaves identically on every version we support.
2026-08-21 18:37:15 +05:30
Dave Page 1f02466324 fix: reject empty or null Username on non-shared server import (#10309) (#10320)
validate_json_data() only checked that the Username key was present on
a non-shared server, not that it held anything useful, so an empty or
null value imported cleanly and left behind a server that libpq would
silently authenticate as the OS account running pgAdmin rather than
reject outright. Check the value, matching the truthiness check already
used for shared servers and the "Username must be specified" rule
enforced by the server dialog.
2026-08-21 18:35:35 +05:30
Dave Page c0fa2a18d8 Relax azure-mgmt-resource pin to allow 24.0.0 (#10323)
The exact ==25.0.0 pin was an incidental side effect of a mass
dependency bump and isn't required by pgAdmin's own code: the cloud
wizard only uses the top-level ResourceManagementClient re-export and
resource_groups.list(), both unchanged between 24.0.0 and 25.0.0.
Pinning to >=24.0.0,<26.0.0 lets distro packagers keep pgAdmin
installable alongside Azure CLI, which still requires
azure-mgmt-resource<25.

Closes #10247
2026-08-21 18:34:55 +05:30
Dave Page 46c092cc5d Remove redundant passlib pin that conflicts with libpass (#10325)
Flask-Security-Too >= 5.7 depends on libpass, a fork of passlib that
installs its files under the same passlib/ import path. Our own
unconditional passlib==1.* pin in requirements.txt therefore causes
both packages to be installed into the same site-packages/passlib/
directory, and parallel installers such as uv can end up with a
mixed or overwritten set of files depending on install order.

pgAdmin's own code never imports passlib directly, and the older
Flask-Security-Too 5.6.x branch (used on Python 3.9) already pulls in
real passlib as its own transitive dependency, so dropping our direct
pin does not change what gets installed there. On newer Python
versions, only libpass is installed, resolving the conflict.

Closes #10239
2026-08-21 18:34:06 +05:30
Dave Page f739036066 fix: guard PasswordExec against None host/port/username (#10326)
Service-only connections (pg_service.conf) leave host, port and username
unset, so a per-server Password Exec Command crashed in get() with
TypeError: replace() argument 2 must be str, not None. Fall back to an
empty string for each unset placeholder instead.

Closes #10237
2026-08-21 18:33:16 +05:30
Thomas Han 0ebefaf80e fix: accept SharedUsername when importing shared servers (#9971)
Importing a servers.json definition insisted on a Username attribute for
every server, so a shared server that carried only SharedUsername was
rejected with "'Username' attribute not found for server ...", even though
the dialog treats SharedUsername as the default username for a shared
server. Validation now accepts either attribute when the server is shared,
whilst non-shared servers still require Username.

The loader derives the username it stores in the same way. Username wins
when both are present, since it is the owner's own login and the per-user
override, and SharedUsername is used when Username is absent. That matches
what creating a shared server through the dialog produces, so an imported
shared server prompts for a password on the first connection rather than
sitting on a loading spinner with no username to connect with.
SharedUsername itself does not inherit a legacy Username, because it means
"the default username for the other users of this server" rather than a
fallback for the owner.

Folded in during review:

Validation now looks at the values rather than merely at the keys. Checking
for the presence of a key alone let {"Shared": true, "SharedUsername": null}
and its empty-string equivalent through, and the loader would then store
that as the server's username: on a schema created from the model that is an
integrity error surfaced as a raw "Error creating server" string, whilst on
a database migrated over the years, where the column carries no NOT NULL, it
imports silently and leaves behind a server that cannot connect. The
equivalent pre-existing hole on the non-shared path, where {"Username": ""}
is still accepted, is left for a separate change covering empty usernames in
general.

Tests in web/pgadmin/utils/tests/test_validate_json_data.py cover the
username requirements for shared and non-shared servers, the Service escape
hatch, the integer port check, and shared servers being skipped rather than
rejected for a non-admin user. The JSON format documentation notes that
SharedUsername may stand in for Username.

Fixes #9226
2026-08-18 10:11:58 +01:00
hiteshjambhale 104d018677 fix: dedupe concurrent getNodeAjaxOptions requests (#10307)
getNodeAjaxOptions() in web/pgadmin/browser/static/js/node_ajax.js, the
shared helper behind every AJAX-backed dropdown, cached responses only
once they had resolved, so when many components asked for the same URL
before the first response landed each of them saw an empty cache and
fired its own identical GET. Every column row's Data Type dropdown
mounting at once on a wide table's Columns tab therefore produced one
get_types request per row: around 150 concurrent duplicates on a
150-column table.

Concurrent GETs are now shared in the Axios wrapper. A module-level Map
tracks requests in flight, keyed on the request axios will actually make:
api.getUri() resolves the URI exactly as the request will, honouring the
instance baseURL, plain-object params, URLSearchParams and any custom
paramsSerializer, whilst the instance's own header configuration and the
per-request headers are hashed in alongside it, so an instance built with
extra headers never shares with a plain one. Params are canonicalised
first so that callers passing the same values in a different order still
share. The entry is removed once the request settles, success or failure,
so nothing leaks and later callers fetch fresh data.

Beyond params and headers there is plenty in an axios config that cannot
be captured in a key and that changes either what a caller gets back or
how it can be aborted: transformResponse, responseType, validateStatus,
timeout, signal and so on. Rather than let those share silently, a
request carrying anything outside the shareable set goes straight through
to api.get().

Each caller still runs its own caching and transform on the shared
response, so cached behaviour and response-shape handling are unchanged.

Fixes #10155.
2026-08-18 10:02:30 +01:00
Dave Page 81ac80321e fix: make the auth gating test independent of import order
The test added in #10240 fails in a full run, though it passes when the
authenticate package is tested on its own:

    FAIL: runTest (pgadmin.authenticate.tests.test_auth_gating
                   .AuthSourceGatingTestCase)
    AssertionError: 'oauth2' not found in
                    ['internal', 'kerberos', 'ldap', 'webserver']

It cleared sys.modules for each provider and expected load_modules(), which
reaches them with "from . import <provider>", to import and hence re-register
them. That is not enough: IMPORT_FROM finds the attribute already set on the
parent package by whichever earlier test imported the module, and returns the
previous module object without re-executing it, so the provider never
re-registers itself.

Only oauth2 was affected, because it is the one provider imported earlier in a
full run, by the tests under browser/tests. Nothing pre-imports it when the
authenticate package is run alone, which is why the narrow run passed and CI
did not.

Drop the attribute from the parent package alongside the sys.modules entry, so
the import genuinely happens again.

Verified with the full suite as CI runs it, python regression/runtests.py
--exclude feature_tests: both scenarios pass and the runner's own exit status
is clean, with the only remaining failure a local config-directory permissions
check that depends on the developer's config_local.py.
2026-08-17 16:54:47 +01:00
agu2347 01e5bf0993 Schema Diff: fix false SERIAL/BIGSERIAL differences and invalid ALTER SQL (#10248)
Schema Diff compares tables whose serial columns have been
reverse-engineered back onto the SERIAL/BIGSERIAL/SMALLSERIAL pseudo-type,
and that reprojection left two problems behind for any column declared as
SERIAL.

First, the raw oid of the sequence behind the column's nextval() default
(defseqrelid) was still being compared, and two independently created
databases assign that sequence completely different oids, so structurally
identical columns were reported as different; it is now ignored alongside
its sibling seqrelid.

Second, the SQL generated for a serial column that genuinely does differ
read the column's old properties straight from the catalogue without the
same reprojection, so the real integer type and the real nextval() default
were compared against the pseudo-type and its emptied default. Any genuine
difference, such as a comment or a NOT NULL, therefore also rendered an
invalid ALTER COLUMN ... TYPE bigserial, a spurious DROP DEFAULT, and a set
of sequence options that only an identity column accepts. The changed
column is now normalised back onto the type that ALTER COLUMN can actually
be given, whilst the sequence it owns is left to the sequence object's own
comparison.

Covered by a unit test for the column comparison and by a Schema Diff test
that applies the generated SQL to the target and re-compares.

Fixes #10236
2026-08-17 14:58:21 +01:00
byshy 549d71a203 feat: toggle Object Explorer by re-clicking Default workspace icon (#10254)
Clicking the Default workspace icon whilst that workspace is already
current now collapses the Object Explorer, and clicking it again brings it
back, in the manner of the VS Code side bar. The choice is remembered in a
new Browser/ObjectExplorerVisible setting, so it survives a refresh, and
File → Reset Layout restores the panel along with the rest of the layout.

The panel is hidden with CSS rather than unmounted, so the tree keeps its
expansion and selection state whilst it is out of the way, and because
rc-dock sizes box children with flex, the main panel takes the freed width
with no gap left behind.

Folded in during review:

The Object Explorer keyboard shortcut no longer does nothing when the
sidebar is collapsed. It asks for the panel to be shown first, through a
pgadmin:object-explorer:show event on pgAdmin.Browser.Events. The focus()
call in bindLeftTree() was already inert, since the panel is a div with no
tabindex, so the useful part of that shortcut is the tree selection that
follows it.

LayoutDocker now fires a RESET event which BrowserComponent listens for,
rather than resetLayout() being monkey-patched onto the shared docker
instance. That removes a mutation of an object other code holds a
reference to.

A failed attempt to persist the setting is logged rather than silently
discarded, since otherwise the sidebar could disagree with the server after
the next refresh with nothing to explain why.

The icon's tooltip says Show or Hide Object Explorer while it acts as a
toggle, instead of describing a workspace switch that will not happen, and
aria-pressed exposes the state to assistive technology.

Tests in web/regression/javascript/workspaces/WorkspaceProvider.spec.jsx
cover the default, the saved setting being honoured, each toggle persisting
its new value, two toggles in one tick resolving in order, and the reveal
event.
2026-08-17 14:49:49 +01:00
dependabot[bot] 7b592f2e82 Javascript dependency: Bump image-minimizer-webpack-plugin in /web (#10288)
Bumps [image-minimizer-webpack-plugin](https://github.com/webpack/image-minimizer-webpack-plugin) from 4.1.4 to 5.0.0.
- [Release notes](https://github.com/webpack/image-minimizer-webpack-plugin/releases)
- [Changelog](https://github.com/webpack/image-minimizer-webpack-plugin/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webpack/image-minimizer-webpack-plugin/compare/v4.1.4...v5.0.0)

---
updated-dependencies:
- dependency-name: image-minimizer-webpack-plugin
  dependency-version: 5.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-17 14:48:25 +01:00
Dave Page efc0dea335 docs: describe what AI features transmit to LLM providers (#10291)
The AI documentation covered how to configure each provider but said
nothing about what actually leaves the server once one is configured,
which is the first question anyone working under data residency or
procurement constraints will ask.

This adds a provider-neutral section to the AI Reports documentation
setting out what may be transmitted, which is schema definitions,
configuration settings read from pg_settings, query text, EXPLAIN plan
output and, because the Query Tool assistant can run read-only queries,
row data where the assistant judges it necessary; when nothing is
transmitted at all, which is the default, since no provider is
configured out of the box; and the fact that each provider processes
that data under its own terms and in locations of its own choosing, so
the reader knows to check both those terms and their own organisation's
policies before enabling a cloud provider.

It also makes explicit that the list of providers reflects the APIs
pgAdmin can speak to rather than a recommendation, and cross-references
the new section from the AI Assistant notes in the Query Tool
documentation.
2026-08-17 14:25:47 +01:00
dev-hari-prasad 2de30f25c0 Gate external auth providers behind SERVER_MODE in desktop mode (#10240)
Desktop mode has no use for the kerberos, ldap, mfa, oauth2 or webserver
authentication providers: AUTHENTICATION_SOURCES defaults to internal, MFA is
inert because mfa_enabled() requires SERVER_MODE, and get_logout_url() already
guards its kerberos and oauth2 branches on SERVER_MODE. So skip importing and
initialising them unless SERVER_MODE is set, leaving desktop mode with
internal authentication alone.

The accompanying test needed wiring into our own runner before it would ever
execute: web/pgadmin/authenticate/tests/ had no __init__.py, so pkgutil did
not report it and find_modules() never reached the module, and the test class
derived from unittest.TestCase rather than BaseTestGenerator, so the
TestsGeneratorRegistry metaclass never registered it and get_suite() could not
pick it up. Both are fixed here, and the two scenarios now run and pass under
regression/runtests.py.

The test no longer asserts that pgadmin.authenticate.mfa is absent from
sys.modules in desktop mode, because it is not: both pgadmin/browser/__init__
and pgadmin/user_login_check import pgadmin.authenticate.mfa.utils
unconditionally. The original assertion only held because the test itself
popped the module first.
2026-08-17 13:39:59 +01:00
Dave Page c2398d5b08 chore: stop Dependabot re-proposing pickr 1.10 and Babel 8 (#10286)
Two exclusions, both for bumps we have already established we cannot take.

pickr 1.10 switched to a dual CJS/ESM build whose CommonJS entry point exports
a namespace object rather than the class, so Babel's interop leaves
_pickr.default as an object and every dialog carrying a colour field dies on
mount. That took master's feature tests down for three days (#10264, reverted
in #10278). Because 1.9 -> 1.10 is a minor bump it rejoined the grouped
minor-and-patch PR immediately afterwards, buried among twenty other packages,
so minor updates are excluded here as well as majors until withColorPicker.js
is adapted to the new export shape.

Babel 8 requires Node ^22.18.0 || >=24.11.0, whilst Node 20 remains our
minimum, and every 8.x package peer-depends on @babel/core ^8.0.0 whilst we
are on 7.x. Taking any of them individually, as Dependabot proposed for
preset-env, eslint-parser and plugin-syntax-jsx, leaves an unsatisfiable peer
requirement and a mixed 7/8 tree. Babel 8 needs a coordinated migration across
all ten @babel/* packages once we are on Node 22.
2026-08-17 12:13:56 +01:00
dependabot[bot] 98fda1cbb0 Javascript dependency: Bump the runtime-javascript-minor-and-patch group across 1 directory with 2 updates (#10279)
Bumps the runtime-javascript-minor-and-patch group with 2 updates in the /runtime directory: [electron](https://github.com/electron/electron) and [globals](https://github.com/sindresorhus/globals).


Updates `electron` from 43.3.0 to 43.4.0
- [Release notes](https://github.com/electron/electron/releases)
- [Commits](https://github.com/electron/electron/compare/v43.3.0...v43.4.0)

Updates `globals` from 17.9.0 to 17.11.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.9.0...v17.11.0)

---
updated-dependencies:
- dependency-name: electron
  dependency-version: 43.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: runtime-javascript-minor-and-patch
- dependency-name: globals
  dependency-version: 17.11.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: runtime-javascript-minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-17 12:08:25 +01:00
Dave Page c20f0e33bb chore: stop Dependabot proposing major jest-dom bumps (#10280)
@testing-library/jest-dom 7 declares "engines": {"node": ">=22"}, whilst Node
20 remains our minimum and is what most of the buildfarm runs. The bump passes
our JS tests on Node 20 in practice, so this is a deliberate choice not to
depend on an officially unsupported combination rather than a reaction to a
failure.

The "^6.9.1" constraint in web/package.json already prevents 7.x from being
installed; what Dependabot proposes is widening that constraint, which is the
part we do not want, so ignore major updates for this package until the
buildfarm moves to Node 22. See #10271 and #10210.
2026-08-17 10:35:22 +01:00
dependabot[bot] e2ca7bb447 Javascript dependency: Bump @tanstack/react-virtual in /web (#10270)
Bumps [@tanstack/react-virtual](https://github.com/TanStack/virtual/tree/HEAD/packages/react-virtual) from 3.13.24 to 3.14.9.
- [Release notes](https://github.com/TanStack/virtual/releases)
- [Changelog](https://github.com/TanStack/virtual/blob/main/packages/react-virtual/CHANGELOG.md)
- [Commits](https://github.com/TanStack/virtual/commits/@tanstack/react-virtual@3.14.9/packages/react-virtual)

---
updated-dependencies:
- dependency-name: "@tanstack/react-virtual"
  dependency-version: 3.14.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-17 10:29:57 +01:00
dependabot[bot] e3626c4918 Python dependency: Bump selenium in /web/regression (#10267)
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.46.0 to 4.47.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.46.0...selenium-4.47.0)

---
updated-dependencies:
- dependency-name: selenium
  dependency-version: 4.47.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-17 10:29:46 +01:00
Dave Page 7790264acb chore: batch minor and patch Dependabot updates into one PR per manifest (#10277)
We were carrying 27 open Dependabot PRs, the great majority of them single
patch bumps of transitive packages, and the review cost of that queue is
entirely out of proportion to its risk. Every genuine problem found whilst
clearing it (paramiko 5.0 breaking sshtunnel, use-resize-observer 10.0 dropping
its default export, jest-dom 7.0 requiring a newer Node) was a major bump.

Group minor and patch updates into a single weekly PR per manifest, and leave
major updates arriving individually so each still gets its own review. Grouping
applies to version updates only, so security updates are unaffected and
continue to arrive as separate PRs.
2026-08-17 10:23:20 +01:00
Dave Page 8ceffe310b Revert "Javascript dependency: Bump @simonwep/pickr from 1.9.1 to 1.10.1 in /web (#10264)" (#10278)
This reverts commit 34dba5740e0e0e3bb6dd06afe4d84f9e4c0a9a6e.

pickr 1.10.1 breaks every dialog carrying a colour field, which includes
Register - Server, so the dialog renders as "Something went wrong." and all
feature tests time out waiting for its fields.

The cause is a dual-package interop change rather than anything in our code.
In 1.9.1 the UMD factory ended with "return e = e.default", so module.exports
was the Pickr class itself; Babel's _interopRequireDefault saw no __esModule
marker, wrapped it, and _pickr.default was the constructor. In 1.10.1 the
factory instead returns a namespace object carrying a default getter, still
without an __esModule marker, so the wrapper nests it one level deeper and
_pickr.default is that namespace object:

  TypeError: _pickr.default is not a constructor
      at initPickr (pgadmin/static/js/helpers/withColorPicker.js:69)

Nothing in the JS unit tests, eslint or the webpack build can see this,
because it only fails when the component mounts, which is why the bump went in
with a green board and only the feature tests caught it.

Moving to 1.10.1 later is perfectly possible, but it needs the import in
withColorPicker.js adapted to the new shape, and it must be validated by
opening a dialog rather than by a green Jest run.
2026-08-17 10:22:50 +01:00
dependabot[bot] 34dba57409 Javascript dependency: Bump @simonwep/pickr from 1.9.1 to 1.10.1 in /web (#10264)
Bumps [@simonwep/pickr](https://github.com/simonwep/pickr) from 1.9.1 to 1.10.1.
- [Release notes](https://github.com/simonwep/pickr/releases)
- [Commits](https://github.com/simonwep/pickr/compare/1.9.1...v1.10.1)

---
updated-dependencies:
- dependency-name: "@simonwep/pickr"
  dependency-version: 1.10.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 13:12:02 +01:00
dependabot[bot] 6fac4f0cbe Javascript dependency: Bump eslint from 10.8.0 to 10.8.1 in /runtime (#10260)
Bumps [eslint](https://github.com/eslint/eslint) from 10.8.0 to 10.8.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.8.0...v10.8.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.8.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 13:08:56 +01:00
dependabot[bot] 12830a7be8 Python dependency: Update setuptools requirement from ==83.* to ==84.* (#10261)
Updates the requirements on [setuptools](https://github.com/pypa/setuptools) to permit the latest version.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v83.0.0...v84.0.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-version: 84.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 13:08:31 +01:00
dependabot[bot] 1b48d616f9 Javascript dependency: Bump @testing-library/user-event in /web (#10262)
Bumps [@testing-library/user-event](https://github.com/testing-library/user-event) from 14.6.1 to 14.6.3.
- [Release notes](https://github.com/testing-library/user-event/releases)
- [Changelog](https://github.com/testing-library/user-event/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/user-event/compare/v14.6.1...v14.6.3)

---
updated-dependencies:
- dependency-name: "@testing-library/user-event"
  dependency-version: 14.6.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 13:08:22 +01:00
dependabot[bot] 39a56a1074 Python dependency: Update cryptography requirement (#10263)
Updates the requirements on [cryptography](https://github.com/pyca/cryptography) to permit the latest version.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/49.0.0...50.0.0)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 50.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 13:08:19 +01:00
dependabot[bot] 6de909b2d5 Javascript dependency: Bump globals from 17.8.0 to 17.9.0 in /runtime (#10259)
Bumps [globals](https://github.com/sindresorhus/globals) from 17.8.0 to 17.9.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.8.0...v17.9.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.9.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 12:04:02 +01:00
dependabot[bot] 1908d468f1 Javascript dependency: Bump electron from 43.2.0 to 43.3.0 in /runtime (#10258)
Bumps [electron](https://github.com/electron/electron) from 43.2.0 to 43.3.0.
- [Release notes](https://github.com/electron/electron/releases)
- [Commits](https://github.com/electron/electron/compare/v43.2.0...v43.3.0)

---
updated-dependencies:
- dependency-name: electron
  dependency-version: 43.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 12:03:59 +01:00
Flipper 9cd0e35f47 Add backendRefs group and kind to httproute.yaml (#10222) 2026-08-14 11:34:31 +01:00
Martin Manka 3cb33475ec Helm Chart: Add existingClaim to persistence (#10230) 2026-08-14 11:33:39 +01:00
byshyandCursor e6e35bb4c4 fix(pkg): remove trailing quote from Windows ProductVersion (#10250)
rcedit was passed "%APP_VERSION%"", which stamped ProductVersion as
e.g. 9.17" on Windows installer builds.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 11:31:43 +01:00
dependabot[bot] 1dd4d00246 Javascript dependency: Bump ip-address from 10.2.0 to 10.3.1 in /web (#10225)
Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.2.0 to 10.3.1.
- [Release notes](https://github.com/beaugunderson/ip-address/releases)
- [Commits](https://github.com/beaugunderson/ip-address/compare/v10.2.0...v10.3.1)

---
updated-dependencies:
- dependency-name: ip-address
  dependency-version: 10.3.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:27:59 +01:00
Dave Page 9338129183 chore: stop Dependabot proposing major paramiko bumps (#10257)
paramiko 5.0 removed DSSKey entirely, whilst sshtunnel 0.4.0 still refers to
paramiko.DSSKey in SSHTunnelForwarder.get_keys(), which _consolidate_auth()
calls from the constructor. A major bump therefore does not merely drop DSA
key support, it raises AttributeError before any SSH tunnelled connection can
be established, and nothing in CI covers SSH tunnels so it looks green.
sshtunnel has had no release since 0.4.0 in 2019, so there is nothing newer to
move to on that side.

Ignore major paramiko updates until sshtunnel is fixed or replaced. The
exclusion is repeated under the /web/regression entry because
web/regression/requirements.txt starts with "-r ../../requirements.txt", so
that entry sees the root pins too.
2026-08-14 11:26:51 +01:00
dependabot[bot] 2d989238a4 Javascript dependency: Bump tar from 7.5.16 to 7.5.21 in /web (#10182)
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.16 to 7.5.21.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.16...v7.5.21)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.21
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:21:06 +01:00
dependabot[bot] aa16a12182 Javascript dependency: Bump shell-quote from 1.8.4 to 1.10.0 in /web (#10185)
Bumps [shell-quote](https://github.com/ljharb/shell-quote) from 1.8.4 to 1.10.0.
- [Changelog](https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/shell-quote/compare/v1.8.4...v1.10.0)

---
updated-dependencies:
- dependency-name: shell-quote
  dependency-version: 1.10.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:21:03 +01:00
dependabot[bot] d9635cd2cd Javascript dependency: Bump svgo-loader from 4.0.0 to 5.0.0 in /web (#10207)
Bumps [svgo-loader](https://github.com/svg/svgo-loader) from 4.0.0 to 5.0.0.
- [Release notes](https://github.com/svg/svgo-loader/releases)
- [Commits](https://github.com/svg/svgo-loader/compare/v4.0.0...v5.0.0)

---
updated-dependencies:
- dependency-name: svgo-loader
  dependency-version: 5.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:21:00 +01:00
dependabot[bot] 904bb2e1e2 Javascript dependency: Bump anti-trojan-source in /web (#10211)
Bumps [anti-trojan-source](https://github.com/lirantal/anti-trojan-source) from 1.12.0 to 1.12.1.
- [Release notes](https://github.com/lirantal/anti-trojan-source/releases)
- [Changelog](https://github.com/lirantal/anti-trojan-source/blob/main/RELEASE.md)
- [Commits](https://github.com/lirantal/anti-trojan-source/compare/v1.12.0...v1.12.1)

---
updated-dependencies:
- dependency-name: anti-trojan-source
  dependency-version: 1.12.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:56 +01:00
dependabot[bot] 02c8b3748e Javascript dependency: Bump brace-expansion in /web (#10220)
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.16 to 1.1.18.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/commits)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.18
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:53 +01:00
dependabot[bot] 6696db11be Javascript dependency: Bump socket.io-parser from 4.2.6 to 4.2.7 in /web (#10229)
Bumps [socket.io-parser](https://github.com/socketio/socket.io) from 4.2.6 to 4.2.7.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/socket.io-parser@4.2.6...socket.io-parser@4.2.7)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-version: 4.2.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:50 +01:00
dependabot[bot] 109706d8f8 Javascript dependency: Bump fast-uri from 3.1.4 to 3.1.5 in /web (#10232)
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.4...v3.1.5)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:47 +01:00
dependabot[bot] 8cc69cf71c Javascript dependency: Bump dompurify from 3.4.12 to 3.4.13 in /web (#10241)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.4.12 to 3.4.13.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.4.12...3.4.13)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.4.13
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:43 +01:00
dependabot[bot] 1a87ee14d9 Javascript dependency: Bump js-yaml from 3.15.0 to 3.15.1 in /web (#10244)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.15.0 to 3.15.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/3.15.1/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.15.0...3.15.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 3.15.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:39 +01:00
dependabot[bot] 73c5e01309 Javascript dependency: Bump postcss from 8.5.21 to 8.5.23 in /web (#10246)
Bumps [postcss](https://github.com/postcss/postcss) from 8.5.21 to 8.5.23.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.5.21...8.5.23)

---
updated-dependencies:
- dependency-name: postcss
  dependency-version: 8.5.23
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:35 +01:00
dependabot[bot] 1cca96b62c Javascript dependency: Bump eslint from 10.7.0 to 10.8.0 in /runtime (#10204)
Bumps [eslint](https://github.com/eslint/eslint) from 10.7.0 to 10.8.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.7.0...v10.8.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.8.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:31 +01:00
dependabot[bot] 74687c9ddf Javascript dependency: Bump brace-expansion in /runtime (#10219)
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 5.0.7 to 5.0.9.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v5.0.7...v5.0.9)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 5.0.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:28 +01:00
dependabot[bot] 0d6973c042 Javascript dependency: Bump globals from 17.7.0 to 17.8.0 in /runtime (#10223)
Bumps [globals](https://github.com/sindresorhus/globals) from 17.7.0 to 17.8.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.7.0...v17.8.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.8.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:25 +01:00
dependabot[bot] 0b9fb6fc06 Javascript dependency: Bump axios from 1.18.1 to 1.19.0 in /runtime (#10224)
Bumps [axios](https://github.com/axios/axios) from 1.18.1 to 1.19.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.18.1...v1.19.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:21 +01:00
dependabot[bot] 60d4dd8c5a Javascript dependency: Bump undici from 7.28.0 to 7.29.0 in /runtime (#10227)
Bumps [undici](https://github.com/nodejs/undici) from 7.28.0 to 7.29.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v7.28.0...v7.29.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 7.29.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:18 +01:00
dependabot[bot] df7c256b53 Javascript dependency: Bump fast-uri from 3.1.4 to 3.1.5 in /runtime (#10231)
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.4...v3.1.5)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:12 +01:00
dependabot[bot] db7cbc7900 Python dependency: Update typer requirement from ==0.26.* to ==0.27.* (#10203)
Updates the requirements on [typer](https://github.com/fastapi/typer) to permit the latest version.
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.26.0...0.27.0)

---
updated-dependencies:
- dependency-name: typer
  dependency-version: 0.27.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:08 +01:00
dependabot[bot] aac7d33441 Python dependency: Bump certifi from 2026.6.17 to 2026.7.22 (#10205)
Bumps [certifi](https://github.com/certifi/python-certifi) from 2026.6.17 to 2026.7.22.
- [Commits](https://github.com/certifi/python-certifi/compare/2026.06.17...2026.07.22)

---
updated-dependencies:
- dependency-name: certifi
  dependency-version: 2026.7.22
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:05 +01:00
dependabot[bot] 9e0a847410 Python dependency: Bump selenium in /web/regression (#10206)
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.45.0 to 4.46.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.45.0...selenium-4.46.0)

---
updated-dependencies:
- dependency-name: selenium
  dependency-version: 4.46.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 11:20:02 +01:00
Dave Page 35d68c47eb fix: follow Flask-Security-Too 5.8.2's corrected is_locked() semantics (#10256)
Flask-Security-Too 5.8.2, released on 12 August 2026, fixed a long-standing
inversion in its login forms: `LoginForm.validate()` previously read a `True`
return from `UserMixin.is_locked()` as "not locked, carry on", and the base
implementation unconditionally returned `True`. Our `User.is_locked()` was
written against that inverted convention, so as soon as CI began resolving
5.8.2 through the loose `Flask-Security-Too==5.8.*` pin, an unlocked user
returned `True`, form validation failed, the login POST redirected with a 302
and every subsequent request arrived as `AnonymousUser`. The server-mode data
isolation tests caught it, though the breakage is not limited to tests: on
5.8.2 nobody could log in at all.

`User.is_locked()` now returns `True` when the account is locked, matching the
corrected upstream contract, and the dependency is floored at 5.8.2 so that we
cannot silently resolve a release which reads the value backwards. The two
conventions are mutually exclusive, hence a floor rather than a version check
in the model. The regression tests are updated to assert the fixed contract.
2026-08-14 11:17:09 +01:00
Dave Page 6487f2a93f Add support for Python 3.14 (#10255)
Python 3.14 is now supported, so add the trove classifier for it to the
pip packaging metadata and move the desktop builds onto it: the macOS
bundle now defaults to 3.14.7, and the Windows build looks for an
interpreter in C:\Python314 by default, with both build READMEs updated
to match. The minimum supported version is unchanged at 3.9.

Whilst here, the SonarQube scanner's Python compatibility list had drifted
somewhat, still naming 3.7 and 3.8 and stopping at 3.11, so it has been
brought into line with the versions we actually support.
2026-08-14 11:16:25 +01:00
Ashesh Vashi 067f7af227 revert(pkg): back out all _fixup_imports path-handling attempts
pkg/mac/build-functions.sh reverted to bd841b882's state - keeps the
notarization diagnostic fix (print REQUEST_STATUS + fetch notarytool
log on failure), drops everything from 0296de48e through 6891b5e12.

Five iterations trying to fix _fixup_imports's otool handling of
"pgAdmin 4 Helper (GPU)" (newline-based path list, otool-classic
fallback via bare name, via resolved absolute path, absolute-path
retries for otool/install_name_tool) all failed to get the appbundle
build past this file. Confirmed along the way: the path itself is
byte-for-byte correct and the file verifiably exists at the moment
otool runs (od -c / ls -la evidence from a live buildfarm run); both
otool and otool-classic, called directly with correct quoting and a
resolved absolute path, still fail identically on it. That's a real
bug/limitation in Apple's tooling on this build node, not fixable by
further changes to how this script constructs or passes the path.

Reverting rather than continuing to guess. The stale nspkg.pth /
--system-site-packages fix in pkg/linux/build-functions.sh (verified
working, pgadmin4-rpm-build #180 succeeded) is untouched by this.
2026-07-30 12:30:49 +05:30
Ashesh Vashi 6891b5e12f fix(pkg): retry otool/install_name_tool with absolute path before giving up
pgadmin4-appbundle-build #116 (macos-arm64) failed even with
otool-classic invoked directly via its real resolved path
(669c2f244's fix) - identical error, byte-for-byte, to calling plain
`otool -L`:

  can't open file: .../pgAdmin 4 Helper  (No such file or directory)

That rules out PATH resolution and otool's internal re-exec dispatch
as the cause too. Both otool -L and otool-classic -L, invoked directly
with correct argv quoting and a verified-correct, verified-present
path, fail identically on this one binary. Whatever's actually broken
is inside these tools' own handling of "(" in a path they're given.

Untested variable so far: this script pushd's into the bundle dir and
passes relative paths ("./Contents/...") throughout. Try a plain
absolute path with each tool before falling back to the diagnostic
dump - cheap to test, and applies equally to the two
`install_name_tool -change` calls further down that edit this same
file in place, since they could hit the identical issue.

Still not proven - if this also fails, the diagnostic dump (retained
as final fallback) will at least confirm parens themselves are the
blocker regardless of path form, which would mean sidestepping via a
temporary parens-free symlink is the next thing to try.
2026-07-30 12:10:59 +05:30
Ashesh Vashi 669c2f2442 fix(pkg): resolve otool-classic's real path, bare name isn't on PATH
pgadmin4-appbundle-build #115 (macos-arm64) failed even with the
otool-classic fallback from 2d17e9e15:

  otool-classic output: .../build-functions.sh: line 260:
    otool-classic: command not found

otool-classic only exists inside the active Xcode toolchain
(/Applications/Xcode.app/.../XcodeDefault.xctoolchain/usr/bin/
otool-classic - the exact path visible in otool's own internal error
message), not as a bare command on $PATH. The previous fallback never
actually tested whether the real otool-classic binary can open the
file - it just failed on a missing command.

Resolve the real path via `xcrun -f otool-classic` (falling back to
deriving it from `xcode-select -p` if xcrun's lookup is unavailable)
and invoke that directly.

Not yet verified against a real buildfarm run.
2026-07-30 12:01:52 +05:30
Ashesh Vashi 2d17e9e15d fix(pkg): retry via otool-classic directly, now with hard evidence
pgadmin4-appbundle-build #114 (macos-arm64) failed on the same
"pgAdmin 4 Helper (GPU)" binary as before, but this time the
diagnostics from d4364555a actually ran and proved the path itself is
not the problem:

  Raw bytes of the path (od -c): plain ASCII throughout, single
  spaces, no non-breaking/unicode look-alikes, no trailing garbage.
  ls -la of the exact path: file exists, correct size/perms,
  timestamped seconds before otool ran - not a race condition either.

otool -L still failed via its internal otool-classic re-exec on that
exact, verified-correct, verified-present file. That's conclusively a
bug in otool's own internal dispatch, not anything this script builds
or passes to it - we can't fix Apple's tool, but we can avoid
triggering its broken code path.

Retry via `otool-classic -L "${TODO_OBJ}"` called directly (our own
argv-based quoting, not otool's internal re-exec, whatever that does
differently) when the initial `otool -L` fails. Every other binary in
the bundle keeps going through plain `otool -L` unchanged - this only
engages for the specific case that's already failing anyway. The
diagnostic dump (od -c / ls -la / otool-classic's own output) is kept
as the final fallback in case even the direct call fails too.

Not yet verified against a real buildfarm run.
2026-07-30 11:55:29 +05:30
Ashesh Vashi d4364555ae fix(pkg): diagnostics never ran - set -e ate the failure before $? check
pgadmin4-appbundle-build #113 (macos-arm64) failed again on the same
otool -L call, but none of the diagnostic output from 401afbfa3 showed
up. Instead:

  The command "OTOOL_OUTPUT=$(otool -L "${TODO_OBJ}" 2>&1)" failed in
  "_fixup_imports" with exit code 1.

That's this script's own ERR trap firing on the assignment statement
itself. Under set -e, `VAR=$(cmd)` still propagates cmd's non-zero
exit to the trap immediately - the previous diagnostic's separate
`OTOOL_STATUS=$?` line right after never got a chance to run, so
nothing was ever printed, same as the original bare failure.

Move the assignment into the condition of the `if` itself
(`if ! OTOOL_OUTPUT=$(...); then`) - bash explicitly exempts a
command being tested by if/while/until (or negated with !) from
errexit, so this time the diagnostic block will actually execute.

Still not verified - watching the next buildfarm run.
2026-07-30 11:28:36 +05:30
Ashesh Vashi 401afbfa31 fix(pkg): add diagnostics for otool -L failures instead of guessing
pgadmin4-appbundle-build #112 (macos-arm64) failed with otool-classic
unable to open a path that our own logging showed as correct
immediately beforehand ("pgAdmin 4 Helper (GPU)"). Rather than work
around it blindly (an otool-classic fallback was tried and reverted -
unverified, and risks masking a real problem instead of fixing it),
capture real evidence the next time this happens:

- raw byte dump (od -c) of ${TODO_OBJ} right before otool runs, and
  again on failure - catches non-ASCII or invisible whitespace that
  a plain `echo` can't show
- ls -la of the exact path and its containing directory on failure -
  confirms whether the file actually exists at that exact moment
  (rules out/in a race with something still writing it)
- otool's actual stdout/stderr and exit code, instead of letting its
  own error text be the only signal

No fallback behavior - fails loudly (exit 1) with this diagnostic
dump so we can tell what's actually happening from the next real
buildfarm run instead of speculating further.
2026-07-30 11:20:38 +05:30
Ashesh Vashi 0296de48ee fix(pkg): _fixup_imports truncates paths with spaces, breaking otool
pgadmin4-appbundle-build #110 (macos-x64) failed with:
  error: otool-classic: can't open file: ./Contents/Frameworks/pgAdmin
  error: otool-classic: can't open file: ./Contents/Frameworks/Electron

_fixup_imports built its worklist with `awk -F':| '`, a regex
alternation that splits on a literal ':' OR any bare space. `file`'s
actual output format is "path: description" (colon-space as one
token), so any space *inside* the path itself - "pgAdmin 4 Helper
(Plugin).app", "Electron Framework.framework", both routine in macOS
app bundles - also got treated as a split point, truncating $1 to
whatever preceded the first space.

The resulting list was then joined with a single space (ORS=" ") and
iterated via an unquoted `for x in $list`, which word-splits on
spaces again - doubly ambiguous between a path's own spaces and the
list's separator, unrecoverable however it's parsed.

Fix: split only on the literal ": " token file emits (`awk -F': '`,
not `-F ':| '`), and switch the whole worklist to newline-separated
instead of space-separated, iterated with `while IFS= read -r`
instead of `for x in $unquoted_list`, at both the outer (executable)
level and inner (library-copy) level (`TODO="${TODO}"$'\n'"..."`).

Not yet verified against a real buildfarm run - can't reproduce the
macOS codesigning environment locally. Watching the next
pgadmin4-appbundle-build run.
2026-07-30 09:48:03 +05:30
Ashesh Vashi 689c969f95 fix(pkg): stop using --system-site-packages, use a scoped .pth instead
The previous fix (bd841b882) tried to delete the specific broken
sphinxcontrib-jsmath nspkg.pth file from the system site-packages
before creating the venv. It didn't work: pgadmin4-rpm-build #177
failed identically on el-10. The delete silently no-opped - that
directory is root-owned on the build node and the build user doesn't
have write access there, so `find -delete` failed while `-print` (which
runs first) still logged the match, making the fix look like it ran.

Root cause is the --system-site-packages flag itself: it uses Python's
site.addsitedir() internally, which does not just add a directory to
sys.path - it also scans that directory for every *.pth file and
executes any "import ..." lines found in them. That's what runs the
broken nspkg.pth's stale namespace-package bootstrap code and corrupts
sys.path before core stdlib resolves, breaking pip's own subprocess.

We only need --system-site-packages for OS-provided packages that
don't have reliable pip wheels (e.g. dbus-python, a hard runtime
dependency per pkg/debian/build.sh's python3-dbus dep, needs
libdbus-1-dev to build from source). A *plain path line* (no "import")
in a .pth file only appends that directory to sys.path - it does not
trigger a further .pth scan of it. So: create the venv without
--system-site-packages, then write the system site-packages
directories as plain lines into a .pth file inside the venv's own
site-packages (which the build user does own). Same OS-package
availability, without ever asking Python to treat the system directory
as a site directory - the broken nspkg.pth is simply never read.

Not yet verified against a real buildfarm run - can't reproduce the
el-10 environment locally. Watching the next pgadmin4-rpm-build run.
2026-07-30 09:36:44 +05:30
Ashesh Vashi bd841b8827 fix(pkg): surface real notarization failures, guard against stale nspkg.pth in venv
macOS build (build-functions.sh): _notarize_pkg only printed
"Notarization failed." on rejection, giving no indication why. Print
the actual REQUEST_STATUS and fetch the full notary log via
`notarytool log` so future failures are actually diagnosable from the
Jenkins console instead of just "status: Invalid".

Linux build (build-functions.sh): _create_python_virtualenv creates
venvs with --system-site-packages, which pulls in the entire system
site-packages dir - including any stale, improperly-uninstalled
package's namespace-package .pth hook. That legacy pip/setuptools
mechanism runs at interpreter startup, before core stdlib is
guaranteed to resolve; a leftover sphinxcontrib-jsmath nspkg.pth on
the el-10 build node corrupted sys.path early enough to break pip's
own subprocess bootstrap, failing the whole build with a misleading
"No module named 'importlib'"/"'traceback'" error
(pgadmin4-rpm-build #176). Remove that exact known-broken file before
creating the venv - not every *-nspkg.pth, since this touches the
*system* Python install on a build node shared by other jobs, and any
other such file could still be load-bearing for something unrelated.
--system-site-packages itself is left untouched - it's required so
venvs can see OS-provided packages not available as clean pip wheels
on every target platform.
2026-07-30 09:21:22 +05:30
Ashesh Vashi 3f99454199 fix: unbound keyring probe at config-import time can hang desktop startup
evaluate_and_patch_config() called keyring.get_password() synchronously
at `import config` time to detect a selected-but-unusable OS keyring
backend. On Debian 13 (and similar headless/RDP sessions with no live
D-Bus/GNOME-Keyring session), that call - and even the keyring import
itself - can block forever, freezing the whole desktop app before it
ever starts.

Revert evaluate_config.py to the pre-9.17 synchronous check (backend
name only, no get_password call). Move the usability probe into
pgadmin.utils.keyring_probe, run from create_app() in a background
daemon thread so it never delays startup, isolated in its own process
via subprocess.Popen(sys.executable, '-c', ...) so a hang can actually
be killed - a thread-only timeout can't do this, it would leave
CPython's per-module import lock held forever and wedge any later
`import keyring` in the parent process too.

subprocess.Popen (plain fork+exec), not multiprocessing.Process, is
required here: create_app() runs at the top level of pgAdmin4.py while
it's still being imported, and multiprocessing's spawn start method
refuses to start a child before the current process finishes
bootstrapping its __main__ module. An earlier version of this fix used
multiprocessing and crashed the probe thread with RuntimeError on every
single test run, which corrupted the SQLAlchemy/sqlite session for the
rest of app init and surfaced as an unrelated-looking "attempt to write
a readonly database" error on module_preference inserts.

config.USE_OS_SECRET_STORAGE is only ever read from request handlers
requiring an authenticated session, never at import time or inside
create_app() itself, so the async resolution race is safe in practice.

Tests mock subprocess.Popen for the timeout/kill/config-fallback
orchestration (deterministic, no real 3s wait or backend dependency),
plus one test class that runs the real probe script in a real
subprocess against a fake keyring module injected via PYTHONPATH, so
the script body itself has real coverage.

Verified with the full regression suite (--exclude feature_tests) in
both desktop mode (2134 passed, 0 failed) and server mode (2251
passed, 0 failed); remaining skips are pre-existing pgAgent-dependent
job tests.
2026-07-30 00:00:33 +05:30
Ashesh Vashi 6e029ab6e5 docs: correct reporter credit for #10193/#10194 to full name
Hung Tran Quoc (GitHub handle @rampage0010) — release notes only
listed the given name.
2026-07-28 12:40:25 +05:30
Ashesh Vashi ee7109d400 Updated version for release v9.17 2026-07-28 12:08:09 +05:30
Ashesh Vashi 78f7a5f6ab test: restore app.PGADMIN_EXTERNAL_AUTH_SOURCE in auth-mocking tearDown
Each of the Kerberos/LDAP/OAuth2/webserver login-mocking test classes
sets self.app.PGADMIN_EXTERNAL_AUTH_SOURCE (the Flask app instance
attribute before_request() actually reads) in setUp, but tearDownClass
only restored app_config.PGADMIN_EXTERNAL_AUTH_SOURCE -- a different
object (the config module). Whichever of these classes ran last
(test_webserver_with_mocking, alphabetically) left the live app
attribute stuck at WEBSERVER for the rest of the suite, making
before_request() route every subsequent unauthenticated /login request
through authenticate.login()'s webserver auto-auth path instead of
rendering the login form -- surfacing as an unrelated CSRF-harvest
failure in test_close_requires_auth much later in the run.

Full server-mode regression: 2507 tests, 0 failures/errors (was 2).
2026-07-28 11:07:37 +05:30
Ashesh Vashi 689d200e9f test: fix server-mode test-harness bugs found running the full suite
get_test_user() created secondary test clients via app.test_client()
but never called setApp() on them, so any test using a second user
crashed with 'NoneType has no attribute config' the first time it
needed to fetch a CSRF token (44 errors in a full server-mode run).

TestSqlEditorCloseRequiresAuth.setUp() logs out the shared
class-level tester before asserting a CSRF token was harvested; when
that assertion failed, unittest skipped tearDown() entirely (by
design, tearDown only runs if setUp succeeds), leaving the tester
logged out for the rest of the suite and cascading into 188 unrelated
failures. Switched to addCleanup(), which always runs.

Full server-mode regression: 2507 tests, was 232 failures/errors,
now 2 (both isolated to this same test's own CSRF-harvest timing in
full-suite order, unrelated to these two fixes).
2026-07-28 10:12:18 +05:30
Ashesh Vashi 339b4f9cd3 Merge branch 'cve-9.17-rebase' into master 2026-07-28 09:12:21 +05:30
Domenico Sgarbossa 5fc319551d Updated message catalogs for v9.17 (#10212) 2026-07-28 09:00:14 +05:30
Ashesh Vashi 9ef9a7136f docs: add 9.17 release notes for CVE-2026-17346 through 17351, 17566
Adds bug-fix bullets for issues #10190-10194, #10200 (previously
assigned CVE-2026-17346..17351) and #10213 (CVE-2026-17566, the
import/export \copy backslash-escape RCE reported by Arpit Jain).
2026-07-28 08:56:41 +05:30
Ashesh Vashi 1496fabe28 fix(security): reject ambiguous backslash-escape in import/export query guard
_is_query_parens_balanced() always treated \' inside a single-quoted
string as an escaped quote, matching psql only when
standard_conforming_strings=off. Under the actual default (scs=on,
every supported PostgreSQL version), psql treats \ as a literal
character, so 'a\' closes the string right there. A crafted query
export payload like SELECT 'a\') TO PROGRAM 'cmd' x' passed the
balance check while the real ) it hid closed the wrapping \copy (...)
context in psql, exposing a live TO PROGRAM clause for RCE.

Since the correct interpretation depends on a server setting we
can't reliably know, reject any backslash inside a single-quoted
string outright instead of guessing.

Reported by Arpit Jain (arpitjain099).
2026-07-27 19:04:29 +05:30
Kundan ef76102bcd fix(llm): close lexer-differential bypass in AI Assistant read-only guard
sqlparse's string-literal lexing can disagree with PostgreSQL's: under
standard_conforming_strings = on (the default), a backslash before a
quote is an ordinary character to PostgreSQL but sqlparse treats it as
escaping the quote, so a payload like
SELECT '\';COMMIT;CREATE TABLE pwn(x int);SELECT 1 --'
passes _validate_readonly_query as a single SELECT while PostgreSQL
executes it as four statements -- the smuggled COMMIT ends the wrapping
BEGIN TRANSACTION READ ONLY and the trailing ROLLBACK is a no-op,
reintroducing the write/RCE bypass the bf47924444 fix was meant to
close (reported by Kai Aizen / SnailSploit).

Run the LLM-supplied query with prepare=True, forcing psycopg3's
extended query protocol. PostgreSQL's own Parse step -- not a
client-side approximation of it -- rejects any text containing more
than one statement, independent of how it's lexed. Threaded through
execute_2darray as an opt-in parameter (default None) so no other
caller's behavior changes. Also set SESSION CHARACTERISTICS AS
TRANSACTION READ ONLY as defense-in-depth against a smuggled COMMIT.

prepare=True alone is not sufficient: psycopg3's PrepareManager.get()
returns Prepare.NO -- checked before it even inspects the prepare
argument -- whenever the connection's prepare_threshold is None, which
is pgAdmin's per-server default ("Prepare threshold" is blank unless an
administrator sets it). On a default-configured server the extended
protocol never actually engaged, so the bypass stayed live. Force
prepare_threshold=0 on the LLM's single-use connection in
_connect_readonly() so the extended protocol -- and PostgreSQL's
single-statement Parse-step guarantee -- is unconditional on this
connection, without touching the server-wide setting or any other
session/caller.

Adds regression coverage at three levels: unit tests pinning that
prepare=True is always passed and that prepare_threshold=0 is forced
on the connection; and an end-to-end test driving the real
/sqleditor/nlq/chat/<trans_id>/stream route (LLM client mocked, real
tool-dispatch path) with the exact smuggled-COMMIT payload, confirming
the guarantee holds from the HTTP entry point down to the driver call.
2026-07-27 16:51:46 +05:30
Ashesh Vashi 2b4307f321 feat: add system-wide default for Geometry Viewer custom tile provider (#10198)
Follow-up to #10142. Geometry Viewer's custom tile provider was only
configurable per-user (Preferences), with no way for an administrator
to set an organization-wide default (e.g. an internal tile server)
that applies out of the box for every user.

config.DEFAULT_GEOMETRY_VIEWER_PROVIDER is a plain dict; the five
custom_tile_* preference defaults (url, name, crs, attribution,
max_zoom) are sourced from it instead of hardcoded literals.
Preference.get() only reads a per-user DB row if the user has
explicitly saved one, otherwise it falls back to this default --
override semantics, one active provider, no naming-conflict surface.

config_local.py/config_distro.py/PGADMIN_CONFIG_* replace this config
variable wholesale, not merged key-by-key, so a naive
DEFAULT_GEOMETRY_VIEWER_PROVIDER['name'] lookup would KeyError-crash
preference registration (and app startup) on any partial admin
override, or AttributeError on a wrong-typed value.
resolve_geometry_viewer_provider_defaults() guards against this:
falls back per-field on missing/wrong-type values, validates crs
against the 3 supported choices, validates max_zoom is a non-bool int
in [0, 25], degrading to the original hardcoded defaults instead of
crashing.

No new attacker-reachable surface: DEFAULT_GEOMETRY_VIEWER_PROVIDER is
filesystem/deployment-level admin config, same trust boundary as
DEFAULT_BINARY_PATHS/OAUTH2_CONFIG. Existing DOMPurify sanitization on
name/attribution and the http(s):// + {x}/{y}/{z} URL validation in
GeometryViewerUtils.js (from #10142) apply uniformly to config-sourced
and per-user values alike.

Adds test_geometry_viewer_provider_defaults.py (9 scenarios: fully
valid, partial override, non-dict, invalid CRS, out-of-range/non-int/
bool max_zoom, non-string fields, empty dict).
2026-07-27 16:07:17 +05:30
Kundan Sable 362c202b25 fix: close remaining front-door-only tool-RBAC gaps (tools_ai, import_export_servers, search_objects, change_password)
Extends the tool-RBAC fix (permission enforced only on a blueprint's
"front door" route, with the rest relying on @pga_login_required alone)
to four permission types the original fix didn't cover:

* tools_ai ("AI Reports"): none of the 14 Security/Performance/Design
  report routes in the llm blueprint checked this permission at all --
  only the frontend menu was hidden behind AllPermissionTypes.TOOLS_AI
  (llm/static/js/ai_tools.js). A user an admin had denied AI access to
  could call the report/report-stream routes directly and have real
  server/database/schema content sent to whichever external LLM
  provider is configured, bypassing both the access control and the
  data-exposure/cost boundary the permission exists to enforce.
* tools_import_export_servers: only 'save' was gated; 'get_servers' and
  'load_servers' relied on @pga_login_required alone. Lower impact than
  the above: get_servers only returns the calling user's own servers,
  and load_servers only previews an already-uploaded file without
  persisting (the actual write stays gated at 'save').
* tools_search_objects: only 'search' was gated; 'types' (a static list
  of supported object-type names for the dropdown, no DB content) was
  not.
* change_password: the self-service password-change route
  (browser.change_password) never checked this permission, so revoking
  "Change Password" from a role in Role management had no effect --
  users under that role could still change their own password. Lower
  severity than the others since the route is inherently self-scoped
  (can only ever affect the caller's own password).

Extends tools/tests/test_tool_permissions_required.py with 17 new
scenarios for the first three, and adds a dedicated
browser/tests/test_change_password_permission_required.py for the last
(different blueprint, different permission category).

Verified against a live PostgreSQL server in SERVER mode: all 40
scenarios (37 + 3) pass with the fix applied. Negative control:
reverting the four fixes reproduces exactly the reported gaps -- 17 of
the 20 pre-existing scenarios still pass unaffected, the 17 new ones
fail, and change_password returns 200 instead of 403 -- confirming the
tests actually catch the regression rather than passing vacuously.
2026-07-27 05:28:57 +00:00
Ashesh Vashi 84b93c268d chore(deps): consolidated dependency bumps (setuptools, fast-uri, tar, shell-quote, svgo) (#10199)
Supersedes 7 open Dependabot PRs by applying the safe ones and
properly fixing the one with a broken lockfile, in one CI cycle:

- setuptools ==82.* -> ==83.* (#10144, #10145 - duplicate PRs, same
  patch). Only touches the `python_version > '3.9'` line; the
  `<82; python_version <= '3.9'` gate for Python 3.9 is untouched,
  so this doesn't affect Python 3.9 support.
- fast-uri 3.1.2 -> 3.1.4 in both /web and /runtime (#10183, #10195)
  - fixes two real CVEs (GHSA-v2hh-gcrm-f6hx, GHSA-4c8g-83qw-93j6).
- tar 7.5.16 -> 7.5.21 (#10182) - patch series, decompression-bomb
  and unbounded-recursion hardening only.
- shell-quote 1.8.4 -> 1.10.0 (#10185) - additive opt-in option +
  parser fixes, no breaking changes.
- svgo 3.3.3 -> 4.0.2 (#10184) - Dependabot's own PR left yarn.lock
  internally inconsistent (dropped the workspace-level `svgo` entry
  while merging version-range blocks), so `yarn install --immutable`
  failed in CI with "the lockfile would have been modified by this
  install". Regenerated properly via `yarn up`/`yarn dedupe` here.
  The direct `svgo`/`svgo-loader` deps are not actually wired into
  any webpack rule (verified via grep) - the real SVG pipeline is
  `@svgr/webpack` -> `@svgr/plugin-svgo` -> svgo 3.3.3, which this
  bump does not touch - so the major version jump has no build
  impact. `yarn.lock` now correctly keeps that separate 3.3.3
  resolution alongside the deduped 4.0.2 one.

Not included (structurally blocked, tracked separately):
- paramiko 3.5.1 -> 5.0.0 (#9927): paramiko 5 removes DSSKey
  entirely; sshtunnel 0.4.0 (dormant since 2021) still references
  paramiko.DSSKey, so `import sshtunnel` would crash immediately.
- pywinpty 2.0.* -> 3.0.* (#10082, #10084): the existing pin cites
  https://github.com/andfoy/pywinpty/issues/545, confirmed still
  open ("process read and write not working as expected in 3.x").

Verified: `yarn install --immutable` clean in both /web and
/runtime, `yarn run linter` clean, full `yarn run bundle:dev`
compiles successfully.
2026-07-25 01:46:48 +05:30
Ashesh Vashi 1e7407bbf6 Merge remote-tracking branch 'origin/master' into cve-9.17-rebase 2026-07-25 01:04:16 +05:30
Ashesh Vashi 9bcc0ff8de docs: fix RST emphasis error in v9.17 release notes
Trailing "SELECT *" broke sphinx's inline emphasis parser (bare *
without matching close), failing the macOS appbundle docs build.
2026-07-25 01:02:36 +05:30
Kundan Sable f75452bfd0 test(security): behavioral regression test for name-literal SQL escaping
Add test_name_literal_sql_escaping.py covering the templates fixed in the
CVE-2026-12044 follow-up: index Statistics (coll_stats.sql, both
dialects), publications (pg + ppas), and subscriptions dependency/
get-position lookups.

Each scenario renders the real template with a stacked-statement
apostrophe payload and asserts (1) the object name appears exactly as
qtLiteral escapes it and (2) the rendered SQL parses as exactly one
statement -- the property that actually prevents statement smuggling.
Verified the semantic assertion fails on the pre-patch raw-interpolation
form (parses as 2 statements) and passes on the fixed form, so the test
genuinely guards the fix rather than trivially passing.

Complements test_stats_template_regclass_cast.py (single-index
pgstatindex path) and the lint guard in test_sql_string_literal_lint.py.
Pure template-render test, no DB required.

Also independently verified during review: the fix's escaping neutralises
a live stacked-statement injection on PostgreSQL 16 (pre-patch slept 5s,
post-patch 0.0s) for both index-stats and pub/sub paths, and confirmed
the browser tree label and Statistics grid render object names as
React-escaped JSX text, so the HTML/XSS probe in an object name does not
execute in those paths. EPAS/ppas runtime path not exercised (ppas
publication templates are byte-identical to the pg variants and are
covered at render level by this test).
2026-07-25 00:55:46 +05:30
Kundan Sable 73b3218992 fix(security): escape index-stats/publication/subscription name sinks (CVE-2026-12044 follow-up)
The 9.16 fix for CVE-2026-12044 hardened qtLiteral and switched sixteen
COMMENT ON / pgstattuple / pgstatindex templates to it, but the fix
missed several sinks that were previously excused in
test_sql_string_literal_lint.py's ALLOWLIST on the (incorrect)
assumption that schema/table/publication/subscription names sourced
from pg_catalog via the browser tree could never contain apostrophes.
They can, since PostgreSQL permits arbitrary characters in quoted
identifiers, so a low-privileged user able to CREATE TABLE, CREATE
PUBLICATION, or CREATE SUBSCRIPTION can plant a name that breaks out of
the unescaped '{{ name }}' interpolation once any user views that
object's Statistics or Dependencies tab.

Switch the following templates to qtLiteral(conn):
- schemas/tables/templates/indexes/sql/{16_plus,default}/coll_stats.sql
  (Index Statistics -- reported as "SQL injection in pgAdmin index
  Statistics (incomplete fix for CVE-2026-12044)")
- publications/templates/publications/{pg,ppas}/default/sql/
  {dependencies,get_position}.sql
- subscriptions/templates/subscriptions/sql/default/
  {dependencies,get_position}.sql

publications/__init__.py and subscriptions/__init__.py now pass
conn=self.conn into the dependencies.sql render_template call so the
qtLiteral filter has a connection to quote against. Remove the
corresponding ALLOWLIST entries in test_sql_string_literal_lint.py now
that these sinks are properly escaped instead of merely assumed safe.

Patch supplied pre-written; manual testing by the reporter reported
both the SQL-injection and HTML-injection probes as positive, but the
exact pre/post-fix state tested was not fully disambiguated in this
session -- treat as reported-but-not-independently-verified pending
follow-up confirmation.
2026-07-25 00:55:46 +05:30
Dave Page 24fdcf0f58 fix(security): add missing auth decorators to Constraints/preferences/debugger/schema_diff routes (CVE-2026-12046 follow-up)
In SERVER mode pgAdmin enforces authentication per route via
@pga_login_required; the before_request hook only handles desktop
auto-login and the Kerberos/Webserver redirect, so a route shipped
without the decorator is reachable unauthenticated (CWE-306). This is
the same defect class as CVE-2026-12046 (the sqleditor close/
update_connection routes).

A sweep found further omissions, now fixed with @pga_login_required:

* Constraints blueprint: nodes, proplist (obj), delete -- the routes
  named in the "SQL injection in pgAdmin index Statistics" follow-up
  report as an incomplete fix for CVE-2026-12046. delete is a
  state-mutating DELETE (removes table constraints); nodes/proplist
  return object information. Adds the missing pga_login_required import
  to this module.
* preferences.get_all_cli (GET)
* debugger.close (DELETE)
* schema_diff.close (DELETE)
2026-07-25 00:55:46 +05:30
Ashesh Vashi e7a8576731 Fix MASTER_PASSWORD_HOOK tokenisation on Windows
posix=False in shlex.split() never strips quote characters, so any
Windows hook path quoted to handle spaces (or any quoted argument)
came out with literal quotes still attached, and unquoted spaced
paths were split into multiple argv elements either way.

Use a shlex.shlex instance with posix=True (correct quote-stripping)
and escape='' (so backslashes in Windows paths are not treated as
escape characters). Document the quoting requirement in config.py
and add regression tests for quoted/unquoted spaced paths.
2026-07-25 00:55:46 +05:30
Dave Page ea7e798aac Fix OS command injection in the MASTER_PASSWORD_HOOK feature
The MASTER_PASSWORD_HOOK setting lets administrators specify an external
command that returns a per-user encryption key, with %u in the configured
string replaced by the current user's name. The previous implementation
substituted the username into the command string and executed the result
with subprocess.Popen(..., shell=True). Because the username can originate
from an external authentication source (OAuth/OIDC claims, Kerberos,
webserver auth), a username containing shell metacharacters allowed an
authenticated user to execute arbitrary commands as the pgAdmin service
account in deployments where the hook uses %u.

Tokenise the trusted hook string into an argument vector first, substitute
the untrusted username into the individual arguments, and execute with
shell=False. The username is therefore always confined to a single argv
element and any shell metacharacters it contains are inert.

Note for administrators: hooks that previously relied on shell features
(pipes, redirection, environment-variable expansion, globbing) in the
MASTER_PASSWORD_HOOK string itself will no longer have those interpreted;
such logic should be moved into the hook script. The documented form,
'<PATH>/script.sh %u', is unaffected.

Adds regression tests covering usernames containing ';', '$()', backticks,
pipes, '&&' and newlines, plus an end-to-end marker-file proof that no
shell execution occurs.

Reported-by: B1gN0Se
2026-07-25 00:55:46 +05:30
Ashesh Vashi 64a9cdbd6a fix: close remaining tool-RBAC gaps found in review
Extends the tool-permission enforcement pattern from the reported CVE
fix to the backup/restore/maintenance/import_export blueprints, which
had the identical front-door-only gap: only create_*_job was gated,
while objects()/check_utility_exists()/get_import_export_settings()
relied on @pga_login_required alone.

Also clears password/save_password/tunnel_password on adhoc server
clones, not just ownership fields - Server.clone() copies every
column, so a non-owner cloning another user's shared server was still
persisting that user's stored credentials into a row the non-owner
now owns.

Adds missing socket test scenarios (erd tables, psql socket_input/
socket_set_role/resize) that the existing test docstring claimed to
cover but didn't.
2026-07-25 00:55:46 +05:30
Dave Page ba1984718a Add RBAC regression tests for tool routes, sockets and adhoc ownership
Add regression coverage for the authorisation fixes:

  * test_tool_permissions_required: a consolidated, per-blueprint check
    that logs in as a user with no roles (hence no tool permissions) and
    asserts every gated backend HTTP route across the query tool, grant
    wizard, schema diff, ERD, PSQL and debugger returns 403. This catches
    any future route added to these blueprints without the decorator.
  * test_tool_socket_permissions_required: asserts the schema diff
    compare_database/compare_schema and psql start_process Socket.IO
    handlers refuse a user lacking the tool permission.
  * test_adhoc_connect_server_ownership: asserts that an adhoc connect
    triggered by a non-owner against an administrator-owned shared server
    persists a server row owned by the caller and not shared.

All three are skipped in DESKTOP mode, where every request is
auto-authenticated as the all-permissions DESKTOP_USER.
2026-07-25 00:55:45 +05:30
Dave Page a7e74a6ed6 Re-home adhoc cloned servers to the calling user
When /misc/workspace/adhoc_connect_server is given a sid, it clones the
existing server. Server.clone() copies every column of the source row,
including user_id, shared and shared_username. When a non-owner triggered
an adhoc connect against an administrator-owned shared server, the clone
inherited the administrator's ownership and shared flag, so pgAdmin
persisted a new, administrator-owned, shared adhoc server row created at
the behest of another user; the row is committed before the connection is
attempted, so it survived even when the connection failed.

Force the cloned adhoc record to belong to the current user and to be
private (user_id, shared, shared_username) before committing, mirroring
the new-server branch, so a non-owner can no longer persist a
cross-tenant server record.
2026-07-25 00:55:45 +05:30
Dave Page d36bd8dc96 Enforce tool RBAC on every backend route, not just the entry point
The tool permissions (tools_query_tool, tools_grant_wizard,
tools_schema_diff, tools_erd_tool, tools_psql_tool, tools_debugger) were
enforced only on a single "front door" route per tool, whilst the rest of
each tool's backend workflow relied on pga_login_required alone. An
authenticated user who had been denied a tool could therefore still drive
the tool through its other routes and Socket.IO handlers:

  * Query Tool: View/Edit Data via sqleditor.initialize_viewdata and the
    rest of the view-data chain, bypassing the gate on initialize_sqleditor.
  * Grant Wizard: object discovery (objects), SQL preview (modified_sql)
    and the actual privilege change (apply) were ungated; only acl_list
    was protected. This allowed real GRANTs to be generated and applied.
  * Schema Diff: initialize, servers, get_server, connect_server,
    connect_database, databases, schemas, ddl_compare and the
    compare_database/compare_schema socket handlers were ungated; only
    panel was protected.
  * ERD: initialize, prequisite, sql (table DDL generation) and the
    tables socket handler were ungated; only panel was protected.
  * PSQL: the panel route and the entire /pty Socket.IO namespace
    (start_process, socket_input, socket_set_role, resize) had no tool
    permission check at all, so a denied user could still obtain an
    interactive psql session.
  * Debugger: the directly addressable get_arguments/set_arguments/
    clear_arguments routes were ungated.

Apply permissions_required to the HTTP routes and socket_permissions_required
to the Socket.IO handlers so the tool permission is enforced consistently
across each tool's surface. The permission check is the outermost
decorator, so it runs before any connection or transaction lookup.
2026-07-25 00:55:45 +05:30
Dave Page 461c3afba9 Add socket_permissions_required decorator for Socket.IO RBAC
Flask-Security's permissions_required only guards HTTP routes; pgAdmin's
Socket.IO event handlers had no permission-aware equivalent and relied on
socket_login_required, which checks authentication but not the tool
permission. Add socket_permissions_required as the socket counterpart of
permissions_required so that event handlers can enforce the same
tool-level RBAC as the routes.

It reads the user's permissions via has_permission() rather than
flask_principal's Permission().can(), so it does not depend on the
principal identity having been loaded onto the socket request context,
and it honours pgAdmin's Administrator bypass. On failure it disconnects
and raises ConnectionRefusedError, mirroring socket_login_required.
2026-07-25 00:55:45 +05:30
Ashesh Vashi 54ff7b4dce Updated message catalogs for v9.17 2026-07-25 00:54:55 +05:30
Ashesh Vashi 5d39a52a73 docs: add release notes for v9.17 2026-07-25 00:21:27 +05:30
Niv Greenstein 108797d48a feat: add custom tile provider settings for Geometry Viewer (#10142)
Geometry Viewer's base-layer choices were hardcoded (Empty, Street,
Topography, Gray Style, Light Color/Dark Matter), with no way to
point at a private/internal tile server or a provider not in that
built-in list.

Add a geometry_viewer preferences category (custom_tile_url, _name,
_crs, _attribution, _max_zoom) under sqleditor. When a valid custom
tile provider URL is configured (must be http(s) and contain {x},
{y}, {z}), it's used as the default base layer; built-in tiled
layers are hidden unless the custom provider's CRS is also
EPSG:3857 (Web Mercator), since they can't be reprojected together.
Non-mercator custom providers (e.g. EPSG:4326) only apply to SRID
4326 geometry data; other SRIDs still render on the existing blank
Cartesian plane.

Custom name/attribution are DOMPurify-sanitized before being passed
to Leaflet (both are innerHTML sinks). URL is not sanitized but is
gated by the http(s):// prefix check, so javascript:/data: URLs are
rejected; it's consumed as a tile-image src template, not an HTML
sink.

Adds GeometryViewerUtils.spec.js covering URL validation, defaults,
sanitization, CRS resolution/fallback, and base-layer composition.
2026-07-24 22:17:51 +05:30
Ashesh Vashi 7339eb8dcc fix: report the correct error message on trigger node.sql failure (#10197)
The failure path for the second query (node.sql, resolving the
trigger function's node data) reported errormsg=rset — the result
dict from the first, already-successful get_function_oid.sql query
— instead of res, the actual error from the failed query. Any
failure here (permissions, catalog access) surfaced a stale,
misleading payload instead of the real cause.
2026-07-24 21:59:06 +05:30
Ashesh Vashi 34108aa50f fix: remove unused sqlalchemy exists import in server_access.py (#10196)
'exists' was imported but never called; the .exists() at line 165 is
the query-builder method on a Query instance, not this function.
2026-07-24 21:58:00 +05:30
lkmatsumura 1e1240038a refactor(server_groups): centralize shared-group visibility and access logic (#10077)
Replace the per-server ServerGroupModule.has_shared_server() loop and
scattered ad hoc shared-server checks with two centralized helpers,
get_server_groups_for_user() and get_server_groups_for_user_query(),
in server_access.py — a single SQL EXISTS query instead of iterating
servers per group. get_server_group() reuses the same shared-access
logic, and returned groups now carry is_shared_group metadata so the
browser tree can render the correct icon and derive edit/delete
permissions consistently.

update() now resolves the target group via get_server_group(gid,
hide_shared=True), so a non-owner can no longer rename another
user's shared group; delete() already blocked deleting shared or
first-user groups and now reports clearer errors for both cases.
Desktop mode's non-SERVER_MODE query path uses
literal(0).label('is_shared_group') (a bare int has no .label()).

Adds test_sg_permissions.py covering owned/shared/desktop group
visibility and access.
2026-07-24 19:11:27 +05:30
Hari Prasad 966a8ae99a docs: add basic starter contributing guide (#10093)
* docs: add basic starter contributing guide

Add a CONTRIBUTING.md file to document the contribution workflow for pgAdmin 4.

Includes:
- Getting started instructions
- Issue reporting guidelines
- Development workflow and coding practices
- Pull request requirements
- Development environment setup
- Database migration guidance
- Security reporting process
- Community support resources

This provides a single reference for new and existing contributors.

* add language tag on the opening fence of the Windows command block

* Add architecture overview, define $PGADMIN4_SRC, and link GitHub URLs

* docs: update contribution guidance

Clarify contributor workflow, fix the runtime link, and add references to existing contributor docs.
2026-07-24 19:05:11 +05:30
Dave Page 75dd304d25 fix(cloud): stop googleapiclient pulling in the system oauth2client (#10110) (#10112)
On packaged Linux installs the bundled venv is created with
--system-site-packages (issue #7173) so it can reach system packages such
as dbus-python. That also exposes the deprecated system oauth2client and
whatever pyOpenSSL ships alongside it. googleapiclient imports oauth2client
optionally, and on Ubuntu 24.04 that drags in a pyOpenSSL too old for our
bundled cryptography, aborting startup at blueprint registration with
"AttributeError: module 'lib' has no attribute 'GEN_EMAIL'".

pgAdmin only ever authenticates to Google via google-auth and
google-auth-oauthlib, so park a None sentinel under
sys.modules['oauth2client'] before importing googleapiclient in both the
web module and the standalone pgacloud provider. The optional import then
fails cleanly and googleapiclient falls back to google-auth.

Closes #10110
2026-07-24 19:02:29 +05:30
n0099 67755809a6 zh_Hans_CN translate: truncate 截断 -> 清空 (#10138)
this also sync with phpmyadmin: https://github.com/phpmyadmin/phpmyadmin/blob/c605fd63bc2e48b682e06d6d1041de544ddf861c/resources/po/zh_CN.po#L12154
2026-07-24 19:01:55 +05:30
Kobi Hikri e65edd4669 Pin sonarqube-scan-action to a full commit SHA (v8.2.1) (#10154) 2026-07-24 19:01:03 +05:30
Kundan 9bf83b4489 fix: return Response as-is and pass conn when expanding a trigger's function (#10177)
Expanding a Trigger node under a Table to view its function threw
'Response' object is not iterable, crashing the tree.

get_children_nodes() can legitimately return a Flask Response instead
of a list (e.g. gone("Could not find the specified trigger
function") when the trigger's function has no matching row in the
trigger-function node query, as happens for a genuine internal-
language function such as suppress_redundant_updates_trigger).
NodeView.children() / PGChildNodeView.children() unconditionally
sorted whatever get_children_nodes() returned, crashing on a
Response instead of passing it through.

Separately, TriggerView.get_children_nodes() rendered the trigger-
function node.sql template (which quotes fnid via qtLiteral(conn))
without passing conn into the template context. This call site
predates qtLiteral requiring a connection; after qtLiteral was
hardened in 658bb585d to raise ValueError instead of silently
degrading when conn is missing, this broke node.sql rendering for
every trigger, not just the internal-language case.

Fix both: check isinstance(children, flask.Response) in children()
before sorting/iterating and return it as-is, and pass
conn=self.conn into the node.sql render call, matching every other
render_template call site in the file.

Fixes #10117
2026-07-24 19:00:31 +05:30
Regina Obe 58e5fc7aed Fix for #10187 (#10188)
Extension UI gives error with PG 19
column reference "comment" is ambiguous LINE 5: e.comment

Issue caused because in pg19 :

SELECT * FROM pg_catalog.pg_available_extensions();

now outputs an additional column `location`
after default_version and comment is now 4th column
2026-07-24 18:38:40 +05:30
Ashesh Vashi 577a518fcb fix: scan all Mach-O binaries for bundle linkage, not just .so/.dylib (#10189)
_verify_bundle_linkage's host-library scan only matched files by
.so/.dylib name suffix, so a shipped executable (Contents/MacOS/*)
or a Python.framework payload with a host-linked dependency but no
matching suffix could slip through unchecked — the same class of
bug #10135 was added to catch.

Detect Mach-O executables/libraries by content via `file` instead
(same pattern the codesign step in this file already uses),
regardless of extension or executable permission bits, so readable
non-executable dylibs are covered too.
2026-07-24 18:34:03 +05:30
Dave Page 1884356245 fix: fail the macOS build if any bundled library links outside the bundle (#10135)
9.16 failed to start on Intel Macs (#10123): cryptography had no
prebuilt Intel macOS wheel, pip compiled it from source, and its
openssl-sys build linked the builder's Homebrew OpenSSL into
_rust.abi3.so instead of the bundled one. _fixup_imports deliberately
skips _rust.abi3.so, so the dangling reference shipped unnoticed and
the app died on startup for anyone without that external dylib.

Add _verify_bundle_linkage, run after the bundle is assembled and
relocated but before code-signing: walks every .so/.dylib and fails
the build if any install-name points at a build-host prefix
(/usr/local, /opt/homebrew, /opt/local, $SLAVE_HOME). OS libraries
and @loader_path/@rpath/@executable_path references pass untouched.
Turns this class of bug into a build-time failure instead of a
runtime one.
2026-07-24 18:22:08 +05:30
Kundan b85fb6c650 fix: use pg_depend ownership instead of name guessing for SERIAL detection (#10167)
Column-owns-sequence was detected by guessing the sequence name as
<table>_<col>_seq and string-matching it in nextval(...). Renaming
a table/column broke the guess (false negative, #10100); an
unrelated sequence with the same guessed name broke it the other
way (false positive, #10101).

Check col.get('seqrelid') (real pg_depend ownership) instead, and
exclude identity columns. SERIAL is now emitted iff a genuine
ownership dependency exists, independent of naming.

Fixes #10100, #10101
2026-07-24 18:15:20 +05:30
Kundan 5ff4f694fd fix: Schema Diff filter chip toggle broadcasting stale empty selection (#10172)
selectFilterOption() computed newOptions inside the functional
setSelectedFilters(prev => {...}) updater, then used that same
variable to dispatch TRIGGER_CHANGE_FILTER synchronously. Since the
updater runs lazily on next render, every chip toggle broadcast an
empty filter, so the tree always showed "No difference found" until
a full re-Compare.

Compute the new selection synchronously from current state and use
it for both the state update and the dispatched event.

Fixes #10102
2026-07-24 18:14:22 +05:30
hiteshjambhale f9935b3da5 fix: honor selected EOL sequence when copying query text to clipboard (#10160)
getSelectionFromState() joined ranges with the chosen EOL but sliced
each range via state.sliceDoc(), which always uses the document's
own \n regardless of the LF/CRLF preference. Introduced in #8691
when the copy path switched from doc.sliceString(..., lineSep) to
sliceDoc(...) to fix multi-cursor copying.

Slice with state.doc.sliceString(range.from, range.to, lineSep) so
the chosen EOL applies within a range too; the #8691 multi-cursor
join behavior is unchanged.

Fixes #10158
2026-07-24 18:13:27 +05:30
Dave Page cec1b38b2f fix: warn when OAuth2 provider settings are misplaced at the top level of config (#10113)
OAuth2 provider settings are only read from the OAUTH2_CONFIG list;
bare top-level keys like OAUTH2_CLIENT_ID or
OAUTH2_SSL_CERT_VERIFICATION are silently ignored. This is an easy
trap in container deployments where every other option is set via
an individual PGADMIN_CONFIG_<KEY> env var.

Add warn_on_misplaced_oauth2_config(), called once at OAuth2 module
startup, that logs when per-provider OAUTH2_* keys exist at the top
level with no provider configured in OAUTH2_CONFIG. No behavior
change for correctly configured or unconfigured deployments.
Documents the supported container approach in oauth2.rst.

Closes #10053
2026-07-24 18:12:22 +05:30
Kundan 6f8be955a1 fix: render disconnect tree label via className, not embedded HTML (#10169)
Disconnect handlers in server.js/database.js built the transitional
tree-node label as an HTML string and passed it to setLabel(), which
writes via label.textContent — correctly escaping markup, so the
literal "<span class='text-muted'>[Disconnecting...]</span>" text
was shown instead of a greyed-out label.

Pass plain text plus a className: 'text-muted' instead; setLabel()
applies the className to the label span (default file-name class
otherwise), so muted styling comes from CSS, not injected markup.

Fixes #10106
2026-07-24 18:11:22 +05:30
Kundan 49e955a855 feat: add preference for default View Data row limit (#10170)
The unqualified "View Data" action always ran with no LIMIT, unlike
"First/Last 100 Rows" which hardcode limit=100 — unusable on large
tables with no way to cap it.

Add view_data_default_row_limit preference (int, default 0 =
unlimited) under sqleditor Options. GridCommand.__init__ applies it
as self.limit when cmd_type == VIEW_ALL_ROWS and the value is
positive; objectquery.sql already renders LIMIT only when > 0, so
no template changes needed. First/Last 100 Rows untouched.

Closes #10104
2026-07-24 18:10:13 +05:30
Kundan 6ad6024bca fix: detect a selected-but-unusable OS keyring and fall back gracefully (#10168)
evaluate_and_patch_config() only disabled USE_OS_SECRET_STORAGE when
keyring.get_keyring().name == 'fail Keyring'. On Debian 13 over RDP, a
real backend (e.g. SecretService) is selected because no D-Bus/GNOME
Keyring session is running, so the name check passes even though every
actual keyring call fails — leaving the crypt key unset and every
operation raising a bare CryptKeyMissing.

Probe the selected backend with a harmless read of a never-existing
entry after selection. A healthy backend returns None without
prompting; an unusable one raises, and we disable
USE_OS_SECRET_STORAGE so the app falls back to the master-password /
in-app crypt key mechanism instead of failing outright.

Fixes #10107
2026-07-24 18:08:27 +05:30
Kundan aeef9c2d80 fix: ALT+F5 not falling back to statement under cursor (#10173)
triggerExecution() only fell back to getQueryAt(cursor) when
getSelection() was falsy. Since #7293/#8691 (non-continuous
highlighted-block support), getSelection() flattens and joins all
ranges, so multiple empty cursor ranges can produce a truthy but
whitespace-only string (e.g. "\n"), skipping the fallback entirely —
ALT+F5 silently tried to execute whitespace. Same stale check existed
in checkUnderlineQueryCursorWarning(). Also fixes a latent
state.selection.head reference (EditorSelection has no such
property; correct field is state.selection.main.head).

Treat a whitespace-only selection as empty before the fallback check
in both functions. Real highlighted selections always contain
non-whitespace, so #7293/#9570 behavior is unaffected.

Fixes #10109
2026-07-24 18:07:26 +05:30
Ashesh Vashi 8812025a8a chore(deps): Bump patch/minor dependency bumps (#10176)
Consolidates 20 open dependabot PRs (JS + Python) into one bump, applied
directly rather than cherry-picked (PR branches were stale and would have
reverted unrelated fixes like the yarn packageManager pin). Adds further
same-major patch/minor bumps found by auditing beyond dependabot's own PR
list.

JS (web + runtime): axios, brace-expansion, form-data, undici, js-yaml,
dompurify, @babel/core, webpack, sharp, electron, eslint, react-checkbox-tree,
autoprefixer, eslint-plugin-jest, globals, jest, jest-environment-jsdom, svgo,
terser-webpack-plugin, typescript-eslint, webpack-bundle-analyzer,
@date-io/date-fns, @szhsin/react-menu, @tanstack/react-query, @types/react,
ajv, anti-trojan-source, ip-address, marked, moment-timezone, papaparse,
postcss, react, react-dom, react-draggable, react-timer-hook, sql-formatter,
zustand.

Python: certifi, selenium (version-gated: 4.45.0 requires Python >=3.10,
4.44.0 kept for <=3.9 to preserve Python 3.9 support).

Reverted / excluded, with reasons:
- azure-mgmt-resource 26.0.0: moved ResourceManagementClient from
  azure.mgmt.resource to azure.mgmt.resource.resources, breaking
  pgadmin/misc/cloud/azure/__init__.py at import time. Caught by the Python
  regression suite. Kept at 25.0.0.
- @simonwep/pickr 1.10.0: switched its build tool to tsup, which marks its
  UMD bundle as an ES module via Symbol.toStringTag instead of the
  __esModule flag Babel's interop helper checks for. Babel double-wraps the
  export, so `new Pickr(...)` resolves to a non-constructor and crashes
  every dialog that mounts a color picker -- reproduces only in the
  production/minified webpack build, not the dev bundle or Jest. Pinned to
  ~1.9.1 (tilde, not caret) so a future install can't silently float back to
  1.10.x.
- paramiko 3->5 (#9927): structurally blocked by sshtunnel 0.4.0 still
  referencing paramiko.DSSKey.
- @mui/material / @mui/x-date-pickers 7/8->9 (#10091, #10092): known
  UI-breaking, needs the accompanying component fixes tracked on a separate
  branch, not a bare version bump.
- react-arborist, @tanstack/react-virtual, react-frame-component: same-major
  bumps available but excluded -- core object-browser tree, already-fragile
  virtualization code, or tilde-pinned range respectively.
- A handful of JS packages hit Yarn 4.15's registry quarantine gate (blocks
  just-published versions); backed off to the next-older version instead of
  forcing through.

Added core-js as an explicit devDependency: it was never declared despite
webpack's Babel config (useBuiltIns: 'usage', corejs: 3) requiring it --
it only worked because @simonwep/pickr 1.9.1 happened to pull it in
transitively, which broke when pickr was briefly bumped.

Verified: eslint (web + runtime), full JS test suite (149/149 suites,
916/916 tests), webpack production build compiles clean, Python regression
suite (2388/2388, excl. Selenium), Selenium feature_tests (17/19 pass; the
2 failures trace to a local pldbgapi-extension gap, unrelated to any
bumped dependency).
2026-07-23 15:28:38 +05:30
Ashesh Vashi 1993109475 fix: pin Yarn version from packageManager field in remaining build scripts (#10175)
#10156 fixed CI build failures caused by Yarn 4.x fetching a newer patch
with different builtin compat hashes, breaking --immutable lockfile
validation, but only patched pkg/linux/build-functions.sh and the GHA
workflows. Make.bat, pkg/mac/build-functions.sh, pkg/pip/build.sh, and
Dockerfile still hardcoded 'yarn set version 4', which is what broke the
Windows Jenkins snapshot build (job 1669).
2026-07-23 13:06:29 +05:30
Ashesh Vashi b15c745dc1 fix: pin Yarn version from packageManager field in build scripts (#10156)
* fix: pin Yarn version from packageManager field in build scripts

Replace hardcoded 'yarn set version 4' in build-functions.sh with a
dynamic lookup from each workspace's package.json packageManager field.
Also syncs runtime yarn version to 4.15.0 to match web/package.json.

Fixes CI build failures caused by Yarn 4.x fetching a newer patch that
produces different builtin compat hashes, breaking --immutable lockfile
validation.
2026-07-16 11:48:36 +05:30
Luiz K Matsumura dfc4ef37d0 refactor: clarify ServerGroup relationships to Server and SharedServer (#10076)
The Server and SharedServer models each declared a relationship named
'servers' that actually pointed at the parent ServerGroup, with backrefs
('server'/'sharedserver') providing the collections. The naming was the
inverse of what it modelled and made the call sites read oddly.

Redefine the relationships in the natural direction using explicit
back_populates: ServerGroup gains 'servers' and 'sharedservers'
collections (carrying the existing delete-orphan cascade), and Server and
SharedServer each gain a 'servergroup' reference. The two call sites that
read the group name are updated from server.servers.name to
server.servergroup.name accordingly.

This is a naming/modelling cleanup with no functional or schema change, so
no migration is required.
2026-06-19 10:32:02 +01:00
somaz 7e76fb4eb0 Add Gateway API HTTPRoute support to the Helm chart (#10095)
Add an opt-in Gateway API HTTPRoute template to the Helm chart as an
alternative to the existing Ingress, addressing #9942. It is disabled by
default (httpRoute.enabled: false) so existing installs are unaffected.

The template mirrors the existing ingress.yaml conventions: the
pgadmin4.fullname backend, commonLabels/commonAnnotations propagation, and
a hostname that falls back to ingress.hostname when httpRoute.hostnames is
unset. parentRefs is required (a fail guard fires when it is empty),
apiVersion defaults to gateway.networking.k8s.io/v1, and the default rule
forwards "/" (PathPrefix) to the pgAdmin service. Custom hostnames and
rules can be supplied for full control. The new values are documented in
the chart README.
2026-06-19 09:41:54 +01:00
Jeremy Schneider 0c6740f146 feat: include authenticated user identity in HTTP access log (#9991)
Set an X-Remote-User response header containing the authenticated username
on every request when the LOG_AUTHENTICATED_USER config option is enabled
(disabled by default). This allows the HTTP access log to be configured to
include user identity via standard log format directives
(%({x-remote-user}o)s in gunicorn, %{X-Remote-User}o in Apache) without
requiring any changes to pgAdmin's session or authentication behaviour. The
default gunicorn access log format is updated to surface the header.

The username is sanitised to a header-safe value: it is transliterated to
Latin-1 (HTTP headers are Latin-1 only) and any non-printable characters,
including CR/LF, are stripped, so unusual usernames cannot cause a 500 on
every response.
2026-06-19 09:26:32 +01:00
Dave Page 888a053231 fix(mac): prune dangling symlinks before codesign so Gatekeeper accepts the bundle (#10108)
A signed, notarised and stapled pgAdmin 4.app was rejected by Gatekeeper
with "invalid destination for symbolic link in bundle". Gatekeeper walks
every symlink in the bundle and rejects the whole app if any link does
not resolve to a real file inside it; notarisation does not catch this, so
a broken link slips through stapling and only surfaces as a Gatekeeper
failure on the end user's machine.

The embedded Python.framework ships such links: an arm64-only build still
carries a bin/python3-intel64 launcher symlink (whose target
_strip_architecture deletes when it removes the foreign-arch files), and
the bundled Tcl/Tk frameworks carry PrivateHeaders links pointing at a
Versions/Current that has none.

Add a _prune_dangling_symlinks step that removes every dangling symlink in
the bundle after architecture stripping and before signing, then fails the
build if any remain, so this cannot slip past notarisation again.
2026-06-18 18:36:11 +05:30
Ashesh Vashi 3660d19535 fix: Move the 'Back to logic' link outside the <form/>.
Moving the URL from the form to avoid any unnecessary form validation.
Refs #10037
2026-06-17 15:07:48 +05:30
Ashesh Vashi 660ecf2113 fix(cli): register module preferences before set-prefs validation (#10105)
PR #10047 made `Preferences.save_cli()` validate against the registered
preference object, but `setup.py set-prefs` only enters `app_context()`
and never calls `run_before_app_start()`, leaving `Preferences.modules`
empty. Every CLI write then fell into the "Module 'X' is no longer in
use." path and was reported as "Invalid value provided".

Trigger registration explicitly (run_before_app_start enters both
app and test_request contexts internally, satisfying registration
callbacks that touch current_user) and propagate the typed error
message from save_cli so users see the actual reason a value was
rejected.
2026-06-17 14:49:53 +05:30
Ashesh Vashi 71c18fb4a7 docs: handle Vietnamese diacritics in LaTeX PDF build
The PDF docs build in the Check documentation builds workflow began
failing after the 9.16 release notes added "Mai Phạm Hiền" as the
reporter for CVE-2026-12049. pdflatex's default utf8 inputenc maps
Latin-1 and Latin-Extended-A but rejects the precomposed Vietnamese
code points U+1EA1 (a with dot below) and U+1EC1 (e with circumflex
and grave) with:

  ! LaTeX Error: Unicode character ạ (U+1EA1)
                 not set up for use with LaTeX.

Declare the two characters in the LaTeX preamble via
\DeclareUnicodeCharacter so they typeset correctly:

  ạ -> \d{a}        (a with combining dot below)
  ề -> \`{\^e}      (e with circumflex + grave)

Picked this over switching to xelatex because it is a single-file
change, keeps the existing pdflatex toolchain, and the CI workflow
already has the apt packages it needs (no .github/workflows change).

Verified by running make docs-pdf in an ubuntu:22.04 container that
mirrors check-doc-builds.yml (same apt packages, locale-gen
en_US.UTF-8, sphinx + sphinxcontrib-youtube): 682-page pgadmin4.pdf
produced cleanly, zero Unicode-character errors in the log.
2026-06-16 15:36:24 +05:30
Ashesh Vashi 9b071d7287 test(sqli-lint): groom allowlist for PG-14-default templates
Master commit 7b9b8cdd0 (#10054 / Issue #10050) rebased the
version-specific SQL templates so the new default targets PG 14, and
collapsed the 11_plus/, 12_plus/, 14_plus/ buckets into default/.
After merging that into cve-9.16, the SQL-string-literal lint
introduced for CVE-2026-12044 (658bb585d, 2ae0d3610) reported:

  4 NEW violations at the new default/ paths --
    subscriptions/sql/default/create.sql :: '{{ data.streaming}}'
    subscriptions/sql/default/update.sql :: '{{ data.streaming}}'
    grant_wizard/pg/default/sql/function.sql :: '{{ kind }}'
    grant_wizard/ppas/default/sql/function.sql :: '{{ kind }}'

  25 STALE entries pointing at the removed _plus/ paths --
    aggregates/sql/{11,12}_plus/create.sql (data.initial_val,
      data.moving_initial_val)
    tables/index_constraint/sql/11_plus/properties.sql
      (constraint_type)
    tables/sql/{11,12}_plus/properties.sql (pg_get_partkeydef)
    subscriptions/sql/14_plus/{create,update}.sql (data.sync,
      data.streaming)
    grant_wizard/{pg,ppas}/11_plus/sql/function.sql (func_type,
      icon, kind)
    search_objects/sql/{pg,ppas}/11_plus/search.sql,
      search_objects/sql/ppas/12_plus/search.sql (search_text,
      obj_type, LABELS_SCHEMACOL)

Each new entry carries the same justification as the corresponding
removed _plus/ entry (no semantic change to what is allowlisted; only
the path universe shrank). The four 'data.streaming' and 'kind'
additions are not new violations in the source-code sense -- the
expressions themselves were already allowlisted at the version-suffix
paths -- they only became visible at default/ paths after the rebase.

Verified: test_sql_string_literal_lint passes on PG 17 and PG 18
(33/33 each); pycodestyle clean.
2026-06-16 15:02:21 +05:30
Ashesh Vashi 846aa3718c Merge remote-tracking branch 'origin/master' into cve-9.16
# Conflicts:
#	docs/en_US/release_notes_9_16.rst
2026-06-16 11:47:25 +05:30
Ashesh Vashi 0c17c82ddc Updated version for release v9.16 2026-06-16 11:44:14 +05:30
dependabot[bot] 5fe93608de chore: Update cryptography to 49.0.0 requirement in /web/regression (#10087)
Updates the requirements on [cryptography](https://github.com/pyca/cryptography) to permit the latest version.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/48.0.0...49.0.0)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 49.0.0
  dependency-type: direct:production
...
2026-06-16 11:27:35 +05:30
dependabot[bot] 797927aee5 Javascript dependency: Bump axios from 1.17.0 to 1.18.0 in /runtime (#10088)
Bumps [axios](https://github.com/axios/axios) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-16 11:25:13 +05:30
Dave Page e9363232a9 Allow any Font Awesome style for the OAuth2 button icon. #7641 (#10036)
The login page hardcoded the 'fab' (brands) Font Awesome style for the
OAuth2 button icon, so non-brand icons could not be used. Use the
configured OAUTH2_ICON as-is when it already specifies a style class
(e.g. 'fas fa-key'), and fall back to 'fab' when only an icon name is
given, preserving backward compatibility.
2026-06-16 11:24:20 +05:30
Dave Page 9c7bdd0765 Validate preference values set via the CLI. #7346 (#10047)
The CLI set-prefs path (save_pref -> Preferences.save_cli) wrote the raw
value to the configuration database without any type validation and
always reported success, unlike the GUI path which validates via
_Preference.set(). Route save_cli through the same set() validation
(set() now accepts an explicit user_id so it works outside a request
context), and make setup.py set-prefs check the result and report
preferences whose value was invalid.
2026-06-16 11:22:06 +05:30
Dave PageandAshesh Vashi 14ccd2619e Fix View/Edit Data crash on a stale/non-filter session transaction object (#9744) (#10071)
* Fix View/Edit Data crash on a stale/non-filter session transaction object

initialize_viewdata restores the filter and data-sorting from any command
object previously stored in session['gridData'] under the same trans_id. It
assumed that object was always a filter-capable (View/Edit Data) command and
accessed old_trans_obj._row_filter / ._data_sorting directly.

That assumption is wrong: the same trans_id may have been used by the Query
Tool (a QueryToolCommand, which does not inherit SQLFilter), or the session
may contain an incompatible object persisted by an older version after an
upgrade. In those cases the attribute access raised AttributeError, returning
a 500 from the endpoint and - in desktop mode, where this runs during startup
- preventing the application from loading at all.

Guard the restore with isinstance(old_trans_obj, SQLFilter) (short-circuited
before the did/obj_id checks) so a non-filter object is simply skipped. Add a
regression test that seeds a pickled QueryToolCommand under the trans_id and
asserts initialize/viewdata returns 200.

Closes #9744

* test: avoid hard-coded PK constraint name colliding across the suite

The regression test created its table with a fixed 'table_pk' primary key
constraint name, which collides with the same name used by TestViewData in
this package when the full suite runs against one database. That made the
CREATE TABLE fail in CI (table not found -> IndexError on the OID lookup).
Let PostgreSQL auto-name the primary key instead.

---------

Co-authored-by: Ashesh Vashi <ashesh.vashi@enterprisedb.com>
2026-06-16 11:18:53 +05:30
Domenico Sgarbossa a0c71a668e Updated Italian translation for v9.16. (#10094) 2026-06-16 11:13:17 +05:30
Ashesh Vashi db1ab34f76 Merge remote-tracking branch 'origin/master' into cve-9.16 2026-06-13 01:11:55 +05:30
Ashesh Vashi f02e9be500 docs(release-notes): backfill 9.16 entries from master commits
Add 14 release-note entries that were merged on master but not yet
captured in the 9.16 notes: 1 new feature (#2431), 6 housekeeping
(#9817, #9866, #9917, #9959, #10014, #10023) and 7 bug fixes (#9701,
#9782, #9933, #9952, #9985, #10013, #10030). Entries inserted in
numeric order within each section.

Also add an "Additional changes (no associated issue) -> Dependencies"
section mirroring the 9.15 format, listing net direct dep bumps
between REL-9_15 and HEAD across Python (requirements.txt,
tools/requirements.txt, web/regression/requirements.txt), web/
package.json, and runtime/package.json. Transitive yarn resolutions
and the setuptools pin (covered by bug fix #9829) are excluded.
2026-06-13 01:11:14 +05:30
Ashesh Vashi 4beb7e4670 Updated message catalogs for v9.16 2026-06-13 00:45:56 +05:30
Ashesh Vashi 8c4fb7f9f9 Merge remote-tracking branch 'origin/master' into cve-9.16
# Conflicts:
#	docs/en_US/release_notes_9_16.rst
2026-06-13 00:41:26 +05:30
dependabot[bot] 8c5805279d Javascript dependency: Bump shell-quote from 1.8.3 to 1.8.4 in /web (#10079) 2026-06-12 23:23:49 +05:30
Dave Page c33927f55b Add a "Back to login" link to the password pages. #9301 (#10037)
The Forgot Password and Reset Password pages had no way to navigate back
to the login page. Added a "Back to login" link (using the login URL
already used by the login form) to both pages.
2026-06-12 23:07:27 +05:30
Dave Page 94564e406b Fix double dot in generated font and image filenames. #9806 (#10032)
Webpack 5 asset modules include the leading dot in the [ext] token, so
the 'img/[name].[ext]' and 'fonts/[name].[ext]' templates produced
filenames with a double dot (e.g. Roboto-Bold..ttf). Use '[name][ext]'
so the emitted filenames are correct.
2026-06-12 23:05:02 +05:30
Dave Page 7b9b8cdd07 Rebase the version-specific SQL templates to target PostgreSQL 14 (#10054)
The base (default) SQL templates previously targeted PostgreSQL < 12.
Re-base them so the default target is 14 - the oldest supported server
version - by collapsing every version bucket <= 14 (11_plus, 12_plus,
13_plus, 14_plus and the old default) into a single `default`, keeping
per file the content a v14 server resolves today. Buckets for newer
versions (15_plus, 16_plus, 17_plus, 18_plus) are retained as overrides.

The transformation is behaviour-preserving for every server version >= 14:
template (and test-fixture) resolution is byte-identical before and after
for all supported versions, verified programmatically across every bucket
container and confirmed by the resql, ERD and Schema Diff suites against
PostgreSQL 18.

Also drop PostgreSQL/EDB Advanced Server 13 from the 9.16 supported-server
list and repoint the sqleditor explain_plan tests (which referenced the
removed 12_plus/13_plus buckets) at the new default template.

Closes #10050
2026-06-12 23:02:56 +05:30
0b4bb3ea3f Propagate column renames to FK and unique constraints in the table dialog (#9060) (#10046)
* Propagate column renames to FK and unique constraints. #9060

In the new-table dialog, the primary key already updated its column
references when a column was renamed, but foreign key and unique
constraint definitions did not, leaving them pointing at the old name.
Mirror the PK rename-propagation in the foreign_key and unique_constraint
depChange handlers (and add 'columns' to the unique constraint deps so it
fires on column changes).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Address review feedback for column rename propagation (#9060)

- Remap unique constraint INCLUDE columns on rename. The INCLUDE list
  holds bare name strings (not {column} objects), so renaming an
  included column previously emitted stale DDL. Now mirrors the
  primary key INCLUDE handling.
- Add regression tests covering rename propagation in depChange for
  foreign_key and unique_constraint, including the unique constraint
  INCLUDE case.
- Correct the release note wording from "Create/Edit Table" to
  "Create Table"; the propagation only runs on the new-table path
  (state.oid === undefined).

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Ashesh Vashi <ashesh.vashi@enterprisedb.com>
2026-06-12 23:01:28 +05:30
Dave Page 6de0f371b2 Pin setuptools<82 on Python 3.9 to keep pkg_resources. #9829 (#10045)
setuptools 82 stops shipping pkg_resources, which passlib (via
Flask-Security-Too on Python 3.9) imports, so a clean install on Python
3.9 failed with "No module named 'pkg_resources'". Python 3.9 is still a
supported target (RHEL/Rocky/AlmaLinux 8 and 9 build with system Python
3.9). Split the pin by Python version, mirroring the existing
Flask-Security-Too split.
2026-06-12 22:54:53 +05:30
Dave Page 0649bcdb96 Restore Alt+drag rectangular selection in the editor. #9864 #10029 (#10043)
The fix for #9570 (stop Alt+F5 showing a crosshair cursor) changed the
rectangular-selection eventFilter to require Alt+Ctrl and moved the
crosshair cue to Control. That broke the long-standing Alt+drag block
(column) selection and left an inconsistent Ctrl crosshair cue.

Restore the default rectangularSelection() (Alt+drag) and drop
crosshairCursor entirely - the crosshair-on-Alt was exactly the artifact
#9570 wanted gone, and CodeMirror's crosshair cannot be limited to an
active drag. This brings back block selection (#9864, #10029) while
keeping #9570's intent (no crosshair on the Alt+F5 shortcut).
2026-06-12 22:53:44 +05:30
Dave Page 2a34eda5bc Fix ERD delete crash on stale foreign key column. #8318 (#10042)
removeOneToManyLink looked up a column by the FK's stored local_column
name and read .attnum unconditionally. After a column rename the stored
name no longer matches, so _.find returned undefined and .attnum threw,
blocking deletion of the table/link. Use optional chaining so a stale FK
simply doesn't match the link being removed and deletion proceeds.
2026-06-12 22:50:50 +05:30
Dave Page ba60f0ae63 Apply server foreground colour to object counts (#9766) (#10041)
Apply muted server foreground colour to column type labels (#9766)

Issue #9766 asked for both the object counts and the column type text
to follow the server's custom foreground colour. The dynamic per-server
CSS rule only recoloured the file-name and children-count spans, leaving
the column type text (span.text-muted) at its default low-contrast
colour.

Recolour span.text-muted to a reduced-emphasis blend of the foreground
colour using color-mix, so the datatype still reads as de-emphasised
secondary text while following the server colour.
2026-06-12 22:49:46 +05:30
Dave Page 9939d335e0 Let clicks pass through the object breadcrumbs popup. #9128 (#10038)
The breadcrumbs popup is an absolutely-positioned, informational overlay
at the bottom-left of the object explorer, so it intercepted pointer
events and blocked clicks on the tree items beneath it. Set
pointer-events: none so clicks pass through to the tree.
2026-06-12 22:47:40 +05:30
Dave Page 50f95f0fcb Preserve jsonb number representation in the JSON editor (#9854) (#10074)
The Query Tool's JSON cell editor pretty-printed jsonb values by parsing
and re-stringifying them with json-bignumber. While that preserves big
integers, it normalizes decimals through a JS float, so trailing
fractional zeros are dropped (10.00 -> 10, 3.140 -> 3.14). Because the
reformatted text is what gets written back, opening an unrelated jsonb
document and saving it silently rewrote numbers it never edited - which
can break applications that rely on the canonical jsonb text.

Switch the editor to lossless-json, which preserves the exact numeric
representation (big integers and trailing zeros alike), and pass it to
the underlying vanilla-jsoneditor as its parser so the in-editor format
action and tree/table modes are lossless too. The lossless helpers are
centralized in a small json_utils module with unit tests.

Closes #9854
2026-06-12 22:46:13 +05:30
Dave Page cc8ce7e153 Fix blank Query Tool screen caused by malformed runtime locale (#10066)
The Query History panel formats entry dates/times with
Date.prototype.toLocaleDateString()/toLocaleTimeString(). On runtimes
whose default locale (derived from the OS/environment) is malformed,
these throw "RangeError: Incorrect locale information provided".

Because getDateFormatted()/getTimeFormatted() are called during render
(via getGroups/getGroupHeader/getDatePrefix), the uncaught exception
unmounts the whole SQL editor React tree, leaving the user with a blank
white screen and losing any unsaved query work.

Guard both helpers and fall back to a moment-based format (moment uses
its own locale data and does not depend on the broken Intl default) so
the editor keeps working instead of crashing.

Closes #7596
2026-06-12 22:22:18 +05:30
Ashesh Vashi b458e69528 Merge remote-tracking branch 'origin/master' into cve-9.16
# Conflicts:
#	docs/en_US/release_notes_9_16.rst
2026-06-12 22:14:56 +05:30
Dave Page f6961bce49 Gracefully handle a missing crypt key in the Query Tool connection endpoints. (#10065)
After a backend/pod restart the in-memory crypt key is gone, so
manager.connection() raises CryptKeyMissing. The new-connection
endpoints (_check_server_connection_status and get_new_connection_*)
swallowed it in a broad "except Exception", logged a full ERROR
traceback, and returned a generic error the client cannot recognise.
The standard recovery (a 503 CRYPTKEY_MISSING response that the client
uses to transparently re-establish the key and retry) therefore never
fired, leaving a spurious "Crypt key is missing" message in the Query
Tool and noisy tracebacks in the log.

Re-raise CryptKeyMissing (along with ConnectionLost /
SSHTunnelConnectionLost) before the generic handler, matching the
pattern already used by the query execution path, so these endpoints
emit the standard CRYPTKEY_MISSING response and the client recovers
gracefully.

Closes #10027
2026-06-12 22:09:03 +05:30
Dave Page 922f06c7d2 Strip foreign-architecture code from the macOS bundle (#10063) (#10064)
The macOS app is built for a single architecture (matching the build
machine, via ${ARCH}), but relocatable-python pulls the python.org
universal2 installer, so the entire Python.framework ships both arm64
and x86_64 slices. PostgreSQL-sourced dylibs may be universal too. The
foreign slice is dead weight that bloats the bundle and DMG.

Add a _strip_architecture step, run after _complete_bundle and before
code-signing (lipo invalidates signatures, so the existing sign passes
re-sign the thinned binaries). It removes the universal2 stragglers
(python*-intel64 launcher, config-*-darwin/python.o) and lipo-thins
every fat Mach-O in the bundle to the build arch, preserving file modes
and warning on anything lacking the target slice. Already single-arch
inputs (Electron and its helpers) are skipped.
2026-06-12 15:57:09 +05:30
Dave Page 255550e981 Fix Query Tool password re-prompt loop for unsaved passwords (#9091) (#10073)
When a tool (Query Tool, View/Edit Data, etc.) opens a connection for a
server whose password was not saved, it relies on the password cached on
the server manager. If that cached password is unavailable, the tool
prompts for it. The entered password was POSTed to the connect_server
endpoint, which short-circuited with "Server connected" whenever the
server's primary connection was already established -- silently discarding
the entered password. The tool's own connection therefore still had no
password and re-prompted immediately, producing an infinite prompt loop
in which the re-entered password appeared to be rejected.

Cache the entered password on the server manager (encrypted) in that
short-circuit path so the tool's connection can reuse it. The password
overwrites any cached value, so a regenerated short-lived cloud auth
token (AWS RDS IAM / Azure Entra) takes effect immediately.
2026-06-12 15:51:01 +05:30
Dave Page 5a868bde90 Warn before opening a very large JSON value in the data grid (#9868) (#10075)
Opening a huge JSON/JSONB cell in the Query Tool's cell editor parses,
pretty-prints and renders the entire document on the main thread. For
pathologically large values (e.g. a jsonb object with 100k keys) this
blocks the UI thread and pgAdmin becomes completely unresponsive, with
no chance for the user to back out.

Guard the JSON editor: when the raw cell value exceeds a size threshold,
render nothing until the user confirms via a warning dialog. If they
cancel, the editor is closed without doing the expensive work. Small
values are unaffected and open immediately as before. The editor already
uses commitOnOutsideClick: false, so the confirm dialog does not dismiss
the editor.

The size-threshold logic is a small, separately tested helper.

Closes #9868
2026-06-12 15:41:35 +05:30
Dave Page 4fa95c58af Fix runtime menu refresh crash when menus not yet received (#9762) (#10070)
refreshMenus() rebuilt the application menu from the module-level
cachedMenus, which is only populated once the renderer sends its menu
definition via the 'setMenus' IPC. When a menu refresh was triggered
before that happened - e.g. an auto-update event, or the user closing
the window while the UI was still loading - cachedMenus was undefined
and bindMenuClicks() crashed with 'Cannot read properties of undefined
(reading map)', surfacing as an uncaught-exception dialog.

Guard refreshMenus() so it bails out when there are no cached menus to
rebuild.

Closes #9762
2026-06-12 15:38:19 +05:30
Dave Page ed9bf2f249 Fix syntax error editing SQL functions/procedures with a 'return' substring in the body (#10061)
The SQL-standard body detection used a regex that matched 'return'
anywhere in the body, so a plain SQL body containing a RETURNING clause
(or an identifier like 'returned_value') was wrongly treated as a
SQL-standard (BEGIN ATOMIC / RETURN) body. The generated CREATE OR
REPLACE statement then dropped the AS $BODY$ ... $BODY$ wrapper,
producing invalid SQL and a syntax error on save.

Anchor the RETURN form to the start of the body so only genuine
SQL-standard bodies are detected. Add unit tests for the detection.

Closes #10059
2026-06-12 15:25:34 +05:30
Dave Page 458dec3571 chore(deps): clear vulnerable transitive deps (tar, flatted) (#10049)
Resolves open Dependabot security advisories for transitive npm
dependencies that have no direct manifest entry (so Dependabot cannot
auto-open fix PRs for them).

tar (6 x HIGH): an old tar@6.2.1 was pulled in via
ttf2woff2@4.0.5 -> node-gyp@9.4.1 (and node-gyp's
make-fetch-happen@10 -> cacache@16 chain). ttf2woff2 6+ switched to an
ESM/default export that breaks @vusion/webfonts-generator's callable
usage, so rather than bump ttf2woff2 we override its node-gyp to
^11.2.0 via a scoped resolution. That modernises the whole sub-tree
(node-gyp 11, make-fetch-happen 14/15, cacache 19/20) onto tar@7.5.16
while keeping ttf2woff2 at 4.0.5 so webfont generation still works.

flatted (1 x HIGH): bumped 3.4.1 -> 3.4.2 in the Electron runtime
(GHSA-rf6f-7fwh-wjgh).
2026-06-12 14:50:43 +05:30
Dave Page 8dcc30a05d doc: Fix typo and clarify PGPASS_FILE documentation. #9866 (#10034)
Corrected "varible" -> "variable" and rewrote the broken sentence to
explain that PGPASS_FILE is the path to a pgpass file that is copied into
the container and used as the .pgpass file.
2026-06-12 14:49:41 +05:30
Dave Page 51e90a9827 Correct the macOS Replace shortcut in Query Tool toolbar docs (#9817) (#10033)
doc: Correct the macOS Replace shortcut in the Query Tool toolbar docs. #9817

The Edit toolbar table listed Replace as "Option + Cmd + F (MAC)" /
"Ctrl + Shift + F (Others)", but the default Replace shortcut is
Cmd/Ctrl + R, per register_editor_preferences.py.
2026-06-12 14:47:28 +05:30
Ashesh Vashi 4751795087 docs: clarify 9.16 release-notes entries for #10068 and #10078
Tighten the release-notes prose for the two security entries whose
original one-liner didn't carry the impact framing settled during
Dave Page's 2026-06-11 CVSS review.

#10068 (CVE-2026-12048): re-lead with the critical-severity chain.
Default pgAdmin Content-Security-Policy allows inline script and an
iframe srcdoc inherits the embedding origin, so attacker JavaScript
ran same-origin to the victim's authenticated pgAdmin session and
could read every saved server connection credential and issue
arbitrary SQL against every server the victim was connected to.
The previous wording described the sinks but not the impact.

#10078 (CVE-2026-12044): re-lead with the stored
pgstattuple/pgstatindex sink (low-privilege user names a table or
index foo'bar, superuser viewer triggers SQL under the superuser
role). That sub-defect is what earns the score; the description-
field self-injection is bundled because the fix is the same. The
previous wording led with the self-injection only.

Both rewrites match the descriptions used in the CVE JSON records
submitted to the PostgreSQL CNA.
2026-06-12 09:49:44 +05:30
Ashesh Vashi cc4deed6eb docs: add CVE numbers and security fix entries to 9.16 release notes
Add CVE-2026-12044 through CVE-2026-12050 to the Bug fixes section and
set the release date to 2026-06-18.
2026-06-12 09:15:44 +05:30
Ashesh Vashi 04977b593e Merge remote-tracking branch 'origin/master' into cve-9.16 2026-06-12 08:58:28 +05:30
Dave Page 0ff9ecfe67 test(llm): pin sandbox-weakening commands and parser edge cases
Extend the read-only query validator's regression suite with 17 more
scenarios lifted from a v2 of the original #10022 patch that was
never committed (recovered from an uncommitted draft).

Five new accept scenarios cover parser corner cases:
  - leading whitespace
  - trailing semicolon followed by trailing whitespace
  - leading line comment
  - semicolon inside a string literal (must not split the statement)
  - (SELECT 1) UNION (SELECT 2), confirming the leading-keyword
    traversal walks past parentheses

Twelve new reject scenarios pin commands that directly attack the
BEGIN TRANSACTION READ ONLY wrapper rather than merely attempting a
generic write:
  - bare COMMIT / END / ROLLBACK / ABORT / BEGIN as single statements
    (previously tested only as the leading verb of a multi-statement
    payload)
  - START TRANSACTION (synonym for BEGIN)
  - SAVEPOINT (savepoint manipulation)
  - SET LOCAL transaction_read_only = off
  - SET SESSION default_transaction_read_only = off
  - DISCARD ALL (resets session state -- search_path, prepared
    statements, etc.)
  - multi-statement payloads where the leading statement is an
    allowed verb (SELECT or WITH) followed by ROLLBACK and a write
    -- closer to a real attack shape than the trailing-COMMIT PoC

If a future refactor of _ALLOWED_LEADING_KEYWORDS or the statement-
counting logic lets any of these slip through, the new scenarios
fail loudly. Module is now 77 passed / 0 failed / 0 skipped.
2026-06-11 10:11:28 +05:30
Yogesh Mahajan 7aa3f85caf fix(#9701): Ensure to use psycopg3 is used while connecting to postgres DB when PGADMIN_CONFIG_CONFIG_DATABASE_URI is specified. (#9914) 2026-06-11 09:55:09 +05:30
Ashesh Vashi 2ae0d36109 fix(sqli): close remaining apostrophe-in-identifier sinks and tighten the lint
Layered follow-up to the COMMENT description SQLi fix. Closes three
related gaps the original patch did not cover.

1. Stats templates — apostrophe-in-identifier SQLi (10 sites).

The pgstattuple/pgstatindex call sites in the stats templates rendered
the target relation as an embedded single-quoted literal, e.g.

    pgstattuple('{{schema_name}}.{{table_name}}')
    pgstatindex('{{conn|qtIdent(schema)}}.{{conn|qtIdent(name)}}')

A user with CREATE privilege on a schema could plant a table or index
named `foo'bar` (PostgreSQL permits any character except NUL inside a
quoted identifier). Any viewer who then opened that object's stats
panel would render an unbalanced SQL literal. qtIdent does NOT escape
apostrophes — it escapes the embedded double quotes that delimit a
quoted identifier — so the outer single-quoted literal still broke
out. Same bug class as the COMMENT description vector, just gated on
DDL privilege instead of dialog access.

Fix replaces all 10 sites with the canonical regclass form:

    pgstattuple({{ tid }}::oid::regclass)
    pgstatindex({{ exid|cid|idx }}::oid::regclass)

The OID is already passed by each handler (tables/utils.py,
exclusion_constraint/__init__.py, index_constraint/__init__.py,
indexes/__init__.py, views/__init__.py). The cast eliminates the
embedded string literal entirely — the bug class can no longer recur
through these sites.

Files:
  tables/sql/{default,16_plus}/stats.sql
  views/templates/mviews/{pg,ppas}/default/sql/stats.sql
  tables/templates/exclusion_constraint/sql/{default,16_plus}/stats.sql
  tables/templates/index_constraint/sql/{default,16_plus}/stats.sql
  tables/templates/indexes/sql/{default,16_plus}/stats.sql

2. Lint regex — embedded-Jinja blind spot.

The original lint regex `'\{\{[^}]+\}\}'` only matched literals where
the Jinja interpolation filled the entire single-quoted body. It
missed the embedded form `'foo{{ x }}bar'` — exactly the shape used
by the stats templates above and by `'%{{ search_text }}%'` in
search_objects.

The broadened regex `'[^'\n{}]*(?:\{\{[^}]+\}\}[^'\n{}]*)+'` catches
both forms. The `[^'\n{}]` body constraint is what stops the regex
from spanning a Jinja control block `{%...%}` — without it the regex
would walk across long `{% if %}` chains and produce huge false-
positive matches that span unrelated literals.

Allowlist extended with one-line justifications for every additional
occurrence the broadened regex now surfaces (search_objects manual
escape, CATALOGS.LABELS_SCHEMACOL macro, gettext-translated catalog
labels, opcintype oidvector pairs, the pg_get_partkeydef CASE
expression where the interpolation is between two separate literals
rather than inside one).

3. qtLiteral — close the inner-except silent-failure hole.

The fail-fast for a missing `conn` was the right shape but the inner
`except Exception: print(value)` still silently returned the raw
input when `psycopg.sql.Literal(value).as_string(conn)` raised
(unadapted custom type, encoding error, etc.). Same SQL-injection
sink the outer fail-fast just plugged, gated on a different failure
mode. Removed the except so the exception propagates — callers can
now react explicitly instead of seeing an unescaped value flow into
their SQL.

Tests:
  test_stats_template_regclass_cast.py — 10 scenarios that render
    each stats template with an apostrophe-bearing identifier payload
    and assert (positive) the pgstat* call uses ::oid::regclass and
    (negative) no `pgstat*('...'` form recurs, and the apostrophe
    payload never appears inside a literal in the rendered SQL.
  test_qtliteral_no_silent_unescape.py — asserts qtLiteral raises on
    an unadaptable value rather than silently returning it.

42 tests / 0 failures across the touched packages.
2026-06-10 21:37:47 +05:30
Dave Page 658bb585d1 fix(sqli): HTML-escape description fields and harden qtLiteral
Fixes a SQL injection vulnerability where authenticated users could
break out of SQL string literals in COMMENT ON ... IS '<description>'
clauses by submitting an apostrophe-laden description through pgAdmin
dialogs. The original report covered domains; the patch expands the
fix to every site of the same pattern.

Three layers of defense:

1. Site fixes (16 places) — Replace '{{ x.description }}' with
   {{ x.description|qtLiteral(conn) }} across templates for domains,
   domain constraints, foreign tables, languages, event triggers,
   and the views OID-lookup query. Plumbs conn=self.conn through
   every render_template call that needed it. Also fixes a `{ % elif`
   Jinja typo in foreign-table schema diff that was preventing the
   elif branch from being reachable.

2. Driver hardening — qtLiteral (in utils/driver/psycopg3/__init__.py)
   used to silently return the raw unescaped value when conn was
   falsy. Now raises ValueError with a message pointing at the two
   fixes (render_template(..., conn=) or pass conn as the second
   argument). Surfaces this whole bug class loudly going forward,
   and immediately uncovered 8 latent plumbing bugs in
   schemas/__init__.py, schemas/functions/__init__.py,
   schemas/tables/utils.py, foreign_servers/__init__.py, and 7 sites
   in roles/__init__.py — all now fixed.

3. Regression tests (3 new files):
   - test_comment_description_sql_escaping.py — renders each
     previously-vulnerable template with an apostrophe-injection
     payload and asserts the escaped fragment is present (15
     scenarios).
   - test_sql_string_literal_lint.py — walks every *.sql template,
     flags every '{{ ... }}' single-quote-wrapped Jinja
     interpolation, and compares against a curated allowlist (75
     entries, each with a justification — OIDs, fixed enums,
     server-derived identifiers, SQL-comment headers, etc.). New
     occurrences fail the test until either qtLiteral is used or
     an allowlist entry is added.
   - test_qtliteral_requires_conn.py — unit test asserting the new
     fail-fast behavior.

Reported by Jasser Chebbi (j3seer).
2026-06-10 21:37:47 +05:30
Ashesh Vashi f81433ae2f Fix RCE via unauthenticated session deserialization in SQL Editor close/update routes.
The 'close' (DELETE /sqleditor/close/<trans_id>) and
'update_sqleditor_connection' (POST /sqleditor/initialize/sqleditor/
update_connection/...) endpoints were the only state-mutating SQL Editor
routes missing @pga_login_required. Both reach pickle.loads on
session['gridData'][trans_id]['command_obj'] via
close_sqleditor_session() and check_transaction_status() respectively.

Combined with a forged session file (precondition: SECRET_KEY leak +
write access to sessions/), this gave an unauthenticated attacker a
pickle deserialization sink and arbitrary code execution in the pgAdmin
process. Adding the login decorator forces is_authenticated/MFA checks
before the unsafe deserialization path is reached, matching the
convention used by every other endpoint in the module.

Includes a server-mode regression test that harvests a CSRF token from
GET /login (mirroring the attacker's path) and asserts both endpoints
reject the unauthenticated request before reaching the route body.
Self-skips in DESKTOP mode because pgAdmin's before_request hook
re-authenticates DESKTOP_USER on every request there, so no auth
decorator can be exercised in an unauthenticated state. Wired into the
existing server-mode CI workflow alongside the data-isolation tests.

Reported by Fernando Bortotti <fernando.bortotti@bsd.com.br>.
2026-06-10 20:01:44 +05:30
Ashesh Vashi 60d149864b fix(cloud): HTML-escape SDK error text across cloud module endpoints
Promote the post-connection-SQL sanitiser to a generic helper and apply
it to every cloud-module endpoint that propagates AWS / Azure / Google
SDK exception text into a JSON response field. Closes the RDS
HTML-injection vector reported against /rds/verify_credentials/ and
sweeps the same pattern across the verify-credentials, deploy, regions,
and update-server paths so no remaining cloud endpoint embeds raw
SDK / OS exception text into the response.

Sanitiser
  - Move web/pgadmin/utils/driver/psycopg3/text_sanitize.py to
    web/pgadmin/utils/text_sanitize.py.
  - Rename sanitize_driver_message -> sanitize_external_text; the
    function now describes its real role (HTML-escape text from any
    external/untrusted source — driver, cloud SDK, OS process).
  - Move tests to web/pgadmin/utils/tests/test_text_sanitize.py.
  - Update the single existing importer in psycopg3/connection.py.

Backend wrap sites
  - misc/cloud/rds/__init__.py — verify_credentials info= (the
    reported case: AWS STS IncompleteSignature echoes access_key
    verbatim into the exception string) and get_regions errormsg=
    (boto3 Session().get_available_regions exception).
  - misc/cloud/azure/__init__.py — verify_credentials and
    check_cluster_name_availability errormsg= (3 sites).
  - misc/cloud/google/__init__.py — verify_credentials
    (PermissionError + generic Exception path-resolution branches and
    the get_auth_url error), verification_ack, projects, regions,
    instance_types, database_versions — 8 sites covering every path
    that propagates SDK / file-resolution exception text.
  - misc/cloud/__init__.py — central /deploy endpoint (errormsg=resp
    where resp is str(e) bubbled up from deploy_on_rds /
    deploy_on_azure / deploy_on_google) and update_cloud_server
    (errormsg=server where server is the str(e) from db.session.commit
    failure).

Frontend
  - components/FormComponents.jsx — declare plainText in
    FormFooterMessage.propTypes (it already passes through via
    spread).
  - misc/cloud/static/js/CloudWizard.jsx — add plainText to the three
    FormFooterMessage sites. INFO messages there are gettext literals,
    so plain-text rendering is uniformly safe; the ERROR path now
    follows the SafeMessage contract for backend-derived strings.

Tests
  - rds/tests/test_rds_verify_credentials_xss.py — wiring test that
    patches RDS.validate_credentials to return an AWS-shaped error
    embedding an <iframe> payload, asserts the response info field is
    entity-encoded and contains no raw markup. Includes a happy-path
    guard against the sanitiser altering 'verified'.
  - azure/tests/test_azure_verify_credentials_xss.py — same pattern,
    Azure.__init__ touches current_user so the Azure class is patched
    to a stand-in that yields the HTML-bearing validation error.
  - google/tests/test_google_verify_credentials_xss.py — covers the
    PermissionError and generic-Exception branches of the
    client_secret_file resolution path (most directly user-influenced).
  - test_post_connection_sql_xss.py — docstring + comment updates for
    the renamed function.

Frontend rendering is already DOMPurify-guarded at the NotifierMessage
sink, so the reported PoC payload would not execute even without
these backend changes; the fixes here are the defence-in-depth layer
the report's section-5 "Suggested directions" calls out, ensuring API
consumers other than the browser (audit logs, third-party clients)
never see raw markup.

876 / 876 JS tests + ESLint clean. Cloud / utils / server-groups
Python test packages pass (24 + 60 + 102, with pre-existing skips
unchanged).
2026-06-10 20:01:44 +05:30
Dave Page 9e370d3cb6 fix(xss): comprehensive XSS hardening across notification and Explain flows
Mitigates a stored XSS vector where a malicious PostgreSQL server's
ErrorResponse — or any backend-derived string — could inject HTML into
pgAdmin's DOM via the notifier, Explain visualiser, or form-input error
paths. Combines three complementary layers of defence.

Frontend — DOMPurify at every HTMLReactParse sink:
  - NotifierMessage (toasts) and FormFooterMessage
  - FormInput help / error messages, FormNote
  - ModalProvider AlertContent + confirmDelete
  - ToolErrorView (tool open failure)
  - Explain/Analysis NodeText (plan extra-info renderer)
  - SQL editor confirm dialogs (transaction, promotion, close-running)
  - Dialogs/ConfirmSaveContent
  - PreferencesHelper modal alert
  - SelectThemes helper text
  No HTMLReactParse call site renders text unsanitised after this.

Frontend — plain-text contract for backend-derived strings:
  - New components/SafeMessage.jsx exports SafeMessage (plain text,
    preserves newlines via pre-wrap) and SafeHtmlMessage (sanitised
    HTML via DOMPurify + html-react-parser).
  - NotifierMessage and ModalProvider.AlertContent accept a `plainText`
    prop. When true the body renders via SafeMessage.
  - Notifier gains errorText / alertText / warningText / infoText /
    successText methods that plumb {plainText: true} through. These
    are the correct choice whenever the message may originate from a
    PostgreSQL server, driver, OS process, remote API, or any other
    untrusted channel.
  - pgRespErrorNotify and pgNotifier use alertText / errorText
    internally. The redundant _.escape and \\n -> <br/> substitution
    in pgNotifier are gone — the SafeMessage container's pre-wrap
    preserves newlines without further transformation.
  - FormInput.errorMessage and ToolErrorView render as plain text
    unconditionally; their inputs are always validation / driver
    errors.
  - ~50 callers across browser, tools, dashboard, debugger, misc, llm,
    preferences, schema diff, and the SQL editor are migrated to the
    *Text variants where they pass a backend-derived field
    (err.response.data.errormsg, parseApiError(error), res.errormsg,
    res.info, res.data.result, err.message, interpolated PG object
    names).
  - Browser auto-update notification rewritten to plain text — the URL
    is shown inline instead of being interpolated into an <a href>
    attribute. The gettext template-literal anti-pattern on that path
    is fixed too (URL is a separate %s argument).

Cleanup:
  - helpers/Notifier.jsx — remove the dead AlertContent function and
    its seven imports (Box, CloseIcon, DefaultButton, PrimaryButton,
    HTMLReactParser, CheckRoundedIcon). The function was defined but
    never instantiated; the real top-level alert path goes through
    ModalProvider.AlertContent. Eliminates a false-positive sink that
    recent audits cite — the cited line numbers reference a function
    that never runs.

Explain — escape Recheck Cond / Exact Heap Blocks:
  - nodeExplainTableData concatenates plan-node fields into HTML
    strings parsed by html-react-parser. Every sibling field (Filter,
    Index Cond, Hash Cond, Join Filter, Rows Removed by Filter, Hash
    Buckets/Batches/Peak Memory) wraps the value in _.escape();
    Recheck Cond and Exact Heap Blocks were the two outliers
    concatenating raw. An attacker who introduces a table with a
    crafted column name and triggers a Bitmap Heap Scan over it could
    inject HTML into Explain output that a victim later views in the
    visualiser. With the rest of the XSS fix this would otherwise be
    neutralised by DOMPurify at the sink — escaping at construction
    matches the sibling fields and provides defence in depth.

Backend — HTML-escape PG-returned text in post-connection-SQL:
  - New web/pgadmin/utils/driver/psycopg3/text_sanitize.py exports
    sanitize_driver_message. Strips C0 control characters
    (0x00-0x08, 0x0B, 0x0C, 0x0E-0x1F, 0x7F) — preserving TAB, LF,
    CR so multi-line error messages stay readable — then HTML-escapes
    via html.escape(..., quote=True).
  - execute_post_connection_sql logs the raw PG-returned text so the
    server log stays human-readable, and applies the escape only to
    the value crossing into the JSON response body, where downstream
    consumers may render it as HTML:
      <iframe srcdoc="..."> -> &lt;iframe srcdoc=&quot;...&quot;&gt;
    Real Postgres errors (which never contain literal markup) round-
    trip unchanged for human readability. Protects third-party JSON
    consumers (audit logs, API clients, support tickets) that do not
    have the frontend's DOMPurify.

Tests
  - components/SafeMessage.spec.js — 25 payloads (iframe srcdoc, SVG
    onload, MathML href javascript:, embed/object data:, marquee
    onstart, template/noscript, CSS expression, etc.).
  - Notifier.spec.js — 9 cases (errorText / alertText plumbing,
    pgRespErrorNotify 410 vs non-410, pgNotifier raw errormsg pass-
    through, "Unknown error" fallback).
  - ToolErrorView.spec.js — 3 cases.
  - ModalProvider.spec.js — 4 cases.
  - FormComponents.spec.js extended with NotifierMessage plainText
    mode + FormInput errorMessage plain-text rendering.
  - Explain regression test renders Analysis with HTML-laden extraInfo
    and asserts no <iframe> / <script> reaches the DOM.
  - Python: test_sanitize_driver_message.py (21 sanitiser + 5
    execute_post_connection_sql wiring scenarios with a real Flask +
    flask-babel app context and a stand-in connection).
  - test_post_connection_sql_xss.py — end-to-end integration: register
    a server, set post_connection_sql to a query referencing a relation
    whose name contains an iframe payload, POST to the connect endpoint,
    and assert the response JSON errormsg is entity-encoded and never
    raw markup.
  - fake_pgadmin.js notifier mocks and enable_disable_triggers_spec.js
    spies updated for the new API.

875 / 875 JS tests pass; ESLint clean.
2026-06-10 20:01:44 +05:30
Khushboo Vashi 04fa05c1e6 Fix missing ALTER ... SET DEFAULT for inherited columns in table SQL. (#9774)
When a table inherits a column from a parent, the generated table
SQL/EDIT script omitted the column's default. Emit a post-create
ALTER TABLE ... ALTER COLUMN ... SET DEFAULT for inherited columns
that carry a default, and show the default in the inherited-column
comment, across all version buckets.

Generated columns (colconstype 'g') are excluded from both the new
ALTER statement and the comment default, consistent with the inline
column-definition logic, since SET DEFAULT is invalid for a generated
column.
2026-06-09 15:44:22 +01:00
ZoroXL 77dc9d77ec Fix infinite loading after an idle connection is dropped (#6308)
When a database connection was silently dropped while pgAdmin sat idle
(common on Linux Desktop behind a firewall/NAT), the Object Explorer and
Query Tool would hang on an infinite spinner instead of offering to
reconnect, because connected() only checks local driver state and misses
stale/half-open TCP sockets.

- ping() now performs a real network check (SELECT 1) guarded by the
  connection's transaction_status, so an in-progress query or open
  transaction is never disrupted; on failure it tears down the dead
  connection and returns False.
- The Object Explorer children() endpoint uses ping() to detect a dead
  connection up front and returns 503 CONNECTION_LOST; the tree shows a
  reconnect dialog (deduplicated per server) and marks the node
  disconnected.
- TCP keepalive defaults are applied to all connections so the OS
  surfaces dead sockets in seconds rather than the full retransmission
  timeout.
- The Query Tool re-checks connection status when its tab becomes
  visible again, and its layout/visibility listeners are now cleaned up
  on unmount.

Refs #9700, #8279. Adds a 9.16 release note.
2026-06-09 15:26:28 +01:00
Manolis Stamatogiannakis 8ad45be9c8 Use ServerManager's passfile in connect() credential gate. (#9810)
The passfile kwarg passed to Connection.connect() was only ever used as
a gate for the passexec fallback; it was never forwarded to
create_connection_string(), which builds the DSN's passfile from the
ServerManager's connection parameters. This made the gate inconsistent
with the passfile actually used for the connection.

Use the ServerManager passfile for the credential gate so the check
matches what is used to connect. The manager passfile now takes
precedence over both passexec and any passfile kwarg; warnings are
emitted when either is ignored in its favor.
2026-06-09 15:23:50 +01:00
Dave Page 2918e16734 docs: move misfiled release-note entries from 9.9 to 9.16
The entries for #9875 (EXPLAIN/blank-line query extraction) and #9988
(OAuth2 metadata URL guidance) were added to release_notes_9_9.rst,
which is an already-released version. Move them to the in-progress
9.16 notes where they belong.
2026-06-09 15:22:33 +01:00
Daniel Zabel 06300e76a0 Make init container security context configurable in the Helm chart (#9646)
The two init containers in the Helm deployment template had hardcoded
securityContext blocks, unlike the main container which already renders
its context from .Values.containerSecurityContext via the
renderSecurityContext helper. Switch the init containers to the same
pattern so operators can customise (or disable) their security context.

Default behaviour is unchanged: containerSecurityContext defaults to
enabled with values identical to the previous hardcoded block, and the
helper continues to gate appArmorProfile on
global.compatibility.appArmor.enabled. Verified with helm template that
the rendered init-container securityContext is unchanged for the default
values, honours the appArmor toggle, and is omitted entirely when
containerSecurityContext.enabled=false.

Adds a 9.16 release note.
2026-06-09 15:17:01 +01:00
Ashesh Vashi 397be4e70e Fixed an issue where EXPLAIN and EXPLAIN ANALYZE failed when blank lines separate clauses in the SQL query. (#9875)
getQueryAt now uses the syntax tree as the primary check for whether a
blank-line boundary cut through a SQL statement. It is split into two
helpers: _findQueryBoundaries (the original scan, parameterized by
stopAtBlankLine) and _needsExpansion, which detects when a Statement
node straddles the extracted range and re-scans ignoring blank lines.

A STATEMENT_STARTERS keyword list guards the case where the parser
merges semicolon-less queries into one Statement, and WRAPPER_STARTERS
(EXPLAIN, ANALYZE, WITH) force expansion when the Statement extends past
the range. Also fixes a Lezer boundary bug (tree.iterate is inclusive at
boundaries) with a node.to > startPos check. Adds 21 tests covering
EXPLAIN, negative no-merge cases, comments, and boundary edge cases.
2026-06-09 15:10:07 +01:00
Adam Tao 0223e8a026 fix(openai): tolerate empty/null fields in streaming tool-call deltas (#9828)
Some OpenAI-compatible providers emit empty or null name/arguments/id
fields in streaming continuation deltas to keep the response schema
stable. pgAdmin's accumulator overwrote the real tool name (captured in
the first delta) with the later null, producing a tool call named "null"
that could not be dispatched.

Skip falsy name/arguments/id when accumulating (matching the OpenAI
Python SDK, which ignores nulls the same way) so the values captured in
the first delta survive. Also guard against a null `function` object in
a delta, which previously raised TypeError. Without the id guard a null
id in a continuation delta clobbered the real id, which the final build
then replaced with a random uuid rather than the provider's id.

Adds a unit test covering the null-continuation, multi-chunk-arguments,
and null-function cases, and a 9.16 release note.
2026-06-09 15:08:19 +01:00
Ashesh Vashi 89e84eb913 OAuth2: actionable error when openid scope lacks OAUTH2_SERVER_METADATA_URL (#10007)
When OAUTH2_SCOPE contains 'openid' but OAUTH2_SERVER_METADATA_URL is
not set, Authlib fails deep inside id_token verification with a cryptic
`Missing "jwks_uri" in metadata` error that names neither the config
knob nor the fix.

Add a pre-flight check at the entry of _authorize_access_token: if the
scope includes 'openid' and no (non-whitespace) metadata URL is set,
raise a RuntimeError with actionable guidance before any network
round-trip. server_metadata_url is the only way pgAdmin feeds JWKS to
Authlib, so this carries no regression risk for correctly-configured
providers. Clarify the OAUTH2_SERVER_METADATA_URL comment in config.py
and add regression coverage.
2026-06-09 14:53:28 +01:00
Ashesh Vashi 879ae40cbb CLI: skip delete_adhoc_servers() in CLI mode (#10008) 2026-06-09 14:47:48 +01:00
Ashesh Vashi c88c8f612e docker: read PGADMIN_CONFIG_CONFIG_DATABASE_URI safely via os.environ (#9984)
The container entrypoint substituted ${PGADMIN_CONFIG_CONFIG_DATABASE_URI}
into a double-quoted Python string for `python3 -c`. Combined with the
config_distro.py convention (where the env var's value must itself be a
Python literal, i.e. users set it to 'postgresql+psycopg://...'), the
entrypoint re-wrapped the already-quoted value, producing a string with
literal quotes inside that SQLAlchemy could not parse -- and the Python
crash made the first-launch check capture an empty string, silently
skipping PGADMIN_DEFAULT_EMAIL / PGADMIN_DEFAULT_PASSWORD setup.

Read the env var inside Python via os.environ so the shell no longer
participates in Python-literal quoting (also removing a shell-injection
surface), and use ast.literal_eval to unwrap the legacy quoted form while
letting raw values pass through. external_config_db_exists now stays
"False" on any Python failure so first-launch setup still runs.

Adds a 9.16 release note.
2026-06-09 14:44:26 +01:00
Ashesh Vashi 24f0597dc8 Server UI: clarify SSH tunnel identity-file password prompt label (#10010) 2026-06-09 14:35:42 +01:00
Ashesh Vashi 303f6a2dd8 Use resolve_fks=False in migration reflect() so stale FKs don't crash startup (#9976)
An old configuration database (e.g. a pre-9.0 pgadmin4.db lingering in
%appdata%) can carry a stale foreign key such as server.user_id ->
user_old, a table removed long ago. SQLAlchemy's MetaData.reflect()
defaults to resolve_fks=True, which auto-follows the reflected table's
foreign keys and reflects their targets too; the orphan target trips
NoSuchTableError and aborts the startup migration, surfacing in the GUI
as the misleading "Server could not be contacted".

None of the migrations use the FK-target tables -- each operates only on
the explicitly requested table(s). Pass resolve_fks=False at all 14
meta.reflect() call sites across the 12 migration files so reflection no
longer cascades into broken FK targets. Behaviour is unchanged for
healthy databases.

Adds a 9.16 release note.
2026-06-09 14:32:19 +01:00
Dave PageandClaude Opus 4.8 8afe14ec36 Remove design proposal document committed in error
This internal design proposal was inadvertently included with the
session and file-manager hardening changes and should not have been
added to the repository.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 14:31:10 +01:00
Ashesh Vashi 25415b888a docs(container): warn about K8s init-container tag mismatch and RollingUpdate hazard on shared data volumes (#10014) 2026-06-09 14:28:16 +01:00
Pavan Manish c720a33b44 Add toast_tuple_target to the Materialized View dialog (#9626)
Exposes the PostgreSQL 11+ TOAST_TUPLE_TARGET storage parameter in the
Materialized View properties dialog, mirroring the existing FILLFACTOR
support: an integer field (128-8160) in the Definition group, extracted
from reloptions in properties.sql, emitted in the CREATE ... WITH clause,
and SET/RESET on edit. The recreate-on-definition-change path preserves
the value.

The dialog field and SQL are applied to the version buckets that
supported servers actually resolve to. The original change only touched
the legacy default/ bucket (PG < 12), so it had no effect on any
supported server (13-18, which resolve to 13_plus/15_plus); the
create/properties/update templates are now updated in the 12_plus,
13_plus and 15_plus buckets too. Template output is byte-identical to
the previous SQL when toast_tuple_target is unset.

Adds a 9.16 release note.
2026-06-09 14:16:50 +01:00
Ashesh Vashi f9b9bc9d40 fix(sqleditor): skip read-only columns when saving inserted rows (#10015) 2026-06-09 14:12:11 +01:00
pavanmanishd 39684cdf48 Generate ALTER TABLE SET UNLOGGED/LOGGED when persistence is changed (#9768)
Wire the relpersistence change through to the table update SQL across all
version buckets (default, 11_plus, 12_plus, 15_plus) so the Unlogged toggle
emits ALTER TABLE ... SET LOGGED/UNLOGGED on every supported server.

Closes #9677.
2026-06-09 14:00:15 +01:00
pavanmanishd 4c5702dd47 Close tab on middle-click (#9767)
Closes #9699.
2026-06-09 13:53:10 +01:00
Ashesh Vashi 6bc4341383 fix(llm): expand allowlist for self-hosted endpoints and stop silent fallbacks (#10016) 2026-06-09 13:48:12 +01:00
Ashesh Vashi 5b17cad8a4 fix(pkg/linux): pin psycopg-c build to x86-64 v1 baseline (#10017) 2026-06-09 13:42:30 +01:00
Ashesh Vashi 4dd5cdd9ea fix(schema-diff): reverse-engineer SERIAL columns by default (#10020)
Schema Diff's "Generate Script" emitted CREATE TABLE DDL with
the libpq-expanded form of SERIAL columns:

    col integer NOT NULL DEFAULT nextval('table_col_seq'::regclass)

instead of preserving the SERIAL declaration. Applied to a clean
target, that script fails with `relation "table_col_seq" does
not exist` because the sequence is never created — exactly the
symptom in issue #9896.

SERIAL detection already existed in
columns/utils.py:get_formatted_columns (added in 115208c8d for
ERD generation, Nov 2023), but was gated behind a
``with_serial_cols`` parameter that defaulted to False. Only ERD
and the Schema Diff *comparison* phase opted in via explicit
True. The Schema Diff *Generate Script* path and the browser
tree's *CREATE Script* view went through `_get_resql_for_table`
→ `_formatter(data)` without specifying it, so SERIAL detection
was skipped and #9896 reproduced.

There is no use case where pgAdmin should knowingly emit the
expanded libpq form: SERIAL is purely a CREATE-time macro that
PostgreSQL expands into an integer column plus an implicit
sequence owned by the column. The detection logic is reversing
that expansion, which is the correct interpretation in all
contexts (DDL emission, comparison, ERD, properties dialog).

Flip the default to True at all four declaration sites:

- columns/utils.py: get_formatted_columns
- utils.py: BaseTableView._formatter
- utils.py: BaseTableView.fetch_tables
- __init__.py: TableView.fetch_tables

All four existing explicit-True callers (ERD x2, Schema Diff
compare x2) are unaffected. Silent callers that previously got
the buggy False — `_get_resql_for_table` (Schema Diff Generate
Script and browser CREATE Script), `select_sql` / `insert_sql` /
`update_sql` in the table node, and one path in the partition
flow — now correctly get SERIAL detection. The SELECT/INSERT/
UPDATE generators are unaffected regardless: they emit only
column names, which SERIAL detection never touches (it rewrites
the column type and clears `defval`, leaving the name intact).
The table edit path is likewise safe: `get_sql` diffs each
changed column against a freshly re-fetched old column state
that bypasses SERIAL detection, so the reprojected `old_data`
columns are never consulted for column DDL.

Adds a resql regression in pg/{12_plus, 14_plus, 16_plus}: a
CREATE TABLE scenario covering ``serial`` / ``bigserial`` /
``smallserial`` columns plus a plain ``text`` column, with the
expected reverse-engineered DDL preserving the SERIAL keywords.
Would have failed before this fix.

Known coverage gaps (not blockers for this PR):

- PG11 (uses ``pg/11_plus`` / ``pg/default``): test intentionally
  not added there because PG11 still emits ``WITH (OIDS = FALSE)``
  which the existing expected-output convention reflects, and
  without a live PG11 instance I can't verify the expected SQL
  variant. The source-side fix still applies to PG11.
- PPAS (``ppas/*`` test dirs): not added because PPAS output may
  diverge subtly (oraplus / hyphenated identifiers) and I don't
  have a PPAS instance to verify against. The source-side fix
  applies equally to PPAS.
- The SERIAL detection heuristic is name-based
  (``<table>_<col>_seq``); sequence/table/column renames break
  detection. Pre-existing in 115208c8d; could be replaced with
  proper ``pg_depend``-based detection in a follow-up.

Fixes #9896
2026-06-09 13:35:12 +01:00
Ashesh VashiandClaude Opus 4.8 833504f1be fix(schema-diff): aggregate child counts at parent group rows (#10021)
In Tools > Schema Diff, the top-level group rows ("Schema Objects",
"Database Objects") rendered blank difference counts even when their
child object-type groups (Functions, Tables, Sequences, ...) listed
Source-Only / Target-Only / Different objects, giving no signal at the
parent level that anything differed.

The results tree has three levels: top-level object-group rows, mid-level
object-type rows, and leaf object rows carrying a status. setRecordCount()
only handled leaf children, so mid-level rows counted correctly but
top-level rows (whose children are mid-level rows with no status) stayed
at zero. The render gate 'identicalCount' in row also skipped count
rendering for top-level rows because generateGridData() never seeded
those fields on them.

Fix: setRecordCount() now recognises counted-group children (recursing to
refresh their counts so filter changes propagate, then rolling the totals
up); leaf-only behaviour is unchanged. generateGridData() seeds the four
count fields on every top-level group row so the render gate fires. Adds
Jest coverage driving the now-exported setRecordCount directly, including
the reporter's exact tree and a filter-refresh case.

Fixes #9892.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 13:32:47 +01:00
Ashesh VashiandClaude Opus 4.8 94a7687d2d chore(cloud): remove EDB BigAnimal cloud deployment feature (#10018)
Removes the EDB BigAnimal cloud-deployment integration from the Cloud
Wizard. AWS RDS, Azure Database, and Google Cloud SQL remain as the
supported deployment targets. Covers the backend blueprint and pgacloud
provider, the frontend wizard steps/components/constants/icons, the
documentation page and screenshots, and stray BigAnimal references in
docstrings.

The BigAnimal-only "Cluster Type" wizard step is removed and the
remaining steps renumber from 0-5 to 0-4. As a side effect, the Azure
cluster-name availability check (previously dead code at activeStep == 2,
skipped past by the now-removed step) is now exercised. Two latent bugs
in that check are fixed at the same time: it inspected res.data.success
although checkClusternameAvailbility already resolves res.data, so a name
collision was never reported; and it passed an Error object to gettext(),
which cannot render it. It now uses res.success and surfaces
error.message with a readable fallback.

A 9.16 Housekeeping release-note entry is added documenting the removal.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 13:16:48 +01:00
Dave PageandClaude Opus 4.8 1a8dcd8bcc Add release notes scaffold for 9.16. (#10048)
Create release_notes_9_16.rst with empty sections and add it to the
release notes toctree, so that individual fix/feature PRs can add their
entries without each recreating the file.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 12:36:30 +01:00
Hari Prasad 937d34ea2d refactor: Optimize startup time with adaptive server pinging (#9782)
* Fix exponential backoff logic and ping race condition in desktop startup
* Adaptive polling mechanism in startDesktopMode().
   -  Fix exponential backoff to cap at 1000ms instead of cycling back to 100ms
   - Move pingInProgress flag before the async pingServer() call to prevent race conditions
* Update showErrorDialog to use clearTimeout consistent with setTimeout-based scheduling
2026-06-09 15:33:51 +05:30
Ashesh Vashi ec3e6414e7 fix: accept prepare/binary kwargs in DictCursor.execute(..) (#10030)
psycopg.Connection.execute(query, params, *, prepare=None, binary=False)
delegates to its underlying cursor as
cur.execute(query, params, prepare=prepare). The DictCursor /
AsyncDictCursor in pgadmin.utils.driver.psycopg3.cursor narrowed the
signature to (self, query, params=None), so any caller that uses the
high-level Connection.execute() path with a cursor_factory=DictCursor
connection hits

    TypeError: execute() got an unexpected keyword argument 'prepare'

The most visible victim is psycopg_pool.ConnectionPool.check_connection,
which sends conn.execute("") to validate every checkout — every
connection then looks broken to the pool and getconn() times out.

Forward prepare and binary (keyword-only) to the underlying
psycopg.Cursor / psycopg.AsyncCursor. Defaults match psycopg's own,
so existing callers see no behavior change.

Adds a regression test asserting both classes expose the kwargs as
keyword-only parameters. The test docstring leads with psycopg.Cursor
substitutability (DictCursor is a Cursor subclass; both kwargs must be
accepted to remain substitutable) and notes that Connection.execute is
just the most visible failure path — it forwards prepare but handles
binary by setting cur.format instead of forwarding it.
2026-06-09 14:11:09 +05:30
dependabot[bot] d2bdd25160 Javascript dependency: Bump axios from 1.16.1 to 1.17.0 in /runtime (#10025)
Bumps [axios](https://github.com/axios/axios) from 1.16.1 to 1.17.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.16.1...v1.17.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-09 09:09:48 +01:00
Ashesh Vashi 8383c1220b chore(tests): unskip MFA validation-view test by completing dummy harness
The previous commit (2e14bd95d) made the MFA test package discoverable
and resilient but left one scenario --
'Validation view of a MFA method should return a HTML tags' -- as a
documented unittest.SkipTest. The skip reason was that
validate.html -> security/render_page.html -> base.html references
'current_app' and 'csrf_token()' in Jinja, and the dummy Flask app
built by test_create_dummy_app() does not expose either: pgAdmin's
real create_app() injects current_app via an @app.context_processor
(web/pgadmin/__init__.py:922) and Flask-WTF registers csrf_token() in
the Jinja env. The bare Flask(name, ...) used by the dummy app has
neither, so the GET-path render fails with
UndefinedError: 'current_app' is undefined.

Add the same two globals to the dummy app:

* A @app.context_processor returning {'current_app': current_app} so
  the Flask proxy is bound at render time, mirroring what
  create_app() does in production.
* A jinja_env.globals['csrf_token'] = lambda: 'dummy-csrf-token' that
  matches what Flask-WTF would otherwise install. Tests asserting on
  the rendered HTML can rely on the marker being present and stable.

With both globals available the template renders, /mfa/validate
returns a 200 HTML response, and the scenario goes from SkipTest to
a real assertion. The fix is intentionally scoped to the dummy harness
in tests/utils.py -- no production code change.

Result on this worktree: pgadmin.authenticate.mfa.tests now runs as
13 passed / 0 failed / 0 skipped (was 12/0/1). Full suite goes from
1818/0/444 to 1819/0/443.
2026-06-08 19:41:51 +05:30
Ashesh Vashi 2e14bd95dd chore(tests): make MFA test package discoverable and resilient
The MFA test directory was missing __init__.py, so
find_modules('pgadmin', False, True) in regression/runtests.py could
not walk into it. The test classes therefore never reached the
TestsGeneratorRegistry registry and the entire pgadmin.authenticate.mfa
test suite was silently absent from the default test run. The
regression for #10028 added in this branch was caught by that gap.

Adding the missing __init__.py exposes a second pre-existing problem:
TestMFATests.setUp called BaseTestGenerator.setUp, which posts to
/browser/server/connect/... and asserts a 200 response. The MFA
scenarios all run against a dummy Flask app (or pure mocks), so that
endpoint is not registered and the connect_server assertion fires
before any check_*() function runs. Skip the BaseTestGenerator setUp
since these scenarios deliberately do not need a real PostgreSQL
server.

Three further fixes that surface once the suite actually runs:

* mfa_enabled() and init_app() both short-circuit when SERVER_MODE
  is False. test_config.json defaults to DESKTOP mode, so every
  scenario in the suite was taking the disabled path. Force
  SERVER_MODE=True for the duration of the TestMFATests class and
  restore the previous value in tearDownClass.

* check_validation_view_content patched flask.current_app to capture
  logger.exception() calls. Those only fire on the POST path of
  /mfa/validate; the test exercises only the GET path, so the patch
  was dead code -- and additionally turned flask.current_app into a
  MagicMock, which broke Jinja's lookup of current_app in
  validate.html. Drop the patch and the now-unused ValidationException
  import.

* check_validation_view_content still cannot render validate.html
  against the bare dummy Flask app because the template references
  current_app.config and extends Flask-Security's
  security/render_page.html, neither of which the dummy app provides.
  Skip the scenario with a clear unittest.SkipTest reason rather than
  paper over with a brittle patch; rebuilding the dummy harness to
  expose those globals is its own follow-up.

Result on this worktree: pgadmin.authenticate.mfa.tests now runs as
12 passed / 0 failed / 1 skipped (the dummy-app/template gap),
up from a silent 0/0/0. Full suite goes from 1806/0/443 to 1818/0/444.
2026-06-08 19:25:48 +05:30
Dave Page fff6a48185 fix(mfa): reject external 'next' targets in MFA flow to close open redirect
The MFA flow honoured the user-supplied "next" query/form parameter
without checking that it pointed back inside pgAdmin, so an attacker
who got a logged-in user to click /mfa/validate?next=<external> could
land them on an attacker-controlled host straight out of the auth
flow -- a trusted-domain redirect ideal for credential-phishing
follow-on.

Add a single _is_safe_redirect_url helper that allows only same-origin
http(s) targets (relative paths included) and rejects:

* external hosts in absolute and protocol-relative ("//host") form;
* non-http schemes a browser will still follow (javascript:, data:,
  mailto:);
* userinfo tricks ("http://localhost@attacker.example/");
* backslash variants ("/\\host", "\\\\host") that some browsers
  normalize to forward slashes, enabling protocol-relative bypasses;
* empty / missing targets.

Gate every redirect that consumes the user-supplied next value through
the helper -- the GET and POST branches of /mfa/validate and the POST
branch of /mfa/register -- falling back to the internal browser index
when the target is anything other than safe. The registration POST
keeps its existing 'internal' sentinel ("rendered from the in-app
dialog") since that string is matched exactly and is not a URL.

Ship the validator with a dedicated table-driven unit test covering
each accept/reject category and an integration test that POCs the
attacker payload from the report and asserts the response redirects
to the internal index instead of attacker.example.

Reported by: Mai Phạm Hiền <mai.phamhien171@gmail.com>
Reviewed by: Kundan Sable <kundan.sable@enterprisedb.com>
2026-06-08 18:55:51 +05:30
Ashesh Vashi 3b1a6ce481 fix(server): schema-qualify remaining pg_catalog calls in ServerNode
The SQL injection fix for create_restore_point now calls
pg_catalog.pg_create_restore_point so that a non-default search_path
on the connection cannot redirect the call to a shadow definition.
Apply the same hardening to the other pg_* calls in the same file
that were still unqualified: pg_reload_conf in reload_configuration,
and pg_xlog_replay_pause / pg_wal_replay_pause / pg_xlog_replay_resume
/ pg_wal_replay_resume in wal_replay.

These were not exploitable on their own -- the SQL string is static
and not user-derived -- but resolving them via pg_catalog removes any
dependency on the connection's search_path being trustworthy.
2026-06-08 18:42:40 +05:30
Dave Page 3379c39865 fix(server): parametrise named restore point query to prevent SQL injection
ServerNode.create_restore_point interpolated the user-supplied "value"
field directly into a SQL string with str.format(), so an authenticated
pgAdmin user could inject additional statements through that endpoint.
The injection ran with the user's own database role -- so it did not
cross a privilege boundary and granted no capability the role does not
already have via the Query Tool -- but it bypassed the documented SQL-
execution path and any application-layer controls a deployment may
have built around the Query Tool.

Pass the name as a bound parameter, and qualify the function with
pg_catalog so a non-default search_path on the connection cannot
redirect the call to a shadow definition.

Add a regression test that mocks the driver and asserts the call
arrives as ("SELECT pg_catalog.pg_create_restore_point(%s);", (name,))
with no payload spliced into the SQL text, plus defence-in-depth
assertions that the SQL string contains neither pg_sleep nor the PoC's
closing-quote signature, so a future refactor that reintroduces string
formatting is caught.

Reported by: Geo <cve@sageby.com>
Reviewed by: Kundan Sable <kundan.sable@enterprisedb.com>
2026-06-08 18:42:40 +05:30
Dave Page bf47924444 fix(llm): reject multi-statement and non-read-only AI assistant queries
The AI Assistant's execute_sql_query tool runs LLM-generated SQL inside
a BEGIN TRANSACTION READ ONLY wrapper. However, the LLM-supplied query
was sent to psycopg as-is, so a multi-statement payload beginning with
COMMIT, END, ROLLBACK, or ABORT terminated the read-only transaction
and ran subsequent statements in autocommit mode. With ordinary write
privileges this allowed unauthorised data modification; for a superuser
or pg_execute_server_program role this chained to remote code execution
on the database host via COPY ... TO PROGRAM.

Validate the LLM-supplied query before any connection work happens:

* The input must parse to exactly one non-empty/non-comment statement.
* The leading real token (after stripping leading whitespace, comments,
  and punctuation) must be one of SELECT, WITH, EXPLAIN, SHOW, VALUES,
  TABLE. Everything else -- DML, DDL, CALL, COPY, DO, SET/RESET, the
  transaction-control verbs, and the rest -- is rejected up front.

PostgreSQL's READ ONLY mode continues to enforce the remaining cases
(data-modifying CTEs, EXPLAIN ANALYZE on writes, volatile side effects)
at runtime, so the validator is the load-bearing check for multi-
statement / top-level escapes and READ ONLY is the backstop for the
rest.

Add a 60-scenario regression suite under
web/pgadmin/llm/tests/test_database_tool_security.py covering the
original PoC payloads (COMMIT/END/ROLLBACK/ABORT/SET/BEGIN), multi-
statement masked by comments, the full allow- and deny-list of leading
keywords, dollar-quoted literals containing semicolons, and degenerate
inputs (empty, whitespace-only, comment-only, quoted identifier).

Reported by: Isaac Chen <isaac9503@gmail.com>
Reviewed by: Kundan Sable <kundan.sable@enterprisedb.com>
2026-06-08 18:42:40 +05:30
Ashesh Vashi 5627944f87 chore(deps): bump JavaScript and Python third-party dependencies (#10023)
Combined fix for 8 packages flagged by GitHub Dependabot (collapsing
6 of them from open dependabot bump PRs and 4 from transitive
vulnerabilities with no existing PR). All eight are transitive — no
direct dep changes — so we override via `resolutions` in web/package.json
and let yarn collapse duplicate-version entries during install.

Resolved (pre → post via resolution):

  Runtime:
    ws                    8.20.0    -> 8.21.0    (patched 8.20.1)

  Dev:
    @xmldom/xmldom        0.7.13    -> 0.8.13    (patched 0.8.13)
    serialize-javascript  6.0.2,
                          7.0.5     -> 7.0.5     (patched 7.0.5)
    ip-address            10.1.0,
                          10.2.0    -> 10.2.0    (patched 10.1.1)
    postcss               8.5.8,
                          8.5.15    -> 8.5.15    (patched 8.5.10)
    qs                    6.15.0    -> 6.15.2    (patched 6.15.2)
    @tootallnate/once     2.0.0     -> 2.0.1     (patched 2.0.1)
    tar (7.x lineage)     7.5.13    -> 7.5.16    (patched 7.5.11)

The tar 6.2.1 lineage (consumed via ^6.1.2/^6.1.11) is unaffected by
these CVEs (alert ranges are 7.x-only), so the resolution is scoped
`tar@npm:^7.5.4` to leave it on 6.2.1.

Supersedes open dependabot PRs #9956 (ws), #9962 (tar), #9966
(@tootallnate/once), and #9974 (qs) — one CI cycle instead of four.

Verification:
- yarn install — clean (only pre-existing peer-dep warnings about
  @mui/system, aspen-core, eve, etc.; no new ones)
- yarn run test:js-once — 824 / 824 pass across 140 test suites
- yarn run bundle:dev — webpack compiled successfully
- All 8 packages confirmed at safe versions via lockfile audit;
  duplicate entries collapsed (yarn.lock net -64 lines)

Out of scope (cannot fix here):
- paramiko (#276 #278): no patched version exists; bump-to-5.0.0
  PRs #9927/#9930 audited 2026-05-20 and deferred to Q4 2026 over
  SSH bastion compat risk
- elliptic (#176): no patched version, dev-only, low severity
- flatted (#224): alert is stale; lockfile already at 3.4.2 (patched);
  will auto-dismiss on next dependabot rescan

* chore(deps): bump Python deps to latest 3.9-compatible

Picks up five Python dependency bumps that are 3.9-safe (still resolve
under Python 3.9 per PyPI requires_python). Four supersede open
dependabot PRs:

- certifi              2026.4.22  -> 2026.5.20
    (no gate; CA bundle refresh; supersedes dependabot #9977 / #9979)

- typer                0.25.*     -> 0.26.*
    (py > 3.9 row only; supersedes dependabot #9995 / #9999)

- testscenarios        0.6.1      -> 0.6.2
    (py > 3.9 row only; supersedes dependabot #9980)

- urllib3              2.6.*      -> 2.7.*  (py > 3.9 row only)
    Picks up two HIGH-severity security fixes in urllib3 2.7.0
    (2026-05-07): GHSA-mf9v-mfxr-j63j (decompression-bomb safeguards
    bypassed under drain_conn / Brotli stream patterns) and
    GHSA-qccp-gfcp-xxvc (ProxyManager.connection_from_url did not
    strip sensitive headers on cross-host redirects). 2.7.0 requires
    Python >=3.10, which the existing 'python_version > 3.9' gate
    already enforces.

- Flask-Security-Too   5.4.*      -> 5.6.* (py <= 3.9 row only)
    Closes a roughly 2-year gap between the 3.9 row (last pin from
    March 2024) and the py > 3.9 row (already on 5.8.*). 5.5/5.6
    only touched flows pgAdmin doesn't use (register V2, MFA / WebAuthn
    templates, username recovery/changing, secret_key rotation) and
    config pgAdmin overrides (default hash bcrypt->argon2 sidestepped
    by SECURITY_PASSWORD_HASH = 'pbkdf2_sha512'). The contract changes
    that mattered (LoginForm.validate -> is_active, UserMixin.is_locked
    hook, single-kwarg find_user) are all already exercised in
    production via the existing FST 5.8.* / Python 3.10+ deployments.
2026-06-08 16:02:43 +05:30
Ashesh Vashi f8e570faea ci: run data-isolation tests in server mode (#10019)
The existing run-python-tests-pg.yml workflow hardcodes
SERVER_MODE = False in config_local.py. Every test that gates
itself on `config.SERVER_MODE` — including the data-isolation
suites — skips itself in CI today. That gap is what allowed the
admin-bypass regression in 9a76ed8 to ship (see #9933, #10006):
the change to web/pgadmin/utils/server_access.py changed
access-control behaviour but the only tests covering it were
server-mode-only and therefore never ran.

This workflow plugs that gap with a narrow, cheap server-mode
CI job:

- Single OS (ubuntu-22.04), single PG version (18) — no matrix
- SERVER_MODE = True in config_local.py
- Runs only the two data-isolation test modules:
    browser.server_groups.tests.test_sg_data_isolation
    browser.server_groups.servers.tests.test_server_data_isolation

Locally with SERVER_MODE=True both modules finish in well under
half a second (3 + 6 tests), so the marginal CI cost is dominated
by the PG/python setup, not the tests themselves.

Future access-control changes to server_access.py (or related
helpers) will fail this workflow if they regress the existing
isolation guarantees, before they reach master
2026-06-08 11:11:12 +05:30
Kevin Bell 92dd7c7962 Fix README typos (#9920) 2026-06-07 18:52:27 +05:30
Murtuza Zabuawala c7d2106462 fix: filtering pg_attribute only by attname can return the wrong attnum if the column name exists in multiple table (#10013) 2026-06-07 18:47:39 +05:30
Murtuza Zabuawala 291a55ec5a chore: Add pg_catalog schema prefix to catalog table queries (#10004) 2026-06-07 12:57:59 +05:30
Dave PageandClaude Opus 4.7 10f99d07e3 chore(regression): remove dead test_advanced_config + Greenplum config gitignore (#9949)
Two related bits of long-stale plumbing in web/regression/:

* test_advanced_config.json.in — the README has told users for years to
  copy this template to test_advance_config.json (no "d") and customise
  it, but a repo-wide grep for either spelling shows zero code, test,
  or CI references. The .in template is dead, and the README/.gitignore
  also disagree about whether the copied filename has a "d" in it,
  which is a typo trap that has gone unnoticed precisely because nobody
  actually performs the copy step.

* test_greenplum_config.json — Greenplum support was removed from
  pgAdmin years ago (only references left in the tree are historical
  release-notes entries from versions 1.4 through 4.12). Nothing reads
  the config any more.

Drop the dead template, prune both stale lines from
web/regression/.gitignore, and simplify the README to describe just
the server-side test_config.json that the framework actually consumes.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-07 12:43:17 +05:30
Ashesh Vashi ed9dcf6ebf chore(deps): bump electron 41.5.0 -> 42.1.0 and pin packaged version (#9959)
Bumps the desktop runtime to electron 42 (dependabot PR #9945) and
closes a supply-chain gap in the Linux/Mac packaging scripts that
predated this bump.

Why the bump is safe:

  - macOS UNNotification API change — pgAdmin's runtime does not use
    Electron's Notification API (only a UI toast comment in
    src/js/pgadmin.js:211; no `new Notification(...)` anywhere).
  - postinstall no longer downloads electron — production packaging
    fetches the binary directly via wget from GitHub releases, never
    via electron's postinstall script.
  - Offscreen rendering scale-factor change — no OSR usage anywhere
    in runtime/src/js/.

While verifying, found that pkg/linux/build-functions.sh and
pkg/mac/build-functions.sh resolve the packaged electron version
via:

    ELECTRON_VERSION="$(npm info electron version)"

This pulls whatever currently carries the `latest` dist-tag on the
npm registry. Any newly published electron release — including a
hypothetical malicious one — would land in shipped binaries without
review, regardless of what runtime/package.json pins.

Replace with sed-based extraction from runtime/package.json and
fail loudly if extraction returns empty. The Windows installer
(pkg/win32/installer.iss.in) does not have this issue (it bundles a
pre-built tree, no electron download step).

Net change in runtime/yarn.lock is mostly deletions — electron 42
ships with @electron/get 5.x, which dropped a large transitive
dependency tree associated with the old postinstall download path.

Verified:

  - eslint (runtime): clean (silent)
  - yarn install (runtime): resolved to electron 42.2.0 within
    ^42.1.0 range
  - sed extraction smoke-tested: returns 42.1.0 from current
    runtime/package.json
2026-06-07 12:08:56 +05:30
Ashesh Vashi 148705994d fix: remove admin bypass from server access helpers (#9933) (#10006)
In server mode, administrators were auto-granted visibility into every
user's private server groups and servers via four _is_admin() bypasses
in server_access.py. This made the Object Explorer show a separate
top-level "Servers" entry per user when logged in as admin, exposing
private connections the admin should have no access to.

The Administrator role in pgAdmin governs management of pgAdmin itself
(users, preferences) — it is not intended to inherit other users'
database credentials and connection state. Cross-user visibility
requires explicit sharing (Server.shared=True), same as for any user.

Remove the admin bypass from get_server, get_server_group,
get_server_groups_for_user, and get_user_server_query. Drop the now-
unused _is_admin() helper. Update docstrings to make the policy
explicit.

Add a regression test (admin attempts to fetch a non-admin user's
private server group → expect HTTP 410). The original isolation test
only covered non-admin → admin, which is why the regression
introduced by 9a76ed8 was not caught.
2026-06-06 09:10:59 +05:30
hiteshjambhale 679c39f944 fix: resolve E501 pycodestyle line-too-long in llm tools database module (#10003) 2026-06-05 12:25:04 +05:30
Dave Page 2dc9d71d02 fix(webpack): alias react-checkbox-tree to its ESM bundle (#9989)
react-checkbox-tree v2 marks the package as "type": "module" but its
"require" exports condition still points at a UMD bundle. babel-loader
turns our ESM imports into require() calls, so webpack picks the UMD
file and treats it as ESM (because of "type": "module"). The UMD
wrapper's module.exports = factory(...) never runs in that context, and
the default export ends up undefined - causing CheckBoxTree to render
"Element type is invalid" in dialogs like Import/Export Servers.

Alias react-checkbox-tree to its ESM bundle (lib/index.esm.js, exposed
by the package's own "./*": "./*" exports map) so webpack picks the file
that actually has a default export.

Closes #9972
2026-06-05 09:57:09 +05:30
Jaspar Martin 27406b5627 fix: fixed invalid '| None' syntax for python 3.9 (#9993) 2026-06-05 09:55:48 +05:30
Domenico Sgarbossa 5c494ecbf6 Fix (#9917)
* Updated Italian translation for v9.15
2026-06-05 09:55:07 +05:30
Ashesh Vashi 0d11dbc173 fix(docker): make CAP_NET_BIND_SERVICE optional for restricted runtimes (#9985)
The container previously applied CAP_NET_BIND_SERVICE to the python
interpreter so the non-root pgadmin user could bind to ports 80/443.
Some platforms refuse to honor file capabilities:

  - --cap-drop=ALL / OpenShift restricted-v2 SCC zero the bounding set,
    so the kernel returns EPERM on exec of any capability-tagged binary.
    This makes the image fail to start (issue #9657).
  - --security-opt=no-new-privileges / allowPrivilegeEscalation: false
    causes the kernel to silently strip file capabilities on exec, so
    the binary runs but a subsequent bind() to <1024 still fails.

Split the interpreter so neither default behavior nor restricted-runtime
support has to give up the other:

  - Dockerfile copies python3.X to /usr/local/bin/python3-cap and applies
    setcap to the copy. /usr/local/bin/python3.X stays un-capped, so
    /venv/bin/python3 (which symlinks to it) execs cleanly under
    restricted SCCs. A parallel /venv/bin/python3-cap symlink keeps the
    venv activation working when the capped interpreter is used.
  - entrypoint.sh reads /proc/self/status at startup. If NoNewPrivs is
    set, or CAP_NET_BIND_SERVICE is missing from the bounding set,
    gunicorn is invoked through the un-capped python and (when
    PGADMIN_LISTEN_PORT is unset) the default port falls back to 8080
    for plain HTTP or 8443 for TLS. A startup message records the
    choice.
  - Existing deployments with the default 80/443 mapping are unaffected:
    on every unrestricted runtime the bounding set still contains
    NET_BIND_SERVICE and gunicorn runs through the capped interpreter
    exactly as before.
  - PGADMIN_LISTEN_PORT, if set, is honored in both paths.

Docs gain a "Restricted Security Contexts" subsection covering the new
auto-detected fallback and the OpenShift / --cap-drop=ALL invocation.

Fixes #9657
2026-05-28 19:31:55 +05:30
Ashesh Vashi 533aed122f build(mac): drop webpack heap from 6 GB to 4 GB on the macOS build (#9968)
The 6 GB ceiling set by #9967 was too aggressive for the macOS x64
VM's total RAM. Build #1295 on `pgabf-macos-x64` failed in
`_build_runtime` at `unzip electron-vX.X.X-darwin-x64.zip` with exit
code 2 — never even reached webpack. That points at OS-level memory
pressure spilling out of the Node process and starving the rest of
the build: at 6 GB reserved, the box runs out of RAM long before
Terser actually needs the full ceiling.

Drop back to 4 GB, which still gives Terser a full extra gigabyte
beyond the original 3 GB setting that OOM-killed webpack in #1294,
but leaves enough headroom for the other steps in the appbundle
build to coexist.

Only the macOS appbundle path changes (see pkg/mac/build-functions.sh);
linux/pip/Makefile and dev-machine builds keep the 3 GB the `bundle`
npm script ships with.
2026-05-22 15:00:09 +05:30
Ashesh Vashi 3e1921dcd9 build(mac): bump webpack heap to 6 GB on the macOS appbundle build (#9967)
macOS x64 appbundle builds keep dying inside webpack's TerserPlugin at
92% (asset processing). Build #1294 on `pgabf-macos-x64` reached
`<s> [webpack.Progress] 92% [0] sealing asset processing TerserPlugin`
and was killed without producing a V8 fatal-error preamble, which
points at the OS reaping the Node process under memory pressure rather
than V8 hitting its own heap ceiling.

TerserPlugin is already running single-threaded (see
web/webpack.config.js, `parallel: false`), so we can't claw memory back
by reducing parallelism. Bump the V8 old-space ceiling from 3072 MB to
6144 MB inside the macOS appbundle build only — the helper in
pkg/mac/build-functions.sh bypasses `yarn run bundle` and calls
`yarn run webpacker` directly (see commit d96e8634), so this knob is
independent of the npm script and does not affect linux/pip/Makefile
or dev-machine builds. They keep the 3 GB the `bundle` script has been
shipping with for years.

If this still doesn't get the x64 box past Terser we'll switch the
minimiser to esbuild via terser-webpack-plugin's `minify` option; that
is a larger and more invasive change so we are trying the cheap fix
first.
2026-05-22 14:43:58 +05:30
Ashesh Vashi d96e86345e build(mac): split bundle step and capture stderr for diagnostics (#9965)
The macOS x64 appbundle build can fail inside `yarn run bundle` while
producing zero console output -- the Jenkins log goes straight from
"yarn install ... Done with warnings" to the EXIT trap's failure
message, leaving no signal as to whether linter, webpack, or a native
module load was the culprit (build #1293 on pgabf-macos-x64 is the
prompting example).

Split the bundled script into its constituent steps and merge stderr
into stdout so any error text reaches the console even if Jenkins'
shell step drops a tail buffer:

  yarn install
  yarn run git:hash    # cheap source-hash capture, moved up front
  yarn run linter
  yarn run webpacker

`git:hash` is a pure `git log` redirect (see web/package.json) with no
node-module dependency, but `yarn run` needs node_modules so it stays
after install. Pulling it before the heavy steps means the commit_hash
file lands on disk even if webpack later bails out.

Env vars NODE_ENV=production and NODE_OPTIONS=--max-old-space-size=3072
are set explicitly to mirror the cross-env wrapper inside the top-level
"bundle" npm script, so build output stays byte-identical to before.

No-op for successful builds; pure diagnostics win on failure.
2026-05-22 13:58:06 +05:30
Ashesh Vashi ae6dc4ba18 fix(test): stabilize bgprocess polling in backup/restore/IE/maintenance tests (#9958)
The shared polling helpers in:

  - web/pgadmin/tools/backup/tests/test_backup_utils.py
  - web/pgadmin/tools/import_export/tests/test_import_export_utils.py
  - web/pgadmin/tools/maintenance/tests/test_create_maintenance_job.py
  - web/pgadmin/tools/restore/tests/test_create_restore_job.py

all share the same race that surfaced on macos-latest / pg16 in
PR #9955's CI run:

  - Wait budget was 2.5s (5 iterations x 0.5s; maintenance used 5s).
  - The break condition was `execution_time' in the_process`, but
    `execution_time` is the elapsed time of a *running* bgprocess --
    it is set before the wrapped pg_dump / pg_restore / psql / COPY
    actually finishes. The completion signal is `exit_code` becoming
    non-None.
  - So the helper could return control while the wrapped command was
    still running, and the next assertion -- e.g.
    `assert_equal(the_process['exit_code'] in [0, 1], True)` -- would
    fire on `None in [0, 1]`, i.e. `False != True`.

Some scenarios masked the bug by listing `None` in their
`expected_exit_code` set (a tell that someone noticed the polling was
unreliable and worked around it by widening accepted exit codes).
Scenarios that didn't include `None` were the ones that flaked.

Fix all four helpers identically:

  - Poll for up to 60 iterations x 0.5s = 30s, generous enough for
    the slowest CI runner.
  - Break only when `the_process.get('exit_code') is not None`, the
    actual completion signal.
  - Narrow `except Exception` to `except StopIteration`, which is the
    only thing `next(...)` here can raise.

No call-site changes needed; the helper contract (returns once the
job is done; raises if the bgprocess never finished) is unchanged in
spirit and strictly more reliable in practice.

Verified:

  - pycodestyle on the four files: 0 violations.

This fixes the failure observed in the macos-latest / pg16 leg of
PR #9955's CI run (run 26154521710, job 76930277702), which was
unrelated to that PR's lockfile-only changes.
2026-05-20 18:58:32 +05:30
Ashesh Vashi 25f0d853c8 chore(deps): bump cryptography 47.0.* -> 48.0.* (#9960)
Supersedes dependabot #9926 (and its /web/regression duplicate
#9932). Inherited via `-r ../../requirements.txt`, so the single
edit covers both.

cryptography 48 is a smaller bump than its major-version label
suggests:

  - Removed Python 3.8 support. pgAdmin requires Python 3.9+ across
    the supported platforms, so this is a no-op for us. (3.9.0 and
    3.9.1 specifically are excluded by the new metadata; nothing
    in pgAdmin's CI / packaging runs those exact patch versions.)
  - Stricter X.509 CRL parsing: a CRL whose inner
    `TBSCertList.signature` does not match the outer
    `signatureAlgorithm` now raises `ValueError` instead of
    being parsed and rejected later during signature verification.
  - Added ML-KEM and ML-DSA post-quantum primitives (additive).

pgAdmin's cryptography surface area is narrow and CRL-free:

  - web/pgadmin/settings/__init__.py        Fernet
  - web/pgadmin/utils/session.py            Fernet, hashes, HKDF
  - web/pgadmin/utils/crypto.py             Cipher, AES, CFB8

No imports of `cryptography.x509`, `CertificateRevocationList`,
or `load_pem_x509_crl` anywhere in the tree, so the stricter CRL
parsing in 48 cannot affect pgAdmin.

The OpenSSL 1.1.x / LibreSSL < 4.1 removal that I initially
flagged as a concern actually happened in cryptography 47, which
master is already on. No platform-support regression from this
bump.
2026-05-20 18:57:44 +05:30
Murtuza Zabuawala 142a55b864 Feat: Added a option to colorize panel/tab header based on server color #2431 (#9799) 2026-05-20 18:56:02 +05:30
Ashesh Vashi 3b801fc6ba chore(deps): bump transitive lockfile resolutions surfaced by dependabot (#9955)
Pure lockfile-only updates — no package.json changes. Dependabot
surfaced these as separate PRs because they sit below pgAdmin's
direct deps in the resolution tree, so the manifest-level bumps
applied in #9954 did not pull them along.

web/yarn.lock:
- @babel/plugin-transform-modules-systemjs 7.29.0 -> 7.29.4 (#9923)
- devalue                                  5.7.0  -> 5.8.1  (#9937)
- fast-uri                                 3.1.0  -> 3.1.2  (#9922)
- svelte                                   5.55.1 -> 5.55.8 (#9938)
  (5.55.8 supersedes the 5.55.7 dependabot was tracking when the PR
   opened; both are within the same ^5.0.0 range.)

runtime/yarn.lock:
- fast-uri                                 3.1.0  -> 3.1.2  (#9924)

All resolutions stay within their existing semver ranges declared by
the parent packages — no manifest constraints touched. Refreshed via
`yarn up -R <pkg>` in each workspace.
2026-05-20 17:22:35 +05:30
Ashesh Vashi aad2dfd725 chore: Apply non-breaking dependency updates from open dependabot PRs (#9954)
Python:
- requirements.txt: google-auth-oauthlib 1.3.1 -> 1.4.0
  (#9929 / #9931), gated so Python 3.9 stays on 1.3.1 (1.4.0
  requires python_version >= 3.10). Mirrors the existing
  boto3 1.42.*/1.43.* split.
- tools/requirements.txt: requests >=2.33.1 -> >=2.34.2 on
  python_version > '3.9' (#9943 / #9944).
- web/regression/requirements.txt: selenium 4.43.0 -> 4.44.0
  (#9946). The selenium pin already requires Python >=3.10 in
  master, so the bump introduces no new 3.9 gap.

JavaScript (web/package.json, web/yarn.lock):
- postcss 8.5.12 -> 8.5.14 (#9874 / #9889)
- @tanstack/react-query 5.100.5 -> 5.100.9 (#9878)
- ip-address 10.1.0 -> 10.1.1 (#9918)
- packageManager pin yarn@4.14.0 -> yarn@4.15.0 and regenerate
  yarn.lock at lockfile __metadata.version 10. CI runs yarn
  4.15.0 with hardened mode on public PRs and refuses to migrate
  the lockfile from version 9 (yarn 4.14.x) to 10; master passes
  today only because hardened mode is PR-only.

Electron runtime (runtime/package.json, runtime/yarn.lock):
- axios 1.16.0 -> 1.16.1 (#9948)
- eslint 10.3.0 -> 10.4.0 (#9947)

Skipped (genuine breaking changes, deferred to follow-up PRs):
- @mui/material 7 -> 9 (#9843)
- @mui/x-date-pickers 8 -> 9 (#9888)
- cryptography 47.0.* -> 48.0.* (#9926 / #9932)
- paramiko 3.5.1 -> 5.0.0 (#9927 / #9930)
- electron 41.5.0 -> 42.1.0 (#9945)

Verified in an isolated worktree:

  - jest:        140/0/0 suites, 824/0/0 tests
  - eslint:      clean (web + runtime, both silent)
  - pycodestyle: 0 violations project-wide

Each version was cross-checked against the corresponding
dependabot PR diff via `gh pr diff`. Each Python bump was
cross-checked against PyPI's requires_python so Python 3.9
support stays intact.
2026-05-20 14:53:04 +05:30
Dave Page af888027a4 fix(docker): ship libpq-oauth-18.so and libcurl for PostgreSQL 18 OAuth (#9952)
libpq 18 dlopens libpq-oauth-18.so (the SASL OAUTHBEARER flow plugin)
when connecting to a server with an `oauth` pg_hba.conf rule. The
container previously copied only libpq.so.5.18 from postgres:18-alpine
and omitted both the plugin and its libcurl runtime dependency, so
OAuth connections failed with "no OAuth flows are available (try
installing the libpq-oauth package)" before any token exchange could
begin.

Add libpq-oauth-18.so to the existing pg18-builder COPY (it sits next
to libpq.so.5.18 in /usr/local/lib in postgres:18-alpine) and install
the libcurl apk package so the plugin can dlopen libcurl.so.4 at
runtime.

Closes #9951
2026-05-20 12:39:42 +05:30
Ashesh Vashi 86a8b165ab fix(test): mock does_utility_exist in maintenance accept-valid tests
MaintenanceInputValidationAcceptsValidTest asserted batch_process_mock
was called, but the route short-circuits with success=0 (HTTP 200)
when does_utility_exist() returns a missing-binary error. On Windows
CI psql.exe is not at the path pgAdmin probes, so BatchProcess was
never reached and the five 'accepted' scenarios failed with
'AssertionError: False is not true'. Stub does_utility_exist to None
in this test so it focuses on input-validation acceptance, not on the
runtime PostgreSQL binary layout.
2026-05-06 15:03:18 +05:30
Ashesh Vashi bdbca57332 docs: note Python 3.9 boto3 split in v9.15 release notes
Annotate the boto3 1.42 -> 1.43 dependency line to reflect that 1.43
requires Python >=3.10, so 3.9 stays on the 1.42.* series.
2026-05-06 12:46:58 +05:30
Ashesh Vashi dda6d0e3a8 fix(deps): pin boto3 to 1.42.* on Python 3.9
boto3 1.43.0 requires Python >=3.10, which breaks installs on Python
3.9. Add a python_version gate so 3.9 stays on the 1.42.x series (the
last to support 3.9) while newer interpreters track 1.43.*.
2026-05-06 12:43:59 +05:30
Ashesh Vashi 411d718fa7 docs: add v9.15 release notes to toctree
Sphinx ran with -W (warnings as errors) and failed both build-docs and
build-python-package CI jobs because release_notes_9_15.rst was not
referenced from any toctree.
2026-05-06 12:03:29 +05:30
Ashesh Vashi d17616eda8 docs: round out v9.15 release notes with stragglers
Adds entries for items that landed after the release notes were first
written:

  - Housekeeping: #9906 (Italian translation update, merged from
    origin/master).
  - Test-suite stability: 208541cc4 (ImportExportServersTestCase
    sys.executable + subprocess error surfacing).
  - Documentation (new subsection): 9923eefca (clarification that
    MAX_LOGIN_ATTEMPTS applies only to INTERNAL auth; LDAP / OAuth2 /
    Kerberos / Webserver brute-force protection is the upstream IdP's
    and reverse-proxy's responsibility).
  - Dependencies (new subsection): the cumulative non-breaking
    dependabot updates aggregated for v9.15, organized by Python /
    JavaScript (web/) / JavaScript (runtime/), listing the
    package-level diffs without commit-keyed framing. Covers both
    aggregating commits (d55ffe405 and 4330a688a) so a reader looking
    for "what versions did 9.15 ship with" finds it in one place.

Sphinx build remains clean for release_notes_9_15.rst.
2026-05-05 19:33:16 +05:30
Ashesh Vashi c6a6d46283 Updated version for release v9.15 2026-05-05 19:07:40 +05:30
Ashesh Vashi 4330a688aa chore: Apply non-breaking dependency updates from open dependabot PRs
Python (requirements.txt):
- boto3 1.42.* -> 1.43.* (#9908)
- psycopg 3.3.3 -> 3.3.4 (#9911) for python_version >= '3.10'

JavaScript (web/package.json, web/yarn.lock):
- axios 1.15.2 -> 1.16.0 (matches dependabot's #9907 in /runtime,
  applied to /web for cross-package consistency)

Electron runtime (runtime/package.json, runtime/yarn.lock):
- axios 1.15.2 -> 1.16.0 (#9907)
- electron 41.3.0 -> 41.5.0 (#9910)
- eslint 10.2.1 -> 10.3.0 (#9912)
- globals 17.5.0 -> 17.6.0 (#9909)
  follow-redirects 1.15.11 -> 1.16.0 transitively

Skipped (genuine breaking changes, deferred to a future minor):
- @mui/material 7 -> 9 (#9843)
- @mui/x-date-pickers 8 -> 9 (#9888)

Verified in an isolated worktree:

  - jest:                140/0/0 suites, 824/0/0 tests
  - eslint:              clean (silent)
  - pycodestyle:         0 violations project-wide
  - python regression:   1879/0/308 (PG18, --exclude feature_tests)

The axios 1.16.0 release notes call out three observable changes; only
the first is potentially relevant to pgAdmin and is a bugfix:

  - Fetch adapter now enforces maxBodyLength / maxContentLength (these
    were silently ignored on the fetch adapter before 1.16.0). pgAdmin
    does not set these limits, so behaviour is unchanged.
  - Proxy requests preserve user-supplied Host headers — pgAdmin does
    not proxy through axios.
  - Basic-auth credentials embedded in URLs are URL-decoded — pgAdmin
    does not construct credential-embedded URLs.

psycopg 3.3.4 brings three bugfixes: spurious connection-timeout in C
extension on long-uptime systems, client-side adaptation of enums whose
names need quoting, and consistent Cursor.statusmessage after
executemany().

electron 41.5.0 is a patch within the 41.x line carrying Chromium
security backports plus a Windows frameless-window resize regression
fix and a low-level mouse-hook teardown fix.
2026-05-05 18:47:55 +05:30
Ashesh Vashi 96e6528243 Merge remote-tracking branch 'origin/master' into cve-9.15 2026-05-05 16:22:33 +05:30
Ashesh Vashi ba9ff51aaa docs: assign CVE IDs to v9.15 release-notes placeholders
Replaces the "(CVE pending)" markers on the seven placeholder issues
with their assigned identifiers:

  #9830 -> CVE-2026-7813   (cross-user data access / shared-server escalation)
  #9865 -> CVE-2026-7814   (stored XSS via crafted PostgreSQL object names)
  #9898 -> CVE-2026-7815   (SQL injection in Maintenance tool option values)
  #9899 -> CVE-2026-7816   (OS command injection in Import/Export query export)
  #9900 -> CVE-2026-7817   (LFI/SSRF in LLM API configuration endpoints)
  #9901 -> CVE-2026-7818   (unsafe deserialization in session manager)
  #9902 -> CVE-2026-7819   (symlink path traversal in file manager)
  #9904 -> CVE-2026-7820   (account-lockout bypass via Flask-Security /login)

#9835 is a follow-up to #9830 and shares CVE-2026-7813, so its
parenthetical is dropped rather than replaced with a separate ID.

To be revealed publicly when this branch is pushed for the 9.15 release.
2026-05-05 16:14:02 +05:30
Domenico Sgarbossa 4eb899c92c Updated Italian translation for v9.15 (#9906) 2026-05-05 16:07:08 +05:30
Ashesh Vashi 6469b69565 style: fix pre-existing pycodestyle violations across CVE-9.15 test files
24 violations had accumulated on the cve-9.15 branch from the #9901 and
#9902 CVE-fix work and a couple of older spots. Surfaced when the full
suite was run after the #9904 work; no functional change.

  - 22 x E501 (line too long > 79):
      - 15 in pgadmin/misc/file_manager/tests/test_filemanager_security.py
        (13 class declarations using two mixin parents,
        2 docstrings)
      - 6  in pgadmin/utils/tests/test_session_file_format.py
        (5 class declarations, 1 docstring)
      - 1  in pgadmin/browser/tests/test_kerberos_with_mocking.py
        (extracted self.app.url_map._rules_by_endpoint into a local
        before the membership test)
  - 2  x E305 (expected 2 blank lines after class/function):
      - pgadmin/misc/file_manager/__init__.py (after _open_upload_target)
      - pgadmin/browser/__init__.py (after _first_form_error)

Class declarations are wrapped via parenthesised continuation, the
standard pgAdmin convention; docstrings are either shortened or wrapped
across two lines preserving the same meaning. Verified:

  - pycodestyle clean project-wide (24 -> 0).
  - Affected tests still pass: test_filemanager_security 17/0/0,
    test_session_file_format 18/0/0, test_kerberos_with_mocking 2/0/3
    (skips are pre-existing and unrelated -- Kerberos blueprint not
    loaded in default config).
2026-05-05 15:03:00 +05:30
Ashesh Vashi 208541cc48 fix: ImportExportServersTestCase uses sys.executable + surfaces subprocess errors
Two latent bugs in pgadmin/setup/tests/test_export_import_servers.py
caused this test to fail on macOS / modern Linux distros:

1. The test invoked the subprocesses with a hardcoded "python" via
   os.system. macOS and many modern Linux distros do not provide a
   "python" alias — only "python3" or a venv-specific binary. The
   subprocess fails with "sh: python: command not found", exits non-
   zero, and writes nothing to the dump-servers output file.

   Same root cause that a50a553b0 ("chore: feature tests use
   sys.executable") fixed for AppStarter; this is the same fix in the
   regression test.

2. Both os.system calls redirected stderr to /dev/null. When the
   subprocess failed the empty output file then tripped json.loads
   with the misleading "Expecting value: line 1 column 1 (char 0)"
   instead of surfacing the underlying "command not found" error.

Switch to subprocess.run with a list (so there is no shell quoting and
no command-injection surface), use sys.executable, capture stderr, and
self.fail() with the captured stderr if the subprocess exits non-zero.

Verified: setup.tests goes from 4 pass / 1 fail / 1 skip to 5 pass / 0
fail / 1 skip on PG18.
2026-05-05 15:03:00 +05:30
Ashesh Vashi 9923eefcab docs: clarify scope of MAX_LOGIN_ATTEMPTS and document brute-force protection for LDAP
The "Avoiding a bruteforce attack" section in login.rst implied that
MAX_LOGIN_ATTEMPTS protected all logins; in fact it only applies to the
INTERNAL authentication source (the /authenticate/login view filters by
auth_source=INTERNAL). Operators using LDAP / OAUTH2 / KERBEROS /
WEBSERVER got no signal that brute-force protection lives at a different
layer.

Adds:

  - login.rst: the bruteforce section now states that MAX_LOGIN_ATTEMPTS
    is INTERNAL-only and points operators of external sources to the
    upstream identity provider's lockout policy and to the reverse proxy
    for IP-based throttling.
  - ldap.rst: a new "Brute-force protection" section calling out that
    LDAP credential lockout is the directory's responsibility (ppolicy /
    AD account-lockout GPO) and that request rate-limiting belongs on
    the proxy. Cross-references the login-page section.

No code change. Closes the documentation gap that surfaced during the
analysis of the #9904 lockout-bypass fix without inheriting the
maintenance burden of duplicating directory lockout in pgAdmin.
2026-05-05 15:03:00 +05:30
Ashesh Vashi 32d194691e docs: add release-notes line for #9904 lockout-bypass fix
Mirrors the CVE-pending entries for #9898-#9902 with reporter credit.
The detailed CVE record (CVSS, description, affected files) is held in
the local docs/CVEs/ working draft and submitted to MITRE/Vulnogram
externally; only the release-notes summary lands in git pre-disclosure.
2026-05-05 15:03:00 +05:30
Ashesh Vashi d336c1e786 fix: enforce account lockout on Flask-Security's /login endpoint (#9904)
pgAdmin enforces MAX_LOGIN_ATTEMPTS only inside its own /authenticate/login
view. Flask-Security's default /login view (registered automatically by
security.init_app) was reachable but never consulted the locked field:

  - User inherited Flask-Security's UserMixin.is_locked(), which always
    returns True (= "not locked, proceed").
  - User inherited Flask-Login's is_active, which only checks the active
    column, not locked.

So an attacker with valid credentials could bypass a lockout by posting
to /login after triggering the counter at /authenticate/login.

Override both contracts on the User model so every auth path inherits
them:

  - is_active: False when active=False OR locked=True, so
    flask_security.login_user() refuses to mint a session.
  - is_locked(form_error): returns False (= "locked") and appends the
    same "Your account is locked" message /authenticate/login uses, so
    LoginForm.validate() rejects the submission cleanly.

Only INTERNAL accounts are reachable by the bypass (LDAP/OAuth2/Kerberos/
Webserver users have no local password, which LoginForm.validate rejects
before the locked check) and lockout itself is internal-only (auth_source
filter at authenticate/__init__.py:124), so the overrides only take
effect for INTERNAL accounts.

Adds a unit test covering the four (active, locked) combinations of the
contract LoginForm.validate() depends on.

Also includes a SQLite-only data-cleanup migration. Migration 6650c52670c2
added the locked column with server_default='false'. SQLite has no native
BOOLEAN affinity, so the literal 'false' was stored as TEXT both in the
column DEFAULT and on existing rows backfilled by ALTER TABLE.
SQLAlchemy's Boolean processor then reads that TEXT back as Python True
(because bool('false') is True for any non-empty string), which means
the new is_active override would otherwise see every legacy row as
locked and refuse login. The new migration normalize_locked_text_default
rewrites every SQLite row's locked to integer 0/1 (NULL -> 0); on a
PostgreSQL config DB the column was always stored as a proper BOOLEAN
so the migration is a no-op there (and integer literals would fail
on a BOOLEAN column anyway). SCHEMA_VERSION is bumped from 51 to 52.

Reported-by: Fernando Bortotti <fernando.bortotti@bsd.com.br>
2026-05-05 15:00:19 +05:30
Ashesh Vashi 7f230d05fa docs: add release notes for v9.15
Drafts the user-facing release notes for the 9.15 release. Covers all
47 non-merge commits since REL-9_14:

- 18 issue-linked entries under New features / Housekeeping / Bug fixes,
  with reporter credits (names only) for the six external CVE reports
- #9901 absorbs 14 follow-up commits (session encryption + 0o600,
  SHA-256 digest, drop of live AuthSourceManager / cloud provider
  instances, DATA_DIR perms, log file mode, log handler hardening,
  user_info_server prompt-loop bound) via "Also..."
- #9830 absorbs the @with_object_filters extension to ServerNode.list
- 14 commits without an associated GitHub issue listed under
  "Additional changes" (bug fixes / test stability / refactoring /
  housekeeping) for transparency

CVE IDs are placeholders ("CVE pending") and will be filled in once
MITRE assigns them. Release date and bundled-utility version are
also placeholders pending the actual release.
2026-05-02 12:59:54 +05:30
Ashesh Vashi fcb3db7f54 Merge remote-tracking branch 'origin/master' into cve-9.15 2026-05-02 12:12:20 +05:30
Ashesh Vashi 2f211dc04c Updated message catalogs for v9.15 2026-05-02 12:11:32 +05:30
Ashesh Vashi a11d289bd9 test: harden click_modal backdrop wait and open_query_tool stale-element retry
click_modal: wait up to 5s for the MuiDialog-backdrop to become
invisible after clicking the modal button. MUI v7 leaves the backdrop
in the DOM during the ~300ms close animation, which intercepts the
next click in tests that chain modal->modal interactions.

open_query_tool: the execute-query toolbar button can re-render between
the visibility wait and the ActionChains.move_to_element call
(Firefox/geckodriver hits this regularly). Retry the move up to 3
times on StaleElementReferenceException, refetching the element each
attempt rather than reusing a stale handle.

Both changes are pure test-side stability fixes; no production code
or behavior is affected.
2026-05-02 12:10:51 +05:30
Ashesh Vashi a50a553b0a chore: feature tests use sys.executable; sync yarn.lock to package.json
1. AppStarter.start_app() spawned the pgAdmin subprocess with bare
   "python" via subprocess.Popen. macOS (and many modern Linux
   distros) do not provide a "python" symlink — only "python3" or a
   venv-specific binary. The result was an Errno 2 "No such file or
   directory" the moment a feature test tried to launch pgAdmin.

   Switch to sys.executable so the spawned pgAdmin uses the same
   interpreter and venv as the test runner. Works regardless of how
   the venv is named or whether "python" is on PATH.

2. yarn.lock churn from `yarn install` resolving the @tanstack /
   moment-timezone / postcss peer-dep ranges. Snapshot the resolved
   versions for reproducibility (post the dependency bumps in
   d55ffe405).
2026-05-02 11:02:30 +05:30
Ashesh Vashi e7eaef0dc0 Merge remote-tracking branch 'origin/master' into cve-9.15 2026-05-02 11:00:24 +05:30
Ashesh Vashi 849c679fc6 Updated message catalog post merging few translations 2026-05-02 10:59:22 +05:30
rx500 f43c781e98 Update messages.po (es) (#9893)
Word translation corrected.
2026-05-02 10:56:59 +05:30
Daniel Nylander 119a99375d Update Swedish translation. (#9764)
- Database terminology corrections (bord → tabell, Visa → Vy, etc.)
- Standardize Tabellrymd, Sammansatt utlösare
- Fix punctuation in placeholder lists (Oxford-comma alignment)
- Drop incorrect fuzzy flag from .po header

Note: msgid "on" (from ai_tools.js) is missing here because the PR's
.po was regenerated against a slightly older source tree; it will be
re-added on the next `make messages` run.
2026-05-02 10:53:37 +05:30
MichalBartos ff0fc9e7eb Fix translation for 'Refresh' in Czech (#9832) 2026-05-02 10:37:12 +05:30
Degit22 aec3ea117f Update Russian translation. (#9839) 2026-05-02 10:19:18 +05:30
Ashesh Vashi ddc371adf7 fix: bound user_info_server prompt loops + allow .local in deliverability test
Two related issues, both surfaced when running the regression suite
non-interactively:

1. user_info_server()'s while-not-validate retry loops had no upper
   bound. With a mocked or closed stdin (test mocks, EOF in CI/cron,
   typo'd PGADMIN_SETUP_EMAIL=''), the loop would call input()/pprompt()
   forever, printing 'Invalid email address. Please try again.' on
   every iteration. We saw this manifest as a 13.5 million-line
   25 GB log when test_no_email_deliverability hit the case.

   Cap each loop at MAX_PROMPT_ATTEMPTS=5 and raise RuntimeError with a
   pointer to PGADMIN_SETUP_EMAIL/PASSWORD env vars on exhaustion.

2. test_no_email_deliverability included pg@postgres.local in its
   "should be accepted with deliverability=False" data set. The .local
   suffix is in email_validator.SPECIAL_USE_DOMAIN_NAMES which fails
   syntactic validation regardless of the deliverability flag, so
   validate_email always rejected it - looping forever pre-fix #1.

   Set config.ALLOW_SPECIAL_EMAIL_DOMAINS = ['local'] in the test's
   try/finally block so .local is allowed for this scenario, restored
   afterward to avoid leaking state into other tests.

With both fixes in place, the test can be removed from the regression
runtests --exclude list.
2026-05-02 01:52:29 +05:30
Ashesh Vashi 0fad04de85 fix: PSQL socket tests use authenticated tester; role-deps test skips on auth failure
Two test-infra issues exposed by the full regression suite:

1. PSQL socket tests (test_backend_task, test_psql_input,
   test_resize_terminal, test_socket_disconnect, test_start_process)
   created a fresh, unauthenticated app.test_client() and built a
   socketio test client around it. The /pty connect handler is
   wrapped with @socket_login_required, so the unauthenticated client
   was rejected and is_connected('/pty') returned False.

   Switch to the authenticated self.tester from BaseTestGenerator so
   the connect handler accepts the connection. Matches the pattern
   already used by BaseSocketTestGenerator (test_socket_connect,
   test_psql_disabled).

2. test_role_dependencies_sql creates a temporary LOGIN role and
   calls create_table as that role. On clusters where pg_hba.conf
   does not allow arbitrary roles to connect from 127.0.0.1, the
   create_table swallows the connection error via try/except and
   the subsequent pg_class lookup returns no row, surfacing as an
   opaque "NoneType is not subscriptable" error.

   Detect the empty fetchone() and skipTest with a clear message
   pointing at pg_hba.conf so the test fails gracefully on
   environmentally-restricted clusters instead of erroring.
2026-05-02 01:39:00 +05:30
Ashesh Vashi 1f7194924f fix: harden 6 regression tests against environmental drift
Tests that worked on legacy CI envs but failed under newer
email_validator / non-postgres-named superuser / no-app-context
on tearDown / etc.:

1. test_import_export_create_job_unit_test.py - E-string scenario
   was labelled "Rejected: ... (false positive, safe)" expecting
   parser over-rejection. The parser actually correctly identifies
   the query as balanced (close paren is inside the literal). Update
   expected to True and rename scenario to reflect the real
   handling.

2. test_sg_data_isolation.py - tearDown does ORM query/delete after
   the @create_user_wise_test_client wrapper has popped the test
   client/context. Wrap tearDown's ORM ops in an explicit
   app_context().

3. test_validate_user_email.py - the "with deliverability" scenario
   used postgres@local.dev expecting rejection. Newer email_validator
   no longer rejects this. Switch to postgres@nonexistent.invalid,
   which is RFC-reserved and rejected regardless of DNS state. Also
   align expected message with the actual format string used by
   validate_user.

4-5. test_grant_wizard_save_permissions.py and
   test_grant_wizard_get_sql.py - test data hardcoded 'postgres' /
   'enterprisedb' as grantee/grantor. On clusters where the
   superuser is named differently (e.g. dev Homebrew installs use
   the local OS account), the GRANT statement fails with
   "role X does not exist". Use self.server['username'] instead.

6. test_role_dependencies_sql.py - the test creates a fresh LOGIN
   role and tries to CREATE TABLE as that role; without explicit
   CREATE-on-database grant, the create silently fails and the
   subsequent pg_class lookup returns no row. Mark the test role
   SUPERUSER so it can create the table.

All are test-infra fixes; none of the production code paths under
test were modified.
2026-05-02 01:29:01 +05:30
Ashesh Vashi d78a7cc3bf fix: ConnectionLocker session safety + batch_process tests need request context
Two related issues that surfaced in BatchProcessTest:

1. ConnectionLocker.__enter__ accessed Flask session (via 'in' check)
   AFTER acquiring the lock. When called outside a request context,
   session access raises RuntimeError. Python's 'with' semantics skip
   __exit__ if __enter__ raises, so the lock leaked - any subsequent
   call to ConnectionLocker hung forever waiting on a lock that
   would never be released.

   Wrap session access in try/except RuntimeError so missing-request-
   context falls through cleanly and the lock is released normally
   on with-block exit. Also use .get() chains so partial session
   shapes do not raise KeyError.

2. The four batch_process unit tests (backup, import_export,
   maintenance, restore) used app_context() instead of
   test_request_context(). flask-babel's gettext() in
   BackupMessage.details() and similar code paths require a request
   context; ConnectionLocker.__enter__ also touches session as above.
   Switching to test_request_context('/') gives both the request
   binding they need.

Verified: tools.backup.tests.test_batch_process now runs 4/4 passing
(was 3 ERROR + 1 hang before fix #1; 3 FAIL before fix #2).

Both are pre-existing issues exposed by Python 3.14 / flask 3.1 /
flask-babel stricter context enforcement; not introduced by 9.15
CVE work.
2026-05-02 01:10:33 +05:30
Ashesh Vashi 657529280e fix: guard session['auth_source_manager'] access in BatchProcess.start
processes.py:322 unconditionally indexed session['auth_source_manager']
to gate the KRB5CCNAME copy. When the Flask session does not have the
auth_source_manager key (test request contexts that bypass the login
flow, or sessions whose login hasn't populated this key yet), the
indexing raises KeyError, aborting BatchProcess.start() before it ever
spawns the subprocess. The error has no obvious traceback in the
runtests harness because it bubbles up through BackupCreateJob's mock
infrastructure - the test just records ERROR with no message.

Replace [...] with .get(...) chains so a missing auth_source_manager
yields None and the Kerberos branch is skipped, matching the original
intent.

Surfaced by BatchProcessTest "When backup server" / "When backup
globals" scenarios which mock current_user but leave session in its
default unauthenticated state. Same shape on master; the fix is a
one-line robustness improvement.
2026-05-02 00:54:48 +05:30
Ashesh Vashi d55ffe405b fix: Apply non-breaking dependency updates from open dependabot PRs
Python (requirements.txt, tools/, web/regression/):
- cryptography 46.0 -> 47.0 (move CFB8 import to decrepit module to
  silence the 47.0 deprecation warning and survive 49.0 removal)
- typer 0.24 -> 0.25 for python>3.9 (drop removed [all] extra)
- safety >=1.9.0 -> >=3.7.0 (CI audit tool)
- requests >=2.21.0 -> >=2.33.1
- testtools 2.8.7 -> 2.9.1
- pycodestyle >=2.5.0 -> >=2.14.0

JavaScript (web/package.json, web/yarn.lock):
- postcss 8.5.6 -> 8.5.12
- moment-timezone 0.6.0 -> 0.6.2
- @tanstack/react-query 5.90 -> 5.100.5

Skipped (genuine breaking changes): @mui/material 7->9 (#9843),
@mui/x-date-pickers 8->9 (#9888).
2026-05-02 00:18:47 +05:30
Ashesh Vashi 4eb184739a fix: replace 'e.message' with str(e) and add @with_object_filters to ServerNode.list
Two pre-existing master bugs surfaced by the data-isolation regression
tests:

1. 'e.message' on caught exceptions (13 sites). Exception.message was
   removed in Python 3 (it lived on BaseException in Py2). When the
   except handler runs, accessing e.message raises AttributeError,
   masking the original exception. Werkzeug HTTPException doesn't
   expose .message either - it uses .description / .__str__.

   Replace 'e.message' with str(e) across:
   - browser/server_groups/__init__.py (delete/update/create handlers)
   - browser/server_groups/servers/__init__.py (5 handlers)
   - browser/server_groups/servers/databases/__init__.py
   - misc/cloud/__init__.py
   - tools/debugger/__init__.py
   - tools/grant_wizard/__init__.py (2 sites)

   Sites guarded by hasattr(e, 'message') first (psycopg3 driver) are
   left as-is; module.messages dict access (utils/__init__) is also
   unrelated.

2. ServerNode.list() missing @with_object_filters decorator. PR #8917
   (99b822e47) added object_filters as a required positional arg to
   list() but only added the @with_object_filters decorator to
   get_nodes(), leaving list() with a signature the Flask routing
   couldn't satisfy. Surfaced by SharedServersGetTestCase 'Get a all
   shared server' test, which calls the list endpoint directly.
2026-05-01 23:57:57 +05:30
Ashesh Vashi d57acce354 fix: harden validation/preference/connection-params paths against pre-existing edge cases
Five small defensive fixes that were exposed by running the full
regression suite end-to-end:

1. utils/validation_utils.py: validate_email() now returns False
   instead of raising TypeError when passed a non-str/bytes value
   (e.g. None from a missing form field). Matches the wrapper's
   contract that it only ever returns bool.

2. tools/user_management/__init__.py: list endpoint guarded against
   users with no roles. u.roles[0].id -> u.roles[0].id if u.roles
   else None. Triggered by ChangePasswordTestCase fixtures.

3. utils/preferences.py: control_props['tags'] / ['creatable']
   replaced with .get(...) so preferences whose control_props omit
   these keys do not raise KeyError on update.

4. browser/server_groups/servers/__init__.py (create endpoint):
   convert_connection_parameter() is bidirectional (list<->dict).
   The save path always wants the storage shape (dict). When input
   is already a dict (internal callers / tests mimicking storage
   form), skip conversion to avoid the dict->list round-trip that
   breaks the MutableDict column. Same fix applied to the workspaces
   save path.

5. misc/workspaces/__init__.py: same defensive handling for
   convert_connection_parameter() on the save path.

These are all pre-existing master bugs surfaced by edge-case test
data; none are introduced by the 9.15 CVE work.
2026-05-01 23:29:43 +05:30
Ashesh Vashi dc61039e93 fix: quote username in views/mview test helper for dotted local roles
Same dot-username bug as 504775de8 / 9b29bc203 but in a different shape:
view_test_data.json query strings are Python expressions interpolating
server['username'] into ALTER TABLE ... OWNER TO and GRANT ... TO
clauses. views/tests/utils.py:create_view evaluates these expressions,
producing SQL with an unquoted identifier. A local PG role with a dot
(e.g. 'ashesh.vashi') was rejected with 'syntax error at or near "."'.

Substitute server['username'] with Driver.qtIdent(None, server['username'])
in the query template before evaluating, so the resulting SQL contains
the properly-quoted identifier. The substitution covers every
occurrence in the template (some queries have OWNER TO and GRANT TO in
the same string).

Accounts for the remaining 72 'syntax error at or near "."' cases that
504775de8 + 9b29bc203 did not reach.
2026-05-01 23:09:09 +05:30
Ashesh Vashi 9b29bc2033 fix: quote username in types/compound_triggers test helpers for dotted local roles
Two more test setUp helpers had the same dot-username bug as
user_mappings (504775de8): server['username'] was substituted into
the OWNER TO clause unquoted, so a local PG role with a dot (e.g.
'ashesh.vashi') was rejected with 'syntax error at or near "."'.

- types/tests/utils.py - 'ALTER TYPE ... OWNER TO %s' now uses
  Driver.qtIdent() for the username.
- compound_triggers/tests/utils.py - sql_query template substitution
  now passes the qtIdent-quoted username.

Same Driver.qtIdent(None, server['username']) approach as in 504775de8.
2026-05-01 23:00:48 +05:30
Ashesh Vashi 504775de80 fix: quote username in user_mappings test helper for dotted local roles
The setUp helper in user_mappings/tests/utils.py interpolated
server['username'] directly into the CREATE USER MAPPING DDL, so a
local PostgreSQL role containing a dot (e.g. 'ashesh.vashi') was
parsed by PG as a schema-qualified identifier and rejected with
'syntax error at or near "."'. This blocked every test whose setUp
created a user mapping (UserMappingGetSQLTestCase, etc.).

Wrap the FOR target with Driver.qtIdent() so the identifier is
double-quoted when it contains special characters. Mirrors the
approach used by the resql framework's _normalize_owner() / <OWNER>
substitution introduced in d112dc3b9 - that fix covered SQL
expectation comparison; this fix covers test setUp DDL generation,
which the resql logic does not reach.

The OPTIONS user/password are left as raw '%s' since they are SQL
string literals (single-quoted), where dots are syntactically safe.

Verified: 33/33 user_mappings tests pass; zero 'syntax error at or
near "."' occurrences in the targeted run.
2026-05-01 22:54:09 +05:30
Ashesh Vashi 044355c5e0 fix: harden EnhancedRotatingFileHandler._open and add regression tests
Found by aggressive review of 83abb1c4f:

1. fd leak on os.fdopen failure — os.open returns a raw fd; if
   os.fdopen() raises after, the fd is orphaned. Wrap in try/except
   and close on failure. Built-in open() doesn't have this issue
   because it manages the fd internally.

2. Silent regression of close-on-exec — Python's built-in open() sets
   fds non-inheritable by default since PEP 446 (3.4+). os.open()
   does not. Replacing the default open path therefore made the log
   fd inheritable across fork/exec — mostly harmless in pgAdmin's
   subprocess paths (they default close_fds=True) but still a
   silent behavioral diff. OR in O_CLOEXEC to match.

Also adds web/pgadmin/utils/tests/test_enhanced_log_rotation.py
covering: new file mode, rotated archive + new active file mode,
pre-existing file mode unchanged, and fd non-inheritable. Skipped on
Windows where POSIX mode bits and PEP 446 semantics differ. Verified
all 4 cases pass via web/regression/runtests.py --pkg utils.
2026-05-01 16:38:49 +05:30
Ashesh Vashi 85366aa128 fix: create pgadmin4.log with mode 0o600
Override EnhancedRotatingFileHandler._open() so the active log file
and rotated backups are created owner-only on POSIX. The parent
DATA_DIR is already 0o700, so this is defense-in-depth — but the
log file can contain sensitive context (auth events, query
fragments, paths) and should not be world/group readable on its own.

Pre-existing log files keep their current permissions; new installs
and rotated files pick up the tighter mode. Windows uses the default
open path since os.open mode is ignored there.
2026-05-01 16:38:49 +05:30
Ashesh Vashi 6f4f28def7 refactor: factor wtforms-error-to-JSON into helper, drop dead import
Two endpoints (change_password, forgot_password) had previously been
patched ad-hoc to handle wtforms validators that emit Babel
LazyString (LazyProxy) error messages — those instances report as
iterable, so json.dumps fails with "Circular reference detected" if
they reach the encoder. Both fixes lived inline with slightly
different shapes and a shared trap waiting to bite the next caller.

Extract `_first_form_error_message(form, default=None)`: walks
form.errors, force-resolves the first LazyString to plain str, returns
the default when the form has no errors. Use it from both endpoints.

Also drop the now-dead `from flask_security.views import
default_render_json` import — the only callsite in browser/__init__.py
was replaced when that function's signature drifted; the import was
left behind.

No behavior change beyond consolidating the two ad-hoc patterns; both
endpoint test suites still pass.
2026-05-01 16:38:49 +05:30
Ashesh Vashi fb9ce563fb fix: tighten DATA_DIR file/dir permissions at creation
Two related hardening changes around the pgAdmin data directory:

1. Atomic 0o600 for pgadmin4.db
   ----------------------------
   pgadmin/__init__.py:run_migration_for_sqlite() and
   setup.py:setup_db()'s run_migration_for_sqlite() previously chmod'd
   pgadmin4.db to 0o600 *after* SQLAlchemy/SQLite created it via
   db_upgrade(). With a typical 0o022 umask, the file existed at 0o644
   between SQLite's create and pgAdmin's chmod — a TOCTOU window.
   Practically narrow because the parent dir is 0o700, but easy to
   close: wrap the migration call in `os.umask(0o077)` so the file is
   born 0o600. Both code paths use try/finally so the prior umask is
   restored even on migration failure (a raise during db_upgrade no
   longer leaves the rest of the worker running with 0o077 in effect).
   The post-hoc chmod is kept as belt-and-suspenders for the case where
   the file already existed at a wider mode from an older install.

2. 0o700 for sensitive DATA_DIR subdirectories
   --------------------------------------------
   setup/data_directory.py previously chmod'd only SESSION_DB_PATH and
   the parent dir of SQLITE_PATH to 0o700. STORAGE_DIR (user uploads
   including saved cloud-deployment certs/keys), AZURE_CREDENTIAL_CACHE
   _DIR (MSAL token cache files — real Azure credentials), KERBEROS_
   CCACHE_DIR (Kerberos credential caches), and the directory holding
   pgadmin4.log (stack traces frequently capture sensitive context)
   were left at umask-default (typically 0o755 — directory listing
   readable by any local user).

   Refactor the create-loop to track which directories were newly
   created on this invocation, then apply chmod 0o700 uniformly to all
   sensitive dirs at once. Errors (e.g., chmod on a mounted volume in
   OpenShift) emit a WARNING but don't abort — same lenient pattern the
   existing SQLITE_PATH-dir chmod already used.

   pgadmin4.log itself is still 0o644 (umask-default) because Python's
   logging.FileHandler doesn't take a mode argument; tracked as a
   follow-up task to subclass the handler.
2026-05-01 16:38:49 +05:30
Ashesh Vashi 3b36dd3964 fix: encrypt session-file body (Fernet) for confidentiality at rest
The session file contains OAuth access/refresh tokens, AWS / Google /
Azure / BigAnimal cloud credentials, the Kerberos cache path, MFA OTP
material, and pass_enc_key — the symmetric KEK that decrypts the user's
saved Postgres server passwords. The HMAC header introduced earlier in
this branch protects integrity but not confidentiality: a leak of
sessions/<sid> alone exposes every secret in plaintext.

Wrap the pickle body in Fernet (AES-128-CBC + HMAC-SHA256, AEAD) before
the on-disk HMAC computation — encrypt-then-MAC, so pickle.loads is
unreachable on the read path until both the file HMAC verifies and
Fernet authenticates the ciphertext.

File format becomes:

    +----------------------------------------------------------+
    | _HMAC_HEX_LEN bytes : hex HMAC over the ciphertext      |
    +----------------------------------------------------------+
    | N bytes : Fernet(pickle((randval, digest, data)))       |
    +----------------------------------------------------------+

Fernet key is derived from SECRET_KEY via HKDF-SHA256 with a fixed,
versioned salt and info string (`pga-session-body-v1`,
`pgadmin session body encryption v1`) so multiple workers produce the
same key deterministically and a future format swap can derive a fresh
key without reusing bytes already in flight on disk.

Caveat (not theoretical): SECRET_KEY currently lives in pgadmin4.db in
the same DATA_DIR. A leak that includes BOTH sessions/ AND pgadmin4.db
recovers the derived Fernet key and decrypts session bodies. Closing
that gap requires moving SECRET_KEY out of DATA_DIR (e.g., into the OS
keychain via USE_OS_SECRET_STORAGE) — tracked as a Layer-2 follow-up.

Backwards compat: pre-Layer-1 session files (HMAC over plain pickle, no
Fernet) pass the HMAC check but raise InvalidToken on Fernet.decrypt.
That's caught and logged as "legacy unencrypted body"; users see a
one-time re-login on upgrade. (The same upgrade also flips
SESSION_DIGEST_METHOD's default from sha1 to sha256 and changes the
file format, so the re-login is unavoidable regardless.)

Three new tests:

* TestSessionBodyIsEncryptedOnDisk: place a sentinel in the session,
  read raw bytes, assert the sentinel does NOT appear on disk.
* TestSessionBodyRejectedWithDifferentSecret: write under SECRET_KEY=A,
  read under SECRET_KEY=B, confirm rejection (rules out hard-coded-key
  bugs).
* TestLegacyHmacOnlyFileRejected: pre-Layer-1 file is rejected with the
  expected "legacy unencrypted body" log message.

Pre-existing tests that built bodies directly (TestCorruptedHmacHeader,
TestCookieHmacMismatchWithValidFile) updated to wrap the body via the
new make_encrypted_body() helper so they exercise the realistic file
shape.
2026-05-01 16:38:49 +05:30
Ashesh Vashi bee80fe943 fix: write session files with mode 0o600 (was umask-default 0644)
$DATA_DIR/sessions/<sid> contains OAuth access_tokens / refresh_tokens
(via session['oauth2_token']), AWS / Google / Azure / BigAnimal cloud
credentials (via the cloud refactors earlier in this branch), the
Kerberos credential cache path, MFA OTP material, and pass_enc_key —
the symmetric KEK that decrypts the user's saved Postgres server
passwords.

The HMAC header added earlier in this branch protects integrity but
not confidentiality: anyone with read access to the file gets the
secrets. Default `open(path, 'wb')` uses the process umask, which on
typical systems leaves files 0o644 (world-readable). Switch
new_session() and put() to a new _open_session_file() helper that
opens with `os.open(... O_WRONLY | O_CREAT | O_TRUNC, 0o600)`, mirroring
the upload helper introduced in PR 1.

The directory itself is already 0o700, so this is defense-in-depth for
container scenarios where the data volume might be mounted under shared
uids, or for misconfigurations of the directory mode.

NB: Existing session files retain their old mode until next write, then
adopt 0o600. Operators who want to forcibly tighten existing files can
chmod the sessions directory recursively post-upgrade.

Adds a positive test asserting both put() and new_session() produce
0o600 files (skipped on Windows where POSIX mode bits are not
meaningful).
2026-05-01 16:38:49 +05:30
Ashesh Vashi ccfbd2c457 fix: SESSION_DIGEST_METHOD default to sha256, follow-up review polish
Default SESSION_DIGEST_METHOD from hashlib.sha1 to hashlib.sha256.
HMAC-SHA1 is still cryptographically acceptable for the cookie's
(sid, randval) signature, but SHA-256 is the modern default and aligns
with the file-HMAC header introduced earlier in this branch. The session
file format already invalidates all existing sessions on upgrade (the
new HMAC header is required), so flipping this default at the same time
is a free hardening rather than an additional break.

Test polish from the post-merge hostile review:

* Tighten the "no unsafe deserializer imported" assertion in the four
  cloud-module test files (RDS, Google, BigAnimal, Azure) to a regex
  anchored at line start with a word boundary, so it catches
  `from pickle import dumps, loads`, `import pickle as p`, and indented
  imports — not just bare `import pickle`.

* test_login.py: drop a sid-rotation assertion that would have given
  false confidence. Flask-Paranoid does NOT rotate the session id on
  login (it binds a `_paranoid_token` to UA+IP and validates per
  request), so an `assertNotEqual(pre_sid, post_sid)` would always fail
  for the wrong reason. Comment the limitation in the test for the next
  reviewer; stronger fixation testing is owed as a follow-up.

* docs/proposals: spec line numbers in §4.2 had drifted ~10 lines from
  the implemented branch (helper extraction, etc.); refresh them and
  the audit-summary table to point at HEAD-of-branch lines. Append a
  §1.6 entry enumerating the residual `pickle.loads` callsites in
  sqleditor / schema_diff / bgprocess that PR 7 / Phase 2 will close,
  so future reviewers see the surface.
2026-05-01 16:38:49 +05:30
Ashesh Vashi 1518b0828d fix: SERVER_MODE python-test path and two endpoint regressions
CI runs the python test suite with SERVER_MODE=False (DESKTOP) which
explicitly skips OAuth2 / LDAP / Kerberos / change-password / forgot-
password tests via runtime guards. Running the suite with
SERVER_MODE=True surfaced two real pgAdmin endpoint regressions and a
batch of stale test fixtures that this commit addresses.

Test-infra fixes (regression/python_test_utils/csrf_test_client.py):

* fetch_csrf was looking for <input id="csrf_token" ...> which the
  React SPA login no longer renders. The token is exposed as
  "csrfToken": "..." in a JSON config block embedded in /login HTML
  (camelCase) and as "csrf_token": "..." in JSON API responses
  (snake_case). Match both, fall back to the legacy hidden-input form.

* login() captured the CSRF from GET /login, but Flask-Paranoid
  regenerates the session on login (anti-fixation), which drops the
  csrf_token from the new session. Subsequent state-changing API calls
  failed with "The CSRF session token is missing." Refresh the token
  from a post-login GET /browser/ when SERVER_MODE is True.

Endpoint regressions (web/pgadmin/browser/__init__.py):

* change_password JSON path: bad_request(list(form.errors.values())[0][0])
  passed a Babel LazyString (LazyProxy) to the JSON encoder, producing
  500 with "Circular reference detected." Force resolution to plain
  str.

* forgot_password JSON path: default_render_json(form, include_user=
  False) used a Flask-Security API that no longer accepts include_user,
  yielding 500 on every JSON POST. Replace with pgAdmin's standard
  make_json_response/bad_request envelope.

Test-fixture maintenance:

* test_change_password.py / browser/tests/utils.py: send JSON to the
  JSON-only change_password endpoint (was sending form data, which the
  endpoint silently ignored); use DELETE /user_management/save/<id>
  for cleanup; update respdata strings to match current pgAdmin output.

* test_login.py, test_gravatar_image_display.py,
  test_ldap_with_mocking.py, test_kerberos_with_mocking.py,
  test_webserver_with_mocking.py: drop the
  'Gravatar image for X' assertion (server-rendered HTML no longer
  exists; React renders the gravatar client-side) and verify successful
  authentication via session._user_id instead.

* test_ldap_login.py: skip when LDAP config is template placeholders
  (no live LDAP server reachable in dev/CI).

* test_kerberos_with_mocking.py: skip when authenticate.kerberos_login
  is not registered (the blueprint loads only when KERBEROS is in
  AUTHENTICATION_SOURCES at app-init time).

* test_reset_password.py: switch to JSON POST against the JSON-only
  forgot_password endpoint; parametrize expected status; drop HTML
  pre-check.

* test_validate_email.py: drop pg@postgres.local (modern email-
  validator rejects RFC 6761 special-use TLDs); switch deliverability
  scenario to .invalid/.test domains for stable DNS.

Net result: 296 tests pass, 0 failures, 12 skipped (LDAP/Kerberos
require infra; 1 pgcrypto scenario; cloud-wizard real-credential
tests).
2026-05-01 16:38:49 +05:30
Ashesh Vashi 93206710f7 fix: drop live Azure instance from session, persist auth state only
The azure cloud-deployment module wrote a live Azure class instance
directly into session['azure']['azure_obj'] (no pickle.dumps -- it
relied on the session backend to serialize anything). That is an
implicit pickle dependency: any session-format change would crash, and
the live class instance carries Azure SDK credential objects with
mutable state.

Add Azure.to_state()/from_state() that round-trip the persistable
fields (tenant_id, session_token, use_interactive_credential,
authentication_record_json, region, subscription_id, availability_zone,
available_capabilities_list, azure_cache_name, azure_cache_location)
through a plain dict. Live SDK objects (_clients, _credentials,
_cli_credentials) are intentionally NOT in to_state -- they're rebuilt
lazily from authentication_record_json on first credential use.

from_state bypasses __init__ (which references current_user.username)
via cls.__new__(cls) so unit tests work without a Flask login context.

Module-level _get_azure_from_session()/_save_azure_to_session() helpers
replace the 18 session['azure']['azure_obj'] sites across 12 endpoints.

Worker-restart UX trade-off: today's behavior pickles the populated
Azure SDK client cache, surviving a worker recycle. After this change
the in-memory cache is gone on restart, but the persisted
authentication_record_json is sufficient for the SDK to silently rebuild
the credential without re-prompting for device code -- the class was
designed for this replay. Verification owed in PR review.

Seven new tests cover: round-trip of persistable fields, helper from
session state, lazy SDK objects after from_state, missing-session
graceful return, defaults for partial state, regression assertion that
no live instance leaks into 'azure_obj', and that the unsafe
deserializer is not used.
2026-05-01 16:38:49 +05:30
Ashesh Vashi 2b0d44a33f fix: drop pickled BigAnimal provider instance from session
The biganimal cloud-deployment module pickled the live BigAnimalProvider
across 15 sites (verify, polling-for-token, projects, providers,
regions, db_types, db_versions, instance_types, volume_types,
volume_properties, deploy). Same pattern, same risk as the other
cloud providers.

Add BigAnimalProvider.to_state()/from_state() and
_get_biganimal_from_session()/_save_biganimal_to_session() helpers.
from_state uses cls.__new__(cls) to bypass __init__'s
get_auth_provider() HTTP call -- the persisted `provider` dict already
holds that data.

Five new tests cover: round-trip preservation, helper construction,
defaults for partial state, missing-session graceful return, and a
regression assertion that pickle is gone.
2026-05-01 16:38:49 +05:30
Ashesh Vashi fffc3cc242 fix: drop pickled Google cloud instance from session
The google cloud-deployment module persisted the live Google class via
pickle.dumps/pickle.loads across 14 sites: the verify_credentials
handler, the OAuth2 callback, and every region/zone/version/instance-
type lookup. Each call paid a pickle round-trip and re-introduced the
deserialization risk inside session storage.

Add Google.to_state()/Google.from_state() that round-trip the
persistable fields (client_config, credentials_json, redirect_url,
project_id, regions, availability_zones, verification flags) through
a plain dict, and rebuild the google.oauth2.credentials.Credentials
SDK object lazily from credentials_json. Module-level
_get_google_from_session() / _save_google_to_session() helpers replace
the per-site pickle dance.

Six new tests cover: round-trip of all persistable fields, credential
rebuild from token dict, helper construction from session state,
helper returning None for missing/empty session, defaults for partial
state, and a regression assertion that pickle is gone from the module.
2026-05-01 16:38:48 +05:30
Ashesh Vashi adbb249604 fix: drop pickled RDS instance from session
verify_credentials previously stored pickle.dumps(rds, -1) under
session['aws']['aws_rds_obj']; subsequent endpoints unpickled it via
pickle.loads. That pickle round-trip was an in-session deserialization
vector and forced the session storage to carry binary blobs.

The RDS class is a thin wrapper over boto3 clients: all of its mutable
state is the credential dict already saved at session['aws']['secret'].
Drop the pickled blob and reconstruct RDS per request via a new
_get_rds_from_session() helper. boto3 client construction is cheap
(microseconds) and clients are cached on the per-request instance.

Also fixes a pre-existing latent bug in verify_credentials where status
was undefined when the cached creds matched the new ones (only the
inside of the cache-miss branch assigned it), now explicitly set to
True for the cache-hit path.

Five new tests cover: full creds, missing session_token, no aws key,
no secret key, and a regression assertion that the cloud.rds module
no longer imports the unsafe deserializer.
2026-05-01 16:38:48 +05:30
Ashesh Vashi 64a232bc85 fix: drop live AuthSourceManager from session, store provider name only
The OAuth2 login redirect flow stashed the live AuthSourceManager
instance in flask.session via session['auth_obj'] = auth_obj, requiring
the session storage to handle arbitrary Python objects. That coupled the
auth flow to the pickle-backed session format and presented a second-
order deserialization vector if any path could influence session
contents.

The only piece of state that genuinely needs to cross the OAuth2
provider redirect is the provider name. Persist that as
session['oauth2_current_client'] (a plain str) and reconstruct a fresh
AuthSourceManager in oauth_authorize from current_app's auth-source
registry. The OAuth2 source's per-instance oauth2_current_client is
restored before login() so client selection still works on the callback.

Defensive: oauth_authorize now redirects with a flash error when the
session-state key is missing (e.g., session expired between login and
callback), instead of KeyError'ing.

Two new scenarios in test_oauth2_with_mocking.py verify (a) post-redirect
session contains the new minimal state and not a live class instance,
and (b) the callback handles missing provider state without 500.
2026-05-01 16:38:48 +05:30
Ashesh Vashi 435752b83c fix: symlink-based path traversal in file_manager (CWE-61/CWE-22) (#9902)
CWE-61 / CWE-22 in file_manager: check_access_permission used
os.path.abspath, which resolves '..' but not symbolic links, while
the subsequent kernel write follows symlinks. An authenticated user
could plant a symlink inside their storage area pointing outside it
and write to any path the pgAdmin process could reach.

Fix: switch to os.path.realpath for both orig_path and in_dir, and
add a new _open_upload_target helper that opens with O_NOFOLLOW
(and mode 0o600) to close the leaf-component TOCTOU between the
access check and the open. Drops the redundant post-write
check_access_permission call in add().

Mode change for uploaded files (0o644 -> 0o600) is intentional
hardening; release notes will call this out.

Tests: 16 file-manager security tests covering realpath enforcement
on all five access-check consumers and O_NOFOLLOW leaf-symlink
rejection.

The shared design proposal lives in docs/proposals/ and was added
in the preceding pickle-RCE commit.

Reported-by: Fernando Bortotti <fernando.bortotti@bsd.com.br>
2026-05-01 16:38:48 +05:30
Ashesh Vashi 30a8903374 fix: pickle deserialization RCE in session manager (CWE-502) (#9901)
CWE-502 in FileBackedSessionManager.get(): pickle.load was called on
the session file before the HMAC integrity check. Any file dropped
in the sessions directory was deserialized unconditionally, allowing
an authenticated user with sessions-dir write access to achieve
OS-level RCE.

Fix: prepend a 64-byte hex SHA-256 HMAC header over the pickle body,
computed with the SECRET_KEY, and verify it via hmac.compare_digest
before any deserialization. Also raises (not asserts) on empty
SECRET_KEY so -O does not strip the check, and narrows the
post-deserialize except clause to surface programming errors instead
of masking them.

Tests: 13 new session-format tests covering round-trip, malicious-
pickle rejection, header tampering, empty/truncated files,
cookie-HMAC mismatch, unsafe sids, empty SECRET_KEY, MFA-shaped data,
and SERVER_MODE=False direct upload.

Includes docs/proposals/2026-04-30-eliminate-rce-and-symlink-escape.md,
the shared design doc covering this fix and the symlink-traversal fix
in the following commit.

Reported-by: Fernando Bortotti <fernando.bortotti@bsd.com.br>
2026-05-01 16:38:48 +05:30
Ashesh Vashi 24485fe964 fix: prevent LFI and SSRF in LLM API configuration endpoints (#9900)
User-supplied api_key_file and api_url preferences fed pgAdmin's LLM
provider clients without validation. An authenticated user could read
arbitrary server-side files (LFI) or coerce pgAdmin into requesting
internal targets such as 169.254.169.254 (SSRF) via the chat path and
model-list endpoints.

- validate_api_key_path() restricts user-supplied paths to the user's
  private storage directory in server mode (covering both old- and
  new-style names) or the home directory in desktop mode; resolves
  symlinks and rejects null bytes. Shared storage is intentionally
  excluded since API keys are per-user secrets.
- _read_api_key_from_file() caps reads at 1024 bytes and enforces a
  printable-ASCII no-whitespace key shape so it cannot be repurposed
  as an arbitrary file reader.
- validate_api_url() enforces config.ALLOWED_LLM_API_URLS by exact
  scheme://host:port match, applied at refresh endpoints, accessor
  fallbacks, and provider client constructors so the chat path is
  also covered. Logs a startup warning if the allowlist is empty.
- Adds test coverage for path validation, URL validation, refresh-
  endpoint rejection paths, and refresh-endpoint happy paths.

Reported-by: j3seer <jasserchebbi@outlook.com>
2026-05-01 16:38:48 +05:30
Ashesh Vashi 13badc62c3 fix: Prevent OS command injection in Import/Export query export (CWE-78) (#9899)
User-supplied input was interpolated directly into a psql \copy
metacommand template without sanitization. An authenticated pgAdmin
user could inject ") TO PROGRAM 'cmd'" to achieve RCE on the pgAdmin
server, or ") TO '/path'" for arbitrary file write, by breaking out
of the \copy (...) context.

Add _is_query_parens_balanced() which tracks parenthesis depth in the
query, modeled on psql's strtokx tokenizer used by parse_slash_copy.
Only single-quoted strings ('...' with '' and \' escaping) and
double-quoted identifiers ("..." with "" escaping) are recognized;
line/block comments and dollar-quoting are deliberately NOT skipped
because psql's \copy parser does not recognize them either, so any
unbalanced ')' inside those constructs must remain visible to the
validator.

Whitelist-validate format, on_error, and log_verbosity which were
also raw-interpolated, and write the normalized lowercase value back
to data so downstream template equality checks (e.g. data.format ==
'csv') match regardless of input case.

Reject queries containing null bytes (which could cause a C-string
truncation mismatch between Python validation and psql execution)
and normalize \r\n / \r / \n to spaces (required for Windows; also
prevents psql metacommand termination).

Type-check 'query' before string operations so malformed payloads
return a clean 400 instead of a 500. Tighten is_query_export gating
to 'is True' in both update_data_for_import_export and the validation
block so a client cannot exploit a truthy-but-not-True value to
bypass one check while satisfying the other.

Add unit tests covering the parens parser (balanced cases, RCE
attempts, escape edge cases) and route-level tests asserting
BatchProcess is not invoked for malicious payloads.

Reported-by: chungkn (Chung Kim), OneMount Group <kimngocchung.k2a@gmail.com>
2026-05-01 16:38:48 +05:30
Ashesh Vashi cf53953d9a fix: prevent SQL injection in Maintenance tool option values (#9898)
The Maintenance tool concatenated four user-supplied JSON fields
(buffer_usage_limit, vacuum_parallel, vacuum_index_cleanup,
reindex_tablespace) directly into the rendered VACUUM/ANALYZE/REINDEX
command, which was passed to psql --command. An authenticated user
with the tools_maintenance permission could break out of the option
syntax and execute arbitrary SQL on the connected server, escalating
to RCE on the database host via COPY ... TO PROGRAM.

Fix:
- Allow-list values server-side before rendering: vacuum_index_cleanup
  in {AUTO, ON, OFF}; vacuum_parallel a non-negative integer up to
  1024; buffer_usage_limit matching ^\d+\s*(kB|MB|GB|TB)$
  (case-insensitive). Reject with HTTP 400 on failure.
- Switch reindex_tablespace from manual double-quote wrapping to the
  qtIdent filter used elsewhere in the same template, which both
  escapes embedded quotes and only quotes when required.
- Type-guard against unhashable values so non-string payloads return
  400 instead of triggering a 500.

Reported-by: j3seer <jasserchebbi@outlook.com>
2026-05-01 16:38:48 +05:30
Ashesh Vashi d112dc3b96 fix: Fixed the resql tests - use <OWNER> placeholder instead of hardcoded 'postgres' role (#9873)
The reverse-engineered SQL tests hardcoded 'postgres' as the role name
in test JSON data and expected SQL files. This fails on systems where
the superuser is not 'postgres' (e.g. 'ashesh.vashi').

Changes:
- Replace hardcoded 'postgres' with '<OWNER>' placeholder in ~400 test
  JSON, SQL, and MSQL files across all browser module tests
- Extend test_resql.py to resolve '<OWNER>' in scenario data sent to
  API endpoints (not just in expected SQL)
- Handle identifier quoting for usernames containing special characters
  (dots, etc.) by normalizing both expected and actual SQL
- Fix test_domain_sql.py to use qtIdent for username in expected SQL
- Split Authlib version pin: 1.6.x for Python <=3.9, 1.7.x for >3.9
2026-04-24 21:18:38 +05:30
Ashesh Vashi b70d4c9857 fix: Bump runtime and development dependencies (#9870)
Python (requirements.txt):
- Authlib 1.6.9 -> 1.7.0
- Flask-Security-Too 5.7.* -> 5.8.* (py>3.9)
- certifi 2026.2.25 -> 2026.4.22
- Flask-WTF 1.2.* -> 1.3.*

Python test (web/regression/requirements.txt):
- selenium 4.41.0 -> 4.43.0
- testscenarios 0.5.0 -> 0.6.1
- testtools 2.8.7 -> 2.9.0

JavaScript web (web/package.json):
- @mui/material ^7.3.7 -> ^7.3.10
- @mui/x-date-pickers ^8.27.2 -> ^8.28.3
- @mui/icons-material ^7.3.6 -> ^7.3.10
- dompurify ^3.3.3 -> ^3.4.1
- axios ^1.13.5 -> ^1.15.2
- react ^19.2.3 -> ^19.2.5
- react-dom ^19.2.3 -> ^19.2.5
- typescript ^5.9.2 -> ^6.0.3
- marked ^17.0.1 -> ^18.0.2
- react-checkbox-tree ^1.7.2 -> ^2.0.1
- eslint ^9.39.2 -> ^9.39.4
- and ~60 more minor/patch bumps across build, test, and runtime deps

JavaScript runtime (runtime/package.json):
- electron 41.2.0 -> 41.3.0
- axios ^1.15.0 -> ^1.15.2
- eslint ^10.2.0 -> ^10.2.1
- globals ^17.4.0 -> ^17.5.0
2026-04-24 14:28:36 +05:30
Ashesh Vashi 3294e74197 fix: prevent XSS via innerHTML in browser tree and explain visualizer (#9865)
Use textContent instead of innerHTML when setting DOM element text
to prevent stored XSS through crafted PostgreSQL object names.
2026-04-23 14:21:04 +05:30
Aditya Toshniwal 79e490c5fa Updated yarn.lock file to use yarn v4.14.0 and fix the builds 2026-04-17 17:13:19 +05:30
Ashesh Vashi e4edcf2253 fix: SharedServer feature parity columns and write guards (#9835)
Add passexec_cmd, passexec_expiration, kerberos_conn, tags, and
post_connection_sql to SharedServer so non-owners get their own
per-user values instead of inheriting the owner's.  Drop the unused
db_res column which was never overlaid or writable by non-owners.

Key changes:
- New Alembic migration (sharedserver_feature_parity) adds 5 columns,
  drops db_res, cleans up orphaned records.  All operations idempotent.
- Overlay copies new fields from SharedServer instead of suppressing
- _owner_only_fields guard blocks non-owners from setting passexec_cmd,
  passexec_expiration, db_res, db_res_type via API
- Non-owners can set post_connection_sql (runs under their own creds)
- update_tags and flag_modified use sharedserver for non-owners
- update() response returns sharedserver tags for non-owners
- ServerManager passexec suppression with config.SERVER_MODE guard
- UI: post_connection_sql editable for non-owners (readonly only when
  connected, not when shared)
- SCHEMA_VERSION bumped to 51
- Comprehensive unit tests for overlay, write guards, and tag deltas
2026-04-13 15:03:31 +05:30
Ashesh Vashi 4ddb16f47a fix: customize container user permissions using PUID and PGID. #9657 (#9833)
Add support for custom container user permissions via PUID and PGID
environment variables. When the container is started as root
(--user root), the pgadmin user is reassigned to the requested UID/GID
and all initialization runs under that user via su-exec, ensuring
files are created with correct ownership from the start.

Key changes:
- Dockerfile: add su-exec package, add chmod g=u for /run/pgadmin
  (fixes OpenShift random UID access)
- entrypoint.sh: add PUID/PGID validation and privilege dropping
  before initialization (not after), preserving OpenShift compatibility

Three modes supported:
- Default (USER 5050): unchanged behavior
- Custom UID (--user root -e PUID=N -e PGID=N): drops to target user
  before any init
- OpenShift (random UID, GID 0): passwd fixup + group permissions
2026-04-13 14:34:18 +05:30
Ashesh Vashi a3a0537277 fix: Bump runtime dependencies and upgrade ESLint to v10 (#9834)
- electron: 41.0.2 → 41.2.0
- eslint: ^9.39.2 → ^10.2.0
- axios: ^1.13.5 → ^1.15.0
- electron-context-menu: ^4.1.0 → ^4.1.2
- Added @eslint/js and globals as explicit devDependencies (required by ESLint 10)
- Fixed no-useless-assignment lint errors in downloader.js and misc.js
2026-04-09 21:31:17 +05:30
Ashesh Vashi 9a76ed80bb fix: enforce data isolation and harden shared servers in server mode (#9830)
pgAdmin 4 in server mode had no data isolation between users — any
authenticated user could access other users' private servers,
background processes, and debugger state by guessing object IDs.
The shared server feature had 21 vulnerabilities including credential
leaks, privilege escalation via passexec_cmd, and owner data
corruption via SQLAlchemy session mutations.

Centralized access control:
- New server_access.py with get_server(), get_server_group(),
  get_user_server_query() replacing ~20 unfiltered queries
- connection_manager() raises ObjectGone (HTTP 410) in server mode
  when access is denied — fixes 155+ unguarded callers
- UserScopedMixin.for_user() on 10 models replaces scattered
  user_id filters

Shared server isolation (all 21 audit issues):
- Expunge server from session before property merge to prevent
  owner data corruption
- Suppress passexec_cmd, post_connection_sql for non-owners in
  merge, API response, and ServerManager
- Override all 6 SSL/passfile connection_params keys from
  SharedServer; strip owner-only keys; sanitize on creation
- _is_non_owner() helper centralises 15+ inline ownership checks
- SharedServer lookup uses (osid, user_id) not name
- Unique constraint on SharedServer(osid, user_id)
- Tunnel/DB password save, change_password, clear_saved_password,
  clear_sshtunnel_password all branch on ownership
- Only owner can unshare (delete_shared_server guard)
- Session restore includes shared servers
- tunnel_port/tunnel_keep_alive copied from owner, not hardcoded

Tool/module hardening:
- All tool endpoints use get_server()
- Debugger function arguments scoped by user_id
- Background processes use Process.for_user()
- Workspace adhoc servers scoped to current user

Migration (schema version 49 -> 50):
- Add user_id to debugger_function_arguments composite PK
- Add indexes on server, sharedserver, servergroup
- Add unique constraint on sharedserver(osid, user_id)
2026-04-09 18:32:59 +05:30
Ashesh Vashi 872d5ac0b3 fix: Bump python & javascript dependencies (#9827)
* Update Python dependencies:
   - google-auth-oauthlib 1.3.0 → 1.3.1
   - sphinxcontrib-youtube 1.4.1 → 1.5.0
   - fixtures 4.3.1 → 4.3.2
   - Add missing newline at end of requirements files

* Update JavaScript dependencies:
   - Replace deprecated @babel/plugin-proposal-* packages with @babel/plugin-transform-* equivalents
   - Remove unused @types/classnames dependency
   - Update yarn.lock
   - Pin the 'react-frame-component' to '~5.2.6'

* fix: Use PostGIS 36 for EPAS 18 in CI workflow
   - EPAS 18 ships with edb-as18-postgis36 instead of postgis34.
   - Add a postgisver matrix variable to support mixed versions.
   - Add exclude+include for EPAS 18 PostGIS matrix to fix empty runs-on

* Moving '@babel/plugin-transform-class-properties', '@babel/preset-react' to devDependencies section
2026-04-08 17:31:56 +05:30
rztrainlocalandrztrainlocal d59fcf3459 fix(9656): Use absolute paths for a2enmod, a2enconf for debain setup script (#9815)
Reason: On debian, it does not have `/usr/sbin` in the path environment variable anymore.

Co-authored-by: rztrainlocal <ke@KE-U758.HOME>
2026-04-06 21:48:19 +05:30
Akshay Joshi d8a078af53 Updated version for release v9.14 2026-03-30 17:44:32 +05:30
Dave PageandClaude Opus 4.6 9bb96360dd Support /v1/responses for OpenAI models. #9795
* Support /v1/responses for OpenAI models. #9795

* Address CodeRabbit review feedback on OpenAI provider.

- Preserve exception chains with 'raise ... from e' in all
  exception handlers for better debugging tracebacks.
- Use f-string !s conversion instead of str() calls.
- Extract duplicated max_tokens error handling into a shared
  _raise_max_tokens_error() helper method.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Validate api_url and use incomplete_details from Responses API.

- Strip known endpoint suffixes (/chat/completions, /responses) from
  api_url in __init__ to prevent doubled paths if a user provides a
  full endpoint URL instead of a base URL.
- Use incomplete_details.reason from the Responses API to properly
  distinguish between max_output_tokens and content_filter when the
  response status is 'incomplete', in both the non-streaming and
  streaming parsers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 14:16:22 +05:30
Libor M. 2228575564 Czech translation for version 9.14 2026-03-30 12:43:22 +05:30
Khushboo Vashi 5dd0de9e0f Revert "Update JavaScript dependencies."
This reverts commit 92bb092718.
2026-03-30 12:29:48 +05:30
Khushboo Vashi aa3dc389e4 Update Release Notes. 2026-03-27 14:27:15 +05:30
Akshay Joshi 92bb092718 Update JavaScript dependencies. 2026-03-27 13:23:18 +05:30
Anil Sahoo 3598840203 Fixed an issue where ALT+F5 for executing a query in the Query Tool shows a crosshair cursor icon for rectangular selection. #9570 2026-03-27 12:59:35 +05:30
Domenico Sgarbossa 792441ab95 Updated Italian translation for v9.14. 2026-03-27 11:30:59 +05:30
Anil Sahoo 2c626d1181 Fixed Geometry Viewer not auto-updating on first query execution after View/Edit Data to Query Tool promotion. #9392 2026-03-27 11:23:47 +05:30
Pravesh Sharma 278e812293 Fixed an issue where the default fillfactor value for B-tree indexes was incorrect. #9648 2026-03-27 11:20:40 +05:30
Pravesh Sharma 1d51a1a943 Fixed an issue where the Query tool kept prompting for a password when using a shared server. #9789 2026-03-27 11:03:15 +05:30
Dave Page bf649420b7 Fix a couple of related issues in the Query Tool layout.
- Hide the AI Assistant tab if AI is disabled or unconfigured. #9696
- Ensure the AI Assistant tab is not the first one shown.
2026-03-27 11:01:42 +05:30
Anil Sahoo 1c93f93a6a Fixed Python & feature test failures caused by Werkzeug 3.1.7 rejecting empty Host header in CSRF token generation. 2026-03-26 17:59:58 +05:30
Akshay Joshi 3ba887001a Updated message catalogs for v9.14 2026-03-26 17:06:45 +05:30
Akshay Joshi 257654849b Updated Javascript and Python dependencies. 2026-03-17 12:12:00 +05:30
Dave Page d7f462c22c Clarify where the LLM API key files should be. #9758 2026-03-17 11:44:17 +05:30
Dave Page 6296016b67 Fix an issue where LLM responses are not streamed or rendered properly in the AI Assistant. #9734
* Address CodeRabbit review feedback for streaming and SQL extraction.

- Anthropic: preserve separators between text blocks in streaming to
  match _parse_response() behavior.
- Docker: validate that the API URL points to a loopback address to
  constrain the request surface.
- Docker/OpenAI: raise LLMClientError on empty streams instead of
  yielding blank LLMResponse objects, matching non-streaming behavior.
- SQL extraction: strip trailing semicolons before joining blocks to
  avoid double semicolons in output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Address remaining CodeRabbit review feedback for streaming and rendering.

- Use distinct 3-tuple ('complete', text, messages) for completion events
  to avoid ambiguity with ('tool_use', [...]) 2-tuples in chat streaming.
- Pass conversation history from request into chat_with_database_stream()
  so follow-up NLQ turns retain context.
- Add re.IGNORECASE to SQL fence regex for case-insensitive matching.
- Render MarkdownContent as block element instead of span to avoid
  invalid DOM when response contains paragraphs, lists, or tables.
- Keep stop notice as a separate message instead of appending to partial
  markdown, preventing it from being swallowed by open code fences.
- Snapshot streamingIdRef before setMessages in error handler to avoid
  race condition where ref is cleared before React executes the updater.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Address CodeRabbit review feedback for streaming providers and history.

- Fix critical NameError: use self._api_url instead of undefined API_URL
  in anthropic and openai streaming _process_stream() methods.
- Match sync path auth handling: conditionally set API key headers in
  streaming paths for both anthropic and openai providers.
- Remove unconditional temperature from openai streaming payload to
  match sync path compatibility approach.
- Add URL scheme validation to OllamaClient.__init__ to prevent unsafe
  local/resource access via non-http schemes.
- Guard ollama streaming finalizer: raise error when stream drops
  without a done frame and no content was received.
- Update chat.py type hint and docstring for 3-tuple completion event.
- Serialize and return filtered conversation history in the complete
  SSE event so the client can round-trip it on follow-up turns.
- Store and send conversation history from NLQChatPanel, clear on
  conversation reset.
- Fix JSON-fallback SQL render path: clear content when SQL was
  extracted without fenced blocks so ChatMessage uses sql-only renderer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix missing closing brace in NLQChatPanel switch statement.

Adding block scoping to the error case introduced an unmatched brace
that prevented the switch statement from closing properly, causing
an eslint parse error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix missing compaction module and SQL extraction test.

- Replace compaction module imports with inline history deserialization
  and filtering since compaction.py is on a different branch.
- Add rstrip(';') to SQL extraction test to match production code,
  fixing double-semicolon assertion failure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix SQL extraction test expected values after rstrip(';') change.

The rstrip(';') applied to each block before joining means single
blocks and the last block in multi-block joins no longer have
trailing semicolons. Update expected values to match.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Strictly guard Ollama stream: raise if no terminal done frame received.

Truncated content from a dropped connection should not be treated as
a complete response, even if partial text was streamed. Always raise
when final_data is None, matching CodeRabbit's recommendation.
2026-03-17 11:41:57 +05:30
Akshay Joshi e3472103bb Updated release note. 2026-03-16 19:20:18 +05:30
Dave Page 990b4f5e54 Fix an issue where the AI Assistant was not retaining conversation context between messages, with chat history compaction to manage token budgets.
* Address CodeRabbit review feedback for chat context and compaction.

- Track tool-use turns as groups instead of one-to-one pairs, so
  multi-tool assistant messages don't leave orphaned results.
- Add fallback to shrink the recent window when protected messages
  alone exceed the token budget, preventing compaction no-ops.
- Fix low-value test fixtures to keep transient messages short so
  they actually classify as low-importance.
- Guard Clear button against in-flight stream race conditions by
  adding a clearedRef flag and cancelling active streams.
- Assert that conversation history is actually passed through to
  chat_with_database in the "With History" test.

* Address remaining CodeRabbit review feedback for compaction module.

- Expand protected set to cover full tool groups, preventing orphaned
  tool call/result messages when a turn straddles the recent window.
- Add input validation in deserialize_history() for non-list/non-dict data.
- Strengthen test assertion for preserved recent window tail.


* Fix CI test failures in compaction and NLQ chat tests.

- Lower max_tokens budget in test_drops_low_value to reliably force
  compaction (500 was borderline, use 200).
- Consume SSE response data before asserting mock calls in NLQ chat
  test, since Flask's streaming generator only executes on iteration.


* Clarify mock patch target in NLQ chat test.

Add comment explaining why we patch the source module rather than the
use site: the endpoint uses a local import inside the function body,
so there is no module-level binding to patch.
2026-03-16 19:02:36 +05:30
Rohit Bhati 74b1a3bcc4 Fixed Process Watcher garbled text on Windows with non-UTF-8 locales. #9457 2026-03-16 19:00:41 +05:30
Anil Sahoo 01c2d12b51 Fixed an issue where selecting all in the Query Tool's Messages tab would select the entire page content. #8992 2026-03-16 14:39:42 +05:30
Dave Page e5cf456fae Fixed an issue where AI Reports are grayed out after setting an API key by auto-selecting the default provider. #9694
* Don't let auto-selection override an explicit default_provider choice.

If the same save payload includes a default_provider update (including
setting it to empty/disabled), skip the auto-selection logic so the
user's explicit choice is respected.
2026-03-16 14:24:09 +05:30
Dave Page da55da4d32 Replace misleading AI thinking messages with fun elephant-themed ones. #9702
The previous messages like "Vacuuming the catalog..." and "Analyzing
table statistics..." could be mistaken for actual database operations.
Replace them with clearly whimsical elephant-themed messages, expand
the pool to 32 messages, and consolidate them into a single shared
module with gettext() support.
2026-03-16 14:23:05 +05:30
Akshay Joshi b301bdcecd Updated release note 2026-03-16 12:43:29 +05:30
Dave Page 23bd3359c1 Fixed an issue where AI features are visible in the UI even when LLM_ENABLED is set to False. 2026-03-16 12:35:16 +05:30
Dave Page 0bc4edbab5 Improve the AI Assistant user prompt to be more descriptive of the actual functionality. 2026-03-16 12:34:44 +05:30
Dave Page 34aa360830 Allow copying of text from the AI Assistant chat panel. #9738 2026-03-16 12:16:45 +05:30
Dave PageandClaude Opus 4.6 7e39fc8477 Fix flakey SchemaDialogView 'change text' JS test
Add a wait for the FormView autofocus timer (200ms) to complete before
typing, preventing a race condition where the autofocus moves focus away
from the target field on slow CI machines. This matches the pattern
already used by simulateValidData in the same test file.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 12:14:10 +05:30
Dave PageandClaude Opus 4.6 8f74b2e6d4 Fixed an issue where AI Reports fail with OpenAI models that do not support the temperature parameter. #9719
Removed the temperature parameter from all LLM provider clients and
pipeline calls, allowing each model to use its default. This fixes
compatibility with GPT-5-mini/nano and future models that don't
support user-configurable temperature.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 12:13:04 +05:30
Dave PageandClaude Opus 4.6 c8cb744ffd Fix model tool prompt
* Fix NLQ system prompt to work with models that prioritize text instructions over tool calls.

The previous prompt told the model to "Return ONLY the JSON object, nothing else"
while also providing tool definitions. Models like Qwen 3.5 would follow the text
instruction and never use tools. The updated prompt clearly separates the tool-use
phase from the final JSON response phase, and explicitly instructs the model to
call tools directly rather than describing them in text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Update release notes for NLQ prompt fix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix issue number in release notes for NLQ prompt fix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 12:10:02 +05:30
Dave PageandClaude Opus 4.6 b3aa78c0a5 Added support for custom LLM provider URLs for OpenAI and Anthropic, allowing use of OpenAI-compatible providers such as LM Studio, EXO, and LiteLLM. #9703
- Add configurable API URL fields for OpenAI and Anthropic providers
- Make API keys optional when using custom URLs (for local providers)
- Auto-clear model dropdown when provider settings change
- Refresh button uses current unsaved form values
- Update documentation and release notes

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 12:08:55 +05:30
Dave Page 78e3b67eb1 Fix an issue where the AI Assistant input textbox sometimes swallows the first character of input. #9740 2026-03-16 12:06:47 +05:30
Muhammad Aqeel c8bd75c9a8 Fix apparmor_parser not found error in desktop postinst script (#9728)
Add a runtime guard in the postinst so apparmor_parser is only called
  when available. Previously, packages built on Ubuntu 24+ would fail to
  install on headless servers or systems without AppArmor tools. A warning
  is printed when the profile load is skipped to aid debugging.
2026-03-10 15:29:40 +00:00
Akshay Joshi a0e6da0772 1) Updated JavaScripts and Python dependecies.
2) Updated release note.
2026-03-10 13:41:19 +05:30
Rohit Bhati 8ca765478f Fixed an issue where permissions page is not completely accessible on full scroll. #9721 2026-03-10 12:59:42 +05:30
Pravesh Sharma f49c967bfd Added support to download binary data from result grid. #4011 2026-03-10 12:25:21 +05:30
Khushboo Vashi 0a539c32d9 Fixed an issue where OAuth2 authentication fails with 'object has no attribute' if OAUTH2_AUTO_CREATE_USER is False. #9279 2026-03-10 12:24:55 +05:30
Anil Sahoo 395ff36322 Ensure that the Geometry Viewer refreshes when re-running queries or switching geometry columns, preventing stale data from being displayed. #9392 2026-03-09 16:08:14 +05:30
Florian 00a44a5d76 fix TypeError Exception in session.py
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2026-03-09 12:21:36 +05:30
Daniel NylanderandDaniel Nylander 3ecdc57a59 i18n: Complete Swedish translation (3625/3625 strings)
- Translate all 357 previously untranslated strings
- Fix 1 duplicate entry ('on' with empty msgstr)
- Fix format string mismatch (%(provider)s)
- Total: 3625 translated strings (100% coverage)

Co-authored-by: Daniel Nylander <daniel@danielnylander.se>
2026-03-09 12:21:18 +05:30
Akshay Joshi 08b0f6fe7b 1) Updated Python and Javascripts dependencies.
2) Created new release note files for v9.14
2026-03-05 17:56:33 +05:30
Khushboo Vashi 6d18741f1a Ensure the Kerberos mock test handles OS errors correctly. 2026-03-05 17:44:12 +05:30
Akshay Joshi dc47bf48f7 Remove PG/EPAS 13 from the github runners. 2026-03-05 16:52:41 +05:30
Khushboo Vashi 5b231ddd3f Revert "Customize container user permissions using PUID and PGID. #9657"
This reverts commit 97c90f1e69.
2026-03-02 18:05:26 +05:30
Akshay Joshi 3e48c21fe5 Remove #9657 from release notes due to revert. 2026-03-02 17:06:53 +05:30
Akshay Joshi 4cc74c13f7 Updated version for release v9.13 2026-03-02 14:11:36 +05:30
Akshay Joshi 2cf5d39a01 Fixed one translation issue. 2026-03-02 14:09:25 +05:30
Akshay Joshi f4112c9a0a Updated yarn.lock 2026-03-02 14:08:49 +05:30
Domenico Sgarbossa 6f69120af5 Updated Italian translation for v9.13 2026-03-02 11:48:06 +05:30
Libor M. cf6d7f3b89 Czech translation for version 9.13. 2026-03-02 11:38:56 +05:30
Aditya Toshniwal b78fc884e3 Fixed an issue in file dialog where rename was not working. #9651 2026-02-27 18:24:54 +05:30
Rohit Bhati caafc6bb1b Fix broken checkbox selection in backup dialog objects tree. #9649 2026-02-27 17:01:11 +05:30
Akshay Joshi e9e52905cc Updated message catalogs for v9.13 2026-02-26 18:56:11 +05:30
Akshay Joshi cae00a1dc6 1) Fixed one issue in session.py
2) Updated release note.
2026-02-25 14:26:30 +05:30
Pravesh Sharma 5dd63ca16b Fixed an issue where modifying a shared server incorrectly updated the original server details. #9258 2026-02-25 11:22:44 +05:30
kon-foo 97c90f1e69 Customize container user permissions using PUID and PGID. #9657 2026-02-24 16:49:43 +05:30
Khushboo Vashi bcd48a92b9 Load predefined users from a JSON file through command line. #9229 2026-02-24 16:46:31 +05:30
Lance J.andChristian P. 6d0d387f53 ERD Tool: Insert table with relations via drag-and-drop. #5578 #8198
* Add preference for insert with relations

Co-authored-by: Christian P. <pirnichristian@gmail.com>

* Insert tables with relations on drag and drop

Co-authored-by: Christian P. <pirnichristian@gmail.com>

* Fix test mock not returning Erd Supported Data

Co-authored-by: Christian P. <pirnichristian@gmail.com>

---------

Co-authored-by: Christian P. <pirnichristian@gmail.com>
2026-02-24 12:15:54 +05:30
Rohit Bhati 3995ba9a95 Add support for 'ONLY' in Index creation dialog. #6386 2026-02-24 12:14:36 +05:30
Akshay Joshi 4bb6b72377 Updated Python and JavaScript dependencies. 2026-02-24 11:54:19 +05:30
balodis 080fcc1cfb Fix column ordering in unique/primary key constraint properties
The fromRaw formatter for the Columns field in unique constraint and
primary key properties used _.filter(allOptions, ...), which preserved
the order of allOptions (table column position) rather than the
constraint-defined column order from backendVal. Replaced with _.find
mapped over backendVal to preserve the correct constraint column order.

Added unit tests for cell and type formatter functions to verify
column ordering is preserved.
2026-02-23 17:11:38 +05:30
Dave Page 93e2f23a48 Update the release notes to properly describe the new AI features. 2026-02-23 15:07:36 +05:30
Akshay Joshi 965a27db39 typer[all]==0.24.* drop support for Python 3.9. Added conditional requirement. 2026-02-18 17:41:13 +05:30
Akshay Joshi 7b377ff3da Pin ESLint to 9.39.2 as 10.0.0 not working. 2026-02-18 17:19:05 +05:30
Akshay Joshi 2dedb6e69a Updated Python and Javascript dependencies. 2026-02-18 13:02:46 +05:30
kon-foo b15f15960f Fix misleading error when _FILE secret is not readable. 2026-02-18 12:10:23 +05:30
Khushboo Vashi 50f78bf210 Fix translation compilation. #9583 2026-02-18 11:09:06 +05:30
Akshay Joshi 0842f36f16 Updated release note 2026-02-17 17:41:42 +05:30
Khushboo Vashi 5002419611 Fixed an issue where the 'Quote strings only' configuration was ignored when downloading the result set. #7578 2026-02-17 17:19:41 +05:30
Dave Page f2756a3dcf Core LLM integration infrastructure to allow pgAdmin to connect to AI providers. #9641
* Core infrastructure for LLM integration.
* Add support for a number of different AI generated reports on security, performance, and schema design on servers, databases, and schemas, as appropriate.
* Add a Natural Language AI assistant to the Query Tool.
* Add an AI Insights panel to the EXPLAIN tool in the Query Tool, to analyse and report on issues in query plans.
2026-02-17 17:16:06 +05:30
Khushboo Vashi 2715932464 Update Release Notes. 2026-02-10 14:39:34 +05:30
Murtuza Zabuawala b366d210dc Allow users to customize "OF TYPE" columns during table creation. #229 2026-02-10 14:33:22 +05:30
Simon Randby fbbc12a0a3 Fix an issue where deployment of helm chart crashing with operation not permitted. #9572 2026-02-09 17:13:43 +05:30
Pravesh Sharma 9039080214 Fixed an issue where a long name in ERD table node was not breaking into multiple lines. 2026-02-09 14:53:51 +05:30
Pravesh Sharma f52584eef8 Fixed an issue where column comments were not displayed in the SQL tab for materialised views. #9486 2026-02-09 14:46:15 +05:30
Pravesh Sharma 5abd9e3c5b Fixed an issue where tools settings changed by the users were not restored on application relaunch. #8988 2026-02-09 10:54:53 +05:30
Akshay Joshi 3e05f7a14f Updated Javascript and Python dependencies. 2026-02-06 13:30:09 +05:30
Aditya Toshniwal 9464e44887 Update windows installer side image as the current one gets flipped. 2026-02-04 14:46:48 +05:30
Aditya Toshniwal 18c73d00ce Update version in Helm for release v9.12 2026-02-02 15:17:06 +05:30
Aditya Toshniwal aa33a99b0d - Updated release notes.
- Fix translation compilation.
2026-02-02 15:13:14 +05:30
Anil Sahoo 6000cc0fb4 Fixed an issue where pgAdmin4 app on macOS cannot auto-update while running on a read-only volume even if present in the Applications folder. #9402 2026-02-02 15:11:58 +05:30
Akshay Joshi ef1b69bd5a Update version for release v9.12 2026-02-02 12:24:51 +05:30
Akshay Joshi 5103c47fdf Updated release note. 2026-01-30 17:04:23 +05:30
Libor M. b539740d8e Czech translation for version 9.12 2026-01-30 16:56:52 +05:30
Rohit Bhati 0cb6738343 Fix pgAdmin fails when performing Backup/Restore on a PostgreSQL connection defined exclusively via pg_service.conf. #9553 2026-01-30 16:54:48 +05:30
Domenico Sgarbossa eee9989dde Updated Italian translation for v9.12
update translations
2026-01-30 16:52:33 +05:30
Yogesh Mahajan 596b14a0f4 Ensure the container deployment supports boolean values in yaml format. #9522 2026-01-30 12:10:36 +05:30
Aditya Toshniwal a46d4c22d8 Updated message catalogs for v9.12 2026-01-30 12:04:47 +05:30
David Aparicio c47c79c3dc Enables deployment strategy configuration within the Helm chart. 2026-01-29 14:03:02 +05:30
Yogesh Mahajan c45502dc01 Update menu bar documentation. #9567 2026-01-29 13:14:12 +05:30
MrMonkeyface 5edab2f621 Fix typo in note about file path specifications. 2026-01-28 11:42:08 +05:30
Akshay Joshi 8f39f8a6bc Update JavaScript Dependencies. 2026-01-27 12:25:34 +05:30
dependabot[bot] 26ea03f421 Javascript dependency: Bump lodash from 4.17.21 to 4.17.23 in /web 2026-01-23 11:49:46 +05:30
dependabot[bot] 63e3ad8d33 Javascript dependency: Bump lodash-es from 4.17.22 to 4.17.23 in /web (#9556) 2026-01-23 11:49:29 +05:30
Akshay Joshi 31d1dbc697 Ensure that the tooltip is disabled for a password cell in a dialog grid. #9552 2026-01-22 15:15:13 +05:30
Anil Sahoo 0cac007970 Add new options like INHERIT and SET to the Role's membership tab. #6451 2026-01-20 11:53:32 +05:30
Akshay Joshi 93605c0baa Updated Python and Javascript dependencies. 2026-01-19 17:46:22 +05:30
Akshay Joshi 3d1cd444b0 Updated release note 2026-01-19 17:16:56 +05:30
Paul BOURHISandPaul Bourhis a500939532 Enhance OAUTH2 and OIDC authentication support with improved claims handling and configuration options
Change logging level from exception to error for OIDC profile data issues.
Refactor debug logging in OAuth2 authentication to improve clarity and consistency
Add error handling for missing OAuth2 provider and enhance claims processing logic
Enhance OIDC ID token handling by implementing JWT parsing and updating tests to mock claims extraction
Refactor ID token claims extraction for OIDC providers and update tests to mock userinfo handling
Refactor OAuth2 configuration to use get method for optional URLs
Enhance OAuth2 documentation and implement PKCE support for public clients in authentication logic
Fix typo in OAUTH2 authentication documentation
Implement Azure Entra ID Workload Identity authentication support and add corresponding tests

Co-authored-by: Paul Bourhis <paul.bourhis@bhs-consulting.com>
2026-01-19 16:06:25 +05:30
Aditya Toshniwal 3dab883d88 Update yarn.lock to fix few security vulnerabilities in upstream. 2026-01-16 10:55:45 +05:30
Aditya Toshniwal 7c36eaba90 Warn user of unsaved data output edits before page navigation. #8916 2026-01-14 18:20:52 +05:30
Akshay Joshi e0ba1dd68e Updated JavaScript dependencies. 2026-01-14 12:44:30 +05:30
Rohit Bhati 90be555ec8 Fix pg_restore logs to distinguish UI sync issues from actual failures. #9074 2026-01-14 12:32:12 +05:30
Jørgen H. Fjeld 402ddafa2a Fix sslsni boolean to integer conversion for libpq compatibility
The sslsni connection parameter was being stored as a boolean (true/false)
in the database, but libpq expects integer values (1/0) for this parameter.
When a boolean value was passed to libpq, it resulted in SSL connection
failures with 'unexpected eof while reading' errors.

This fix converts boolean connection parameters (sslcompression, sslsni) to
integers when creating the connection string in server_manager.py, ensuring
libpq receives the expected integer format.

Fixes connection issues when using PGSSLSNI=1 with PostgreSQL 14+ servers.
2026-01-14 12:31:36 +05:30
Akshay Joshi 74c8b2d0a1 Updated release note. 2026-01-08 18:45:02 +05:30
Yogesh Mahajan bef374d023 Upgrade ID column in the database table to BigInteger to support large OID values. #9223 2026-01-08 18:38:02 +05:30
Pravesh Sharma a9d56402a1 Fixed an issue where connection parameters were using localized values instead of literal values, causing connection failures. #9500 2026-01-08 18:10:15 +05:30
Akshay Joshi 62e2d18b02 Mask the secret key for restrict option in the process watcher when restoring plain SQL file. #9518
Fixed coderabbit review comment.
2026-01-08 11:39:01 +05:30
Rohit Bhati 3b184dbeee Fixed an issue where the dashboard freezes on initial render when there is a high number of locks. #9285 2026-01-07 17:10:35 +05:30
Khushboo Vashi 71920c2903 Fixed the SSL certificate issue while the CA file is not configured. 2026-01-06 17:07:45 +05:30
Rohit Bhati d30fd5d67e Disable Parameters and Membership fields when object is not new for Login and group roles. #9350 2026-01-06 16:45:07 +05:30
Akshay Joshi d26aa0a8de 1) Added --no-cache-dir for OSX while installing requirements.txt
2) Updated release note.
2026-01-06 12:25:35 +05:30
Guiorgy f63f8f7342 Removed redundant constraint for Python version. 2026-01-06 12:06:12 +05:30
Yogesh Mahajan 1301e5d2ff Ensure saved shared server passwords are re-encrypted on password change. #9258 2026-01-06 11:29:42 +05:30
Aditya Toshniwal cc0377fb59 Code changes required by latest react-virtualized-auto-sizer package which was updated in the previous commit. 2026-01-05 17:10:28 +05:30
Akshay Joshi 79de352636 Updated Javascript dependencies. 2026-01-05 16:42:52 +05:30
Rohit Bhati 965a6ad886 Fix Query Tool state restoration for new connections and queries. #8987 2026-01-05 16:32:49 +05:30
Aditya Toshniwal c6551145a3 Optimize checkbox selection logic in backup dialog objects tree. #9110 2026-01-05 16:18:57 +05:30
Aditya Toshniwal 04583fe8f0 Fixed an issue where data filter dialog removes newline character when sending SQL to the query tool. #9260 2026-01-05 15:01:54 +05:30
Akshay Joshi a1d2308dc9 Updated certifi package 2026-01-05 13:34:16 +05:30
Akshay Joshi 52daa56a04 Copyright updated for 2026 2026-01-05 13:33:45 +05:30
Akshay Joshi 19532f534f Updated Python and Javascript dependencies. 2026-01-05 13:23:38 +05:30
Khushboo Vashi 7462a6a91f Fixed the SSL certificate issue while checking for the upgrade. #9293 2026-01-05 13:01:02 +05:30
Guiorgy c3da32f0f7 Correct erroneous comment in Dockerfile 2026-01-05 12:59:50 +05:30
Degit22 01e8d0c7e9 Update Russian translation. 2026-01-05 12:59:16 +05:30
Guiorgy 30f032b7d8 Optimisations in the Dockerfile
* mount .git from host instead of copying & removing
* use tmpfs for build cache in Dockerfile
* avoid rerunning apk when requirements.txt changes
2026-01-01 14:00:49 +05:30
Pravesh Sharma a9bf4c23bc Fixed a sorting issue in the system stats memory usage table. #9332 2026-01-01 11:28:33 +05:30
Dave Page a5e9315b89 Add warning about the new Windows cert to the release notes. 2025-12-23 12:37:54 +00:00
Dave Page cf123a3290 Update Windows code signing to work with new hardware key (or none) (#9483) 2025-12-23 12:32:03 +00:00
Akshay Joshi 44434948e2 Updated Python and Javascript dependencies. 2025-12-15 16:58:07 +05:30
Aditya Toshniwal a2ea57fc2e Fixed an issue where 'View/Edit Data' shortcut opened 'First 100 rows' instead of 'All Rows'. #9235 2025-12-15 13:47:54 +05:30
Aditya Toshniwal 5dd07d5d4b Fixed an issue where double click to open a file in the file manager is not working. #9196 2025-12-15 13:28:00 +05:30
Aditya Toshniwal 491fbe8a36 Add a new button in the query tool data output toolbar to get entire range of data. #8890 2025-12-12 15:38:01 +05:30
Aditya Toshniwal 63397a003a Fixed an issue where the Query History panel would auto-scroll to the top and did not preserve the scroll bar position for the selected entry. #9380 2025-12-12 11:27:39 +05:30
Domenico Sgarbossa 10669d60a6 Italian translation updated 2025-12-11 16:20:03 +05:30
Akshay Joshi 1457f08343 Updated Python and Javascript dependencies. 2025-12-11 16:02:44 +05:30
Khushboo Vashi dc801e362e Update version for release v9.11 2025-12-08 15:15:10 +05:30
Anil Sahoo 55a332be5b Fix an issue with the type casting of default string function/procedure arguments in the debugger tool. #9036 2025-12-08 14:24:00 +05:30
Akshay Joshi 51bd866a3a 1) Updated urllib3 version.
2) Updated release note.
2025-12-08 11:30:36 +05:30
Akshay Joshi d5a909f14c Plain SQL restore runs with '\restrict' option to prevent harmful psql meta-commands. #9368 2025-12-08 11:02:10 +05:30
Libor M. 5129905307 Czech translation for version 9.11 2025-12-08 11:01:08 +05:30
Khushboo Vashi 6f5c69a4c8 Specify the correct hostname placeholder for the Password Exec command. 2025-12-05 14:40:47 +05:30
Aditya Toshniwal dd51290d06 Upgrade React version to latest as upstream has fixed a security bug 2025-12-04 18:21:58 +05:30
Aditya Toshniwal d46bce2d7b Fixed an issue where copying highlighted text in the query tool data output cell editor would copy the complete string. #9372
Fixed an issue where copying a single cell should not add quoting. #9373
2025-12-04 16:58:39 +05:30
Khushboo Vashi e50d839ac0 Updated message catalogs for v9.11 2025-12-04 15:50:27 +05:30
Khushboo Vashi d26888c65c Update release notes. 2025-12-03 12:08:17 +05:30
Tobi 2ef67a5fa2 Ensure the proper handling of extra volume mount configurations in the Helm deployment template by correcting the configuration value references. #9408 2025-12-03 12:06:13 +05:30
Akshay Joshi c6406dbaa4 Fixed Javascript test cases. 2025-12-02 16:37:10 +05:30
Jun f55fcf7baf fix: copyright updater skips folders like 'modules' 2025-12-02 12:05:47 +05:30
Akshay Joshi 71719db3ab sphinx==9.0.0 required Python version >= 3.11. Back to version 7.4.7 2025-12-02 11:55:26 +05:30
Akshay Joshi 086fa9bf87 psycopg[c] v3.3.0 requires Python version 3.10 and above. 2025-12-02 11:32:17 +05:30
Akshay Joshi dc7873c2b2 Update Python and JavaScript dependecies. 2025-12-01 19:13:04 +05:30
Koren Peretz 56040aa116 Use -i instead of -I in the helm deployment YAML for best minimal practice. 2025-12-01 16:27:46 +05:30
Dave Page 9c8df1ad3b React string cleanup. 2025-12-01 16:18:27 +05:30
Dave Page e7db3510e1 Javascript string cleanup (#9405)
* Javascript string cleanup

* Further JS string fixes.
2025-12-01 10:17:30 +00:00
Guiorgy 0132ce2001 fixed .git copy destination inside Dockerfile 2025-12-01 12:17:22 +05:30
Dave Page 70e4435b04 Python string cleanup
* Python string cleanup
* Fix line lengths
* Further Python string fixes.
2025-12-01 11:06:21 +05:30
Dave Page ec3b508ba6 Cleanup a bunch of documentation issues. 2025-11-28 15:40:48 +00:00
Khushboo Vashi 7885ed7f87 Update release notes. 2025-11-27 11:03:40 +05:30
Koren Peretz d1b25c99cc Fix the Helm chart server definition and change the app version. #9393 2025-11-27 10:59:28 +05:30
Guiorgy c7909958da Optimised Dockerfile.
* Move the installation of dependencies to the top of the stage.
* Upgrade all system packages.
* Combine copy layers where possible.
2025-11-26 14:20:06 +05:30
Aditya Toshniwal 8c153be335 Fixed an issue where connection is failing via Query Tool/PSQL Tool workspaces. #9354 2025-11-25 12:05:22 +05:30
Akshay Joshi 65860fc12c Updated Python and JavaScript dependencies. 2025-11-24 18:25:11 +05:30
Akshay Joshi fc04e2eb1a Remove __gpg_sign_cmd as it is failing on Fedora 43 due to some obsolete options. 2025-11-24 13:58:18 +05:30
Guiorgy d481507569 Removed the RUN rm -rf layer from the Dockerfile app-builder stage; exclusions are now handled by updating .dockerignore. 2025-11-24 11:37:49 +05:30
Guiorgy 6d01a247db Ensure LF line endings on text files. 2025-11-21 12:16:35 +05:30
Nicolas Boulard 27779370d8 Add conditional TLS support for the Ingress in the Helm chart. #9345 2025-11-21 12:08:22 +05:30
Akshay Joshi 482549b951 Updated release note. 2025-11-19 12:35:17 +05:30
Rohit Bhati f06668aed9 Add support of DEPENDS/NO DEPENDS ON EXTENSION for INDEX. #6388 2025-11-19 12:32:35 +05:30
Guiorgy 4129d38410 Fix pkg_resources deprecation warning by migrating Docker base image to python:3-alpine from alpine:latest. #9155 2025-11-19 10:59:27 +05:30
Akshay Joshi c03b55042c Updated Python and Javascript dependencies. 2025-11-18 16:33:36 +05:30
Akshay Joshi f22aa1597f Updated release note 2025-11-18 16:21:13 +05:30
Rohit Bhati 467e496599 Add support of DEPENDS/NO DEPENDS ON EXTENSION for MATERIALIZED VIEW. #6390 2025-11-18 16:14:00 +05:30
Khushboo Vashi 7b85a09603 Fix Debian builds by executing sudo apt update. 2025-11-18 12:48:13 +05:30
Khushboo Vashi 57f88cf5af Improved Debian build process by ensuring package lists are refreshed during the build workflow. 2025-11-18 12:18:14 +05:30
Anil Sahoo d6b2379fbe Fixed an issue where EXPLAIN should run on query under cursor if no text is selected. #9297 2025-11-18 12:17:46 +05:30
Dave Page 39c2f397f7 Create .coderabbit.yaml 2025-11-14 10:46:12 +00:00
Khushboo Vashi 63ee81202b Updated version for v9.10. 2025-11-13 12:28:13 +05:30
Anil Sahoo 14dec7e5ed Add support for showing the column data type beside column name in the object explorer. #8968 2025-11-12 19:50:28 +05:30
Akshay Joshi 5e472ec42a Updated Python and Javascript dependencies. 2025-11-12 18:14:25 +05:30
Akshay Joshi 60c56b3285 Fixed API test case for restore. 2025-11-10 13:26:42 +05:30
Akshay Joshi f251fdfdb1 Updated version for release v9.10 2025-11-10 11:40:12 +05:30
Khushboo Vashi 09d2b7eeb0 1) Fixed LDAP authentication flow vulnerable to TLS certificate verification bypass (CVE-2025-12765). #9324
2) Fixed LDAP injection vulnerability in LDAP authentication flow (CVE-2025-12764). #9325
2025-11-10 11:27:56 +05:30
Yogesh Mahajan e374edc692 Fixed Command injection vulnerability allowing arbitrary command execution on Windows (CVE-2025-12763). #9323 2025-11-10 11:27:56 +05:30
Akshay Joshi 1d397395f7 Fixed remote code execution vulnerability when restoring PLAIN-format SQL dumps in server mode (CVE-2025-12762). #9320 2025-11-10 11:27:55 +05:30
Libor M. ed52a44b17 Updated Czech translation. 2025-11-10 11:13:33 +05:30
Muhammad Aqeel 06fb5a45c1 pgAdmin4 debian packages were not having release build number and platform distribution name. 2025-11-07 17:33:14 +05:30
Khushboo Vashi d1805c5640 Ensure that the Password Change and Application Restore features comply with FIPS standards. 2025-11-07 17:32:51 +05:30
Domenico Sgarbossa c04b9198c8 Updated Italian translation 2025-11-07 10:09:26 +05:30
Aditya Toshniwal ec63acc4c5 Updated message catalogs for v9.10 2025-11-06 15:55:36 +05:30
Aditya Toshniwal f906326003 Fixed an issue where the last used storage directory was reset to blank, leading to access denied errors during backup or restore operations. #9281 2025-11-06 15:43:06 +05:30
Aditya Toshniwal 39b6f40482 Fix following issues:
1. Debian builds are failing after commiting changes for #9240.
2. Object explorer context menu shows "No objects selected" on preferences change.
2025-11-04 16:49:12 +05:30
Akshay Joshi e6f6a90d2f Updated Python and JavaScript dependencies. 2025-11-03 18:39:10 +05:30
Akshay Joshi d80cc6f8f9 Updated release note. 2025-10-31 18:20:00 +05:30
Rohit Bhati 38ebb43bac Add support of DEPENDS/NO DEPENDS ON EXTENSION for PROCEDURE. #6391 2025-10-31 18:17:04 +05:30
Pravesh Sharma 48b4a8d448 Fixed an issue where the Select All option on the columns tab of import/export data was not working in languages other than English. #9233 2025-10-31 16:25:51 +05:30
Koren Peretz d9b3f950ad Fixed indentation issue in the extraEnvVars field, preserved the serverDefinitions template, corrected a typo in README.md, and increased resource allocations in the Helm chart. 2025-10-31 12:40:47 +05:30
Aditya Toshniwal 986ba41ba9 Added the ability to search for tables and automatically bring them into view in the ERD tool. #4306 2025-10-31 12:19:27 +05:30
Pravesh Sharma 08379d6ae0 Fixed an issue where the 2FA window redirected to the login page after session expiration. #9132 2025-10-31 11:17:04 +05:30
Yogesh Mahajan 7251c1f628 Fix github actions for pg17 for windows platform broken due to changes in github runner image. 2025-10-31 11:05:05 +05:30
LiZixin 061450c8d7 Fixed an issue where the Debian build process failed with a "Sphinx module not found" error when using a Python virtual environment. #9240 2025-10-31 10:38:04 +05:30
Akshay Joshi b62212b8e5 Fixed an issue that prevented assigning multiple users to an RLS policy. #9304 2025-10-30 18:54:20 +05:30
Anil Sahoo 282a956f4f Reverted changes in Python tests for EPAS/PG YAML files that were added to support Subscription RESQL test cases and adjust streaming values for PG v16+. 2025-10-30 12:50:33 +05:30
Aditya Toshniwal 00dbe58125 Add support for formatting .pgerd ERD project file. #8912 2025-10-29 16:22:37 +05:30
Aditya Toshniwal abdcd983f6 Add support for setting image download resolution in the ERD tool. #6698 2025-10-29 14:57:20 +05:30
Akshay Joshi c7a6056ee3 Fixed an issue where Schema Diff does not ignore Tablespace for indexes. #9117 2025-10-28 16:31:39 +05:30
Akshay Joshi 55c5e86fe0 1) Updated version of Authlib, psycopg[c], typer[all] and selenium.
2) Updated release note.
2025-10-28 11:45:57 +05:30
Royston Shufflebotham 8d55e9a445 Add support for displaying detailed Citus query plans instead of 'Custom Scan' placeholder. #7885 2025-10-28 10:47:55 +05:30
Akshay Joshi c1da777fba 1) Updated Russian translation.
2) Updated electron version.
3) Updated release note
2025-10-27 11:26:08 +05:30
AKY 9e35c32ef2 Updated Korean translation 2025-10-27 11:17:45 +05:30
Aditya Toshniwal 37a164cccb - Rebase pgadmin-org/react-data-grid fork to latest.
- Fixed an issue where data output column resize is not sticking in Safari. #8504
2025-10-27 10:45:36 +05:30
Aditya Toshniwal c20d035f1b Update Python and JS packages. 2025-10-24 08:37:55 +05:30
Aditya Toshniwal 9a44fee646 Update release notes. 2025-10-24 08:29:01 +05:30
Aditya Toshniwal 0a14db01be Migrate pgAdmin UI to use React 19. #8676 2025-10-24 08:26:10 +05:30
Anil Sahoo 53a994ba1e Fixed an issue where Python tests for EPAS github actions were failing due to a port mismatch with RESQL test case files for Subscription. 2025-10-22 18:14:12 +05:30
Aditya Toshniwal 91ad54d17b Fixed an issue where query tool shortcut would trigger the callback twice. #9157 2025-10-14 14:33:17 +05:30
Akshay Joshi ea5ee74205 Update version for release v9.9 2025-10-13 20:51:55 +05:30
Anil Sahoo 5f22b4e2d2 Fixed following issues related to auto-update:
1. Fixed the issue where auto-update was not working for macOS x64 arch machines as pgadmin4 zip file name has x86_64 in it.
2. Improved error handling in the /upgrade_check API by replacing the static “Failed to check for update” message for Windows users with a dynamic error message.
3. Fixed the CSS issue affecting the close icon in the warning notifier.
4. Removed trailing periods from helper texts and notifier messages in the app’s auto-update workflow. #9133
2025-10-13 17:25:14 +05:30
Rohit Bhati 758bbc7272 Enable depends on extension option on for functions. 2025-10-13 11:39:37 +05:30
rlbxku1r 618e03b65f Update Japanese translation for v9.9 2025-10-13 11:38:35 +05:30
Akshay Joshi e9b97d61f8 1) Pin pywinpty due to https://github.com/andfoy/pywinpty/issues/545
2) Remove scram_client_key and scram_server_key from the connection string parameter
   as it is not meant to be specified directly by users or client applications.
2025-10-10 13:07:32 +05:30
Domenico Sgarbossa 83377d4a50 Italian translation updated for v9.9 2025-10-10 13:06:34 +05:30
Aditya Toshniwal c03d21899b Updated message catalogs for v9.9 2025-10-10 10:07:42 +05:30
Koren Peretz d03a0cdce6 Add support for initializing the pgAdmin4 Kubernetes Helm chart. #9225 2025-10-08 14:41:00 +05:30
Akshay Joshi f3567518d3 Added option to skip the password dialog when using an identity file. #6996
1. Don't ask for the SSH Tunnel or Database server password if it is already saved.
2. Modified the generic error message from the SSH Tunnel library.
2025-10-07 13:13:37 +05:30
Akshay Joshi b30520adc0 Updated Python and Javascript dependencies. 2025-10-06 17:33:12 +05:30
Yogesh Mahajan c6af61afd3 Implement pre and post scenario SQL execution in subscription ResQL tests to manage publication lifecycle. #8932 2025-10-03 12:12:15 +05:30
Akshay Joshi 04024c7f61 Updated Python and Javascript dependencies. 2025-10-01 15:27:23 +05:30
Rohit Bhati 9e6ab295df Add support of DEPENDS/NO DEPENDS ON EXTENSION for ALTER FUNCTION. #6385 2025-10-01 13:49:03 +05:30
Akshay Joshi 5c9acc1c3d 1) Added PG 18 in the github runner.
2) Added PG 18 in the docker container file.
2025-09-29 13:40:03 +05:30
Anil Sahoo c75bba03c2 1) Added 'failover' parameter support in CREATE and ALTER SUBSCRIPTION for PostgreSQL v17+. #8932
2) Added 'two_phase' parameter support for ALTER SUBSCRIPTION for PostgreSQL v18+.
3) Updated versioned_template_loader.py to prioritize v18+ templates.
4) Updated the default value of the streaming parameter in CREATE SUBSCRIPTION to 'parallel' in PG v18 (previously false).
2025-09-29 12:52:47 +05:30
Aditya Toshniwal 93bbadb994 Fixed an issue where the query tool displayed 'default' instead of 'null' for null text data in the data output. #9098 2025-09-29 12:37:25 +05:30
Akshay Joshi 42ff67c845 Updated Python and Javascript dependencies. 2025-09-25 15:50:14 +05:30
Yogesh Mahajan 5376d88444 Update the PATH variable with the newly installed EPAS directory to use the correct pg_config. 2025-09-24 15:55:10 +05:30
Yogesh Mahajan f733d124bd Update the PATH variable with the newly installed PostgreSQL directory to use the correct pg_config. 2025-09-24 14:55:56 +05:30
Aditya Toshniwal 7ff3c4bbeb Fixed an issue where shortcuts are not working as expected on multiple keyboard layouts. #9157 2025-09-17 11:34:15 +05:30
Aditya Toshniwal e5590797c0 Fixed an issue where saving the newly changed preferences was not reflecting on the preferences tab. #9158 2025-09-16 14:09:11 +05:30
Akshay Joshi 8576a5e7e6 Updated Javascript dependencies. 2025-09-15 09:45:05 +02:00
Akshay Joshi 3e66b6f7be 1) Added "MULTIRANGE_TYPE_NAME" option while creating a Range Type. #6394
2) Added "SUBSCRIPT" option while creating an External Type. #6395
2025-09-11 14:27:27 +05:30
Akshay Joshi 2fd2a144f1 Updated Python and Javascript dependecies. 2025-09-08 16:34:56 +05:30
Pravesh Sharma 500a5c7101 Fixed an issue where the pgAdmin configuration database wasn't being created on a fresh install when an external database was used for the configuration. #9125 2025-09-02 19:25:04 +05:30
Khushboo Vashi 5498682934 Update version for release v9.8 2025-09-01 16:39:08 +05:30
Khushboo Vashi cdeb18fcbb Fixed Cross-Origin Opener Policy (COOP) vulnerability in the OAuth 2.0 authentication flow (CVE-2025-9636). #9114 2025-09-01 16:34:18 +05:30
Aditya Toshniwal 0de635cc4c Fixed an issue where editor shortcuts fail when using Option key combinations on macOS, due to macOS treating Option+Key as a different key input. #9116 2025-09-01 16:21:03 +05:30
Akshay Joshi e09af0a0e9 Updated release note. 2025-08-28 16:18:38 +05:30
Akshay Joshi ade57d4ec4 Updated Python and JavaScript dependencies. 2025-08-28 12:56:20 +05:30
Rohit Bhati fc41c795f1 Add menu items for truncating foreign tables. #6396 2025-08-28 10:23:46 +05:30
Pravesh Sharma 7caaf2de82 Fixed an issue where pgAdmin config migration was failing while upgrading to v9.7 #9095 2025-08-28 10:15:35 +05:30
Akshay Joshi 09bc544e83 Pin Paramiko to version 3.5.1 to fix the DSSKey error introduced in the latest release. #9090 2025-08-25 18:09:45 +05:30
Domenico Sgarbossa 42a47126aa Italian translation update 2025-08-25 18:08:23 +05:30
Aditya Toshniwal db87df8f82 Remove usage of BrowserFS as it is deprecated. #7448 2025-08-25 14:34:33 +05:30
Aditya Toshniwal 15c212a2df Change the default pgAdmin theme to System. #9093 2025-08-25 12:33:27 +05:30
Yogesh Mahajan 68627ab44e Allow user to configure security related gunicorn parameters. #8891 2025-08-25 11:52:07 +05:30
Pravesh Sharma 800fdce316 Unpin Electron version 35.x as the GTK crash issue has been resolved upstream. 2025-08-22 11:32:58 +05:30
Akshay Joshi a5557b466c Updated Python and Javascript dependencies. 2025-08-21 13:54:07 +05:30
Anil Sahoo cad6025ce9 Fixed an issue on Linux systems where the /upgrade_check API in server mode raised a KeyError. 2025-08-20 08:29:11 +05:30
Aditya Toshniwal f8b894d52b Update version for release v9.7 2025-08-18 15:59:05 +05:30
Aditya Toshniwal 9d0ec04667 Add support for changing cursor blink rate within the editors. #8712 2025-08-18 12:34:31 +05:30
webmasterzamora 24b4d35565 Spanish translation for version 9.7 2025-08-18 12:27:09 +05:30
Libor M. 0c8571de9e Czech translation for version 9.7 2025-08-18 12:26:16 +05:30
Akshay Joshi 2075dd5270 Updated message catalogs for v9.7 2025-08-14 16:23:49 +05:30
Yogesh Mahajan 7d0241008b Ensure that disabling "Save Application State" in Preferences prevents tool data from being saved and stops it from being restored on application restart. #9067 2025-08-14 13:47:30 +05:30
Akshay Joshi ecb652c7c5 Updated Python and JavaScript dependencies. 2025-08-12 11:54:03 +05:30
Pravesh Sharma 9b5f0f0f63 Fixed an issue where downloading images on the ERD tool was not working in desktop mode. #9047 2025-08-12 11:51:58 +05:30
Akshay Joshi 1eb7c9d3e2 Added support for builtin locale provider while creating Collation. #8931 2025-08-11 11:42:14 +05:30
Akshay Joshi a4c5e5683c Remove python version check for setuptools. 2025-08-07 18:56:51 +05:30
Khushboo Vashi d53a34b8df Fixed the issue where updating the name of a table column does not reflect in the corresponding primary key constraint. #7617 2025-08-07 16:36:38 +05:30
Anil Sahoo 8a4a3814ab Fixed an issue where custom column widths in the result grid of Query Tool or View/Edit Data were reset after re-executing a query. #7057 2025-08-07 15:32:40 +05:30
Akshay Joshi 6aaf47ddb4 Fixed JavaScript test cases. Replace deprecated inputProps with slotProps. 2025-08-06 18:54:04 +05:30
Akshay Joshi 4d078ab747 Updated Python and JavaScript dependecies. 2025-08-05 13:10:42 +05:30
excavator-matt 96de08212a Clarify version in issue template (#9020) 2025-08-04 14:43:55 +01:00
Anil Sahoo 2dd27d20c1 Fixed an issue where adding breakpoints caused errors, and stepping out of a nested function removed breakpoints from the parent function. #8982 2025-08-04 16:59:38 +05:30
Aditya Toshniwal 86c2769221 Check if sharp is failing on bundle before running image minimizer 2025-08-04 12:35:29 +05:30
Akshay Joshi 1316a3d7d8 Added all new connection string parameters introduced in PostgreSQL 16 and later. #8935 2025-08-04 12:02:30 +05:30
Aditya Toshniwal 9f866b0b27 Make image minimising optional based on sharp package availability. 2025-08-04 11:38:47 +05:30
Pravesh Sharma 829d6323b8 Fixed an issue where CPU usage was very high on Windows when opening the psql tool. #8864 2025-08-01 12:41:16 +05:30
Akshay Joshi 559c6cfa65 Added GENERIC_PLAN, MEMORY, SERIALIZE option to EXPLAIN/EXPLAIN ANALYZE command. #6456 2025-08-01 12:40:07 +05:30
Yogesh Mahajan 1f7fbb91f7 Ensure the scratch pad in the Query Tool is not restored after it is closed. #9007
Update the documentation for parameters that require file paths. #9008
2025-07-31 17:24:27 +05:30
Rohit Bhati 3b9359945e Added PKEY index in the index statistics summary. #8971 2025-07-31 17:12:15 +05:30
Aditya Toshniwal 99b822e472 Add support for server tag-based filtering in the Object Explorer. #8917 2025-07-31 17:06:40 +05:30
Aditya Toshniwal b2ec3a5acc Fixed an issue where pgAdmin failed to update the server connection status when the server was disconnected in the background and a refresh was performed on that server. #8149 2025-07-31 12:43:49 +05:30
Anil Sahoo 9eec4f5b8c Add support for automatic updates in the pgAdmin 4 Desktop application on macOS. #5766 2025-07-31 11:30:19 +05:30
Dave Page 6db0cc5c5d Ensure we have the tools to configure SELinux policies.
The semanage utility is required to configure the policy for the 
pgAdmin log/lib directories in server mode, but it may not always 
be installed on a system.
2025-07-30 11:45:07 +05:30
Aditya Toshniwal a197c85f3a Replace shortened URLs using goog.gl as goog.gl links will no longer be available 2025-07-30 10:17:06 +05:30
Akshay Joshi aa0a1f676d Fix PEP8 2025-07-29 18:12:40 +05:30
Akshay Joshi 5963593fed Replace keyword PROCEDURE with FUNCTION while creating trigger and event trigger. #6384 2025-07-29 17:48:41 +05:30
Akshay Joshi e0e99ddbb5 1) Updated release note.
2) Updated logic for release converter
2025-07-29 15:48:16 +05:30
Rohit Bhati 85510b961f Make Dashboard tables to be vertically resizable. #8650 2025-07-29 15:31:47 +05:30
Rohit Bhati bf229c0d79 Ensure DB restriction type is preserved while import and export server. #8867 2025-07-29 15:26:01 +05:30
Akshay Joshi 33dcb36db5 1) Added release note
2) Updated JavaScript dependencies
2025-07-29 11:57:07 +05:30
Pravesh Sharma 8a4eb4f8ad Fixed an issue in Firefox where the query window would shift to the left after opening the history tab or selecting a column header in the results grid. #8756 2025-07-28 16:27:31 +05:30
Pravesh Sharma 62eb330423 Introduced an ‘Editor’ preferences category and migrated all editor related settings into it. #8861 2025-07-28 14:09:16 +05:30
Murtuza Zabuawala e73d8f4532 Fixed incorrect behaviour of the option deduplicate items after creating the index. #8969 2025-07-28 13:23:39 +05:30
Akshay Joshi 79aeb5204c Updated Python and JavaScript dependencies. 2025-07-28 11:31:40 +05:30
Akshay Joshi de48d4ecda Updated release date. 2025-07-23 17:56:15 +05:30
Aditya Toshniwal 0d204d0554 Update yarn.lock as previous commit is changing the yarn.lock file on yarn install 2025-07-22 17:19:24 +05:30
Aditya Toshniwal 37bdd22e24 Update form-data in yarn.lock to fix a security issue found in form-data 2025-07-22 17:01:52 +05:30
Aditya Toshniwal 2a43d1c939 Nullify git:hash script in package.json for source code tarball release since commit hash is already included 2025-07-22 16:08:51 +05:30
c4f7a18ec5 Fixed following issues found while testing v9.6 candidate build:
1. Migration failed on Debian 11.
2. Menu shortcuts should not for opening search object and query tool when not in default workspace.

Co-authored-by: Yogesh Mahajan <yogesh.mahajan@enterprisedb.com>
Co-authored-by: Pravesh Sharma <pravesh.sharma@enterprisedb.com>
2025-07-22 16:00:29 +05:30
Aditya Toshniwal fdc38f75f8 Update version for release v9.6 2025-07-21 15:34:04 +05:30
Yogesh Mahajan 56d5cab13e Ensure that reconnect dialogs are shown when restoring pgAdmin sessions for the Query Tool or View/Edit Data, if the server password was not saved. #8901 2025-07-21 15:11:12 +05:30
Aditya Toshniwal bec47845be Add support for showing pgAdmin shortcuts on Electron menus. #1923 2025-07-21 15:07:17 +05:30
Libor M. 6dc5807192 Czech translation for version 9.6 2025-07-19 10:20:56 +05:30
Khushboo Vashi ea085cd009 Fix pagination issues in the query tool data output when using a server-side cursor. 2025-07-18 17:54:06 +05:30
Domenico Sgarbossa 6fdb82dd76 Italian translation updated for v9.6 2025-07-18 09:09:24 +05:30
Aditya Toshniwal a3e1a3672c Updated message catalogs for v9.6 2025-07-17 18:29:52 +05:30
Akshay Joshi 8046c238d8 Make the 'Password' and 'Save Password' options visible in edit mode in the Server Dialog. 2025-07-17 18:19:20 +05:30
Yogesh Mahajan 82730da392 Fixed following issues reported while testing application restore changes: #8901
1. Preserve updated tab titles on session restore
2. Ensure query tools opened via the 'Generate Script' are editable.
3. On restore, ensure the query content is correctly loaded into the query tool when it is opened from tools like ERD.
2025-07-17 16:28:57 +05:30
Akshay Joshi fe2332f606 Fixed merge conflict issues. 2025-07-17 12:44:53 +05:30
Akshay Joshi d26b63fdf5 Use 'Drop' instead of 'Delete' for object commands to make destructive actions more deliberate. #8958 2025-07-16 18:02:24 +05:30
Rohit Bhati 770a0f27af Ensure that keyboard shortcuts are displayed in tooltips, context menus, and the main menu. #1923 2025-07-16 17:51:26 +05:30
Pravesh Sharma ced002a6ad Fixed an issue where json editor in result grid was crashing if null value is set in the json editor. #8907 2025-07-16 17:49:00 +05:30
Aditya Toshniwal 3aad58751a Fixed security vulnerabilities identified in the yarn.lock file. 2025-07-15 17:41:31 +05:30
Akshay Joshi 61a420c9fc Updated release note. 2025-07-15 11:52:36 +05:30
Khushboo Vashi 8c662424b2 Display a confirmation message for the server-side cursor transaction status when closing the query tool.
Resolve the pagination issue by fetching an additional row to determine the availability of the next record set when using a server-side cursor.
2025-07-15 11:51:14 +05:30
Grégoire Bellon-Gervais 13ade4c0b2 Enable the PKCE workflow for OAuth 2 authentication. #8941 2025-07-15 11:36:05 +05:30
Yogesh Mahajan 1195f14327 Improved the application restore which includes: #8901
1. Leverage rc-dock layout to restore the application state.
2. Move the save and load file endpoints to the file manager module.
3. Ensure that the order and layout of tabs is maintained on restore.
4. Persist the changed title of tabs on restore.
2025-07-15 11:21:57 +05:30
Aditya Toshniwal 65a35ab23d Fixed windows signature issue by passing SignTool using /S arg ISCC.exe instead of specifying the path in installer.iss 2025-07-14 15:12:29 +05:30
Aditya Toshniwal b31c8f78c5 Fixed windows signature issue and specify SignTool in installer.iss file instead of calling signtool directly 2025-07-14 10:57:46 +05:30
Akshay Joshi 82e6b57d04 1) Added new columns in pg_stats table.
2) Updated release note.
2025-07-10 19:11:33 +05:30
Aditya Toshniwal 1e4e00886a Fixed a windows build issue where uninstaller failed to sign. #8420 2025-07-10 18:55:36 +05:30
Jun 0fd7d0dedb Added support for setting a custom SESSION_DIGEST_METHOD in pgAdmin 4 to facilitate FIPS compliance. #7979 2025-07-10 16:10:31 +05:30
Anil Sahoo 0ebf78ca61 Fixed an issue in the Search Objects tool where selecting a node occasionally selected an incorrect node. #8675 2025-07-10 15:37:31 +05:30
Aditya Toshniwalandstephannn 60c8e5fe05 Fixed an issue where windows installer is not signing tmp files generated by InnoSetup. #8420
Co-authored-by: stephannn <stephannn@users.noreply.github.com>
2025-07-10 15:35:02 +05:30
Akshay Joshi 1d68074a59 Fixed macros test cases when run on more than one server. 2025-07-09 16:01:51 +05:30
Akshay Joshi 8723896da0 Updated Python and JavaScript dependencies. 2025-07-08 18:50:32 +05:30
Akshay Joshi e4f17e5a6c Ensure that pgAdmin 4 is compatible with PG/EPAS v18. #8828 2025-07-08 18:34:39 +05:30
Ethan Bayliss 454ba52c88 Update zstd library link to 1.5.7 in Dockerfile 2025-07-03 11:57:40 +05:30
Akshay Joshi d5c0fac885 Revert "Javascript dependency: Bump pbkdf2 from 3.1.2 to 3.1.3 in /web"
This reverts commit 385148cf6e.
2025-07-02 16:46:55 +05:30
Akshay Joshi 3f7683854b Remove some code for Python 3.8 2025-07-02 15:59:22 +05:30
dependabot[bot] 385148cf6e Javascript dependency: Bump pbkdf2 from 3.1.2 to 3.1.3 in /web 2025-07-02 15:58:11 +05:30
Khushboo Vashi f207818afa Implemented a server-side cursor to enhance performance when retrieving large datasets. #5797 2025-07-02 12:47:01 +05:30
Akshay Joshi 1280cf5108 Updated Python and Javascript dependencies. 2025-07-01 12:22:22 +05:30
Akshay Joshi a5714903ac Fixed an issue where the Query Tool’s 'Edit Options' menu was unresponsive when clicked. 2025-06-27 18:29:15 +05:30
Akshay Joshi dd0c0cd3e1 Updated release date in the release note. 2025-06-27 13:36:31 +05:30
Yogesh Mahajan 51d3fe54f3 Ensure proper error message shown if any error occurs while restoring psql tool. 2025-06-27 13:35:24 +05:30
Akshay Joshi 7c2b773ad1 Allow the user to set a master password if an error occurs while accessing the OS secret storage. 2025-06-25 17:11:52 +05:30
Aditya Toshniwal f3a87de967 Fixed terminal size detection issue in PSQL when opening multiple tabs rapidly. 2025-06-25 14:58:46 +05:30
Akshay Joshi 536191cef6 Downgrade selenium version, as latest version don't support urllib3 v2.5.* 2025-06-24 15:55:19 +05:30
Khushboo Vashi 43d70de5bb Reinstall Python packages regardless of their presence in the system-wide installation. 2025-06-24 15:50:45 +05:30
Yogesh Mahajan 6fab59a13c Ensure the generate script button in schema diff populates diff query in query tool. 2025-06-24 15:28:36 +05:30
Akshay Joshi 03f18d5242 Updated release note. 2025-06-23 18:08:27 +05:30
Akshay Joshi 66cddab4a4 Updated version for release v9.5 2025-06-23 15:57:53 +05:30
Akshay Joshi 3e9169b282 1) Upgrade urllib3 to 2.5.*
2) Fixed one issue for #3319
2025-06-23 15:55:26 +05:30
Aditya Toshniwal 77fa10304b Fixed a UI layout issue that occurred after upgrading from pgAdmin v9.2 when all tabs had been closed prior to the upgrade. #8830 2025-06-23 15:51:42 +05:30
Domenico Sgarbossa 68bd329da9 Italian translations for version 9.5 2025-06-23 11:34:16 +05:30
Libor M. 14e40cedca Czech translation for version 9.5 2025-06-23 11:33:52 +05:30
Akshay Joshi 6382f31f9a Updated message catalogs for v9.5 2025-06-19 16:48:36 +05:30
Dirk Heinrichs 44496a300e Add a flag to allow access to system Python packages on recent Linux distributions. #7173 2025-06-19 16:21:15 +05:30
Pravesh Sharma 08d250e5ef 1. Fixed issues reported while testing changes for editor preferences. #2659
2. Updated preferences docs.
2025-06-19 16:09:39 +05:30
Yogesh Mahajan f07eabedbe Ensure that restored query tool tabs display the correct title. #3319 2025-06-19 12:12:54 +05:30
Aditya Toshniwal 5df2c7686c Fix issues found while testing changes for preferences tab and search. #6743 2025-06-19 11:49:37 +05:30
Akshay Joshi 7946ee78f6 Ensure that Keyboard shortcuts for save and download actions should not called when their respective UI buttons are disabled. #8803 2025-06-17 16:19:41 +05:30
Akshay Joshi 335a39bc75 Updated JavaScript dependencies. 2025-06-16 18:57:56 +05:30
Macchiarch d50a7dbd1a Corrected the translation of "min"-> "minuti" 2025-06-16 11:12:10 +05:30
Akshay Joshi 6714bb114c Fixed an issue in SQL syntax highlighting where the same color was used for both variable names and datatypes. #8235 2025-06-13 16:55:54 +05:30
Pravesh Sharma cda498f779 Added support for customizing keyboard shortcuts in the Query Tool's Edit menu. #2659 2025-06-13 15:48:54 +05:30
Yogesh Mahajan 67c18cb082 Fix the SonarQube issues and issues reported during testing. #3319 2025-06-13 13:14:36 +05:30
Akshay Joshi 22fd919220 1) Added copyright header from the missing files.
2) Update release note.
3) Update Javascript dependecies.
2025-06-12 19:14:41 +05:30
Aditya Toshniwal 1e0e9c4f7d 1) Open preferences in a new tab instead of a dialog for better user experience. #6743
2) Add a search box to enable searching within the preferences tab. #2864
2025-06-12 19:03:54 +05:30
Rohit Bhati 814250aade Added role-based restrictions for editing server connections. #1947 2025-06-10 12:19:41 +05:30
Daniel Nylander 2e072baf72 Updated Swedish translation. 2025-06-09 19:15:11 +05:30
Akshay Joshi 7f22d6135a Added Swedish language in config.py 2025-06-09 16:58:08 +05:30
Daniel Nylander 331fd76b42 Adding Swedish translation 2025-06-09 16:52:45 +05:30
Akshay Joshi 1259d72643 Plugin workspace-tools is included by default starting from Yarn 4. 2025-06-09 11:57:02 +05:30
Akshay Joshi cab1bc3cb4 Update yarn to version 4. 2025-06-06 19:08:32 +05:30
Akshay Joshi 4cd331f0ca Fixed an issue where the Columns node was not visible under Catalog Objects. #8834 2025-06-06 12:34:20 +05:30
Akshay Joshi e4e2761fe3 Fixed an issue where data export using a query opened the wrong dialog type. #8808 2025-06-05 17:04:33 +05:30
Akshay Joshi 45653180ed Fixed an issue where data export using a query failed when the query contained a newline character. #8809 2025-06-05 16:58:10 +05:30
Yogesh Mahajan 68e559c613 Added support to preserve the workspace, query windows, and pgAdmin state during an abrupt shutdown or restart. #3319 2025-06-05 16:50:38 +05:30
Akshay Joshi c2ef9d06ca 1) Remove migrations folder from the exclude list of .pycodestyle file.
2) Fixed all the PEP8 issues in the migration files.
2025-06-04 12:36:42 +05:30
Rohit Bhati db5943bd8f Add a new permission to allow disabling "Change Password" feature for a pgAdmin role. #1926 2025-06-03 16:20:30 +05:30
Akshay Joshi b6f64c4ba4 Updated Python and JavaScript dependencies. 2025-06-03 13:40:47 +05:30
Akshay Joshi a3e43e4e97 Fixed an issue where utilities such as pg_dump and pg_restore failed to log error messages when required dependency files were missing. #7466 2025-06-03 13:33:58 +05:30
Allen HernandezandAllen Hernandez 0a2db9bc59 Supports JSON logging for gunicorn process within Docker. #8665
Co-authored-by: Allen Hernandez <2349718+AllenSH12@users.noreply.github.com>
2025-06-03 13:33:09 +05:30
Akshay Joshi 12b263c20b Changed the version of libzstd.so from 1.5.6 to 1.5.7 for Docker builds. 2025-06-03 12:55:12 +05:30
Aditya Toshniwal 4a4d4569ae Improved PL/PGSQL code folding and support nested blocks. #6118 2025-06-02 15:58:07 +05:30
Pravesh Sharma 3286b4e32f Fixed an issue in the query tool where using multiple cursors to copy text resulted in only the first line being copied. #8691 2025-05-30 14:45:48 +05:30
Khushboo Vashi 63f2c7fe00 Remove the reference to the DEPENDENCIES file from the macOS build. 2025-05-30 09:47:43 +05:30
Akshay Joshi 7504f6216a Fixed an issue where the Schema Diff Tool incorrectly reported differences due to variations in the order of the privileges. #8032 2025-05-29 19:08:56 +05:30
Khushboo Vashi 58715daf10 Remove all references to the DEPENDENCIES file. 2025-05-29 16:01:56 +05:30
Khushboo Vashi 1ad8736d72 Removing the script for managing project dependencies, as SBOM is already in use. 2025-05-29 15:22:30 +05:30
Akshay Joshi 79ec042e0d Updated Python and Javascript dependencies. 2025-05-29 13:37:21 +05:30
Aditya Toshniwal 7c74b7cdb7 - Pin Electron to v35.4.0 as the v36 is not working on many OS.
- Pin html-to-image to v1.11.11 as latest version breaks ERD image downloads.
2025-05-27 13:02:11 +05:30
Khushboo Vashi e8826863e0 Updated version for v9.4 2025-05-26 18:47:53 +05:30
Pravesh Sharma 4f79deac0b Fixed CSS issue found during testing of issue 6510 2025-05-26 18:32:07 +05:30
Akshay Joshi 695166bde5 Revert "Trying to fix pip error on Windows build machine. pin the pip version to 24.2"
This reverts commit 9ce0e77e61.
2025-05-26 18:10:31 +05:30
Akshay Joshi 9ce0e77e61 Trying to fix pip error on Windows build machine. pin the pip version to 24.2 2025-05-26 13:28:28 +05:30
Libor M. 0b911bf58c Updated Czech translation for v9.4. 2025-05-26 11:14:34 +05:30
yuki 15ca0ba1b6 Updated Portuguese (Brazilian) translation for v9.4 2025-05-26 11:13:57 +05:30
Aditya Toshniwal c6183c9d03 Fixed more issues found while testing changes for large file download. #3369 2025-05-24 15:25:07 +05:30
Aditya Toshniwal dfd896db10 Fixed an issue where pgAdmin failed to focus when previously unfocused and then quit. #8760 2025-05-24 15:23:17 +05:30
yuki ac8f8fb0b0 Updated Portuguese (Brazilian) translation for v9.4
Added new translations there were missing.
2025-05-23 11:31:42 +05:30
Domenico Sgarbossa d6ae6b2773 Updated Italian translation for v9.4 2025-05-22 18:51:25 +05:30
Akshay Joshi a42f789ff0 Fixed an issue where correct error message not displayed when sql statement contains Arabic letters. #7926 2025-05-22 18:49:42 +05:30
Aditya Toshniwal 5d8ec6e5b0 Fix issues found while testing changes for large file download. #3369 2025-05-22 16:41:17 +05:30
Akshay Joshi e711a1bbc6 Updated message catalogs for v9.4 2025-05-22 15:58:58 +05:30
Pravesh Sharma b6e1223e88 Fixed an issue where the result grid slowed down when any column contained a large amount of data. #6510 2025-05-21 18:57:47 +05:30
Akshay Joshi 28921be00f Updated Python and Javascript dependencies. 2025-05-20 14:07:38 +05:30
Anil Sahoo 4e8f29f328 Fixed an issue where light theme briefly appears when pgAdmin loads or tools open, even when a dark or system UI theme is preferred. #8711 2025-05-20 10:36:29 +05:30
Aditya Toshniwal 126e1fb53d Enabled large file downloads for desktop users within the query tool. #3369 2025-05-14 15:30:17 +05:30
Allen HernandezandAllen Hernandez ebf4963758 Fixes venv notations for web build
2) Removes venv notation from web bundling directions
3) Add venv notation after activation

---------
Co-authored-by: Allen Hernandez <2349718+AllenSH12@users.noreply.github.com>
2025-05-14 14:17:13 +05:30
Akshay Joshi eece396b30 Fixed an issue where the PSQL tool would hang when the database encoding was set to SQL_ASCII and certain commands were executed. 2025-05-14 14:05:29 +05:30
Anil Sahoo abcb5f8830 Fixed an issue where the options key was not working as expected in the PSQL tool. #6968 2025-05-14 13:46:16 +05:30
Akshay Joshi ebb4c9994f Update Python and Javascript dependencies. 2025-05-13 12:59:25 +05:30
Aditya Toshniwal 971eee32ea Update MUI from v6 to v7. 2025-05-13 12:51:00 +05:30
Rohit Bhati af84d6b1e0 Handle result grid data changes in View/Edit Data mode by automatically reconnecting to the server if a disconnection occurs. #8608 2025-05-13 11:35:58 +05:30
Koren Peretz 2cb69f09b9 Update the Dockerfile to use UID 5050 instead of the pgadmin user to prevent Kubernetes deployments from failing when securityContext.runAsNonRoot is set to true without specifying securityContext.runAsUser. 2025-05-09 15:24:42 +05:30
Akshay Joshi 0403079a4b 1) Fixed an issue where the Cancel button did not work when attempting to delete a user from the User Management.
2) Fixed an issue where automatic user creation via LDAP failed if an existing Internal user with the same username was already present.
2025-05-09 13:28:23 +05:30
Anil Sahoo 97984eb3ec Fix an issue where, after a database disconnection, the server would disconnect, and the reconnect dialog would repeatedly appear when clicking the Execute button. #8607 2025-05-08 15:48:49 +05:30
Aditya Toshniwal c46fd30446 Fix JS test cases failing because of latest version of @tanstack/react-virtual. 2025-05-07 17:07:56 +05:30
Rohit Bhati ff8a301f6a Enhance contrast for selected and hovered items in the Object Explorer to improve visibility and accessibility. #8595 2025-05-07 12:33:04 +05:30
Aditya Toshniwal 27bd28ee97 Replace Grid with Grid2 as the former is deprecated by MUI 2025-05-06 19:39:33 +05:30
Akshay Joshi fb4d25d907 1) Updated Python and JavaScript dependencies.
2) Updated release note.
2025-05-06 19:07:29 +05:30
Pravesh Sharma ca6f52e7c7 Fixed issues related to column range selection using shift + click. #8713 2025-05-06 15:52:20 +05:30
Yogesh Mahajan 3bdeb9ace1 Implement API fetch error display for select dropdown. #8668 2025-05-06 10:52:42 +05:30
Akshay Joshi f64b59e735 Updated release note. 2025-05-05 14:59:48 +05:30
Pravesh Sharma 5d78f4a89f Fix the issue where an error is displayed when a table is dropped while a query is running. #6564 2025-05-02 14:12:06 +05:30
Anil Sahoo 695f870ce1 Fixed an issue where the query tool returns "cannot unpack non-iterable Response object" when running any query with a database name change. #8607 2025-05-02 10:57:43 +05:30
Akshay Joshi 593b111fdf Add all missing options to the Import/Export Data functionality, and update the syntax of the COPY command to align with the latest standards. #8583
Add support for exporting table data based on a custom query. #8681
2025-04-30 17:51:04 +05:30
Aditya Toshniwal 82efd188c4 Fix pep8 issues from the last commit 2025-04-30 15:38:44 +05:30
Aditya Toshniwal 9df7275429 Add a python script to parse a release note file and convert to Email, Markdown and HTML formats required for pgAdmin release 2025-04-30 15:31:20 +05:30
Akshay Joshi 829876c2e0 1) Sorted requirements.txt alphabetically.
2) Remove packages for Python 3.8.
3) Update JavaScript dependencies.
4) Update Python packages.
2025-04-30 12:43:02 +05:30
Akshay Joshi 41ba6bd1f4 Delete .python-version file 2025-04-29 15:07:31 +05:30
Khushboo Vashi aa282711f8 Try to fix the Fedora build failure. 2025-04-28 14:33:46 +05:30
Akshay Joshi 5a501603ac Updated version for v9.3 2025-04-28 11:00:39 +05:30
Libor M. e7f8cb4ea3 Czech translation for version 9.3 2025-04-28 10:58:35 +05:30
Pravesh Sharma 78d9aa5b76 Fixed issue found while testing PostGIS spatial type constructor support. #2256 2025-04-25 11:13:18 +05:30
Domenico Sgarbossa 038029eb2d Italian translation for v9.3 2025-04-24 18:43:33 +05:30
Aditya Toshniwal a14cc1bd77 Updated message catalogs for v9.3. 2025-04-24 16:19:42 +05:30
Yogesh Mahajan 33389fc48e Fix feature test failures for PG servers. 2025-04-24 15:57:48 +05:30
Aditya Toshniwal d468c16ca2 Fixed more issues found while testing role permissions feature. #7310 2025-04-23 15:47:51 +05:30
Khushboo Vashi fcf7cf5eb2 Update release notes. 2025-04-23 15:41:43 +05:30
Pravesh Sharma b08e90ea88 Add support for type constructors for PostGIS spatial types. #2256 2025-04-23 15:35:42 +05:30
Yogesh Mahajan 75dc42cf24 Allow OAuth 2 login using the username claim if the email is absent from the user profile. #8652 2025-04-23 15:21:25 +05:30
Aditya Toshniwal ec3d142ad9 Fix issues while testing role permissions feature. #7310 2025-04-21 15:14:18 +05:30
Aditya Toshniwal 280f0b0038 Revert "Rebase fork pgadmin-org/react-data-grid to get latest changes and update pgAdmin package.json"
It requires React 19.

This reverts commit 7307c52250.
2025-04-21 15:12:27 +05:30
Aditya Toshniwal 7307c52250 Rebase fork pgadmin-org/react-data-grid to get latest changes and update pgAdmin package.json 2025-04-21 13:48:43 +05:30
Aditya Toshniwal e8cb962890 Add Cache-Control no-cache,no-store,must-revalidate header to dynamically generated utils.js file. #3688 2025-04-16 11:23:35 +05:30
Akshay Joshi 934f17c65e Ensure that the server list is alphabetically sorted in the Query Tool/PSQL workspace. #8636 2025-04-15 16:12:49 +05:30
Akshay Joshi 55f36912f9 Updated JavaScript dependencies. 2025-04-15 11:52:44 +05:30
Akshay Joshi 7b1ad5fa67 Fixed an issue where changes to foreign key constraints were not detected in the schema diff. #8627 2025-04-15 11:46:12 +05:30
Aditya Toshniwal 7d8a915ee0 Add support for custom roles and role permissions management in pgAdmin. #7310 2025-04-15 11:25:31 +05:30
Aditya Toshniwal 8b4df8beb1 Change the shortcut for canceling a running query as it conflicts with the shortcut to open a new query tool. #8628 2025-04-14 13:46:59 +05:30
Aditya Toshniwal f98a74b526 Fixed an issue where the user management tab is not opening in the classic layout. #8651 2025-04-14 13:32:05 +05:30
Aditya Toshniwal 8a0eae2bb0 Fixed an issue where drag and drop function with no parameters does not work. #8613 2025-04-14 12:57:26 +05:30
Aditya Toshniwal 18f47a59c5 Fixed an issue where the query tool went blank when converting history dates to the appropriate locale format. #8632 2025-04-14 12:43:05 +05:30
Akshay Joshi 31b1af2f84 Fixed an issue where filtering on a view caused an error. #8630 2025-04-09 19:00:32 +05:30
Akshay Joshi 4c56e49c66 Updated Javascript dependencies. 2025-04-09 11:56:07 +05:30
Rohit Bhati 2de2c30545 Fixed an issue where Ctrl/Cmd+A in cell editor would select all rows. #8572 2025-04-08 18:29:05 +05:30
Kijong Han 51897dc804 Fixed an issue where shift + click on rows/columns for range selection did not work in the query tool data output window. #5266 2025-04-08 12:43:05 +05:30
Akshay Joshi bbef00a151 Fixed an issue where the scroll position in the Object Explorer was not retained when switching workspaces. #8497 2025-04-07 13:31:00 +05:30
Akshay Joshi 627aa5d695 Added ability to use SQL in the 'DB Restriction' field. #2767 2025-04-04 15:53:12 +05:30
Akshay Joshi 0d8b3c4389 Ensure that graph data is updated even when the Dashboard tab is inactive. #8556 2025-04-04 11:39:37 +05:30
Khushboo Vashi 8031c35160 Fixed an issue where the debugger hangs when stepping into nested function/procedure. #8443 2025-04-03 19:20:28 +05:30
Akshay Joshi 8cf14222ff Updated Javascript dependencies. 2025-04-03 19:07:02 +05:30
Mike Christensen 10b15b3986 Added support for font ligatures. #8629 2025-04-03 19:06:40 +05:30
Aditya Toshniwal 73fefb8603 Fixed an issue where query tool is crashing on macOS 15.4 due to a locale issue. #8623 2025-04-02 15:15:23 +05:30
Akshay Joshi af6c1a24cf 1) Upgraded Gunicorn to version 23.0.0 to address a security vulnerability present in Gunicorn.
2) Resolved an issue where an empty PSQL panel would open if the psql utility was not found in the binary path.
2025-04-01 16:33:50 +05:30
Aditya Toshniwal cfca6f6218 Fixed issues while testing multiple popups issue. #8316 2025-03-31 14:28:56 +05:30
Akshay Joshi c001b7b50a Fixed an issue where closing the pgAdmin main window did not automatically close the View Logs and Configure Runtime dialogs. 2025-03-31 12:59:03 +05:30
Akshay Joshi bd259cda42 Updated version for release v9.2 2025-03-31 11:34:12 +05:30
Akshay Joshi 75be0bc22d Fixed a remote code execution issue in the Query Tool and Cloud Deployment (CVE-2025-2945). #8603 2025-03-31 11:33:37 +05:30
Akshay Joshi 1305d9910b Fixed an XSS vulnerability issue in the Query Tool and View/Edit Data (CVE-2025-2946). #8602 2025-03-31 11:30:26 +05:30
Libor M. 6a850fff10 Czech translation for version 9.2 2025-03-31 11:10:19 +05:30
Aditya Toshniwal 6b9f002366 Fixed an issue where user management tab was not focussed when opened from a non default workspace. #8574 2025-03-28 15:31:51 +05:30
Domenico Sgarbossa 0eb8d6c8d6 Italian translation update for v9.2 2025-03-28 12:18:00 +05:30
Aditya Toshniwal 8a2a5fda1d Update release notes. 2025-03-28 10:42:00 +05:30
Rohit Bhati a2b35b35f3 Fixed an issue where the query tool data grid did not respect the default value for columns of domain type when the domain had a default value. #8483 2025-03-28 10:38:30 +05:30
Aditya Toshniwal f250f5de5e Fixed an issue where delete/rename was done on the wrong file after sorting in Storage Manager. #8597 2025-03-28 10:31:11 +05:30
Akshay Joshi fa60ab0f6a Updated message catalogs. 2025-03-27 19:23:57 +05:30
Akshay Joshi 1d3e0a4455 Revert the fix for #8006 2025-03-27 12:32:46 +05:30
Aditya Toshniwal 82c5febde6 Font family should fallback to Source Code Pro if not valid. #392
Update user management docs.
2025-03-27 11:03:39 +05:30
Akshay Joshi 0914ec24ad Updated release note. 2025-03-26 15:54:52 +05:30
Aditya Toshniwal 57d757d4de Fixed an issue where pgAdmin should fallback to main screen if the last opened screen is disconnected. #8362 2025-03-26 09:21:53 +05:30
Akshay Joshi 7edaac1da7 1) Updated Security.md file.
2) Updated release note.
2025-03-25 12:40:46 +05:30
Aditya Toshniwal 9ab451e163 Open user management in a separate tab instead of a dialog to enhance UI/UX. #8574 2025-03-25 12:33:49 +05:30
jackfromeast 213be44e29 Create SECURITY.md file. 2025-03-25 12:32:10 +05:30
Anil Sahoo cb597d0acb Fixed an issue where the upgrade_check API returned an unexpected keyword argument 'cafile' due to changes in the urllib package supporting Python v3.13. #8577 2025-03-25 11:44:23 +05:30
Akshay Joshi badc6f33bf Updated JavaScript Dependencies. 2025-03-24 17:42:37 +05:30
Akshay Joshi a5993549b8 Disable controls for shared servers that cannot be edited by the users. 2025-03-24 14:30:56 +05:30
Mike Christensen 13b44fffc7 Add an ability to configure the font family for SQL editors. #392 2025-03-24 11:08:49 +05:30
Akshay Joshi fc1a1610a3 Ensure the newly added parameters in the server dialog are incorporated into the Import/Export Servers functionality. #8514 2025-03-20 15:49:43 +05:30
Rohit Bhati 47eca9a19c Fixed an issue where updating the grantee was not correctly applying the privileges. #8546 2025-03-20 15:35:46 +05:30
Akshay Joshi f635df6ccf Added support for post-connection SQL execution, which will be run automatically on each connection made to any database of the server. #4503 2025-03-18 16:54:38 +05:30
Yogesh Mahajan b2669930f5 Ensure that modal dialogs are not triggered more than once to avoid duplicates. #8316 2025-03-18 15:58:16 +05:30
Akshay Joshi f25cde8c5f 1) Unpin the electron version for RHEL 8 as respective issue is fixed.
2) Updated Javascript dependencies.
2025-03-18 10:27:21 +05:30
Rohit Bhati 797bdb8696 Fixed directory owner update & UI issues. #8034 2025-03-17 12:22:06 +05:30
Akshay Joshi c80be9b3a3 1) Align cancel query icon properly on the Dashboard.
2) Update release note.
2025-03-13 16:37:24 +05:30
Pravesh Sharma 84e2b844e0 Removed the pre-install script from the Red Hat build function as it was causing a No such file or directory warning during the update. #8006 2025-03-13 16:35:21 +05:30
Rohit Bhati be534be674 Update the stop/terminate icon at all the places for better UX. #8473 2025-03-12 12:31:23 +05:30
Chris Bandy 846d0eafe6 Change session files garbage collection strategy. #8335
Currently GC for session files is done by the /misc/cleanup endpoint which requires browser UI
to be running. With this change, the pgAdmin server will open a separate thread at a fixed frequency
which will take care of GC independently.
2025-03-11 16:32:30 +05:30
Akshay Joshi cd179a3e9f Updated release note. 2025-03-11 16:17:58 +05:30
Lau Ernebjerg Josefsen 2d10e95311 Add an option to load/replace the servers.json file on each container startup. #8540 2025-03-11 16:14:06 +05:30
Pravesh Sharma f9af74529c Fixed an issue where geometries in the geometry viewer will render partially when the container was resized. #8462 2025-03-10 18:44:24 +05:30
Akshay Joshi 8c9ab2afd9 Update Javascript dependencies. 2025-03-10 17:22:36 +05:30
Yogesh Mahajan 708a570ba0 On the Ubuntu runner, uninstall the default PostgreSQL version before installing any other PostgreSQL version. 2025-03-10 15:39:41 +05:30
Akshay Joshi 074db05f7a Updated release note. 2025-03-10 11:42:43 +05:30
Pravesh Sharma 73b437c0f5 Added support to automatically open a file after it is downloaded in the desktop mode. #4194 2025-03-10 11:38:13 +05:30
Rohit Bhati df5dced926 Change icon buttons to show tooltip even when disabled. #8449 2025-03-08 11:48:08 +05:30
Rohit Bhati 1590df8dfd Change the stop/terminate icon at all the places for better UX. #8473 2025-03-07 11:26:13 +05:30
Akshay Joshi 5ee33cf162 Fixed an issue where the PSQL terminal displays keyname for non alphanumeric keys. #8437 2025-03-05 18:31:49 +05:30
Aditya Toshniwal 7a25da9b06 Add support for restoring plain SQL database dumps. #5871 2025-03-05 18:22:44 +05:30
Akshay Joshi d7faa85338 Pin the electron version to 33.3.2 for RHEL 8 2025-03-05 12:37:50 +05:30
Akshay Joshi cf2328d2cd Fixed PEP8 2025-03-04 15:49:41 +05:30
Akshay Joshi 4e52a8664c Updated Javascript dependencies. 2025-03-03 19:00:59 +05:30
Rohit Bhati 7bae1eb663 Added support for creating Directory nodes in EPAS. #8034 2025-03-03 18:45:21 +05:30
Akshay Joshi 4791897578 Fixed an issue where the Schema Diff was not displaying the difference query when a table had a UNIQUE NULLS NOT DISTINCT constraint. #8479 2025-03-03 18:39:09 +05:30
Aditya Toshniwal 1cbdb435df Update the README.md file based on latest requirements. #8345 2025-02-25 17:06:49 +05:30
Akshay Joshi b59495603a 1) By Default 'Open in a new tab?' should be false.
2) Updated version for release v9.1
3) Updated the release note
2025-02-25 16:50:45 +05:30
Akshay Joshi 58f86a3c32 Updated Javascript dependencies. 2025-02-25 11:38:37 +05:30
Akshay Joshi adcf089357 Updated release note. 2025-02-21 15:00:01 +05:30
Yogesh Mahajan 636821f2ac Added an option to open the file in a new tab within the query tool. #1235 2025-02-21 14:45:41 +05:30
Pravesh Sharma b983b094a3 Fixed an issue where drop-down menus were hidden behind the dock. #8439 2025-02-20 12:12:29 +05:30
Akshay Joshi 53077b6c04 1) Updated chart.js to 4.4.7
2) Fixed an issue where Default Workspace and Preferences button is disabled when
   selecting any node from object explorer.
2025-02-19 16:12:17 +05:30
Aditya Toshniwal a0ddfad655 Fixed an issue where deleting rows in the query tool would delete all rows in the table when 'Select All Remaining Rows' was used. #8460 2025-02-18 17:34:24 +05:30
Yogesh Mahajan 39f92ffae4 Fixed GUI test cases failures on Github actions. 2025-02-18 14:44:32 +05:30
Akshay Joshi 84a5467a5e Updated Sphinx to 7.4.7 2025-02-18 13:34:20 +05:30
Akshay Joshi 35d6277f00 Rename all '10_plus' folders to 'default' as modulewise RESQL tests are not running. 2025-02-18 13:07:03 +05:30
Pravesh Sharma 85290d4e61 Fixed an issue where the column order displayed was incorrect for exclusion constraints with multiple columns. #8430 2025-02-18 11:57:42 +05:30
Yogesh Mahajan 48a26e8979 Ensure the saved passwords are decrypted with the correct encryption key for external authentication in server mode. #8435 2025-02-18 11:54:57 +05:30
Akshay Joshi 53a8cac7f8 Update Javascript dependencies. 2025-02-17 18:37:48 +05:30
Akshay Joshi 96128f6a15 1) Enable the ability to close the 'Welcome' tab in the Query Tool/PSQL Workspace. #8436
2) Fixed an issue where the User Management and Change Password dialogs were hidden when selecting a menu while a workspace other than 'Default' was active. #8418
3) Revert the change of OS from Ubuntu 22.04 to 24.04 for github action failure.
2025-02-17 18:28:56 +05:30
Anil Sahoo e2a80b2465 Fixed an issue where pasting text containing JSON data into the query tool grid would result in incorrect parsing. #8296 2025-02-17 17:41:05 +05:30
Pravesh SharmaandAditya Toshniwal 6dd91c8277 Fixed an issue where the ERD tool fails to open a saved file containing parent-child relationship within the same table. #8389
Fixed an issue in ERD where link notation end-points were not rendering occasionally.

---------

Co-authored-by: Aditya Toshniwal <aditya.toshniwal@enterprisedb.com>
2025-02-17 17:37:30 +05:30
Michal Charemza 83ade5dcc2 Update the query that fetches roles to be faster with many roles.
This changes the query that fetches roles from using the
pg_catalog.shobj_description function to using an explicit join on
pg_catalog.pg_shdescription. In my specific case, in a production system with
over 20k roles, this reduces the query time down from 8 minutes(!) down to
~40ms. Just in case it was a locking issue, I did use pg_activity to
investigate locks, and nothing was being blocked during the 8 minutes.

This fixes a problem that exists only for certain users, and specifically in my
case where the user that runs the query is themselves a member (directly and
indirectly) of a high number of roles. Running the existing query as a user
that has a low number of roles (and specifically, the master user in an AWS RDS
database), the existing query is fairly performant.

My best explanation as to the performance difference comes from the definition
of shobj_description
https://github.com/postgres/postgres/blob/2a8a00674e973dec4d7d74d5e16c7d7cdedf2be5/src/backend/catalog/system_functions.sql#L303-L312.
Each time it's called it runs a query against pg_shdescription and pg_class,
and so in my case runs 20k times, compared to the equivalent of once when doing
the explicit join on pg_shdescription. It should also be noted that in my case
pg_class is quite big - currently about 500k rows (although it has grown to ~5
million in the past, but that was borderline a mistake).

See https://github.com/pgadmin-org/pgadmin4/pull/8457#issue-2853052114 for
EXPLAIN ANALYZE results of the existing query and the updated query.
2025-02-17 17:20:28 +05:30
Akshay Joshi 5c257fe1b9 Change the Operating System from Ubuntu 22.04 to 24.04 to test whether it fixes the github actions. 2025-02-17 12:38:28 +05:30
Yogesh Mahajan 740a50680e Fix the following SonarQube issues:
1. Do not use the Array index in keys
2. Visible, non-interactive elements with click handlers must have at least one keyboard listener.
3. Add replacement fields or use a normal string instead of an f-string.
4. Add a parameter to the parent lambda function
2025-02-13 11:56:10 +05:30
Matthias Wilhelm 706eec0d5b Fix wrong parameter description for Password Exec Command
The documentation mentions that `%HOST%` can be used as a replacement parameter for the Password Exec Field in the Advanced tab of the Server Dialog, but the parameter is actually `%HOSTNAME%`:
2025-02-12 18:12:02 +05:30
Akshay Joshi f63190dc93 Fixed an issue where pgAdmin does not support pg_vector column length/precision. #8181 2025-02-12 16:14:31 +05:30
Akshay Joshi 58bb14253e Revert changes from the previous commit to restore the 'Object Explorer' title. 2025-02-11 20:18:10 +05:30
Akshay Joshi eb7c3ef361 Workspace Layout Update - Enhanced Query Tool and PSQL Behaviour:
With these changes, the Query Tool and PSQL tabs will now open in the same active workspace where the action is initiated.
2025-02-11 15:36:03 +05:30
Pravesh Sharma 2c37ff2893 Fixing following SonarQube Issues:
1. Ternary operators should not be nested.
2. "Exception" and "BaseException" should not be raised.
2025-02-11 12:03:43 +05:30
Akshay Joshi a30a722e11 Update release note. 2025-02-10 15:07:35 +05:30
Aditya Toshniwal 650a15beec Fixed an issue where the query tool was not treating IDENTITY columns as columns with default values when inserting new rows. #8341 2025-02-10 15:05:09 +05:30
Pravesh Sharma 2fc65589c8 Add support for one to one relationship in the ERD tool. #5128 2025-02-10 14:40:20 +05:30
Akshay Joshi bf7f8cdd73 1) Added missing GLOBALLY_DELIVERABLE config parameter in the config.py from the last commit.
2) Fixed API test cases for DBMS_JOB_SCHEDULER
2025-02-07 13:36:11 +05:30
Igor Serko ae76ea3585 Fixed Docker image entrypoint.sh email validation. #8410
Introduces a GLOBALLY_DELIVERABLE variable so that it can be passed to the email validator library
and ultimately allowing the email admin@localhost to be valid, as long as False is passed in.

Also:
* Adjusted the indentation of a command above it in the entrypoint.sh
* Added printing out the output of the validation library so that we can better find what the actual issue is
2025-02-07 12:34:23 +05:30
Akshay Joshi 0b46bdf901 1) Updated Javascript and Python dependencies.
2) Added release note for v9.1
2025-02-07 11:52:08 +05:30
Khushboo Vashi b02e210c68 Python v3.8 does not support parenthesized context expressions. 2025-02-06 14:42:29 +05:30
Aditya Toshniwal e6d2334753 Pin Electron version to 33.3.2 as the versions above it fails to start on RHEL 8/Rocky 8 2025-02-05 19:10:39 +05:30
Akshay Joshi 9f4ce1e7d1 Use HKA registry key instead of HKLM/HKEY_LOCAL_MACHINE in Windows installer.iss.in file. 2025-02-05 15:47:59 +05:30
Akshay Joshi efd0dd2ac0 1) Fixed an issue where selecting all rows and copying using shortcut only, the first attempt fails to copy.
2) Fixed an issue where a single row is copied first and then clicked on "Select All", the previously copied row's highlight color changes.
3) Fixed an issue where non-shared servers are visible in the Existing Servers list on the Welcome page and New Connection dialog.
2025-02-05 10:26:51 +05:30
Akshay Joshi b90a390d5c 1) Run the uninstaller first only if the v8 version is already installed.
2) Delete the MyAppVersion key from the Windows registry during the installation or upgrade.
3) Remove the logic that checks if a 32-bit or 64-bit version of the installer is already installed.
2025-02-05 10:17:46 +05:30
Akshay Joshi 2f495006ea 1) Fixed an issue where the server shows disconnected on the Welcome page, even after the password was provided.
2) Updated the release notes and version information.
2025-02-03 14:26:57 +05:30
Pravesh Sharma dd09986f71 Fixed an issue where quotes were missing in the CREATE script for the tablespace. #8408 2025-02-03 11:50:50 +05:30
Libor M. 41873de29e Czech translation for version 9.0 2025-02-03 10:31:31 +05:30
Akshay Joshi 92c9e59c1f 1) Update version for v9.0
2) Update message catalogs for v9.0
2025-01-30 18:16:05 +05:30
Akshay Joshi d5101b7568 1) Disable PSQL Workspace in Server mode.
2) Fixed an issue where empty binary path throwing an error instead of proper error message.
2025-01-30 17:59:18 +05:30
Anil Sahoo e7888c5265 Fixed an issue where the server without a saved password did not persist the user's latest filter dialog input after disconnection. #6044 2025-01-30 11:10:25 +05:30
Yogesh Mahajan ebeb768a53 Ensure the double-click event is listened to even if the user clicks after the label. 2025-01-30 10:26:11 +05:30
Akshay Joshi 228156d0b6 1) Fixed an issue where the ad-hoc server with SSH Tunnel repeatedly prompted for the password.
2) Fixed an issue where the SSH Tunnel password was not being saved in the External Database if its encoded length exceeded 64 characters.
3) 'Save Password' check box should be hidden for SSH Tunnel password on the Welcome page.
2025-01-29 19:43:23 +05:30
Akshay Joshi 1607875a08 Fixed issues for Workspaces:
1) Unable to add ad-hoc server with External Database.
2) Server list not updating when password is saved on the Welcome page.
3) Icons for Query Tool and PSQL missing on the Welcome page.
4) Error when removing connection parameters.
2025-01-29 17:14:25 +05:30
Akshay Joshi 707d0372ba Update JavaScript Dependencies. 2025-01-29 11:53:58 +05:30
Akshay Joshi 1317e5a921 Change the logic of setval function, so that the next nextval of sequence will return exactly the specified value. #3273 2025-01-28 17:52:21 +05:30
Kristof Hauser 1e00611792 Add support for OAuth2 profile array response, which also takes care of the GitHub Private Email ID issue. #8391 2025-01-28 16:53:56 +05:30
Akshay Joshi 22b7ae6cdc 1) Fixed an issue where loadingText message is not shown in SchemaView.
2) Fixed SonarQube Bugs and Code Smells.
2025-01-24 13:58:21 +05:30
Akshay Joshi 684818def1 Ensure that the Server List on the Welcome page is refreshed only when there are changes in the Object Explorer. 2025-01-23 14:51:39 +05:30
Yogesh Mahajan 5ee0328063 Fix an error during logout from pgAdmin when using OAuth2 authentication with the query tool open. 2025-01-22 21:05:06 +05:30
Akshay Joshi ab98e5f6bb Update Python and Javascript dependecies. 2025-01-22 19:49:35 +05:30
Akshay Joshi 84a8a522e3 1) Fixed an issue where Default Privileges and Privileges not working correctly. #8369
2) Fixed <br/> tag visible issue.
2025-01-22 19:40:13 +05:30
Anil Sahoo 133a59c71b Fixed an issue where filter dialog save fails when the PostgreSQL server/database connection is lost. #6044 2025-01-22 10:06:56 +05:30
Aditya Toshniwal 168aaa227a Update the server list on welcome page when workspace is changed to get the latest server connection info. #7708 2025-01-20 18:45:51 +05:30
Suall1969 74e776ba21 Psycopg binary packages are now available for macOS version < 14.0. 2025-01-20 17:27:08 +05:30
Khushboo Vashi 90eff9a596 Pass an empty string for the table cell tooltip if the cell value is an object. 2025-01-20 16:53:01 +05:30
Akshay Joshi cd86ce08cf Fixed an issue where pgadmin cannot install into path with non ASCII characters. #5204 2025-01-20 16:04:07 +05:30
Akshay Joshi 7e20bf5b75 Remove function call IsPathValid to test non-ascii characters in the path for Windows installer. 2025-01-20 12:25:16 +05:30
Yogesh Mahajan 98f6b1ff12 Ensure the double-click event is not ignored in the browser tree. 2025-01-20 11:21:21 +05:30
Akshay Joshi a410b15e30 Fixed an issue where <br/> tag is visible in the error message when delete any database and it is in use. 2025-01-17 17:16:36 +05:30
Khushboo Vashi 72a3ed9068 Do not display the tooltip if the table cell value is an object. 2025-01-17 15:32:11 +05:30
Rohit Bhati 1be0ff13db Update prop on confirmDelete to fix TypeError. #6513 2025-01-17 14:53:51 +05:30
Aditya Toshniwal 1216f075ce Fixed an issue where PSQL tool is not opening if database name have HTML characters in the name. #8365 2025-01-17 14:53:24 +05:30
Akshay Joshi 99e1f005fc Update Python version to 3.13 2025-01-15 13:44:34 +05:30
Akshay Joshi bf69b16f1f 1) Added the MAINTAIN privilege for PostgreSQL version 17 and above. #8332
2) Updated JavaScript Dependecies.
2025-01-14 14:18:07 +05:30
Khushboo Vashi 36df6d5c8a Fix an issue where using the binary cursor, utf-8 decode error comes up. #8199 2025-01-13 12:23:50 +05:30
Aditya Toshniwal a9974b418c Fixed an issue where cell background color is removed when copied in query tool data output grid. #8273 2025-01-09 15:37:20 +05:30
Rohit Bhati de6fbe7725 Fixed a button focus issue found while testing the dialog button changes. #6513 2025-01-08 17:22:11 +05:30
Khushboo Vashi 172edaa227 Fix an issue where wrong information is shown after using the filter on the Dashboard> State tab. #8320 2025-01-08 12:43:50 +05:30
Akshay Joshi bac50e10f0 1) Fixed an issue where User Language is not getting changed.
2) Fixed an issue where Import/Export Server menu is disabled.
3) Update few JavaScript dependencies.
2025-01-07 13:55:02 +05:30
Yogesh Mahajan b9c7e7e9af Remove the option "With no data (concurrently)" from Refresh MATERIALIZED VIEW context menu. #8309 2025-01-07 12:22:07 +05:30
Akshay Joshi 8c461ffb86 Reverted changes for formatted exception message. #8165 2025-01-06 17:46:34 +05:30
Akshay Joshi 1934a75eee Updated Javascript packages. 2025-01-06 12:23:10 +05:30
Akshay Joshi 90cdeeff0a Modified logic for formatted exception message. #8165 2025-01-03 20:56:47 +05:30
Yogesh Mahajan 6d45dd4491 Ensure master password pop up is not shown on setting MASTER_PASSWORD_REQUIRED to false. #8299 2025-01-03 20:50:32 +05:30
Rohit Bhati b22bfdf74b Only the python version should be shown in the about dialog. #8249 2025-01-03 20:49:56 +05:30
Aditya Toshniwal 6dab60d9e4 Fixed an issue where copying query tool output cell is not working if any SQL text is selected. #8273
Rebase react-data-grid fork to latest.
2025-01-03 14:03:33 +05:30
Anil Sahoo 657bf08fb8 Fixed an issue where keys like Backspace, Enter, and Input keys were shown as text in the PSQL tool. #6968 2025-01-03 12:22:24 +05:30
Akshay Joshi ff1d9e20d1 Fixed an issue where error message from the database server need space between two sentences. #8165 2025-01-02 18:14:51 +05:30
Yogesh Mahajan d03553be7a Fix the error occurring while loading preferences on startup. #8256 2025-01-02 18:12:24 +05:30
Yogesh Mahajan 5dc52446f3 Fixed the issues reported while testing #8208 2025-01-02 15:47:25 +05:30
Akshay Joshi eb517e6df8 Fixed following issues for Workspace:
1. On the welcome page, the Password should be cleared when the user/db is changed.
2. Added a spinner when we tried to connect to the existing remote server.
3. Details should be cleared when we select the existing server but cancel when it asks for the password.
4) Return from the chageWorkspace function if clicking on the same workspace button multiple times.
2025-01-02 13:24:13 +05:30
Akshay Joshi 621d66fb57 Add correct validation for Authlib. 2025-01-01 11:58:10 +05:30
Akshay Joshi 964d211260 Copyright updated for 2025 2025-01-01 11:26:42 +05:30
Aditya Toshniwal c83d997f2f Make depedabot use Python v3.8.
Update release notes.
2025-01-01 10:42:49 +05:30
Rohit Bhati 7a9a45b065 Fixed an issue where tooltip on a dropdown button is blocking access to dropdown menu. #8255 2025-01-01 10:31:48 +05:30
Rohit Bhati 700ecaef4a Show the python version used for the pgAdmin server in the about dialog. #8249 2025-01-01 10:28:58 +05:30
Anil Sahoo 19c8fcd775 Fixed jest test cases failing due to an update of react-resize-detector package. 2024-12-30 17:22:07 +05:30
Rohit Bhati bcd6f3f429 Fix a formatting issue in View/Edit tool generated SQL where some filters are applied. #8254 2024-12-30 11:56:24 +05:30
dependabot[bot] 92e531db02 Javascript dependency: Bump react-resize-detector in /web 2024-12-24 11:35:26 +05:30
dependabot[bot] f81c546069 Javascript dependency: Bump @mui/icons-material in /web 2024-12-24 11:34:49 +05:30
dependabot[bot] 68f41dd5c6 Javascript dependency: Bump @tanstack/react-query in /web 2024-12-24 11:33:40 +05:30
dependabot[bot] 1be9dd4033 Python dependency: Update authlib requirement from ==1.3.* to ==1.4.* 2024-12-24 11:32:57 +05:30
dependabot[bot] 0c6776b713 Python dependency: Update flask-socketio requirement. 2024-12-24 11:32:36 +05:30
Akshay Joshi 9cd8492ec1 Fixed an issue where Schema Diff not produce difference script for Index definition with where condition. #8072 2024-12-19 16:40:18 +05:30
Akshay Joshi 6df5d14a60 Fixed an issue where properties dialog throwing an error for Materialized View. #8209 2024-12-19 15:55:23 +05:30
Anil Sahoo 91881ad6d3 Fixed an issue where option key was not registering in PSQL tool. #6968 2024-12-19 15:40:23 +05:30
Akshay Joshi e011ad02a5 Remove console log 2024-12-18 18:43:04 +05:30
Akshay Joshi fdf5d12196 1) Fixed schema diff workspace button is disabled for the first tab.
2) Adhoc servers should connect with service file and open the Query/PSQL tool.
2024-12-18 18:19:13 +05:30
Rohit Bhati 8af25ba0c1 Change button labels and color in delete confirmation dialog for all objects to improve UX. #6513 2024-12-18 17:25:36 +05:30
Akshay Joshi 2ba4f79a46 Package 'rc-resize-observer' throwing error on Windows so pin the version. 2024-12-18 12:46:18 +05:30
Akshay Joshi 185e0f61e2 Close the connection and delete adhoc server if all it's Query tool and PSQL connections are closed. 2024-12-17 17:57:25 +05:30
Aditya Toshniwal e84f4cd35b Fix an issue where view/edit tool is not opening in workspace layout.
Fixed few other theme related issues.
2024-12-17 17:03:37 +05:30
Yogesh Mahajan eef20dc5a9 Correct the documentation for the MFA configuration. #8142 2024-12-17 11:50:25 +05:30
Akshay Joshi 0b65dcd4ef Updated Javascript dependencies. 2024-12-17 11:36:18 +05:30
Akshay Joshi ba58b140d4 Updated version of liblz4 in Docker file. 2024-12-16 14:58:47 +05:30
Yogesh Mahajan a0cd6c6a88 Allow deleting the entry while creating/adding new label to enumeration type. #8208 2024-12-16 14:54:24 +05:30
Grégoire Bellon-Gervais 776e092a89 Fix in case of the file does not exist (#8258) 2024-12-16 14:53:18 +05:30
Akshay Joshi fe6e21a08b Enhanced pgAdmin 4 with support for Workspace layouts. #7708 2024-12-16 14:52:56 +05:30
Akshay Joshi 4e2fd404c0 pgagent extension should be created only EPAS < 17. 2024-12-12 16:49:11 +05:30
Akshay Joshi ae9d324f8f Updated Python & Javascript dependencies. 2024-12-12 14:54:31 +05:30
Akshay Joshi 6f8fb6f49d pgAgent for EPAS is no more supported from v17, so changing the github actions accordingly. 2024-12-11 18:56:24 +05:30
Akshay Joshi 52d6017ce5 Removed PG/EPAS 12 and Added PG/EPAS 17 for github actions. 2024-12-11 12:31:53 +05:30
Aditya Toshniwal 9e58717321 Fix text wrapping issue for tags feature. #8192 2024-12-09 18:04:47 +05:30
Akshay Joshi c3a334f8df 1) Update the repo to the version 2.0 for downloading EPAS.
2) Use 'ubuntu-22.04' instead of 'ubuntu-latest'.
2024-12-09 12:32:03 +05:30
Akshay Joshi 72a4f93e4f Updated version for release v8.14 2024-12-09 11:51:07 +05:30
Libor M. 09e13b2f37 Czech translation for version 8.14 2024-12-09 11:33:50 +05:30
Aditya Toshniwal 60078c37a3 Add a new config MAX_SERVER_TAGS_ALLOWED to limit the number of tags on server node. #8192 2024-12-06 12:16:15 +05:30
Yogesh Mahajan 1cf9ced260 Fixed the issues reported while testing #7330. 2024-12-06 12:08:24 +05:30
Domenico Sgarbossa 50cf6489b9 Italian translation updated for v8.14 2024-12-06 11:34:10 +05:30
Rohit Bhati 621a48c642 More fixes related to query tool prompting for unsaved changes when there are no changes. #8127 2024-12-05 19:03:31 +05:30
Akshay Joshi c841c82220 Update message catalogs for v8.14 2024-12-05 18:40:39 +05:30
Yogesh Mahajan 22b89265d6 Ensure CSRF errors handled to return unauthorized response. #8065 2024-12-05 16:54:35 +05:30
Anil Sahoo e2c20b5022 Fixed an issue where a column name change in the edit dialog of the table node does not show the updated column name. #7892 2024-12-05 16:53:50 +05:30
Aditya Toshniwal 2dd7de73b9 Update dependabot.yml to check for updates on a weekly basis instead of daily. 2024-12-05 16:31:38 +05:30
Khushboo Vashi bd227e03bd Fix an issue where pgAdmin crashes on accessing the dashboard state tab when database is super busy. #7809 2024-12-05 15:00:35 +05:30
Akshay Joshi 413202899f Update release note. 2024-12-05 12:23:29 +05:30
Aditya Toshniwal bd2a484c2f Added support for adding tags on a server node. #8192 2024-12-05 12:18:26 +05:30
Pravesh Sharma 5e8a75cdf9 Added escaping for the placeholder parameters before passing it to the passexec command. #6794 2024-12-04 15:42:45 +05:30
Yogesh Mahajan d8ed75dbfd Ensure correct custom SSL certificate passed in connection string. #8215 2024-12-04 15:38:27 +05:30
dependabot[bot] 4392b83a98 Javascript dependency: Bump @tanstack/react-query in /web 2024-12-04 11:41:29 +05:30
Aditya Toshniwal 256d1e55c8 Fixed an issue where doing Ctrl/Cmd+C on a selected text in a cell editor of data output in the query tool copied the complete text. #8157 2024-12-04 11:32:01 +05:30
Aditya Toshniwal c2dcfdb96f Update package.json and yarn.lock to use yarn v3.8.7 2024-12-04 09:47:45 +05:30
Khushboo Vashi 46c7562ed2 Update release note. 2024-12-03 17:52:39 +05:30
Yogesh Mahajan 42018e69a5 Add support to deploy pgAdmin in container with readOnlyRootFilesystem to true. #7330 2024-12-03 17:50:20 +05:30
Akshay Joshi 56c6fc6b72 Updated Javascript dependencies. 2024-12-03 11:58:25 +05:30
dependabot[bot] c0a6ff3029 Javascript dependency: Bump zustand from 4.5.5 to 5.0.1 in /web 2024-12-02 12:13:43 +05:30
dependabot[bot] 79f3db5ea5 Javascript dependency: Bump @tanstack/react-query in /web 2024-12-02 11:27:55 +05:30
dependabot[bot] b5327cbe17 Javascript dependency: Bump yarn-audit-html from 4.0.0 to 7.3.2 in /web 2024-12-02 11:24:41 +05:30
dependabot[bot] 217e9ed0b1 Python dependency: Update typer[all] requirement in /web/regression 2024-12-02 11:24:21 +05:30
dependabot[bot] 82c7a94023 Javascript dependency: Bump @tanstack/react-query in /web 2024-12-02 11:24:01 +05:30
dependabot[bot] 1a1b63f92a Javascript dependency: Bump @types/classnames 2024-12-02 11:23:40 +05:30
Pravesh Sharma 6810fa6ce6 Add support for passing connection details as placeholders in the passexec command. #6794
Added a fix where electron app menu was not refreshing when node selection changed.
2024-11-29 17:54:07 +05:30
Aditya Toshniwal 8876c4241f Update package.json to use yarn v3.8.6 2024-11-29 12:08:42 +05:30
Yogesh Mahajan 190574b3af Fix issues more scenarios related to crypt key missing on backend server restart. #8065 2024-11-29 12:05:46 +05:30
Akshay Joshi fac1857579 Updated yarn.lock 2024-11-29 11:27:03 +05:30
dependabot[bot] acedd38899 Javascript dependency: Bump imports-loader from 4.0.1 to 5.0.0 in /web 2024-11-29 11:08:59 +05:30
dependabot[bot] e3bf110f1f Javascript dependency: Bump style-loader from 3.3.4 to 4.0.0 in /web 2024-11-29 11:08:40 +05:30
dependabot[bot] 638d597061 Python dependency: Update cryptography requirement 2024-11-29 11:06:56 +05:30
dependabot[bot] 588aa88144 Python dependency: Update cryptography requirement in /web/regression 2024-11-29 11:06:36 +05:30
dependabot[bot] c918407eb3 Javascript dependency: Bump @testing-library/react in /web 2024-11-29 11:06:15 +05:30
dependabot[bot] f87c981974 Javascript dependency: Bump electron from 33.1.0 to 33.2.1 in /runtime 2024-11-29 11:05:52 +05:30
dependabot[bot] 360ec29963 Javascript dependency: Bump date-fns from 3.6.0 to 4.1.0 in /web 2024-11-29 11:05:31 +05:30
Aditya Toshniwal 657b0f82ec Fixed an issue where query tool throws syntax error if a newly added row is untouched and saved. #8028
Fixed an issue where auto-width of wide columns in data output is incorrectly calculated. #8158
2024-11-28 14:18:13 +05:30
dependabot[bot] 2813d82996 Javascript dependency: Bump ip-address from 9.0.5 to 10.0.1 in /web 2024-11-28 10:54:22 +05:30
dependabot[bot] b13dd2abc2 Javascript dependency: Bump axios from 1.7.7 to 1.7.8 in /runtime 2024-11-28 10:53:53 +05:30
dependabot[bot] a5a5503821 Python dependency: Bump selenium in /web/regression 2024-11-28 10:53:29 +05:30
Anil Sahoo cd2f48aeb1 Fixed an issue in schema diff where an error message popup was showing some garbage without any info. #8098 2024-11-28 10:16:41 +05:30
Aditya Toshniwal 88e515093c Show auto-complete column names in filtered rows dialog of table and filter options of view/edit data tool. #3751
Allow setting NULL ordering for columns in view/edit data filter dialog. #3317
2024-11-28 10:13:57 +05:30
Pravesh Sharma 9ef5a53790 Add a user preference to enable/disable alternating row background colors in the data output of query tool. #8134
Fixed some theme related issues.
2024-11-27 11:23:13 +05:30
Aditya Toshniwal da530824d6 Fixed an issue where indent with space was not aligning to next tab position. #7486 2024-11-25 16:42:07 +05:30
Aditya Toshniwal ea693396b8 Update MUI from v5 to v6 2024-11-25 16:36:21 +05:30
Khushboo Vashi f4cba74bf6 Fixed an issue where querying a foreign table gives the error 'ForeignTableCommand' object has no attribute 'auto_commit'. #7384 2024-11-25 14:40:26 +05:30
dependabot[bot] 8b68ea6465 Javascript dependency: Bump imagemin from 8.0.1 to 9.0.0 2024-11-25 11:48:04 +05:30
dependabot[bot] 69046a9429 Python dependency: Update jsonformatter requirement. 2024-11-25 11:46:46 +05:30
dependabot[bot] f3f8c1b7e8 Python dependency: Update jsonformatter requirement 2024-11-25 11:46:24 +05:30
Aditya Toshniwal 042888f5d7 Fixed an issue where ERD auto-layout should: #6592 (#8167)
- Always generate right-angled links
- Switch port to Left/Right for the best link route.
2024-11-22 16:26:50 +05:30
Akshay Joshi ec197c68b8 Updated release note. 2024-11-21 15:58:26 +05:30
Yogesh Mahajan 026c0d2389 Ensure the crypt key is retrieved correctly on backend server restart. #8065 2024-11-21 15:55:38 +05:30
Akshay Joshi 032583e280 Updated release note. 2024-11-21 11:56:30 +05:30
dependabot[bot] 57b3771450 Javascript dependency: Bump @testing-library/jest-dom 2024-11-21 11:22:04 +05:30
Pravesh Sharma 4dbfdd8740 Added an EPAS 17 resql test case for builtin locale provider. #8095 2024-11-21 11:21:05 +05:30
Aditya Toshniwal f23fe38e0b Update release notes. 2024-11-21 10:59:08 +05:30
Rohit Bhati 321366489d Fixed an issue where query tool should show results and messages only from the last executed query. #8010
Fixed an issue where query tool should not prompt for unsaved changes when there are no changes. #8127
2024-11-21 10:52:43 +05:30
Anil Sahoo 6d5b1673e6 Fix SonarQube code smells for PgTree directory. 2024-11-19 15:45:00 +05:30
Anil Sahoo 8be65ceb7b Fixed an issue related to the query tool update connection after the server disconnected from the object explorer. #7865 2024-11-19 15:44:40 +05:30
Akshay Joshi a8384a8826 Added new language Chinese (Traditional) and rename language code for Chinese (Simplified) 2024-11-19 14:20:25 +05:30
Akshay Joshi 9645bb3911 Upgrade Flask to 3.1.* for Python version >= 3.9 2024-11-18 20:59:38 +05:30
dependabot[bot] 847059b717 Javascript dependency: Bump mini-css-extract-plugin 2024-11-18 20:49:13 +05:30
dependabot[bot] 08c776e308 Javascript dependency: Bump @eslint/plugin-kit 2024-11-18 20:48:17 +05:30
dependabot[bot] 716ef2f0db Javascript dependency: Bump eslint from 9.14.0 to 9.15.0 2024-11-18 20:47:44 +05:30
Aditya Toshniwal c5d5fbdafd Fixed an issue where Ctrl/Cmd + A was not selecting all data in query tool data grid. #5099 2024-11-14 16:56:03 +05:30
Aditya Toshniwal 9a8d520abd Fix few issues found in menu rendering code and GUI test cases 2024-11-14 14:49:07 +05:30
Aditya Toshniwal 296befc881 Code refactoring at multiple places to improve re-usability 2024-11-14 14:16:38 +05:30
Aditya Toshniwal 00d3aaa1fd Refactor menu building code to support sub-menus of any depth 2024-11-14 13:36:42 +05:30
Akshay Joshi 64399901ad Added release note for 8.14 2024-11-14 13:23:58 +05:30
Pravesh Sharma 0aba9703cd Added support for a builtin locale provider in the Database dialog. #8095 2024-11-14 13:20:01 +05:30
Yogesh Mahajan f8192b82b8 Allow the use of a pgpass file in the pgAdmin container via Docker secrets. #5786 2024-11-14 13:09:21 +05:30
John (Haipeng) Jiang 040e988323 Schema Diff bug when comparing materialized views with indices: key 'indrelid' needs to be ignored. 2024-11-14 12:43:33 +05:30
dependabot[bot] 849cd65bb7 Javascript dependency: Bump valid-filename from 2.0.1 to 4.0.0 in /web 2024-11-14 12:42:46 +05:30
dependabot[bot] 382a35c25e Python dependency: Update typer[all] requirement 2024-11-14 12:42:21 +05:30
dependabot[bot] 0c22b78cf9 Python dependency: Update typer[all] requirement in /web/regression 2024-11-14 12:41:57 +05:30
dependabot[bot] 7d1a08f22f Javascript dependency: Bump @tanstack/react-query in /web 2024-11-14 12:41:16 +05:30
dependabot[bot] bce53e02e5 Javascript dependency: Bump exports-loader from 4.0.0 to 5.0.0 in /web 2024-11-14 12:40:55 +05:30
Kuo Chaoy 606b5287be Chinese (Simplified) translation for v8.14 2024-11-14 10:46:14 +05:30
Nicolas b278265005 French translation for v8.13 2024-11-11 15:03:29 +05:30
Aditya Toshniwal f9d881ffa6 Fix GUI test cases failing because of previous commit 2024-11-08 18:09:39 +05:30
Aditya Toshniwal 6fcc4ae6a2 More fixes for issues found while testing query tool pagination changes. #1780 2024-11-08 15:48:24 +05:30
Domenico Sgarbossa 67d3f14c3d Italian translation for v8.13 2024-11-08 11:45:16 +05:30
Aditya Toshniwal 947dbf6d0a Update release notes. 2024-11-07 22:02:18 +05:30
Rohit Bhati 173cfb72b2 Format dashboard graph metrics for better readability. #6016 2024-11-07 22:00:45 +05:30
Akshay Joshi 2e61eb0990 Updated message catalogs for v8.13 2024-11-07 19:08:40 +05:30
Aditya Toshniwal 3417186df7 Fix issues found while testing pagination changes. #1780 2024-11-07 18:02:39 +05:30
Aditya Toshniwal 772c6ecd84 Remove the dependency on python packages eventlet and greenlet. #8102 2024-11-07 16:45:18 +05:30
dependabot[bot] efe7f1de6a Javascript dependency: Bump electron from 33.0.2 to 33.1.0 in /runtime 2024-11-07 11:37:58 +05:30
Pravesh Sharma b51eef12b7 Add an object menu option to disconnect all server and database connections. #1984 2024-11-06 15:52:31 +05:30
Akshay Joshi 6cb71c9ae4 Werkzeug 3.1 requires python version >= 3.9. 2024-11-06 12:37:51 +05:30
dependabot[bot] 2e098c487a Python dependency: Bump selenium in /web/regression 2024-11-06 11:39:05 +05:30
dependabot[bot] e592dfde2a Javascript dependency: Bump eslint from 9.13.0 to 9.14.0 in /runtime 2024-11-06 11:38:32 +05:30
dependabot[bot] 7168499521 Python dependency: Update werkzeug requirement from ==3.0.* to ==3.1.* 2024-11-06 11:37:45 +05:30
Yogesh Mahajan f5f79a516a Fix SELinux permission issue. 2024-11-05 11:51:02 +05:30
Aditya Toshniwal 44dc78f4df - Update few JS dependencies.
- Update runtime documentation page.
2024-11-04 13:47:30 +05:30
Akshay Joshi 25c3142586 Updated python packages. 2024-11-02 17:39:15 +05:30
Aditya Toshniwal a44424d5fa Update release notes 2024-10-31 19:23:49 +05:30
Aditya Toshniwal bb4777578a Remove bootstrap from the runtime code and update both yarn.lock files. #8077 2024-10-31 18:07:26 +05:30
Pravesh Sharma 2f4cae35bd Updated the react-menu library from v2 to v4. #8061 2024-10-30 17:08:24 +05:30
Rohit Bhati a9bfa8a71d Fix multiple issues related to debugger params dialog input. #7883
- Handle multiple possible values for a boolean parameter.
- Disable value input when "Use default" is enabled.
2024-10-29 16:01:46 +05:30
Aditya Toshniwal 9e3f5f53cc Pin the python version for python tests git runners to 3.12 until pgAdmin supports latest 2024-10-28 14:12:29 +05:30
Khushboo Vashi 8b354aec1d Update Release Notes. 2024-10-19 10:48:18 +05:30
Pravesh Sharma 6101e72552 Fix the QR code generation issue for 2FA. 2024-10-18 19:34:31 +05:30
Yogesh Mahajan 898c7b27df Fix the Jinja2 error for python 3.8. 2024-10-18 19:30:42 +05:30
Pravesh Sharma 4d7fc8be52 Resolved issues reported during testing of #7655. 2024-10-18 13:05:59 +05:30
Akshay Joshi f819841430 Update the release note. 2024-10-17 17:33:08 +05:30
Pravesh Sharma 5d008f0525 Fixed an issue where the query tool was crashing when an empty geometry was being rendered. #7655 2024-10-17 14:13:40 +05:30
Aditya Toshniwal b0d4200aa0 Few UX improvements in query tool pagination. #1780 2024-10-15 16:25:39 +05:30
Akshay Joshi 167bbe100e Another attempt to fix signtool error on Windows 2024-10-15 14:48:14 +05:30
Akshay Joshi 4e7422ed4b Fixed an issue where the Windows Installer was missing a Digital Certificate. 2024-10-15 13:32:11 +05:30
Akshay Joshi 867b2a5149 Updated version for release v8.13 2024-10-14 16:20:54 +05:30
Yogesh Mahajan 2cc8f5f272 Ensure server connection is successful for sslrootcert=system in server configuration. #7907 2024-10-14 16:17:46 +05:30
Kira 9be0fef470 Indonesian translation for version 8.13 2024-10-14 11:33:52 +05:30
Nicolas b4759e776e French translation for version 8.13 2024-10-14 11:29:28 +05:30
Domenico Sgarbossa 1d8dfc110e Italian translation for version 8.13 2024-10-14 11:23:47 +05:30
Libor M. 6ed615a1fc Czech translation for version 8.13 2024-10-14 11:23:19 +05:30
Akshay Joshi 7d12dc3b80 Remove unused variable from Debugger. 2024-10-10 17:54:15 +05:30
Akshay Joshi 72a102aac8 Update message catalog for v8.13 2024-10-10 17:51:59 +05:30
Akshay Joshi 17883fbd84 Use PG17 as the default in the container. #8022 2024-10-10 15:55:43 +05:30
Pravesh Sharma 7a7782a350 Fixed an issue in the debugger where function arguments of the character data type were being truncated. #8007 2024-10-10 15:25:08 +05:30
Rohit Bhati b649094d36 Fix the issue where rows do not retain shading when scrolling. #8013 2024-10-10 15:19:24 +05:30
Aditya Toshniwal 8c45dea975 Fixed an issue where graphical explain keeps the node details open even after plan changed. #7993 2024-10-10 10:50:11 +05:30
Rohit Bhati 509c696aa3 Fixed an issue where the copy shortcut was not working in the Query Tool data grid. #7920 2024-10-09 17:06:51 +05:30
Yogesh Mahajan 866db40f48 Fixed the issues reported while testing. #5869 2024-10-09 17:05:34 +05:30
Aditya Toshniwal 9169d3d4bf Fixed an issue where cursor selection is not visible in the PSQL tool. #7957 2024-10-09 14:42:30 +05:30
Tomas Dabašinskas f1e48b719d Fix a typo in docs for google oauth2
It should probably be `userinfo`, not `useinfo` 🙂
2024-10-07 19:05:46 +05:30
Akshay Joshi 081bebaf80 Update release note. 2024-10-07 11:47:31 +05:30
Yogesh Mahajan 1fe840fcac Allow to pass PGADMIN_CONFIG_CONFIG_DATABASE_URI from docker secrets. #5869 2024-10-07 11:44:20 +05:30
Anil Sahoo 6cccb5da31 Fixed an issue where Dashboard tab showing 'Something went wrong'. #7955 2024-10-07 11:41:27 +05:30
Akshay Joshi 6c3f0a4606 1) Updated French Translation.
2) Updated release note.
2024-10-04 12:26:37 +05:30
Rohit Bhati d736f4266c Fixed an issue where default EOL in the query tool should be based on the OS. #7393 2024-10-03 17:29:58 +05:30
Rohit Bhati 33c88ceb68 - Move 'About pgAdmin 4' to app menu on macOS. #7289
- Add appropriate minimum width and height setting for desktop apps to avoid app accidentally going below visibility levels. #7988
2024-10-03 16:29:11 +05:30
Akshay Joshi a1f8e010b7 qrcode 8.* not available with Python 3.8. Fixed 2024-10-03 10:43:46 +05:30
dependabot[bot] d924a7fb8d Python dependency: Update qrcode requirement from ==7.* to ==8.* 2024-10-03 09:53:08 +05:30
dependabot[bot] 95905cfd5b Python dependency: Update flask-socketio requirement in /web/regression 2024-10-03 09:51:52 +05:30
Dave Page c0122a72c8 Update the Windows build to work with Meson-built PostgreSQL and winpgbuild. 2024-10-01 15:51:43 +01:00
Dave Page ff838e43df Make the vcredist filename configurable, as the name has changed in newer VC++ releases. 2024-10-01 12:38:47 +01:00
Aditya Toshniwal c6d7a0a8da Add missing eslint React rules and fix the linter errors. 2024-10-01 16:32:04 +05:30
Akshay Joshi 485c654c6e Updated release note. 2024-10-01 16:16:47 +05:30
dependabot[bot] 265bf61adf Python dependency: Bump psycopg[c] in web/regression 2024-10-01 15:51:42 +05:30
dependabot[bot] 0bcabd59d3 Python dependency: Bump psycopg[c] from 3.2.2 to 3.2.3 2024-10-01 15:51:03 +05:30
dependabot[bot] 6bda0d4891 Javascript dependency: Bump jsoneditor from 9.10.5 to 10.1.0 2024-10-01 15:50:43 +05:30
dependabot[bot] 97ddab93af Javascript dependency: Bump eslint from 9.11.0 to 9.11.1 2024-10-01 15:50:22 +05:30
Aditya Toshniwal 6322674d98 Replace infinite scrolling with pagination in query tool data output for better UX and performance. #1780 2024-10-01 14:47:12 +05:30
Rohit Bhati f8fb78be11 1) Alternate the background color of rows to enhance readability. #2874
2) Make the background color for the serial number and header cells distinct. #7863
2024-10-01 12:21:44 +05:30
Ashesh Vashi 15c37b620e Fixed issues reported in #7958
* Fixed issues reported in #7954

- Search wasn't working as we were using the wrong row-index, while
  rendering it.
- Fixed the CSS issue with the alignment of the search input box.
- Pass the row object while rendering the 'DataRow' component, to
  improve the performance as it repeatedly calls the filtering function for each row.
- Changed the order of the validators on a field to prioritize the
  'empty' string validator over the unique-id validator in a
  collection.
- Use 'row.index' instead of rowId, while rendering a grid row
2024-10-01 12:06:59 +05:30
Akshay Joshi 28eb2c0b4b Update release note. 2024-09-27 16:25:51 +05:30
Pravesh Sharma 535c7eeef8 Fixed an issue where the dock layout was not saved upon closing a tab. #7919 2024-09-27 16:22:48 +05:30
Pravesh Sharma f0ecc95ca9 Fixed an issue to allow the Enter key to save data in the result grid text editor. #5307 2024-09-27 12:18:07 +05:30
Rohit Bhati 0e63914ab3 Fixed an issue where the copy shortcut CTRL +C was not working in the Query Tool data grid. #7920 2024-09-27 12:17:21 +05:30
Yogesh Mahajan 9b64acb3d2 Allow OAuth2 params OAUTH2_NAME, OAUTH2_DISPLAY_NAME, OAUTH2_ICON, OAUTH2_BUTTON_COLOR to be optional. #7965 2024-09-27 10:35:21 +05:30
Akshay Joshi 0ab5e0d4ef Update release note. 2024-09-24 19:44:28 +05:30
Rohit Bhati 4cb0f87dfd Added support for auto-detecting and setting the End-of-line character (LF/CRLF) in the query tool editor. #7393 2024-09-24 16:39:08 +05:30
Pravesh Sharma fa64e8b38f Fixed an issue where role properties were not loading. #7837 2024-09-24 11:59:05 +05:30
Akshay Joshi fb6cca415d Updated yarn.lock 2024-09-23 17:02:24 +05:30
Akshay Joshi b757d26933 1) Update JS and Python dependencies from Dependabot.
2) Added new release note file.
2024-09-23 16:33:20 +05:30
Dave Page 9f64f5b8db Copy liblz4 and libzstd libraries if present in the PostgreSQL build. 2024-09-20 11:47:43 +01:00
Khushboo Vashi a0aa185518 Fixed a security issue where the OAuth2 client ID and secret exposed through the web browser (CVE-2024-9014). #7945 2024-09-20 08:45:37 +05:30
Ashesh Vashi 1f53baee8f Fixed the dynamic column updation in the Unique & Primary Keys while creating a table.
* Updated the columns for the unique and primary keys while creating a table.
Use the 'editable' option for a Cell instead of 'disabled'.

* Don't need to define the hidden member as fields in GridHeaderSchema

* Updated the columns for the exclusion constraints while creating a
 table.

* Signaled the relevant field, when column options have changed, for all
the children of a table.

* Use current snapshot of data for the GrigFormHeadeer

* Fixed the styling for the search input box

* Don't check for the 'colOptions.editable' flag, as it could be
indirect call as well.
2024-09-19 18:57:09 +05:30
Comocen 6a79d0a195 Russian translation for version 8.12 2024-09-19 18:54:38 +05:30
Aditya Toshniwal 8fd5efaa84 Make sure ALLOW_SPECIAL_EMAIL_DOMAINS should also work for pgAdmin docker apps. #6222 2024-09-19 14:03:43 +05:30
Aditya Toshniwal 53cdc80df2 Add a new config variable - ALLOW_SPECIAL_EMAIL_DOMAINS to allow special domains for pgAdmin user emails. #6222 2024-09-19 10:51:06 +05:30
Anil Sahoo 38d4728333 Fixed an issue where the query is not getting executed after giving a password and connecting to the server on the not saved password server. #6502 2024-09-18 20:55:29 +05:30
Ashesh Vashi b0cd028ff8 Fixed an issue introduced due to reloading of the tree due to changes in particular preferences (#7942)
* Fix an issue - when the object browser tree is being recreated due to reloading for changes in some of the preferences. Tree object returns object from the previous instance as 'selected', but - it does not have the 'treeNodeInfo' available. In this special case - we would consider that there is no node selected at that particular moment, and pass information accordingly.

* Fixed 'New Connection' dialog issue after connecting a disconnected server.

* Disable the 'Add' button in the GridHeader with form, when 'canAdd'
flag is set to false.

* Convert the access path to string array for correct comparision.

* Check the access path type before comparison.
When language is 'c', set the 'code' block read-only.

* Enabled 'Strict' control for EPAS >= 95
2024-09-18 20:55:01 +05:30
Aditya Toshniwal 100f59f78b Fixed an issue where "Quit App" confirmation modal in desktop app is not respecting "Confirm on close or refresh?". #7890 2024-09-18 16:43:57 +05:30
Aditya Toshniwal 23ea201325 Fixed an issue where graph visualizer pie chart was showing X axis, Y axis and grid lines. 2024-09-18 15:07:29 +05:30
Ashesh Vashi 441cc57bb8 Don't show 'Types of objects' for the 'Cluster' operation. Fixes #7884 2024-09-18 07:48:09 +05:30
Anil Sahoo a361fd94ff Fixed an issue where the query gets executed automatically when the query tool opened using Create Script, Schema Diff. 2024-09-18 07:47:20 +05:30
Akshay Joshi acb0eb2141 Update version for release v8.12 2024-09-16 17:57:07 +05:30
Ashesh Vashi 315d1a40a4 Fixes issues #7884
* Introduced a 'exclude' option in the 'Field' to exclude it from the
change completely. Use the option 'exclude' to add field
'notNullColumns', which will be excluded from the data, but - can be
used to force rerender the 'Not Null Columns' select control on
change of it.

* Fixed the linter issue

* Rerender the cell as well, when dependent changes values. (#7884)

* Listen for the depenent changes even for the non-visible controls

* Use 'useRef' on every rendering to avoid the React 'Something wrong' page
2024-09-16 17:55:43 +05:30
Ashesh Vashi 92dd13e72a Introduced a 'exclude' option in the 'Field' to exclude it from the change.
* Introduced a 'exclude' option in the 'Field' to exclude it from the
change completely. Use the option 'exclude' to add field
'notNullColumns', which will be excluded from the data, but - can be
used to force rerender the 'Not Null Columns' select control on
change of it.

* Fixed the linter issue
2024-09-16 15:28:33 +05:30
Ashesh Vashi 0d39e791c9 Fixed the import-export 'Not null columns' and User Management issue #7884 2024-09-16 13:12:41 +05:30
Akshay Joshi 53760dbf59 Fixed tree related issues. 2024-09-16 10:09:28 +05:30
Yogesh Mahajan dd6f6cf1af Support OIDC in OAuth2 authentication. #7839 2024-09-16 08:36:54 +05:30
Ashesh Vashi 5e96f0fd61 Fixes the Variable Schema UI issues and InlineView bug reported in #7884
* Show the icon for the 'Reset' button. (Reference #7884)

* Reload the server list after connecting to a server in the 'New
connection' dialog (QueryTool). (Reference: #7884)

* Pass the grid path during the bulk update (click on a radio action)

* Don't assign the cell value to the 'rowValue' variable.

* Don't rely on the 'optionsLoaded' for setting the variable types as it
is loaded asynchronously, and variable types data may not be available
while rendering the 'value' cell. (Fixes #7884)

* Fixed a type while checking for the 'inline-group'. fixes (#7884)

* 'vnameOptions' can be a Promise function too, hence - taken care accrodingly.

* Introduced a parameter 'reloadOnDepChanges' in the BaseSchemaUI field
to force reload the control on value change for one of the
dependencies.

* Reload on the components in case of dependent value changes.

* Introduced 'useSchemaStateSubscriber', which generates a state
subscriber mananager instance. It helps multiple subscribers in a
single control as we could have multiple subscribe within a control.
(For example - value, options, errors, etc).

* Fixed all the issues reported (#7884)
2024-09-16 00:04:37 +05:30
Domenico Sgarbossa 98d703645c Italian translation for version 8.12 2024-09-16 00:02:41 +05:30
Libor M. cead7b0a6f Czech translation for version 8.12 2024-09-15 23:59:23 +05:30
Akshay Joshi 139d9e21da Update message catalogs for v8.12 2024-09-12 18:34:49 +05:30
Akshay Joshi d81bd595aa Updated release note 2024-09-11 13:07:13 +05:30
Pravesh Sharma ed211a2bbb Fixed an issue where servers listed in the servers.json file were being reimported upon container restart. #7811 2024-09-11 13:06:31 +05:30
Ashesh Vashi e21911b1c6 All the issues are fixed reported in #7884
* Show the icon for the 'Reset' button. (Reference #7884)

* Reload the server list after connecting to a server in the 'New
connection' dialog (QueryTool). (Reference: #7884)

* Pass the grid path during the bulk update (click on a radio action)

* Don't assign the cell value to the 'rowValue' variable.
2024-09-11 12:21:41 +05:30
Yogesh Mahajan d3d1eb3355 Fixed issue of migrating tunnel password with new master password mechanism. #7076 2024-09-09 17:38:22 +05:30
Akshay Joshi d8381918a7 Updated release note. 2024-09-09 14:35:41 +05:30
Ashesh Vashi e9af0c3226 Improved the extendability of the SchemaView and DataGridView. (#7876)
Restructured these modules for ease of maintenance and apply the single
responsibility principle (wherever applicable).

* SchemaView

 - Split the code based on the functionality and responsibility.
 - Introduced a new View 'InlineView' instead of using the
   'nextInline' configuration of the fields to have a better, and
   manageable view.
 - Using the separate class 'SchemaState' for managing the data and
   states of the SchemaView (separated from the 'useSchemaState'
   custom hook).
 - Introduced three new custom hooks 'useFieldValue',
   'useFieldOptions', 'useFieldError' for the individual control to
   use for each Schema Field.
 - Don't pass value as the parameter props, and let the
   'useFieldValue' and other custom hooks to decide, whether to
   rerender the control itself or the whole dialog/view. (single
   responsibility principle)
 - Introduced a new data store with a subscription facility.
 - Moving the field metadata (option) evaluation to a separate place
   for better management, and each option can be defined for a
   particular kind of field (for example - collection, row, cell,
   general, etc).
 - Allow to provide custom control for all kind of Schema field.

* DataGridView

 - Same as SchemaView, split the DataGridView call into smaller,
   manageable chunks. (For example - grid, row, mappedCell, etc).
 - Use context based approach for providing the row and table data
   instead of passing them as parameters to every component
   separately.
 - Have a facility to extend this feature separately in future.
   (for example - selectable cell, column grouping, etc.)
 - Separated the features like deletable, editable, reorder,
   expandable etc. cells using the above feature support.
 - Added ability to provide the CustomHeader, and CustomRow through the
   Schema field, which will extend the ability to customize better.
 - Removed the 'DataGridViewWithHeaderForm' as it has been achieved
   through providing 'CustomHeader', and also introduced
   'DataGridFormHeader' (a custom header) to achieve the same feature
   as 'DataGridViewWithHeaderForm'.
2024-09-09 14:27:31 +05:30
Khushboo Vashi e5012ea9c6 Add debug logs to observe the OpenID token response. 2024-09-04 19:46:40 +05:30
Yogesh Mahajan 306269af5d Fix issues found while testing keyring changes. #7076 2024-09-02 19:32:25 +05:30
Khushboo Vashi 6563067892 Update release notes. 2024-09-02 15:09:34 +05:30
Anil Sahoo 8bae604129 Fix the query tool restore connection issue on the server disconnection from the left side object explorer. #6502 2024-09-02 15:06:11 +05:30
Aditya Toshniwal f451f89d38 Cleanup yarn cache before bundling the installers to reduce size 2024-08-30 14:09:53 +05:30
Akshay Joshi 61413c1902 Update release note. 2024-08-30 12:27:03 +05:30
Pravesh Sharma f88ca891fa Added feature to restore preferences to their default values. #1900 2024-08-30 12:24:24 +05:30
Pravesh Sharma 445e89576b Fixed an issue where users could not use pgAdmin if they did not have access to the management database. #7571 2024-08-30 12:13:47 +05:30
Aditya Toshniwal 1a1734cf5c Allow running non-continuous selected SQL code blocks in the query tool. #7293 2024-08-29 12:41:58 +05:30
Akshay Joshi a0f7d0d50f Update JS and Python dependenies. 2024-08-29 10:35:51 +05:30
Yogesh Mahajan c4dc839d7c Fix issue found while testing keyring related changes. #7076 2024-08-28 11:46:04 +05:30
dependabot[bot] f5c1cd9df8 Javascript dependency: Bump css-loader from 6.11.0 to 7.1.2 in /web
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 6.11.0 to 7.1.2.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v6.11.0...v7.1.2)

---
updated-dependencies:
- dependency-name: css-loader
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-27 11:39:48 +05:30
dependabot[bot] 177653370a Javascript dependency: Bump @emotion/memoize from 0.7.5 to 0.9.0 in /web
Bumps [@emotion/memoize](https://github.com/emotion-js/emotion) from 0.7.5 to 0.9.0.
- [Release notes](https://github.com/emotion-js/emotion/releases)
- [Changelog](https://github.com/emotion-js/emotion/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emotion-js/emotion/compare/@emotion/memoize@0.7.5...@emotion/memoize@0.9.0)

---
updated-dependencies:
- dependency-name: "@emotion/memoize"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-27 11:39:03 +05:30
dependabot[bot] 6bf522da0f Python dependency: Bump python-mimeparse in /web/regression
Bumps [python-mimeparse](https://github.com/falconry/python-mimeparse) from 1.6.0 to 2.0.0.
- [Release notes](https://github.com/falconry/python-mimeparse/releases)
- [Commits](https://github.com/falconry/python-mimeparse/compare/1.6.0...2.0.0)

---
updated-dependencies:
- dependency-name: python-mimeparse
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-27 11:38:30 +05:30
dependabot[bot] 922603975f Javascript dependency: Bump stylis from 4.3.3 to 4.3.4 in /web
Bumps [stylis](https://github.com/thysultan/stylis.js) from 4.3.3 to 4.3.4.
- [Commits](https://github.com/thysultan/stylis.js/commits)

---
updated-dependencies:
- dependency-name: stylis
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-27 11:37:49 +05:30
dependabot[bot] 7284f98c79 Javascript dependency: Bump electron-context-menu in /runtime
Bumps [electron-context-menu](https://github.com/sindresorhus/electron-context-menu) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/sindresorhus/electron-context-menu/releases)
- [Commits](https://github.com/sindresorhus/electron-context-menu/compare/v4.0.1...v4.0.2)

---
updated-dependencies:
- dependency-name: electron-context-menu
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-27 11:37:29 +05:30
dependabot[bot] 8bbc6ecdb8 Javascript dependency: Bump axios from 1.7.4 to 1.7.5 in /runtime
Bumps [axios](https://github.com/axios/axios) from 1.7.4 to 1.7.5.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.4...v1.7.5)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-27 11:37:08 +05:30
dependabot[bot] 7cbde91140 Javascript dependency: Bump eslint from 9.9.0 to 9.9.1 in /runtime
Bumps [eslint](https://github.com/eslint/eslint) from 9.9.0 to 9.9.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.9.0...v9.9.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-27 11:36:52 +05:30
Domenico Sgarbossa 5bdff56b8d Italian translation update for v8.12 2024-08-23 10:41:48 +05:30
Akshay Joshi 96ce010635 Added release note for v8.12 2024-08-22 17:47:40 +05:30
Aditya Toshniwal 47fcf87ae4 Update JS and Python packages 2024-08-22 17:20:50 +05:30
Yogesh Mahajan 1257ec9969 Revamp the current password saving implementation to keyring and reducing repeated OS user password prompts. #7076
The new implementation will store the master password in the keyring instead of storing each and every server password separately. The master password will be used to encrypt/decrypt server password when storing in the pgAdmin config DB.
2024-08-22 16:44:57 +05:30
Aditya Toshniwal cda7d7de90 Fix a crash issue on RHEL based OS's occurring when File menu is clicked. 2024-08-20 16:33:12 +05:30
Aditya Toshniwal e7981c7f11 Fix windows, linux builds as pgAdmin 4 desktop is not opening. 2024-08-20 13:05:59 +05:30
Aditya Toshniwal ba87cbecfd Update release notes. 2024-08-19 15:17:24 +05:30
Akshay Joshi bf6b963c45 Update version for release v8.11 2024-08-19 15:09:49 +05:30
Libor M. 9f8acfc51d Czech translation for version 8.11 2024-08-19 15:07:19 +05:30
Ashesh Vashi 8cf316b853 Fixed some of the issues reported due to introduction of the custom hook 'useSchemaState'. #7776 2024-08-19 09:53:00 +05:30
Akshay Joshi 55817f685f Updated message catalogs for v8.11 2024-08-15 21:36:39 +05:30
Aditya Toshniwal 35d585251a Upgrade xterm realted packages to the latest @xterm based namespace. 2024-08-14 18:15:03 +05:30
Aditya Toshniwal 242dd48cbd Improve code highlighting in query editor. #7748 2024-08-14 16:48:51 +05:30
dependabot[bot] 30134800f3 Javascript dependency: Bump axios from 1.7.3 to 1.7.4 in /runtime (#7813)
Bumps [axios](https://github.com/axios/axios) from 1.7.3 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.3...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-14 11:17:49 +05:30
dependabot[bot] e517fdf6bc Javascript dependency: Bump axios from 1.7.2 to 1.7.4 in /web (#7814)
Bumps [axios](https://github.com/axios/axios) from 1.7.2 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.2...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-14 11:17:27 +05:30
Aditya Toshniwal b00ea3cd99 Update release notes. 2024-08-14 11:12:30 +05:30
Pravesh Sharma c0b6c8726e Add a home button to the geometry viewer to set original zoom level when the viewer was opened. #2046 2024-08-14 11:09:28 +05:30
Rohit Bhati 52c550e3fe Fix an issue where ERD tool should to be able to open saved pgerd file when using keyboard shortcuts. #7688 2024-08-13 14:30:58 +05:30
Aditya Toshniwal 57e72ce598 Fixed bugs found when testing react-data-grid upgrade changes. #7705 2024-08-13 13:00:52 +05:30
Aditya Toshniwal ba3deb5b9b Fixed paths for Flatpak broken after Electron changes. #7793 2024-08-12 13:32:58 +05:30
Khushboo Vashi fb0022923a Fix import Export Server loading issue, affected due to SchemaView component changes. 2024-08-12 11:27:21 +05:30
dependabot[bot] ccaea82341 Javascript dependency: Bump svgo from 2.8.0 to 3.3.2 in /web
Bumps [svgo](https://github.com/svg/svgo) from 2.8.0 to 3.3.2.
- [Release notes](https://github.com/svg/svgo/releases)
- [Commits](https://github.com/svg/svgo/compare/v2.8.0...v3.3.2)

---
updated-dependencies:
- dependency-name: svgo
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-12 11:23:30 +05:30
dependabot[bot] 1a143c9e2c Python dependency: Update setuptools requirement in /web/regression
Updates the requirements on [setuptools](https://github.com/pypa/setuptools) to permit the latest version.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v71.0.0...v72.1.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-08 17:19:46 +05:30
dependabot[bot] 23d15bde8b Python dependency: Update setuptools requirement from ==71.* to ==72.*
Updates the requirements on [setuptools](https://github.com/pypa/setuptools) to permit the latest version.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v71.0.0...v72.1.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-08 17:19:29 +05:30
dependabot[bot] 49c55b41a2 Javascript dependency: Bump @mui/icons-material in /web
Bumps [@mui/icons-material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-icons-material) from 5.16.5 to 5.16.6.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/v5.16.6/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/v5.16.6/packages/mui-icons-material)

---
updated-dependencies:
- dependency-name: "@mui/icons-material"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-08 17:18:50 +05:30
dependabot[bot] 4f822c8021 Javascript dependency: Bump @tanstack/react-virtual in /web
Bumps [@tanstack/react-virtual](https://github.com/TanStack/virtual/tree/HEAD/packages/react-virtual) from 3.8.3 to 3.8.4.
- [Release notes](https://github.com/TanStack/virtual/releases)
- [Commits](https://github.com/TanStack/virtual/commits/v3.8.4/packages/react-virtual)

---
updated-dependencies:
- dependency-name: "@tanstack/react-virtual"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-08 17:18:30 +05:30
Akshay Joshi c3801165a5 Set the yarn version for Wheel Package. 2024-08-08 15:01:27 +05:30
dependabot[bot] fdf58f2d85 Python dependency: Update keyring requirement in /web/regression
Updates the requirements on [keyring](https://github.com/jaraco/keyring) to permit the latest version.
- [Release notes](https://github.com/jaraco/keyring/releases)
- [Changelog](https://github.com/jaraco/keyring/blob/main/NEWS.rst)
- [Commits](https://github.com/jaraco/keyring/compare/v24.0.0...v25.2.1)

---
updated-dependencies:
- dependency-name: keyring
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-08 13:42:32 +05:30
dependabot[bot] 9a3b3530a6 Python dependency: Update keyring requirement from ==24.* to ==25.*
Updates the requirements on [keyring](https://github.com/jaraco/keyring) to permit the latest version.
- [Release notes](https://github.com/jaraco/keyring/releases)
- [Changelog](https://github.com/jaraco/keyring/blob/main/NEWS.rst)
- [Commits](https://github.com/jaraco/keyring/compare/v24.0.0...v25.2.1)

---
updated-dependencies:
- dependency-name: keyring
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-08 13:42:16 +05:30
dependabot[bot] b280c91013 Javascript dependency: Bump svgo-loader from 2.2.2 to 4.0.0 in /web
Bumps [svgo-loader](https://github.com/svg/svgo-loader) from 2.2.2 to 4.0.0.
- [Release notes](https://github.com/svg/svgo-loader/releases)
- [Commits](https://github.com/svg/svgo-loader/commits/v4.0.0)

---
updated-dependencies:
- dependency-name: svgo-loader
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-08 13:19:48 +05:30
dependabot[bot] 95f6a63c70 Javascript dependency: Bump xterm-addon-search in /web (#7758)
Bumps [xterm-addon-search](https://github.com/xtermjs/xterm.js) from 0.8.2 to 0.13.0.
- [Release notes](https://github.com/xtermjs/xterm.js/releases)
- [Commits](https://github.com/xtermjs/xterm.js/commits/0.13)

---
updated-dependencies:
- dependency-name: xterm-addon-search
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-08 13:14:22 +05:30
dependabot[bot] 96965797f6 Javascript dependency: Bump xterm from 4.19.0 to 5.3.0 in /web
Bumps [xterm](https://github.com/xtermjs/xterm.js) from 4.19.0 to 5.3.0.
- [Release notes](https://github.com/xtermjs/xterm.js/releases)
- [Commits](https://github.com/xtermjs/xterm.js/compare/4.19.0...5.3.0)

---
updated-dependencies:
- dependency-name: xterm
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-08 13:14:02 +05:30
dependabot[bot] 7b5d96c5a6 Javascript dependency: Bump axios from 1.7.2 to 1.7.3 in /runtime
Bumps [axios](https://github.com/axios/axios) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.2...v1.7.3)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-08 13:12:54 +05:30
Akshay Joshi 00e2480b7b 1) Fixed an issue where refreshing the Schema Diff tool opened in a new tab caused an error. #7499
2) Fixed an issue where the Generate Script ignored filter conditions when a parent node was selected. #7682
2024-08-08 13:02:38 +05:30
Khushboo Vashi f98e3fa1fd Update release note. 2024-08-07 14:50:55 +05:30
Rohit Bhati 81d8ea56f8 Fix server heartbeat logging error after deleting the server. #7540 2024-08-07 14:32:48 +05:30
Pravesh Sharma 654dc0e2d7 Fixed an issue where the value in the find box is not updating with selected text in editor if find is already open and re-triggered. #7775 2024-08-06 11:59:22 +05:30
Khushboo Vashi b4e4b9d498 Fix an issue where the wheel package is not getting installed on the arm64-based macOS version < 14. #7754 2024-08-05 12:31:28 +05:30
Ashesh Vashi 52af8d3e49 Introduce custom React Hook useSchemaState to simplify SchemaView component. #7776
Changes include: 
- Simplify current SchemaView code
- Add ability to reuse the schema data & state management implementation outside the SchemaDialogView component.
- Further split components in small and manageable separate files.
- Removed the 'DepListenerContext' context as there was no need for separate context.
- Added a reload functionality in the 'useSchemaState'
- Changes in feature tests.
2024-08-02 09:59:01 +05:30
Aditya Toshniwal 546806c40c Always use latest version of Electron in package.json and in builds 2024-08-01 16:03:05 +05:30
Aditya Toshniwal ca7e93cc2c Fix failing windows builds by using Yarn v3 2024-08-01 15:00:30 +05:30
Aditya Toshniwal 4ee76ba8c9 Build changes to sign pgAdmin4.exe and use yarn v3 on linux builds 2024-08-01 13:18:01 +05:30
Rohit Bhati 5d7ec14076 Fixed delete object(shortcut key) affecting both text and Object Explorer items. #7683 2024-08-01 11:48:16 +05:30
Akshay Joshi 88f033e2a8 Update release note 2024-08-01 11:38:23 +05:30
Pravesh Sharma 2e878a3fb2 Fixed an issue where the REVOKE statement in the create script was throwing an error if the role contained special characters. #7737 2024-08-01 11:34:00 +05:30
Aditya Toshniwal c6e7ce03cc Upgrade react-data-grid fork to latest and change pgAdmin accordingly. #7705 2024-07-31 19:12:36 +05:30
Kundan c45fb47b08 Make PgTreeView react component more customisable 2024-07-31 14:07:47 +05:30
Akshay Joshi d39fe78239 Added release note for v8.11 2024-07-31 11:34:29 +05:30
Pravesh Sharma 0399d0be15 Updated the documentation for web server authentication. #7728 2024-07-31 11:26:19 +05:30
Rohit Bhati 19237fe247 Fixed an issue where delete object(shortcut key) affecting both text and Object Explorer items. #7683 2024-07-31 11:25:08 +05:30
Akshay Joshi 729c370125 Fixed build issues after package upgrade. 2024-07-30 13:41:56 +05:30
Akshay Joshi 636c224bd0 Updated JavaScript and Python packages according to Dependabot recommendations 2024-07-29 19:34:43 +05:30
Aditya Toshniwal ab25238f17 Fix an issue where file dialog is not focussed on open in electron. 2024-07-29 10:18:39 +05:30
Khushboo Vashi b9ffbf73e0 Fixed an issue where only psycopg-binary should be installed but PIP wheel installing psycopg-c as well. 2024-07-29 10:16:42 +05:30
Aditya Toshniwal 23cad47f8d Fix a syntax error in postinst when installing Ubuntu 24 deb package 2024-07-25 19:26:12 +05:30
Aditya Toshniwal 5fd308aafc Show OS name and version details in about dialog for Linux platforms. 2024-07-25 17:51:31 +05:30
Aditya Toshniwal 88bee071e5 Make sure AppArmor profile is added only for Ubuntu 24 and above. 2024-07-25 17:27:18 +05:30
Khushboo Vashi 1fcb1f0228 Fix Dashboard UI issues. 2024-07-25 12:43:02 +05:30
Aditya Toshniwal 9544ce1d18 Add apparmor profile for pgAdmin when installing on Debian based OS 2024-07-25 11:40:19 +05:30
Akshay Joshi 8cf15ea17c Change the release date in the release note. 2024-07-24 15:47:42 +05:30
Khushboo Vashi bc10fa5c03 Fix an issue where a cloud instance deployment fails due to wrong import. 2024-07-24 15:34:30 +05:30
Aditya Toshniwal 1d5f5a2067 Fixed an issue where ERD Open/Save shorcuts were not working on Windows/Linux. #7639 2024-07-24 15:11:05 +05:30
jcodeio 70a7c42be1 Set the MFA OTP field to be a normal textbox to eliminate the save password prompt. 2024-07-24 15:00:27 +05:30
Khushboo Vashi d0e6090761 Fix Dashboard State refresh issue with the active sessions only. 2024-07-24 13:45:52 +05:30
Akshay Joshi 87ba177ff3 Fixed linter error. 2024-07-24 13:02:46 +05:30
Akshay Joshi 0511554db9 The following issues have been fixed:
1) White screen issue after closing the Macro dialog.
2) Schema Diff database and schema selection issue.
3) CSV download issue.
2024-07-24 12:54:20 +05:30
Aditya Toshniwal 026292f07b Fix tab focus issue when closing query tool using keyboard shortcut. #6572 2024-07-23 17:02:39 +05:30
Aditya Toshniwal 18d507780d Hide the 'Toggle Full Screen' menu on Linux as it hides the top menu completely making the app unable to use. #7494 2024-07-23 15:17:29 +05:30
Khushboo Vashi 3aedae1436 Call loadNextPage function only when it is required while loading the table. 2024-07-22 14:15:03 +05:30
Akshay Joshi 9cbb9a3d24 Update version for release 8.10 2024-07-22 11:34:28 +05:30
Rohit Bhati b173fda116 Fix tab focus issue while deleting multiple tabs using shortcut key. #6572 2024-07-22 11:32:26 +05:30
Libor M. d9ccef94a2 Czech translation for version 8.10 2024-07-22 11:20:35 +05:30
Akshay Joshi eff63931f2 Update message catalogs. 2024-07-19 15:23:19 +05:30
Pravesh Sharma 3ec676194b Fixed an issue where boolean values in node details of graphical explain plan were not interpreted correctly. #7662 2024-07-18 17:59:58 +05:30
Rohit Bhati 8030bc708b Add support for highlighting selection matches in the query editor. #7530 2024-07-18 17:51:20 +05:30
Khushboo Vashi fd78faf0cc Update release notes. 2024-07-18 14:30:45 +05:30
Pravesh Sharma bfcdcdc4f1 Add a precautionary check for the query tool connection cursor to fix the error 'NoneType' object has no attribute '_query'. #7660 2024-07-18 14:24:50 +05:30
Pravesh Sharma a75273a714 Updated entrypoint.sh to utilize the email-validator package for email validation. #7297 2024-07-18 11:05:37 +05:30
Khushboo Vashi c9cc5257c7 Fix Server Log minor UI issues. 2024-07-18 09:40:49 +05:30
Aditya Toshniwal 3b4fa40253 Update release notes. 2024-07-17 18:22:51 +05:30
Rohit Bhati 9ee896aac4 Add a keyboard shortcut to close active tab panel. #6572 2024-07-17 18:19:36 +05:30
Aditya Toshniwal 01cb1839f8 Fix git commit hash details for pip build. #7623
Skip regression folder when creating pip builds to reduce bundle size.
2024-07-17 14:30:02 +05:30
Yogesh Mahajan 1eb07608e9 Ensure processes related notifiers disappears. #7219 2024-07-17 13:07:52 +05:30
Aditya Toshniwal 8e16e000c3 Fix issues found in electron testing. #7494 2024-07-16 20:29:10 +05:30
Akshay Joshi 64d7c2c62d Update release notes. 2024-07-16 17:52:15 +05:30
Yogesh Mahajan e028ebc152 Ensure pgadmin does not try to connect to the server if saved password is not available. #7679 2024-07-16 17:46:40 +05:30
Anil Sahoo 30051f3257 Fixed an issue where Reassign/Drop Owned dialog not opening for Role. #7663 2024-07-16 17:42:16 +05:30
Yogesh Mahajan c4a52687b6 Ensure that pgAdmin works when opened in an iframe. #7681 2024-07-16 16:32:52 +05:30
Pravesh Sharma a06c13623d Fixed an issue where theme preview under theme options was broken in pgAdmin server mode. #7626 2024-07-16 10:25:48 +05:30
Khushboo Vashi b303693ae8 Fix Dashboard minor UI issues.
Fix the issue where PG logs doesn't display in CSV or JSON format even if it gets selected through the UI.
2024-07-11 10:26:42 +05:30
Khushboo Vashi 6b012193e3 Pin Psycopg Binary packages to 3.1.19 for the ARM64 MacOS platform wheel packages. 2024-07-10 17:43:13 +05:30
Aditya Toshniwal cd6ff48cc0 Fix query tool, ERD closing issue in Electron. #7494 2024-07-10 15:01:35 +05:30
Aditya Toshniwal dbdea181a9 Fixed an issue where pop-up notifications from Object Explorer wouldn't get dismissed automatically if the Query Tool was opened. #6571 2024-07-09 16:25:04 +05:30
Rohit Bhati 721a5da895 Fixed an issue where Generate Script button should be disabled if no objects are selected in the schema diff result. #7638 2024-07-09 13:44:04 +05:30
Khushboo Vashi 8578acd915 Update release notes. 2024-07-09 12:57:48 +05:30
Pravesh Sharma f3c95d9643 Fix an issue where the preferences JSON file has no effect when an external database is used. #7618 2024-07-09 12:52:23 +05:30
Anil Sahoo 5c5b61c4db Fixed an issue where paste operation in query tool data grid should skip bytea columns and put the value as NULL instead. #3199 2024-07-09 10:33:29 +05:30
Aditya Toshniwal 760e38293c Fix issues found during Electron testing. #7494
Fix application crash when using users dialog. #7607
2024-07-08 19:24:29 +05:30
Aditya Toshniwal dcfef154ce - Set the browser target to ES6 and reduce the JS bundle size considerably
- Upgrade ESLint to v9.x and migrate the .eslintrc.js file to make it work
2024-07-04 18:25:47 +05:30
Pravesh Sharma 10b2e91e29 Update react-diagrams library which is used in ERD to the latest version. #7644
Added patch for DataGridView failing when adding a new row.
2024-07-03 18:19:27 +05:30
Khushboo Vashi 4f415f9768 Added support for viewing PostgreSQL Server Logs in Text, CSV and JSON formats. #3981 2024-07-03 16:17:29 +05:30
Akshay Joshi 93b5bc6bf8 Update release note. 2024-07-03 11:54:49 +05:30
Aditya Toshniwal 60c2d0e23b Update more JS packages. 2024-07-03 11:46:16 +05:30
dependabot[bot] c44710c9d7 Javascript dependency: Bump @eslint/js from 9.5.0 to 9.6.0 in /runtime (#7646)
Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.5.0 to 9.6.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.6.0/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-02 11:49:44 +05:30
dependabot[bot] 37e034b3ef Python dependency: Bump psycopg[c] in /web/regression
Bumps [psycopg[c]](https://github.com/psycopg/psycopg) from 3.1.19 to 3.2.1.
- [Changelog](https://github.com/psycopg/psycopg/blob/master/docs/news.rst)
- [Commits](https://github.com/psycopg/psycopg/compare/3.1.19...3.2.1)

---
updated-dependencies:
- dependency-name: psycopg[c]
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-02 11:49:10 +05:30
dependabot[bot] adb8fdb096 Python dependency: Bump psycopg[c] from 3.1.19 to 3.2.1
Bumps [psycopg[c]](https://github.com/psycopg/psycopg) from 3.1.19 to 3.2.1.
- [Changelog](https://github.com/psycopg/psycopg/blob/master/docs/news.rst)
- [Commits](https://github.com/psycopg/psycopg/compare/3.1.19...3.2.1)

---
updated-dependencies:
- dependency-name: psycopg[c]
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-02 11:48:54 +05:30
Rohit Bhati 22cdb86aab Fix issue with missing new added records in download file. #5345 2024-07-02 11:48:13 +05:30
Akshay Joshi 576dc55615 Fixed the permission denied issue for functions of the pgstattuple extension when accessing statistics with a non-admin user. #7035 2024-07-02 11:47:43 +05:30
Aditya Toshniwal f8fa1cf6d6 - Fix few SonarQube issues.
- Cleanup NW.js related stuff.
2024-07-02 10:34:30 +05:30
Aditya Toshniwal 3bb9f0ba8c Remove support for Python 3.7 as Debian 10 is EOL. 2024-07-01 12:39:12 +05:30
Aditya Toshniwal 91eb60a363 Replace pgAdmin NW.js container with Electron container. #7494 2024-07-01 11:27:42 +05:30
Pravesh Sharma 4457a6a6a1 Updated to the latest version of the Notistack library. #7501 2024-07-01 11:26:45 +05:30
Akshay Joshi 6f8cde67a6 Update release note. 2024-06-28 15:09:34 +05:30
Pravesh Sharma 391db5131d Fixed an issue where sorting the database activity table on the dashboard by any column caused the details to expand in the wrong position. #7554 2024-06-28 14:47:26 +05:30
Pravesh Sharma 62a61b403e Fixed an issue where users could not autofill their saved passwords in the connect server dialog in the browser. #7627 2024-06-28 14:44:39 +05:30
Aditya Toshniwal e8f108154d Fix build failures. 2024-06-27 18:03:10 +05:30
Akshay Joshi ccd84b7c2a Update JS packages. 2024-06-27 14:08:01 +05:30
dependabot[bot] 522f3458f6 Python dependency: Update psutil requirement in /web/regression
Updates the requirements on [psutil](https://github.com/giampaolo/psutil) to permit the latest version.
- [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst)
- [Commits](https://github.com/giampaolo/psutil/compare/release-5.9.0...release-6.0.0)

---
updated-dependencies:
- dependency-name: psutil
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-27 13:26:38 +05:30
dependabot[bot] 7efed95ac3 Python dependency: Update psutil requirement from ==5.9.* to ==6.0.*
Updates the requirements on [psutil](https://github.com/giampaolo/psutil) to permit the latest version.
- [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst)
- [Commits](https://github.com/giampaolo/psutil/compare/release-5.9.0...release-6.0.0)

---
updated-dependencies:
- dependency-name: psutil
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-27 13:25:47 +05:30
dependabot[bot] 754cd223c1 Python dependency: Bump selenium in /web/regression
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.21.0 to 4.22.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.21.0...selenium-4.22.0)

---
updated-dependencies:
- dependency-name: selenium
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-27 13:23:57 +05:30
dependabot[bot] a0b7dcca64 Python dependency: Bump azure-identity in /web/regression
Bumps [azure-identity](https://github.com/Azure/azure-sdk-for-python) from 1.16.1 to 1.17.1.
- [Release notes](https://github.com/Azure/azure-sdk-for-python/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/esrp_release.md)
- [Commits](https://github.com/Azure/azure-sdk-for-python/compare/azure-identity_1.16.1...azure-identity_1.17.1)

---
updated-dependencies:
- dependency-name: azure-identity
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-27 13:23:39 +05:30
dependabot[bot] 8876183981 Python dependency: Bump azure-identity from 1.16.1 to 1.17.1
Bumps [azure-identity](https://github.com/Azure/azure-sdk-for-python) from 1.16.1 to 1.17.1.
- [Release notes](https://github.com/Azure/azure-sdk-for-python/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/esrp_release.md)
- [Commits](https://github.com/Azure/azure-sdk-for-python/compare/azure-identity_1.16.1...azure-identity_1.17.1)

---
updated-dependencies:
- dependency-name: azure-identity
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-27 13:23:20 +05:30
Aditya Toshniwal feb3093c6d Automatically apply virtualization in the DataGridView of SchemaView if the schema contains only one collection. #7607 2024-06-27 13:21:18 +05:30
Aditya Toshniwal 6f96f67655 Add the git commit hash details to the About dialog. #7623 2024-06-27 13:20:00 +05:30
Akshay Joshi 3be2221948 Ensure that pgAdmin 4 is compatible with PostgreSQL v17. #7537 2024-06-27 13:18:26 +05:30
Akshay Joshi 7d0bbf30ec Fixed the issue causing the 2FA dialog to appear distorted. 2024-06-25 14:46:30 +05:30
Akshay Joshi 9933a9a9e5 Update version for release v8.9 2024-06-24 20:10:25 +05:30
Akshay Joshi 227f047810 Revert last commit as attr not working. 2024-06-24 19:08:33 +05:30
Khushboo Vashi 95ce9e976e Set the pgAdmin executable file permissions to 755 for the web rpm build. 2024-06-24 18:20:19 +05:30
Khushboo Vashi 4a645343a9 Give the proper file/directory permissions to the pgAdmin installation directory on RHEL-8. This is the only platform that has write permission for the executable files after installation which is fixed. 2024-06-24 17:09:28 +05:30
Khushboo Vashi 3d107ea618 One more attempt to set RHEL-8 file permissions. 2024-06-24 16:05:22 +05:30
Libor M 19f5e41b09 Czech translation for version 8.9 2024-06-24 11:55:52 +05:30
Khushboo Vashi f7eeefa3a9 Fix file permissions for RHEL 8. 2024-06-24 10:54:39 +05:30
Yogesh Mahajan a8f0f5bb4f Fix one more styling issue broken due to JSS changes. #7363 2024-06-24 10:44:05 +05:30
Aditya Toshniwal 44d40f0785 Fixed an issue where delete button in Users data was enabled for incorrect rows. #7616 2024-06-24 10:31:47 +05:30
Domenico Sgarbossa d0b2752fea Italian translation updated for v8.9 2024-06-21 13:14:48 +05:30
Akshay Joshi 8e0c080faf Update message catalogs for v8.9 2024-06-20 18:12:16 +05:30
Yogesh Mahajan 6410ae5f69 Fixed some more styling issues broken due to JSS changes. #7363 2024-06-20 17:18:38 +05:30
Khushboo Vashi a60cbf00c8 Do not change the file permission for the Redhat installation directory. 2024-06-20 17:11:23 +05:30
Akshay Joshi 3e7a220225 Fixed an issue where the schema diff incorrectly marked tables as different due to schema-qualified trigger functions in the trigger definitions. #7523 2024-06-20 16:55:38 +05:30
Aditya Toshniwal 9026f46220 Fixed an issue where object explorer toolbar button not showing shortcut in the tooltip.#7316 2024-06-20 11:31:11 +05:30
Yogesh Mahajan fedbe550db Optimise logic used for OS theme syncing. #5932 2024-06-20 11:05:47 +05:30
Khushboo Vashi 2b45a1f7d5 Fix Redhat installation directory permission. 2024-06-20 10:39:24 +05:30
Aditya Toshniwal 31a91409a0 Fixed incorrect sorting of size in statistics tab. #7542 2024-06-19 18:27:43 +05:30
Aditya Toshniwal 9279393dcd Add missing files from last commit. #7593 2024-06-19 17:57:34 +05:30
Aditya Toshniwal 20caa63508 Fixed an issue where query tool auto-complete stops working after connection change. #7593 2024-06-19 17:55:40 +05:30
Akshay Joshi 6984e97f8d Use correct for loop syntax. 2024-06-19 13:15:45 +05:30
Yogesh Mahajan 95ffd1b9a1 More fixes for issues reported while testing changes related to makeStyle JSS changes and auto-theme. #7363 2024-06-19 11:54:18 +05:30
Akshay Joshi 4c5639bee6 Correct the alignment. 2024-06-18 18:25:38 +05:30
Kolja d4b72e2d89 Detect if pgAdmin is running in Flatpak. 2024-06-18 18:22:13 +05:30
Akshay Joshi 0452828cc7 1) Change the cursor to a pointer for JSON editor toolbar buttons.
2) Remove the extra scrollbar in JSON editor.
3) Set the focus on the PSQL tool.
2024-06-18 16:42:17 +05:30
Aditya Toshniwal 007c4840c2 Fix failing feature tests 2024-06-18 14:02:23 +05:30
Akshay Joshi 2b04f3ca1d Fixed incorrect handling of the code smell for the reject API call 2024-06-17 18:22:38 +05:30
Anil Sahoo 3706c3126a Fixed migration failure while using external database. #7556 2024-06-17 18:12:31 +05:30
Rohit Bhati 1ba9f005a7 Ensure that user should be able to clear comments in RLS Policy. 2024-06-17 18:11:57 +05:30
Aditya Toshniwal c3d6f8887a Fixed an issue where syntax highlighting is incorrect for C-Style escape string. #7485 2024-06-17 17:05:36 +05:30
Aditya Toshniwal 439d6cb28f Fixed an issue where backslash breaks syntax highlighting. #7528 2024-06-17 16:16:15 +05:30
Yogesh Mahajan b0e7847962 Fixed bugs found while testing makeStyles JSS changes. #7363 2024-06-17 15:45:40 +05:30
Anil Sahoo a946c70869 Fixed an issue where changing a column name should reflect in all the constraints in table object dialog and ERD table dialog. #7476 2024-06-17 14:07:45 +05:30
Akshay Joshi 5866da8194 Fixed SonarQube code smells. 2024-06-13 18:48:02 +05:30
Aditya Toshniwal ad34ee2699 Fixed new line indentation in query editor and add a user preference to disable it. #7295 2024-06-13 18:06:13 +05:30
Aditya Toshniwal e03d65d547 Fixed an issue where query tool shortcuts for find/replace are not working. #7555 2024-06-13 17:26:47 +05:30
Pravesh Sharma b5c8692f34 Fixed an issue where resizable data editors in query tool should not be allowed to resize beyond the app window bounds. #7241 2024-06-13 14:07:44 +05:30
Akshay Joshi f96977733f Downgrade some more packages to ensure compatibility with Debian 10 2024-06-13 12:27:24 +05:30
Akshay Joshi 33bd02d337 Downgrade boto3 to ensure compatibility with Debian 10. 2024-06-13 11:26:15 +05:30
Akshay Joshi ab01dde2ba Fixed RESQL test case. 2024-06-12 18:46:12 +05:30
Akshay Joshi dea5335ce5 Fixed the following SonarQube code smells:
1) Do not use the Array index in keys.
2) Import from the same module should be merged.
3) Mutable variables should not be exported.
4) Variables should not be initialized to undefined.
5) startswith or endswith method should be used.
6) Unwrap this unnecessarily grouped subpattern.

Additionally, addressed many other SonarQube rules.
2024-06-12 18:09:06 +05:30
Rohit Bhati 288fd7ed12 Add support for comments on RLS policy object. #7414 2024-06-12 17:18:55 +05:30
Rohit Bhati c98cea2ea9 Search Objects dialog should focus on search input on open. #7536 2024-06-12 17:17:35 +05:30
Aditya Toshniwal 056aff4742 Revert the changes done for removing support for Python 3.7 2024-06-12 16:23:27 +05:30
Yogesh Mahajan 6357672387 Provide an option to set the theme based on the OS theme. #5932 2024-06-12 16:18:37 +05:30
Yogesh Mahajan bdadc77235 Ensure preferences can be loaded using preferences.json. #7516 2024-06-12 12:07:28 +05:30
dependabot[bot] 0cb75bdcab Python dependency: Bump azure-identity in /web/regression
Bumps [azure-identity](https://github.com/Azure/azure-sdk-for-python) from 1.16.0 to 1.16.1.
- [Release notes](https://github.com/Azure/azure-sdk-for-python/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/esrp_release.md)
- [Commits](https://github.com/Azure/azure-sdk-for-python/compare/azure-identity_1.16.0...azure-identity_1.16.1)

---
updated-dependencies:
- dependency-name: azure-identity
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-12 11:44:55 +05:30
dependabot[bot] bc3052ed1b Python dependency: Bump testtools from 2.7.1 to 2.7.2 in /web/regression
Bumps [testtools](https://github.com/testing-cabal/testtools) from 2.7.1 to 2.7.2.
- [Release notes](https://github.com/testing-cabal/testtools/releases)
- [Changelog](https://github.com/testing-cabal/testtools/blob/master/NEWS)
- [Commits](https://github.com/testing-cabal/testtools/compare/2.7.1...2.7.2)

---
updated-dependencies:
- dependency-name: testtools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-12 11:44:31 +05:30
Akshay Joshi df2f3460f0 Fix the following SonarQube code smells:
1) Use the "RegExp.exec()" method instead.
2) Remove parameter form or provide default value.
3) Extract this nested ternary operation into an independent statement.
4) Replace this character class by the character itself.
5) Unnecessary use of conditional expression for default assignment.
6) Prefer using an optional chain expression instead, as it's more concise and easier to read.
2024-06-11 18:07:22 +05:30
Aditya Toshniwal bdf4f39b2b - Update release notes.
- Update more JS packages.
2024-06-11 15:28:21 +05:30
Yogesh Mahajan fff192eb95 Ensure that a user can connect to a server using SSL certificates and identity files from a shared storage. #7306 2024-06-11 14:48:11 +05:30
Akshay Joshi c47390e643 Fixed API test cases for BatchProcess 2024-06-11 12:59:48 +05:30
Ahmad fd944280f1 Fixed an issue where dark theme shows white background when all tabs are closed. #7481 2024-06-11 12:03:43 +05:30
Khushboo Vashi fa71b06874 Set the permission for the installation directory without fakeroot. 2024-06-11 10:41:47 +05:30
Khushboo Vashi 591308fbe8 chmod doesn't work with fakeroot in a single command. 2024-06-10 18:45:44 +05:30
Akshay Joshi a03b513389 Revert changes for yarn.lock 2024-06-10 18:15:05 +05:30
Akshay Joshi 8857f0d179 Fix SonarQube code smells:
1) String literals should not be duplicated.
2) Prefer using an optional chain expression instead, as it's more concise and easier to read.
3) Expected the Promise rejection reason to be an Error.
2024-06-10 18:04:32 +05:30
Khushboo Vashi 2d2aa45ec5 Another attempt to fix Debian installation directory permission. 2024-06-10 16:50:59 +05:30
Khushboo Vashi ba5b66ff4f Fix Debian installation directory permission. 2024-06-10 16:11:09 +05:30
oon arfiandwiandWeblate Admin 285e3afeee Indonesian translation for version 8.9
* Added translation using Weblate (Indonesian)

* Added translation using Weblate (Indonesian)

* Translated using Weblate (Indonesian)

---------

Co-authored-by: Weblate Admin <admin@example.com>
2024-06-10 11:33:03 +05:30
Akshay Joshi b3cf9ce185 Unpin dnspython from 'regression/requirements.txt' as eventlet issue is fixed. 2024-06-07 17:52:46 +05:30
dependabot[bot] 18deb16e36 Python dependency: Bump pbr from 5.11.1 to 6.0.0 in /web/regression
Bumps [pbr](https://docs.openstack.org/pbr/latest/) from 5.11.1 to 6.0.0.

---
updated-dependencies:
- dependency-name: pbr
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-07 16:53:22 +05:30
dependabot[bot] 1a1266a5d6 Python dependency: Bump azure-identity from 1.15.0 to 1.16.0
Bumps [azure-identity](https://github.com/Azure/azure-sdk-for-python) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/Azure/azure-sdk-for-python/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/esrp_release.md)
- [Commits](https://github.com/Azure/azure-sdk-for-python/compare/azure-identity_1.15.0...azure-identity_1.16.0)

---
updated-dependencies:
- dependency-name: azure-identity
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-07 16:49:53 +05:30
dependabot[bot] 7cdcaa0533 Python dependency: Bump azure-mgmt-resource in /web/regression
Bumps [azure-mgmt-resource](https://github.com/Azure/azure-sdk-for-python) from 23.0.1 to 23.1.1.
- [Release notes](https://github.com/Azure/azure-sdk-for-python/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/esrp_release.md)
- [Commits](https://github.com/Azure/azure-sdk-for-python/compare/azure-mgmt-resource_23.0.1...azure-mgmt-resource_23.1.1)

---
updated-dependencies:
- dependency-name: azure-mgmt-resource
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-07 16:49:30 +05:30
dependabot[bot] d5f6802e5f Python dependency: Bump azure-identity in /web/regression
Bumps [azure-identity](https://github.com/Azure/azure-sdk-for-python) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/Azure/azure-sdk-for-python/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/esrp_release.md)
- [Commits](https://github.com/Azure/azure-sdk-for-python/compare/azure-identity_1.15.0...azure-identity_1.16.0)

---
updated-dependencies:
- dependency-name: azure-identity
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-07 16:49:11 +05:30
dependabot[bot] bc1a2a0b4d Python dependency: Bump selenium in /web/regression
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.19.0 to 4.21.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.19.0...selenium-4.21.0)

---
updated-dependencies:
- dependency-name: selenium
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-07 16:39:53 +05:30
dependabot[bot] 7cb1d74c05 Python dependency: Update setuptools requirement from ==69.* to ==70.*
Updates the requirements on [setuptools](https://github.com/pypa/setuptools) to permit the latest version.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v69.0.0...v70.0.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-07 16:39:31 +05:30
dependabot[bot] 02dbb20b41 Python dependency: Update setuptools requirement in /web/regression
Updates the requirements on [setuptools](https://github.com/pypa/setuptools) to permit the latest version.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v69.0.0...v70.0.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-07 16:38:56 +05:30
Akshay Joshi 6b9e3f5d1c Update release note. 2024-06-07 15:54:41 +05:30
Aditya Toshniwal 5f4db94179 Update yarn.lock file 2024-06-07 15:21:13 +05:30
Aditya Toshniwal de712b0805 - Update JS packages.
- Remove support for Python 3.7 as Debian 10 is EOL.
2024-06-07 14:17:22 +05:30
dependabot[bot] fdfd6c7792 Python dependency: Update boto3 requirement in /web/regression
Updates the requirements on [boto3](https://github.com/boto/boto3) to permit the latest version.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](https://github.com/boto/boto3/compare/1.33.0...1.34.86)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-06 18:14:14 +05:30
dependabot[bot] c6739ebd6b Python dependency: Bump dnspython from 2.3.0 to 2.6.1 in /web/regression
Bumps [dnspython](https://github.com/rthalley/dnspython) from 2.3.0 to 2.6.1.
- [Release notes](https://github.com/rthalley/dnspython/releases)
- [Changelog](https://github.com/rthalley/dnspython/blob/main/doc/whatsnew.rst)
- [Commits](https://github.com/rthalley/dnspython/compare/v2.3.0...v2.6.1)

---
updated-dependencies:
- dependency-name: dnspython
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-06 18:11:47 +05:30
dependabot[bot] f673e68677 Python dependency: Bump eventlet from 0.34.2 to 0.36.1
Bumps [eventlet](https://github.com/eventlet/eventlet) from 0.34.2 to 0.36.1.
- [Changelog](https://github.com/eventlet/eventlet/blob/master/NEWS)
- [Commits](https://github.com/eventlet/eventlet/compare/v0.34.2...0.36.1)

---
updated-dependencies:
- dependency-name: eventlet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-06 18:09:33 +05:30
Rohit Bhati 85d4473af4 Disable the query tool editor input if any SQL is being loaded to prevent users from typing. #6357 2024-06-06 18:06:49 +05:30
dependabot[bot] 45cafd2cff Python dependency: Update boto3 requirement from ==1.33.* to ==1.34.*
Updates the requirements on [boto3](https://github.com/boto/boto3) to permit the latest version.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](https://github.com/boto/boto3/compare/1.33.0...1.34.86)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-06 18:03:50 +05:30
dependabot[bot] d5ac441ab7 Python dependency: Bump psycopg[c] in /web/regression
Bumps [psycopg[c]](https://github.com/psycopg/psycopg) from 3.1.12 to 3.1.19.
- [Changelog](https://github.com/psycopg/psycopg/blob/master/docs/news.rst)
- [Commits](https://github.com/psycopg/psycopg/compare/3.1.12...3.1.19)

---
updated-dependencies:
- dependency-name: psycopg[c]
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-06 18:01:42 +05:30
dependabot[bot] 8e372f194c Python dependency: Update bcrypt requirement in /web/regression
Updates the requirements on [bcrypt](https://github.com/pyca/bcrypt) to permit the latest version.
- [Changelog](https://github.com/pyca/bcrypt/blob/main/release.py)
- [Commits](https://github.com/pyca/bcrypt/compare/4.0.0...4.1.2)

---
updated-dependencies:
- dependency-name: bcrypt
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-06 17:58:48 +05:30
dependabot[bot] 55ad67ac52 Javascript dependency: Bump eslint from 9.2.0 to 9.4.0
Bumps [eslint](https://github.com/eslint/eslint) from 9.2.0 to 9.4.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.2.0...v9.4.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-06 17:58:03 +05:30
Yogesh Mahajan cc999ae5a5 Remove the usage of MUI makeStyles as it doesn't support React 18. #7363 2024-06-06 17:13:12 +05:30
Khushboo Vashi f66bd4bcfb Remove the use of is_normalized function for Python 3.7. 2024-06-05 14:11:59 +05:30
Akshay Joshi dfaea944f0 Revert "Detect if running in Flatpak; patch pythonPath and pgadminFile accordingly."
This reverts commit d98ee76b8d.
2024-06-04 20:35:25 +05:30
Akshay Joshi ff287f32c5 Update version for release v8.8 2024-06-04 18:22:35 +05:30
Akshay Joshi a46f99d360 1) Partially fixed the issue with inserting characters at the end of the line by setting 'Underline query at cursor?' to false by default.
2) Update release note.
2024-06-04 18:18:16 +05:30
Kolja d98ee76b8d Detect if running in Flatpak; patch pythonPath and pgadminFile accordingly. 2024-06-04 15:36:08 +05:30
Akshay Joshi 29a526626f Fixed an issue where the size displayed as 'NaN B' for all databases in the statistics tab. #7524 2024-06-03 17:10:11 +05:30
Khushboo Vashi 6509e45b6f Fix the issue where docker with SSL v8.7 fails to start. #7520 2024-05-31 14:29:36 +05:30
Akshay Joshi 2fb5b26adb Update release note. 2024-05-31 11:26:15 +05:30
Khushboo Vashi 24aefd2c7a Fix an issue where user authentication fails with special characters in password. #5785 2024-05-31 11:22:36 +05:30
Pravesh Sharma b5b0538fe3 Fixed an issue where canceling a query without privilege does not display any message on query tool. #7480 2024-05-31 11:19:44 +05:30
Khushboo Vashi 2ab2d6b57c Fix the issue where the query tool documentation screen-shot displays the incorrect function key. #7507 2024-05-28 12:10:14 +05:30
Khushboo Vashi bc83955418 Fix mod_wsgi version mismatch issue for RHEL platforms. 2024-05-28 11:50:21 +05:30
Akshay Joshi 8f8f8ec79a Update version for release v8.7 2024-05-27 16:14:43 +05:30
Anil Sahoo 6690b16f8a Added support for executing the query at the cursor position in the query tool. #6841 2024-05-27 16:11:59 +05:30
Akshay Joshi 16b9b103a2 Resolved the intermittent issue with macros not displaying in the macros dialog. 2024-05-27 15:56:02 +05:30
Aditya Toshniwal b1f70b02ff Update object explorer icons for EPAS and replication related nodes 2024-05-27 12:29:38 +05:30
Domenico Sgarbossa 2a1394ce1f Italian translation updated for v8.7 2024-05-27 11:24:51 +05:30
Akshay Joshi 908d7e88b6 Updated release note. 2024-05-24 15:33:59 +05:30
Rohit Bhati 4e3ec91d23 Added support for the 'Add to macros' feature and fixed various usability issues. #4735 2024-05-24 15:30:31 +05:30
Pravesh Sharma 36a71dc7fa 1. Fixed an issue where resetting the password from the password reset link was not working. #7500
2. Fixed an issue where the recover password button was enabled even when no email id was provided. #7487
2024-05-24 13:18:05 +05:30
Akshay Joshi 6179638fee Set CAP_NET_BIND_SERVICE to Python 3.12 in Dockerfile. 2024-05-24 12:22:32 +05:30
Akshay Joshi 57e1dfa7ec Update message catalogs for v8.7 2024-05-23 18:47:54 +05:30
Akshay Joshi 2aa881d143 Fixed the Docker build by adding Corepack and changing the version of libzstd. 2024-05-23 18:19:08 +05:30
Khushboo Vashi e9f3747969 Fix the issue where pgAdmin fails to start when Ubuntu OS is upgraded to a major version. #7439 2024-05-23 14:34:08 +05:30
Ahmad 5c30695d66 Fixed Typos 2024-05-23 12:52:41 +05:30
Dave Page 301920747d Update Windows build instructions to match modern reality. 2024-05-21 16:44:15 +01:00
Dave Page 7c5554ea31 Fix the filename for the zlib library.
Our build originally relied on a cmake/msbuild build of zlib,
however, this is not the recommended way of building zlib
(although it is the obvious one). We now build using nmake and
copy, which results in a minor change of the filename.

This is also consistent with what the PostgreSQL build system
expects.
2024-05-21 16:29:59 +01:00
Akshay Joshi 6c7bc1c815 Ensure that Schema Diff does not indicate a table as different when the trigger names are the same but the trigger function body is different. #5762 2024-05-21 16:04:25 +05:30
Aditya Toshniwal dd45f06d50 Added support for viewing PGD Clusters. #7215 2024-05-20 16:54:49 +05:30
Aditya Toshniwal d6a9f8a06c Fixed issues found in testing of react-table upgrade changes. #7419
UI fixes and improvement in System Stats Dashboard.
2024-05-20 10:41:55 +05:30
Aditya Toshniwal 9647482791 Fixed incorrect highlighting for C-Style escape strings in SQL editor. #7485 2024-05-20 10:13:30 +05:30
Akshay Joshi ad5bb0b190 Copy yarnrc.yml file to rectify the OSX builds. 2024-05-16 13:12:37 +05:30
Ashesh Vashi b9088b0afa Use index as a key for the table header group in PgReactTableStyled component. #7419 2024-05-15 17:06:45 +05:30
Akshay Joshi 5edeee8017 Another attempt to rectify the OSX builds. 2024-05-15 16:28:47 +05:30
Akshay Joshi 95466b9d6c Update release note. 2024-05-15 15:30:45 +05:30
Pravesh Sharma 1c44cfb714 Update the documentation for preferences dialog and keyboard shortcuts. #7349, #7458 2024-05-15 15:21:23 +05:30
Akshay Joshi f833cea0dd Trying to fix the OSX build failure 2024-05-15 15:05:59 +05:30
Akshay Joshi 2dcaf0b4ed Update release note 2024-05-15 13:11:28 +05:30
Aditya Toshniwal 0e786c519e Replace the current FontAwesome based PSQL tool icon with MUI Terminal icon. #7472 2024-05-14 11:05:27 +05:30
Aditya Toshniwal 3b20cad5bb Fixed an issue where drag and drop publication and subscription name in SQL editors was not working. #6086 2024-05-09 15:34:44 +05:30
Pravesh Sharma afc28d95cf 1. Disable ERD for system Catalogs. #5849
2. Disable Debugger for system catalogs. #6060
3. Fixed an issue where the keyboard shortcut for launching the debugger from Object Explorer was not working.
2024-05-08 15:29:01 +05:30
Akshay Joshi 9edc1d225e Fixed an issue of the pgAdmin window size increasing each time it was reopened. #6464 2024-05-07 17:35:03 +05:30
dependabot[bot] e5f2506663 Python dependency: Bump sphinx from 7.3.5 to 7.3.7 in /tools
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.3.5 to 7.3.7.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.3.5...v7.3.7)

---
updated-dependencies:
- dependency-name: sphinx
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 16:44:08 +05:30
Aditya Toshniwal 5ec6faff13 Upgrade react-table from v7 to v8. #7419 2024-05-07 16:31:04 +05:30
RohitBhati8269 3e6bd29198 Enhance the Delete dialog by highlighting the names of the objects to be deleted in bold. #7411 2024-05-07 11:56:50 +05:30
dependabot[bot] f2036164d0 Javascript dependency: Bump eslint from 9.0.0 to 9.2.0 in /runtime
Bumps [eslint](https://github.com/eslint/eslint) from 9.0.0 to 9.2.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.0.0...v9.2.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 11:48:08 +05:30
Akshay Joshi 1c458b82cd Update release note. 2024-05-06 11:22:12 +05:30
Aditya Toshniwal b85d8c1446 Changes in Query Tool, Debugger, and ERD Tool shortcuts to remove the use of Accesskey which will allow them to be customized. #7192 2024-05-06 11:15:44 +05:30
Akshay Joshi 0ac006fde1 Fixed typo in the previos commit for GitHub action 2024-05-02 16:22:12 +05:30
Aditya Toshniwal 1e6fab92b0 Add PostgreSQL installation bin directory to path of MacOS GitHub action 2024-05-02 12:52:09 +05:30
Aditya Toshniwal 099577959b Attempt to fix GitHub action failing for MacOS 2024-05-02 12:33:19 +05:30
Akshay Joshi c2b7e521d3 Use correct installation path of PostgreSQL in GitHub action. For reference https://docs.brew.sh/FAQ#why-is-the-default-installation-prefix-opthomebrew-on-apple-silicon 2024-04-30 17:36:55 +05:30
Akshay Joshi 36aaf38379 Added sudo while creating tablespace directory on macOS 2024-04-30 16:47:01 +05:30
Akshay Joshi 99c688f894 Update version for release 8.6 2024-04-29 13:42:28 +05:30
Khushboo Vashi f4761f55f7 Fixed Multi-Factor Authentication bypass vulnerability (CVE-2024-4215). #7425 2024-04-29 13:41:02 +05:30
Pravesh Sharma e18a8bf620 Fixed issue found during testing of #7163. 2024-04-29 13:12:21 +05:30
Pravesh Sharma 7c6fdcb12e Disabled auto-fill on password fields. #2410 2024-04-29 11:44:17 +05:30
Khushboo Vashi f88c89f3eb Fixed an issue when closing the materialized view data second tab; it raises the error that the 'MViewCommand' object has no attribute 'auto_commit'. 2024-04-26 15:53:15 +05:30
Domenico Sgarbossa 5949696ded Italian translation updated for v8.6 2024-04-26 14:43:17 +05:30
Akshay Joshi f724578463 Fixed API test cases for exec/call procedure. 2024-04-26 13:01:35 +05:30
Khushboo Vashi 2324337149 Trigger the browser tree destroyed event so the consequences of destroying the tree are handled properly. 2024-04-26 11:59:53 +05:30
Akshay Joshi 2dd009eb7c Update message catalogs for version 8.6 2024-04-25 18:03:28 +05:30
Akshay Joshi 92bb931b0a Fixed an issue where incorrect select/exec scripts were generated for functions/procedures. #7334 2024-04-25 17:24:02 +05:30
Khushboo Vashi eeee45e57c For some Debian platforms, the python3-dbus package is available instead of python-dbus. 2024-04-25 15:02:50 +05:30
Khushboo Vashi 10ba029980 Fixed an issue where connection to the database is not automatically re-established after connectivity drop. #7372 2024-04-24 14:37:33 +05:30
Pravesh Sharma fd65f1b644 Fixed all input boxes in pgAdmin to show browser auto-fill only where it is relevant. #2410 2024-04-24 11:27:08 +05:30
Akshay Joshi 9f6ddd3cf9 Fixed violates check constraint issue when creating a pgAgent schedule. #7390 2024-04-23 17:27:11 +05:30
Yogesh Mahajan 673b5ea5a1 Fix the date-time picker broken after MUI5 upgrade. 2024-04-23 17:03:34 +05:30
Khushboo Vashi 84c024f6fa Fixed an issue when closing the view data second tab; it raises the error that the 'ViewCommand' object has no attribute 'auto_commit'. #7384 2024-04-23 14:45:15 +05:30
Akshay Joshi 3e0ade5a59 Fixed an issue where pressing backspace should remove the spaces and not the entire tab width, on enabling 'Use spaces?' in the preferences. #7317 2024-04-22 12:33:38 +05:30
dependabot[bot] db23330939 Python dependency: Bump selenium in /web/regression (#7325)
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.10.0 to 4.19.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.10.0...selenium-4.19.0)

---
updated-dependencies:
- dependency-name: selenium
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-18 14:03:28 +05:30
Akshay Joshi bb24c445e6 Update yarn.lock in runtime 2024-04-18 13:03:10 +05:30
dependabot[bot] b44b06591b Javascript dependency: Bump eslint from 8.52.0 to 9.0.0 in /runtime (#7361)
Bumps [eslint](https://github.com/eslint/eslint) from 8.52.0 to 9.0.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.52.0...v9.0.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-18 12:48:45 +05:30
Akshay Joshi b475be93fa Update yarn.lock file 2024-04-18 12:46:00 +05:30
dependabot[bot] 3e47abed8f Python dependency: Bump sphinx from 7.2.6 to 7.3.5 in /tools (#7387)
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.2.6 to 7.3.5.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.2.6...v7.3.5)

---
updated-dependencies:
- dependency-name: sphinx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-18 12:15:30 +05:30
Yogesh Mahajan f0185fbe7f Fix issues reported while testing MUI5 library update. 2024-04-17 17:31:55 +05:30
Khushboo Vashi 5f689a56dd Install dbus-python, an in-direct dependency of the Keyring package as a system package for Debian platforms. #7173 2024-04-17 16:21:50 +05:30
Pravesh Sharma 0d1e3f36e1 Revert "Fixed an issue where function arguments were getting enclosed in double quotes if written in upper case. #7222"
This reverts commit fc4b419987.
2024-04-17 11:33:25 +05:30
Aditya Toshniwal 29ccdb3242 Fixed an issue where debugger was not scrolling automatically on stepping. #7275 2024-04-16 15:33:42 +05:30
Akshay Joshi 0546e79aed Made adjustments to ensure the correct version of Authlib is used. #7362 2024-04-16 12:56:42 +05:30
Pravesh Sharma 5ee403fec7 Upgraded Flask, Flask-Security-Too, Werkzeug, and other dependencies, ensuring compatibility with Python 3.7. #7362 2024-04-16 12:23:03 +05:30
Neville Li 5a3fa59741 Fix id_token KeyError on OAuth2 logout. 2024-04-16 12:19:06 +05:30
Akshay Joshi 60497df04b Updated release note. 2024-04-15 11:54:31 +05:30
Pravesh Sharma f143aa05a3 Added support for excluding multiple tables while taking Backup. #7163 2024-04-15 11:50:08 +05:30
Aditya Toshniwal ee0687ecd3 Add a function getQueryAt to get the SQL query at given cursor position from a CodeMirror input 2024-04-13 15:47:18 +05:30
Aditya Toshniwal e612140473 Update release notes. 2024-04-10 18:00:57 +05:30
Yogesh Mahajan e384c9665a Fixed a XSS vulnerability in the /settings/store endpoint. #7282 2024-04-10 17:58:51 +05:30
Akshay Joshi 30d2d1b23e Fixed the following code smells:
1) useState call is not destructured into value + setter pair.
2) A fragment with only one child is redundant.
3) Unnecessary '.apply()' and '.call()'.
4) Expected the Promise rejection reason to be an Error.
2024-04-09 19:18:56 +05:30
Aditya Toshniwal ed2a73f7ff Fix artifact archive error for EPAS tests on github workflows 2024-04-09 09:52:39 +05:30
Aditya Toshniwal b5e5f8ac4c Update release notes. 2024-04-09 08:37:41 +05:30
Yogesh Mahajan 102e0a9839 - Update MUI v4 to v5
- Remove the SCSS dependency completely and use MUI for theming.
- Update - date-fns, @date-io, notistack. Remove - popper.js, sass-loader.
- Cleanup webpack config.
- Port PSQL tool to use MUI themes instead of SCSS theme.
- Theme change will reflect realtime without refreshing pgAdmin.
2024-04-09 08:21:14 +05:30
Akshay Joshi edec9adbfb Fixed SonarQube code smell 'Unnecessary use of boolean literals in conditional expression'. 2024-04-08 17:19:51 +05:30
Aditya Toshniwal c9345ad618 Fixed an issue where double dollar quoted code is treated as string in syntax highlighter. #7294 2024-04-08 15:32:01 +05:30
Pravesh Sharma fc4b419987 Fixed an issue where function arguments were getting enclosed in double quotes if written in upper case. #7222 2024-04-04 16:48:00 +05:30
Akshay Joshi 475e3689f7 Added the new columns last_seq_scan and last_idx_scan from the pg_stat_all_tables and pg_stat_all_indexes tables respectively to the Statistics tab. #6728 2024-04-04 16:39:12 +05:30
Akshay Joshi c90508cece Update version for release 8.5 2024-04-01 17:01:55 +05:30
Pravesh Sharma a85d907351 Fixed an issue where user was unable to share a newly registered server. #7111
* Fixed an issue where the clear SSH tunnel password option was disabled in desktop mode.
2024-04-01 16:57:47 +05:30
Akshay Joshi 9f31ec115a Fixed Schema Diff issues while comparing Materialized View. #7271 2024-04-01 16:56:18 +05:30
Khushboo Vashi fbbbfe22dd Fixed a remote code execution issue in the validate binary path (CVE-2024-3116). #7326 2024-04-01 11:34:01 +05:30
Libor M 26b279cc8a Czech translation for version 8.5 2024-04-01 11:09:48 +05:30
Domenico Sgarbossa 3ac271e702 Italian translation update for v8.5 2024-03-29 11:41:44 +05:30
JyotiEdb 4ae9132b59 Fixed an issue with empty locale provider while editing collation. #5611 2024-03-29 11:40:44 +05:30
Akshay Joshi 3fa48f26b8 Update message catalogs for v8.5 2024-03-28 17:58:24 +05:30
Akshay Joshi 00e17ef152 Fixed an issue where the 'Save Password' option for SSH tunneling password was consistently disabled. #7139 2024-03-28 13:58:03 +05:30
Aditya ToshniwalandAkshay Joshi ace73ebb60 Added support for viewing Log Based Clusters. #7216
Co-authored-by: Akshay Joshi <akshay.joshi@enterprisedb.com>
2024-03-28 12:19:34 +05:30
JyotiEdb 5931162556 Fixed an issue where maximize icon is missing from query tool panel. #7218 2024-03-28 11:53:56 +05:30
JyotiEdb 053b1e3d69 Fixed issues in create collation. #5611 2024-03-27 17:30:16 +05:30
Pravesh Sharma 082fb165d3 Implemented shortcut mapping for the edit menu in the query tool. 2024-03-27 16:41:08 +05:30
Anil Sahoo a02ebe192b Fixed rollback and commit button activation on execute button click. #7248 2024-03-27 16:38:42 +05:30
Akshay Joshi 8ab78dc40d Fixed an issue where serial, bigserial, and smallserial columns were always shown as different in the schema diff. 2024-03-27 16:11:40 +05:30
Khushboo Vashi 6ecd7b20f7 Update release notes. 2024-03-27 11:50:31 +05:30
Benjamin Blattberg 48a86f6c38 Fix the issue where the update-user CLI command doesn't change the password. #7304 2024-03-27 11:47:58 +05:30
Pravesh Sharma b742487dc3 Fixed an issue where table properties were not updating from properties dialog. #7210 2024-03-27 11:41:01 +05:30
Akshay Joshi 089f890f2e Fixed an issue where Triggers, Rules, Indexes were absent from the Schema Diff when comparing views. #7271
Fixed an issue in Schema Diff where Columns with sequences get altered unnecessarily. #4413
2024-03-27 11:40:23 +05:30
Khushboo Vashi 1f0a2fd150 Update release notes. 2024-03-26 18:24:44 +05:30
István Lantos 715839d295 Expose UNIX socket in entrypoint.sh for Docker implementation. #7221 2024-03-26 18:22:29 +05:30
Pravesh Sharma 1bcf343ceb Fixed an issue where taking backup of a shared server was using server owner's user name. #7255 2024-03-26 11:28:20 +05:30
Anil Sahoo e99fc02f9e Fixed issue related to email authentication of Two-factor authentication. #7308 2024-03-26 11:27:35 +05:30
Aditya Toshniwal c0a1429664 Fix failing feature tests 2024-03-26 11:20:04 +05:30
Aditya Toshniwal cc1ce09b73 More CodeMirror fixes. #7268
Fix query tool autocomplete results when cursor is in between the SQL query. #7299
Fix an issue in query tool where custom keyboard shortcuts are not working for some. #7305
2024-03-23 18:22:06 +05:30
JyotiEdb 25074e46b4 Added support for provider, deterministic, version and RULES parameter while creating collation. #5611 2024-03-19 16:52:22 +05:30
Anil Sahoo cee0945a78 Revert the changes made to include a separate 'ALTER TABLE ...' query for setting defaults, as per the previous fix for issue #7165. 2024-03-19 15:12:04 +05:30
Aditya Toshniwal 24b0c2e919 Update axios to the latest version 2024-03-18 16:23:54 +05:30
Akshay Joshi c56aef335b Fixed RESQL test cases for DBMS Schedule 2024-03-18 13:44:07 +05:30
Akshay Joshi 097b630738 Added support for EDB Job Scheduler. #7098 2024-03-18 11:53:59 +05:30
Aditya Toshniwal f351b10ed0 Fix an issue in query tool where toggle case of selected text loses selection. #7277
Also make changes to give pgAdmin shortcuts higher priority over CodeMirror default shortcuts.
2024-03-14 18:18:53 +05:30
Pravesh Sharma 1a02d13a28 Bug fixes and improvements in pgAdmin CLI. #7116 2024-03-14 18:12:28 +05:30
Anil Sahoo bece59d4b3 Fixed schema diff wrong query generation for table, foreign table and sequence. #7165 2024-03-14 11:21:19 +05:30
Akshay Joshi 30398219f4 Replace actions/upload-artifact@v3 with actions/upload-artifact@v4 for all the github actions. 2024-03-12 16:04:15 +05:30
Akshay Joshi 8545d846c0 Replace actions/checkout@v3 with actions/checkout@v4 for all the github actions. 2024-03-12 15:26:31 +05:30
Akshay Joshi 6d8c4bdb82 1) Checking actions/checkout@v4 working or not.
2) Added edb job scheduler command for EPAS 16 only.
2024-03-12 14:45:44 +05:30
Anthony DeBarros 496acf5598 Polish up the system_stats not installed message. 2024-03-12 10:50:09 +05:30
Aditya Toshniwal 36228fece7 Add a workaround in pgAdmin code to make Flask-Migrat>=4.0.6 work 2024-03-11 17:17:40 +05:30
Aditya Toshniwal 794c7cb335 Fixed multiple editor related issues:
1. Replace option in query tool edit menu is not working on non-Mac OS. #7262
2. Format SQL shortcut and multiline selection are not working. #7268
3. "Use Spaces?" Preference of Editor is not working. #7269
2024-03-11 16:52:56 +05:30
Akshay Joshi 9c9766ca0a Update release note. 2024-03-08 11:49:36 +05:30
Aditya Toshniwal 7374997425 Fix an issue in table dialog where changing column name was not syncing table constraints appropriately. #7229 2024-03-08 11:45:32 +05:30
Florian 134e651989 Added support to exclude multiple tables while taking backup. #7163 2024-03-08 11:44:29 +05:30
Akshay Joshi 8b130b3351 Added corepack enable command. 2024-03-04 17:30:16 +05:30
Akshay Joshi d26182d178 Update yarn version for OSX build functions. 2024-03-04 15:23:07 +05:30
Akshay Joshi 8ddcdbf499 Updated version for release 8.4 2024-03-04 14:50:23 +05:30
Akshay Joshi 4e49d752fb Unsafe Deserialization and Remote Code Execution by an Authenticated user in pgAdmin 4 (CVE-2024-2044). 2024-03-04 13:22:09 +05:30
Libor M 0cbb5324bf Czech translation for version 8.4 2024-03-04 11:12:05 +05:30
Akshay Joshi 1e90245650 Update release note 2024-03-01 12:14:43 +05:30
Florian 3425bc0349 Ensure that the OAuth2 session is logged out when users log out from pgAdmin. #7193 2024-03-01 12:09:01 +05:30
Domenico Sgarbossa 7593bb98c1 Italian translation update for v8.4 2024-03-01 11:56:47 +05:30
Akshay Joshi d8c007f644 Fixed duplicate explicit target name issue in the documentation. 2024-02-29 19:14:59 +05:30
Akshay Joshi 0ea51861c7 Update message catalogs for v8.4 2024-02-29 18:40:50 +05:30
Akshay Joshi cfbf4d8452 Updated URL in the container deployment docs. 2024-02-29 18:37:34 +05:30
Pravesh Sharma af88851228 Remove role related checks on the UI dashboard when terminating session/query and let PostgreSQL take care of it. #7217 2024-02-29 16:43:07 +05:30
Akshay Joshi 864f23c60d Update release note. 2024-02-29 11:53:33 +05:30
Anil Sahoo 8dffcf842f Added documentation for System Statistics tab. #7148 2024-02-29 11:34:54 +05:30
Pravesh Sharma 6971d8c3a1 Fixed an issue where preferences.json mapped to container was not having any effect on preferences. #6058 2024-02-27 12:11:59 +05:30
Aditya Toshniwal 43f4cc4e17 Fix an issue where type column in dependencies tab is not showing correct label. #7225 2024-02-26 11:59:30 +05:30
Aditya Toshniwal a5530f59f7 Fix sonarqube issues for the rule - 'If' statement should not be the only statement in 'else' block 2024-02-26 11:55:36 +05:30
Aditya Toshniwal e272552780 Fix doc builds failing because of release notes update 2024-02-23 14:13:06 +05:30
Aditya Toshniwal dfbbc3b1a1 Update release notes. 2024-02-23 14:08:56 +05:30
Anil Sahoo a8ab714606 Fix multiple issues where PasswordExecCommand was not working in server mode and PasswordExecCommand was not loaded when importing servers. #6792 2024-02-23 14:05:26 +05:30
Pravesh Sharma 2ab419c8a5 Fixed EPAS RESQL test case failure. 2024-02-23 11:25:54 +05:30
Aditya Toshniwal 29e85a6b06 Fix SonarQube issues 2024-02-22 16:54:20 +05:30
Khushboo Vashi 125d36e7d2 Update release notes. 2024-02-22 16:43:50 +05:30
Florian 16406f88a7 Add support for JSON log format. #7138 2024-02-22 16:39:25 +05:30
Pravesh Sharma dee1a2ae6b Upgrade python package Flask-Security-Too to 5.3.* #7234 2024-02-22 14:43:48 +05:30
Aditya Toshniwal 1f879b3e87 Upgrade python package cryptography to 42.0.* 2024-02-22 11:57:44 +05:30
Aditya Toshniwal b5bd236387 Fix edit menu related issues of query tool codemirror 2024-02-21 15:54:57 +05:30
Akshay Joshi 41812c9fde Update release note. 2024-02-21 11:25:55 +05:30
Pravesh Sharma 4faf2a3c6d Fixed an issue where dependencies and dependents were not showing if a composite type is used as an attribute in another composite type. #7027 2024-02-21 11:18:44 +05:30
Aditya Toshniwal d3ede3151a Upgrade CodeMirror from version 5 to 6. #7097 2024-02-21 11:15:25 +05:30
Aditya Toshniwal 721290b1e9 Fix an issue where type column in dependents/dependencies tab is not showing correct label. #7225 2024-02-20 16:23:05 +05:30
Khushboo Vashi 10929157b4 Update Release Note. 2024-02-15 15:00:48 +05:30
Yogesh Mahajan 5a74022e8a Allow preferences customization using a configuration file. #6058 2024-02-15 14:58:31 +05:30
Akshay Joshi a74b0232f9 Update release note 2024-02-15 11:41:42 +05:30
Anil Sahoo e81a036850 Fix an issue where the scripts created by generate script of Schema diff for Table with sequence was not working earlier. #7165 2024-02-15 11:38:44 +05:30
Khushboo Vashi 389896411a Update Release Notes. 2024-02-14 11:24:20 +05:30
octo-dama 6adae46a4c Add --yes option for skipping the confirmation prompt while deleting the user via CLI for scripting purpose. #7204 2024-02-14 11:20:44 +05:30
Akshay Joshi 96ed38292f Added release note for v8.4 2024-02-09 16:49:58 +05:30
Anil Sahoo 47b2bc8a83 1) Fix the tabbed panel backward/forward shortcut for tabs. #6808
2) Remove shortcuts for the dialog tab backward/forward.
3) Used hotkeys.js in place of mousetrap for listening to keyboard shortcuts.
2024-02-09 16:33:30 +05:30
Anil Sahoo 9ad223c41c Fix an issue where constraint check control is enabled in edit table dialog. #7164 2024-02-09 16:26:46 +05:30
Ashesh Vashi d09833744a Separate the application name, branding & version information from the configuration file. #7187 2024-02-09 16:25:03 +05:30
Akshay Joshi c92e9c2953 Fixed all broken submenus of the Help menu due to the SonarQube fix. 2024-02-08 12:24:40 +05:30
Akshay Joshi af1f4b3aa7 Update version for release v8.3 2024-02-05 12:38:40 +05:30
Domenico Sgarbossa 4b40aac89f Italian translation for version 8.3 2024-02-05 10:48:35 +05:30
Libor M 0ff34ab6ae Czech translation for version 8.3 2024-02-05 10:48:04 +05:30
Yogesh Mahajan 9462296d33 Fixed API tests failed due to #7113 changes. 2024-02-05 10:47:43 +05:30
Aditya Toshniwal 0904adaed0 Update release notes 2024-02-02 12:55:13 +05:30
Pravesh Sharma f7045b58d4 Fixed an issue where format sql was messing up operator. #5083
- The formatting is done on client side now using sql-formattor JS lib. Backend API based formatting is removed.
- Added new options data type case, expression width, function case, lines between queries, logical operator new line and new line before semicolon available in the new lib.
- Removed old options comma-first notations, re-indent aligned, re-indent, strip comments and wrap after N characters as not available in the new library.
- Capitalise casing is replaced with Preserve casing as it is not supported by the new library.
- Also fixes #6785, #6990, #7115.
2024-02-02 12:28:25 +05:30
Sebastian Bogaci 459121566c Fix wrong default for FORCE_LOWER in the FLASK_GRAVATAR module #7175 2024-02-02 11:47:14 +05:30
Akshay Joshi e12e8bc9cf Update message catalogs for v8.3 2024-02-01 21:27:06 +05:30
Kristof Mattei 956401015d Fixed an issue pgAdmin fails to launch due to inconsistent PATH variable name on windows. #7153, #7125 2024-02-01 21:07:39 +05:30
Khushboo Vashi 1ac385be27 Update documentation for creating the configuration database. 2024-02-01 14:37:09 +05:30
Anil Sahoo 8145e042a6 Fix a backend server error when creating a named restore point. #7166 2024-02-01 14:20:22 +05:30
Aditya Toshniwal cdf49d6300 Fix failing feature tests 2024-01-30 13:01:57 +05:30
Aditya Toshniwal 028b70203c Fix SonarQube bugs 2024-01-29 18:39:30 +05:30
Akshay Joshi e23ef5d9df Update release note. 2024-01-29 14:54:53 +05:30
Yogesh Mahajan 711181c752 Ensure that the correct SQL is generated when changing the column data type to "char". #7113 2024-01-29 14:53:03 +05:30
Pravesh Sharma 3de19f66f2 Added support for column storage syntax while creating table. #6450 2024-01-29 11:32:34 +05:30
Akshay Joshi 4c5324bd99 Fixed API test cases for Backup. 2024-01-25 18:07:40 +05:30
Akshay Joshi 639a28fbfc Fixed code smell 'Prefer using an optional chain expression instead, as it's more concise and easier to read'. 2024-01-25 16:51:40 +05:30
Akshay Joshi 41fe1db884 Fixed PEP8 2024-01-25 12:51:29 +05:30
Akshay Joshi cafe69c235 Fixed SonarQube Bugs and API test cases. 2024-01-25 12:46:55 +05:30
Akshay Joshi d55c35c0e8 Revert yarnrc.yml and yarn.lock 2024-01-24 18:55:32 +05:30
Akshay Joshi 0e0cbc40b8 Fixed SonarQube code smell Replace the unused local variable with '_'. 2024-01-24 18:33:43 +05:30
Aditya Toshniwal 47aa070cc3 Update release notes 2024-01-22 16:17:58 +05:30
Yogesh Mahajan 4fe47b8e92 Ensure that password exec command is included in exported server data json. #6792 2024-01-22 13:38:34 +05:30
Aditya Toshniwal e80e82cd7f Allow drag-n-drop columns collection tree node as comma separated columns. #4419 2024-01-22 13:19:04 +05:30
Khushboo Vashi 29f13f8832 Update release notes. 2024-01-22 12:41:43 +05:30
Akshay Joshi 81fccc87b5 Added support to rename columns in Views. #6380 2024-01-22 12:27:55 +05:30
Aditya Toshniwal 93d25eea0b Use COOKIE_DEFAULT_PATH or SCRIPT_NAME in session cookie path. #6557 2024-01-22 12:25:20 +05:30
Yogesh Mahajan a166f8dc89 Skip debugger test cases to fix "too many clients" error on github actions. 2024-01-18 16:41:18 +05:30
Aditya Toshniwal d26c167c76 Improve auto-focus of editable data grid when adding/editing rows 2024-01-17 18:38:00 +05:30
Akshay Joshi 60983a25d2 Updated release note. 2024-01-12 17:48:56 +05:30
Yogesh Mahajan 2d08b0dd13 Added configurable parameter to enable support for PasswordExecCommand in server mode. #6792 2024-01-12 17:34:40 +05:30
Pravesh Sharma b28df5874e Fixed an issue where multiple errors were showing if user does not have connect privileges. #7073 2024-01-12 17:20:51 +05:30
Nikhil Mohite ad0567bd85 Add support for selecting a schema in the backup database dialog with no tables, mviews, views or foreign tables. #7053
Fixed a UI border issue on the dependencies tab for columns with icon. #7055
2024-01-12 17:19:27 +05:30
Pravesh Sharma 701085adaf Fixed an issue where group membership information was displayed incorrectly. #7085 2024-01-12 16:48:49 +05:30
Akshay Joshi 5240e8ccf8 Added BYPASSRLS|NOBYPASSRLS option while creating a Role. #6392 2024-01-11 19:14:01 +05:30
4600 changed files with 428450 additions and 206605 deletions

No files matched your search

+186
View File
@@ -0,0 +1,186 @@
language: en-US
tone_instructions: ''
early_access: false
enable_free_tier: true
reviews:
profile: chill
request_changes_workflow: false
high_level_summary: true
high_level_summary_placeholder: '@coderabbitai summary'
high_level_summary_in_walkthrough: false
auto_title_placeholder: '@coderabbitai'
auto_title_instructions: ''
review_status: true
commit_status: true
fail_commit_status: false
collapse_walkthrough: false
changed_files_summary: true
sequence_diagrams: true
estimate_code_review_effort: true
assess_linked_issues: true
related_issues: true
related_prs: true
suggested_labels: true
labeling_instructions: []
auto_apply_labels: false
suggested_reviewers: true
auto_assign_reviewers: false
in_progress_fortune: true
poem: false
path_filters: []
path_instructions: []
abort_on_close: true
disable_cache: false
auto_review:
enabled: true
auto_incremental_review: true
ignore_title_keywords: []
labels: []
drafts: false
base_branches: []
ignore_usernames: []
finishing_touches:
docstrings:
enabled: true
unit_tests:
enabled: true
pre_merge_checks:
docstrings:
mode: warning
threshold: 80
title:
mode: warning
requirements: ''
description:
mode: warning
issue_assessment:
mode: warning
custom_checks: []
tools:
ast-grep:
rule_dirs: []
util_dirs: []
essential_rules: true
packages: []
shellcheck:
enabled: true
ruff:
enabled: true
markdownlint:
enabled: true
github-checks:
enabled: true
timeout_ms: 900000
languagetool:
enabled: true
enabled_rules: []
disabled_rules: []
enabled_categories: []
disabled_categories: []
enabled_only: false
level: default
biome:
enabled: true
hadolint:
enabled: true
swiftlint:
enabled: true
phpstan:
enabled: true
level: default
phpmd:
enabled: true
phpcs:
enabled: true
golangci-lint:
enabled: true
yamllint:
enabled: true
gitleaks:
enabled: true
checkov:
enabled: true
detekt:
enabled: true
eslint:
enabled: true
flake8:
enabled: true
rubocop:
enabled: true
buf:
enabled: true
regal:
enabled: true
actionlint:
enabled: true
pmd:
enabled: true
clang:
enabled: true
cppcheck:
enabled: true
semgrep:
enabled: true
circleci:
enabled: true
clippy:
enabled: true
sqlfluff:
enabled: true
prismaLint:
enabled: true
pylint:
enabled: true
oxc:
enabled: true
shopifyThemeCheck:
enabled: true
luacheck:
enabled: true
brakeman:
enabled: true
dotenvLint:
enabled: true
htmlhint:
enabled: true
checkmake:
enabled: true
osvScanner:
enabled: true
chat:
art: true
auto_reply: true
integrations:
jira:
usage: auto
linear:
usage: auto
knowledge_base:
opt_out: false
web_search:
enabled: true
code_guidelines:
enabled: true
filePatterns: []
learnings:
scope: auto
issues:
scope: auto
jira:
usage: auto
project_keys: []
linear:
usage: auto
team_keys: []
pull_requests:
scope: auto
mcp:
usage: auto
disabled_servers: []
code_generation:
docstrings:
language: en-US
path_instructions: []
unit_tests:
path_instructions: []
+1 -1
View File
@@ -1,5 +1,5 @@
.git
web/node_modules
web/config_*.py
web/*.log
web/regression
web/**/tests/
+7
View File
@@ -0,0 +1,7 @@
# Auto detect text files and normalize end of lines to LF (\n)
* text=auto eol=lf
# Make.bat has always been stored with CRLF; the blanket eol=lf above would
# silently rewrite the whole file the first time anything touches it.
Make.bat -text
pkg/win32/*.bat text eol=crlf
+1 -1
View File
@@ -34,7 +34,7 @@ If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. Windows 10, OSX monterey]
- Version: [e.g. 6.15]
- pgAdmin version: [e.g. 6.15]
- Mode: [e.g Desktop or Server]
- Browser (if running in server mode): [e.g. chrome, safari]
- Package type: [e.g. RPM, DEB, Python, Container, etc.]
@@ -0,0 +1,338 @@
# Installs the PostgreSQL build dependencies published by pgadmin-org/pgbuild.
#
# Four workflows need these — the QA and snapshot builds on each of macOS and
# Windows — and keeping the logic in one place is not merely tidiness: the
# first version used the gh CLI, which turned out not to exist on the
# self-hosted Windows runner, and that same fix had to be made twice.
#
# On macOS the archives must land in /opt/pgbuild specifically, because the
# install names inside them are absolute: pg_dump asks for
# /opt/pgbuild/zstd/lib/libzstd.1.dylib and libpq for
# /opt/pgbuild/krb5/lib/libgssapi_krb5.2.2.dylib, among others. _fixup_imports
# copies from those paths into the bundle and rewrites the references, so they
# have to resolve at build time. On Windows there are no absolute references,
# so the location only has to avoid colliding with anything else, which is why
# it goes under the runner's temp directory rather than the C:\build64 the
# buildfarm's Jenkins worker manages.
#
# Everything is fetched over plain HTTPS. pgbuild is public and its asset URLs
# are predictable, so this needs neither a CLI nor authentication, and both
# curl --fail and Invoke-WebRequest fail on a 404 rather than writing an error
# page to disk and failing later at the unpack.
#
# What gets downloaded is decided by pkg/pgbuild-deps.lock rather than by the
# rolling -latest tags, whose assets pgbuild replaces in place on every
# rebuild. Building from those means that what is Authenticode signed on
# Windows and Developer ID signed and notarised on macOS is whatever pgbuild
# happened to be publishing that morning, which is neither reproducible nor
# something anybody reviewed. The lock names a per-version tag and the SHA-256
# of its archive, and an archive that does not hash to the recorded digest, or
# that has no lock entry at all, fails the build rather than being unpacked
# unverified. pgbuild publishes a .sha256 beside each archive, which is
# deliberately not consulted: whoever rebuilds an archive rebuilds that too, so
# it is a convenience rather than a source of trust, and the lock is the only
# thing here that pins anything.
#
# Being out of date is a different thing from being wrong, so once an archive
# has been verified, pgbuild's releases are consulted to see whether a newer
# build of that dependency exists, and if one does the job carries a warning
# naming it. It stays a warning, because the build goes on to ship the pinned
# version and a dependency published overnight is no reason to turn pgAdmin
# red, and the check is best effort, so an API that will not answer leaves a
# build whose downloads are already verified alone.
# tools/refresh_pgbuild_lock.py is what turns such a warning into a reviewed
# commit.
name: Install pgbuild dependencies
description: Download and unpack the PostgreSQL build dependencies from pgadmin-org/pgbuild
inputs:
arch:
description: Architecture as pgbuild names it, e.g. arm64, x86_64
required: true
postgres-major:
description: PostgreSQL major version to install
required: false
default: '18'
outputs:
prefix:
description: Directory the dependencies were unpacked into
# Whichever of the two platform steps ran. Merging these in a shell step
# instead would mean picking a shell that exists on every runner, and the
# Windows signing host has no bash.
value: ${{ steps.install-macos.outputs.prefix || steps.install-windows.outputs.prefix }}
runs:
using: composite
steps:
- name: Install the pgbuild dependencies (macOS)
id: install-macos
if: runner.os == 'macOS'
shell: bash
env:
PGBUILD_ARCH: ${{ inputs.arch }}
POSTGRES_MAJOR: ${{ inputs.postgres-major }}
# Only so that the out-of-date check does not run into the
# unauthenticated rate limit, which is shared with everything else
# coming from a hosted runner's address and would leave the warning
# firing only sometimes. Nothing else here needs authentication,
# pgbuild being public.
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
BASE=https://github.com/pgadmin-org/pgbuild/releases/download
RELEASES=https://api.github.com/repos/pgadmin-org/pgbuild/releases
# GITHUB_ACTION_PATH rather than the workspace, so that the lock is
# found even where a workflow checks the repository out somewhere
# other than the default directory.
LOCK="${GITHUB_ACTION_PATH}/../../../pkg/pgbuild-deps.lock"
# The hosted macOS images have shasum, which comes with the system
# perl, but not sha256sum, whereas a Linux-alike self-hosted runner is
# the other way about, so take whichever is there.
if command -v shasum > /dev/null; then
sha256() { shasum -a 256 "$1" | cut -d' ' -f1; }
else
sha256() { sha256sum "$1" | cut -d' ' -f1; }
fi
# Column 2 of a lock line is the tag to fetch and column 3 the digest
# its archive must hash to. Trailing comments are stripped first,
# which also rebuilds awk's idea of the fields.
lock_field() {
awk -v key="$1" -v col="$2" '
{ sub(/#.*/, "") }
$1 == key { print $col; exit }
' "${LOCK}"
}
# pgbuild's tags, newest first, for the out-of-date check below. This
# is deliberately best effort: a build whose downloads have been
# verified must not fail because GitHub would not say what else has
# been published since.
TAGS="${RUNNER_TEMP}/pgbuild-tags.txt"
: > "${TAGS}"
if ! curl --fail --silent --location --max-time 30 \
-H "Accept: application/vnd.github+json" \
${GH_TOKEN:+-H "Authorization: Bearer ${GH_TOKEN}"} \
"${RELEASES}?per_page=100" \
| grep -o '"tag_name": *"[^"]*"' \
| sed 's/.*"\(.*\)"/\1/' > "${TAGS}"; then
echo "Could not list pgbuild's releases, so this build will not"
echo "report whether its pinned dependencies are still current."
fi
sudo mkdir -p /opt/pgbuild
sudo chown "$(id -u):$(id -g)" /opt/pgbuild
for PKG in openssl krb5 zstd lz4 "postgresql-${POSTGRES_MAJOR}"; do
KEY="${PKG}-macos-${PGBUILD_ARCH}"
TAG=$(lock_field "${KEY}" 2)
EXPECTED=$(lock_field "${KEY}" 3)
if [ -z "${TAG}" ] || [ -z "${EXPECTED}" ]; then
echo "ERROR: ${KEY} has no entry in pkg/pgbuild-deps.lock"
echo
echo "An unpinned dependency must not reach a build we sign,"
echo "so this is a failure rather than a warning. Add it with:"
echo
echo " tools/refresh_pgbuild_lock.py ${PKG%%-*}"
echo
echo "If this is a PostgreSQL major the lock has never seen,"
echo "add it to POSTGRES_MAJORS in that script first."
exit 1
fi
ARCHIVE="${TAG}.tar.gz"
echo "Fetching ${ARCHIVE}..."
curl --fail --silent --show-error --location \
-o "${RUNNER_TEMP}/${ARCHIVE}" "${BASE}/${TAG}/${ARCHIVE}"
ACTUAL=$(sha256 "${RUNNER_TEMP}/${ARCHIVE}")
if [ "${ACTUAL}" != "${EXPECTED}" ]; then
echo "ERROR: checksum mismatch for ${ARCHIVE}"
echo " expected: ${EXPECTED}"
echo " actual: ${ACTUAL}"
echo
echo "The bytes behind ${TAG} are not the"
echo "ones that were reviewed when the lock was written."
echo "Usually that means pgbuild rebuilt the tag in place,"
echo "which it does for PostgreSQL whenever a new minor comes"
echo "out, that tag carrying only the major. Satisfy yourself"
echo "that a rebuild is what happened before re-running,"
echo "because this is also the one check standing between a"
echo "tampered dependency and a signed pgAdmin build, and then"
echo "record the new archive, read the diff and commit it:"
echo
echo " tools/refresh_pgbuild_lock.py ${PKG%%-*}"
exit 1
fi
echo "Verified ${ARCHIVE} (sha256 ${ACTUAL})"
# The first tag of the right shape is the newest, the listing
# coming back in reverse chronological order. The rolling tag is
# skipped because it names no version.
NEWEST=""
while read -r CANDIDATE; do
case "${CANDIDATE}" in
*-latest)
continue
;;
${PKG}*-macos-${PGBUILD_ARCH})
NEWEST="${CANDIDATE}"
break
;;
esac
done < "${TAGS}"
if [ -n "${NEWEST}" ] && [ "${NEWEST}" != "${TAG}" ]; then
echo "::warning title=pgbuild dependency out of date::${KEY} is pinned to ${TAG}, but pgbuild has since published ${NEWEST}. This build is using the pinned version, which is what the lock file is for, and nothing is broken. To move to the newer build, run tools/refresh_pgbuild_lock.py ${PKG%%-*}, review the change to pkg/pgbuild-deps.lock and commit it."
fi
tar -xzf "${RUNNER_TEMP}/${ARCHIVE}" -C /opt/pgbuild
done
ls -l /opt/pgbuild
echo "prefix=/opt/pgbuild" >> "${GITHUB_OUTPUT}"
- name: Install the pgbuild dependencies (Windows)
id: install-windows
if: runner.os == 'Windows'
shell: powershell
env:
PGBUILD_ARCH: ${{ inputs.arch }}
POSTGRES_MAJOR: ${{ inputs.postgres-major }}
# See the macOS step: this is for the out-of-date check's rate limit
# alone, and the downloads themselves need no authentication.
GH_TOKEN: ${{ github.token }}
run: |
# Without this, Invoke-WebRequest spends most of a 90 MB download
# rendering a progress bar into a log nobody will read.
$ProgressPreference = 'SilentlyContinue'
$base = 'https://github.com/pgadmin-org/pgbuild/releases/download'
$releases = 'https://api.github.com/repos/pgadmin-org/pgbuild/releases'
# GITHUB_ACTION_PATH rather than the workspace, so that the lock is
# found even where a workflow checks the repository out somewhere
# other than the default directory.
$lock = Join-Path $env:GITHUB_ACTION_PATH '..\..\..\pkg\pgbuild-deps.lock'
# Column 2 of a lock line is the tag to fetch and column 3 the digest
# its archive must hash to; anything after a # is a comment.
function Get-LockEntry($key) {
foreach ($line in Get-Content $lock) {
$text = ($line -split '#', 2)[0].Trim()
if ($text -eq '') { continue }
$fields = $text -split '\s+'
if ($fields.Count -eq 3 -and $fields[0] -eq $key) {
return @{ Tag = $fields[1]; Digest = $fields[2] }
}
}
return $null
}
# pgbuild's tags, newest first, for the out-of-date check below. This
# is deliberately best effort: a build whose downloads have been
# verified must not fail because GitHub would not say what else has
# been published since.
$tags = @()
try {
$headers = @{ 'Accept' = 'application/vnd.github+json' }
if ($env:GH_TOKEN) {
$headers['Authorization'] = "Bearer $env:GH_TOKEN"
}
$tags = (Invoke-RestMethod -Uri "${releases}?per_page=100" -Headers $headers -UseBasicParsing) | ForEach-Object { $_.tag_name }
} catch {
Write-Output "Could not list pgbuild's releases, so this build will not"
Write-Output "report whether its pinned dependencies are still current."
}
# The first tag of the right shape is the newest, the listing coming
# back in reverse chronological order. The rolling tag is skipped
# because it names no version.
function Get-NewestTag($pattern) {
foreach ($tag in $tags) {
if ($tag -like '*-latest') { continue }
if ($tag -like $pattern) { return $tag }
}
return $null
}
$depsDir = Join-Path $env:RUNNER_TEMP 'pgbuild-deps'
New-Item -ItemType Directory -Force -Path $depsDir | Out-Null
foreach ($pkg in @("postgresql-$env:POSTGRES_MAJOR", 'krb5')) {
$key = "$pkg-windows-$env:PGBUILD_ARCH"
$pin = Get-LockEntry $key
$family = ($pkg -split '-')[0]
if (-not $pin) {
Write-Output "ERROR: $key has no entry in pkg/pgbuild-deps.lock"
Write-Output ""
Write-Output "An unpinned dependency must not reach a build we sign,"
Write-Output "so this is a failure rather than a warning. Add it with:"
Write-Output ""
Write-Output " tools/refresh_pgbuild_lock.py $family"
Write-Output ""
Write-Output "If this is a PostgreSQL major the lock has never seen,"
Write-Output "add it to POSTGRES_MAJORS in that script first."
exit 1
}
$archive = "$($pin.Tag).zip"
$zip = Join-Path $env:RUNNER_TEMP $archive
Write-Output "Fetching $archive..."
Invoke-WebRequest -Uri "$base/$($pin.Tag)/$archive" -OutFile $zip -UseBasicParsing
$actual = (Get-FileHash -Algorithm SHA256 -Path $zip).Hash.ToLower()
if ($actual -ne $pin.Digest) {
Write-Output "ERROR: checksum mismatch for $archive"
Write-Output " expected: $($pin.Digest)"
Write-Output " actual: $actual"
Write-Output ""
Write-Output "The bytes behind $($pin.Tag) are not the"
Write-Output "ones that were reviewed when the lock was written."
Write-Output "Usually that means pgbuild rebuilt the tag in place,"
Write-Output "which it does for PostgreSQL whenever a new minor comes"
Write-Output "out, that tag carrying only the major. Satisfy yourself"
Write-Output "that a rebuild is what happened before re-running,"
Write-Output "because this is also the one check standing between a"
Write-Output "tampered dependency and a signed pgAdmin build, and then"
Write-Output "record the new archive, read the diff and commit it:"
Write-Output ""
Write-Output " tools/refresh_pgbuild_lock.py $family"
exit 1
}
Write-Output "Verified $archive (sha256 $actual)"
$newest = Get-NewestTag "$pkg*-windows-$env:PGBUILD_ARCH"
if ($newest -and $newest -ne $pin.Tag) {
Write-Output "::warning title=pgbuild dependency out of date::$key is pinned to $($pin.Tag), but pgbuild has since published $newest. This build is using the pinned version, which is what the lock file is for, and nothing is broken. To move to the newer build, run tools/refresh_pgbuild_lock.py $family, review the change to pkg/pgbuild-deps.lock and commit it."
}
Expand-Archive -Path $zip -DestinationPath $depsDir -Force
}
Get-ChildItem $depsDir
# Out-File in Windows PowerShell defaults to UTF-16, which the runner
# cannot parse, so the encoding is explicit.
"prefix=$depsDir" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
+88 -6
View File
@@ -1,9 +1,16 @@
version: 2
# A note on the "groups" blocks below: minor and patch updates are batched into
# a single PR per manifest per week, whilst major updates continue to arrive
# individually. Majors are where the breakage lives and each one wants its own
# review, whereas a dozen separate PRs for patch bumps is pure overhead.
# Grouping applies to version updates only, so Dependabot security updates are
# unaffected and still arrive as their own PRs.
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
labels:
- "Dependencies"
commit-message:
@@ -12,44 +19,119 @@ updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
labels:
- "Dependencies"
commit-message:
prefix: "Python dependency"
groups:
python-minor-and-patch:
patterns:
- "*"
update-types:
- "minor"
- "patch"
# paramiko 5.0 removed DSSKey, which sshtunnel 0.4.0 still references in
# SSHTunnelForwarder.get_keys(); a major bump therefore breaks every SSH
# tunnelled connection at construction time. sshtunnel has had no release
# since 2019, so this stays put until it is fixed or replaced. See #9927.
ignore:
- dependency-name: "paramiko"
update-types: ["version-update:semver-major"]
- package-ecosystem: "pip"
directory: "/tools"
schedule:
interval: "daily"
interval: "weekly"
labels:
- "Dependencies"
commit-message:
prefix: "Python dependency"
groups:
tools-python-minor-and-patch:
patterns:
- "*"
update-types:
- "minor"
- "patch"
# Note that web/regression/requirements.txt begins with
# "-r ../../requirements.txt", so this entry also sees everything pinned in
# the root file and the paramiko exclusion has to be repeated here.
- package-ecosystem: "pip"
directory: "/web/regression"
schedule:
interval: "daily"
interval: "weekly"
labels:
- "Dependencies"
commit-message:
prefix: "Python dependency"
groups:
regression-python-minor-and-patch:
patterns:
- "*"
update-types:
- "minor"
- "patch"
ignore:
- dependency-name: "paramiko"
update-types: ["version-update:semver-major"]
- package-ecosystem: "npm"
directory: "/runtime"
schedule:
interval: "daily"
interval: "weekly"
labels:
- "Dependencies"
commit-message:
prefix: "Javascript dependency"
groups:
runtime-javascript-minor-and-patch:
patterns:
- "*"
update-types:
- "minor"
- "patch"
- package-ecosystem: "npm"
directory: "/web"
schedule:
interval: "daily"
interval: "weekly"
labels:
- "Dependencies"
commit-message:
prefix: "Javascript dependency"
groups:
web-javascript-minor-and-patch:
patterns:
- "*"
update-types:
- "minor"
- "patch"
ignore:
# @testing-library/jest-dom 7 requires Node >= 22, whilst Node 20 is the
# minimum we support and what most of the buildfarm runs. Revisit once
# the buildfarm moves to Node 22. See #10271 and #10210.
- dependency-name: "@testing-library/jest-dom"
update-types: ["version-update:semver-major"]
# Babel 8 requires Node ^22.18.0 || >=24.11.0, and every 8.x package
# peer-depends on @babel/core ^8.0.0 whilst we are on 7.x. Taking any of
# them individually leaves an unsatisfiable peer requirement and a mixed
# 7/8 tree, so Babel 8 needs a coordinated migration across all ten
# @babel/* packages once we are on Node 22. See #10283, #10284, #10285.
- dependency-name: "@babel/*"
update-types: ["version-update:semver-major"]
# pickr 1.10 switched to a dual CJS/ESM build whose CommonJS entry point
# exports a namespace object rather than the class, so Babel's interop
# leaves _pickr.default as an object and every dialog with a colour field
# dies on mount. That took master's feature tests down for three days
# (#10264, reverted in #10278). Note 1.9 -> 1.10 is a *minor* bump, so it
# otherwise rejoins the grouped PR and comes back around; minor updates
# are excluded here as well as majors until withColorPicker.js is adapted
# to the new export shape.
- dependency-name: "@simonwep/pickr"
update-types:
- "version-update:semver-major"
- "version-update:semver-minor"
+423
View File
@@ -0,0 +1,423 @@
# Install pgAdmin from a published tree, exactly as the README tells a user to.
#
# Everything else in this pipeline checks that files exist, that indexes parse
# and that signatures validate. All three can be true of a repository apt still
# refuses, and two bugs found during the migration were of precisely that
# shape: packages one directory too deep, and noarch RPMs filed where no dnf
# client looks. Neither failed a build.
#
# So this does not inspect anything. It follows the instructions in the
# repository README, in a clean container, and installs the package. No
# --allow-unauthenticated, no --nogpgcheck, no pinning: if the signature is
# wrong or the architecture is missing from Release, the install fails, which
# is the point.
#
# It runs against a release candidate on the development server, which serves
# its tree the moment it is written. The download server sits behind an hourly
# sync to the mirrors, so testing there would mostly measure the sync.
name: Acceptance test
on:
workflow_call:
inputs:
base-url:
description: The tree to install from, without a trailing slash
required: true
type: string
workflow_dispatch:
inputs:
base-url:
description: >-
The tree to install from, for example
https://developer.pgadmin.org/builds/2026-09-21-1
required: true
type: string
concurrency:
group: 'acceptance-test @ ${{ inputs.base-url }}'
cancel-in-progress: true
permissions:
contents: read
jobs:
# The URL is fetched from, installed from and, in the apt job, written into
# a file, so it is checked once here rather than trusted in nine places. The
# host allowlist is the point: everything below downloads and then installs
# as root whatever that host serves, so this is what decides who gets to ask
# for that.
check:
runs-on: ubuntu-24.04
steps:
- name: Check the base URL
env:
BASE_URL: ${{ inputs.base-url }}
run: |
set -euo pipefail
case "${BASE_URL}" in
https://developer.pgadmin.org/builds/*) ;;
https://ftp.postgresql.org/pub/pgadmin/pgadmin4/*) ;;
*)
echo "Not a tree this test will install from: ${BASE_URL}" >&2
echo "Expected developer.pgadmin.org or ftp.postgresql.org." >&2
exit 1 ;;
esac
# No trailing slash, no shell metacharacters, nothing that could be
# read as a second word: the value is interpolated into commands.
printf '%s' "${BASE_URL}" | grep -Eq '^https://[A-Za-z0-9./_-]+[A-Za-z0-9]$' || {
echo "The base URL may contain only letters, digits, dot, slash, underscore and hyphen." >&2
exit 1; }
apt:
needs: check
runs-on: ubuntu-24.04
# The images default to sh, which has no pipefail, so every step that set
# it died on the first line. All of these carry bash.
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
include:
- { name: 'bookworm', image: 'debian:12' }
- { name: 'trixie', image: 'debian:13' }
- { name: 'jammy', image: 'ubuntu:22.04' }
- { name: 'noble', image: 'ubuntu:24.04' }
- { name: 'resolute', image: 'ubuntu:26.04' }
container: ${{ matrix.image }}
steps:
# Only what a user would already have or would obviously need. lsb-release
# is here because the README's own sources.list line calls lsb_release,
# and following the instruction is the test.
- name: Install the prerequisites
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update
apt-get install -y --no-install-recommends ca-certificates curl gnupg lsb-release
- name: Follow the README
env:
BASE_URL: ${{ inputs.base-url }}
DEBIAN_FRONTEND: noninteractive
run: |
set -euo pipefail
curl -fsS https://www.pgadmin.org/static/packages_pgadmin_org.pub \
| gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg
# Written by this shell rather than handed to `sh -c`, which
# re-parsed the expanded URL as source and was the one place in the
# pipeline where a caller-supplied value reached a shell.
CODENAME=$(lsb_release -cs)
echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] ${BASE_URL}/apt/${CODENAME} pgadmin4 main" \
> /etc/apt/sources.list.d/pgadmin4.list
cat /etc/apt/sources.list.d/pgadmin4.list
# A repository apt will not verify makes this fail here, before any
# package is considered.
apt-get update
- name: Install pgAdmin
env:
DEBIAN_FRONTEND: noninteractive
run: |
set -euo pipefail
apt-get install -y pgadmin4-server
# The version proves what installed is this build rather than
# something the distribution happened to carry, and the file list
# proves the package actually delivered its payload.
dpkg-query -W -f '${Package} ${Version}\n' pgadmin4-server
# grep without -q, deliberately: -q exits on the first match, the
# command feeding it then dies of SIGPIPE, and pipefail turns that
# into a failed pipeline even though the match succeeded.
dpkg -L pgadmin4-server | grep '^/usr/pgadmin4/' >/dev/null || {
echo "pgadmin4-server installed no files under /usr/pgadmin4" >&2
exit 1; }
yum:
needs: check
runs-on: ubuntu-24.04
# The images default to sh, which has no pipefail, so every step that set
# it died on the first line. All of these carry bash.
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
include:
- { name: 'rhel-9', image: 'almalinux:9', family: 'redhat' }
- { name: 'rhel-10', image: 'almalinux:10', family: 'redhat' }
- { name: 'fedora-43', image: 'fedora:43', family: 'fedora' }
- { name: 'fedora-44', image: 'fedora:44', family: 'fedora' }
container: ${{ matrix.image }}
steps:
- name: Follow the README
env:
BASE_URL: ${{ inputs.base-url }}
FAMILY: ${{ matrix.family }}
run: |
set -euo pipefail
# The repository RPM carries the .repo file and the packaging key, and
# points at the tree it shipped in, so nothing here names a URL twice.
# It sets gpgcheck=1 and repo_gpgcheck=1, which is why no --nogpgcheck
# appears below: a wrongly signed repository fails at this step.
RPM=$(curl -fsS "${BASE_URL}/yum/" \
| grep -oE "pgadmin4-${FAMILY}-repo-[0-9.-]+\.noarch\.rpm" \
| sort -u | tail -1)
echo "Repository package: ${RPM}"
rpm -i "${BASE_URL}/yum/${RPM}"
cat /etc/yum.repos.d/pgadmin4.repo
- name: Install pgAdmin
run: |
set -euo pipefail
dnf install -y pgadmin4-server
rpm -q pgadmin4-server
# grep without -q, deliberately: -q exits on the first match, the
# command feeding it then dies of SIGPIPE, and pipefail turns that
# into a failed pipeline even though the match succeeded.
rpm -ql pgadmin4-server | grep '^/usr/pgadmin4/' >/dev/null || {
echo "pgadmin4-server installed no files under /usr/pgadmin4" >&2
exit 1; }
# The Windows installer, actually installed. Nothing else in the pipeline
# runs it, and until now nothing verified the signature on the executable
# inside it either: Make.bat's own check tested a stale %ERRORLEVEL%, and the
# workflow step that claimed to cover the gap only re-verified the installer.
windows:
needs: check
runs-on: windows-2025
steps:
- name: Download and install
shell: pwsh
env:
BASE_URL: ${{ inputs.base-url }}
run: |
$ErrorActionPreference = 'Stop'
$listing = Invoke-WebRequest -Uri "$env:BASE_URL/" -UseBasicParsing
$name = ([regex]'pgadmin4-[0-9.]+-x64\.exe').Matches($listing.Content) |
ForEach-Object { $_.Value } | Sort-Object -Unique | Select-Object -Last 1
if (-not $name) { throw "No installer found at $env:BASE_URL" }
Write-Output "Installer: $name"
Invoke-WebRequest -Uri "$env:BASE_URL/$name" -OutFile installer.exe -UseBasicParsing
# The installer's own signature, before running anything from it.
$sig = Get-AuthenticodeSignature installer.exe
Write-Output "Installer signature: $($sig.Status) / $($sig.SignerCertificate.Subject)"
if ($sig.Status -ne 'Valid') { throw "Installer signature is $($sig.Status)" }
# Inno Setup's silent switches. /DIR is given so the check below does
# not depend on the default install location.
$p = Start-Process -FilePath .\installer.exe -Wait -PassThru `
-ArgumentList '/VERYSILENT','/SUPPRESSMSGBOXES','/NORESTART','/DIR=C:\pgadmin4-test'
if ($p.ExitCode -ne 0) { throw "Installer exited with $($p.ExitCode)" }
- name: Check what was installed
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$root = 'C:\pgadmin4-test'
# The components that carry no signature of ours, and so are only
# checked for presence. Everything we do sign is covered by the step
# below, which checks that it is there as a side effect of verifying
# it.
foreach ($f in @("$root\python\python.exe", "$root\web\pgAdmin4.py")) {
if (-not (Test-Path $f)) { throw "Missing from the installation: $f" }
Write-Output "present: $f"
}
# Everything Make.bat's :SIGN_COMPONENTS signs, verified where it lands.
# None of it exists outside the installer until the installer has run, so
# this is the only place a published build can be checked: the runtime
# executable, and the PostgreSQL and Kerberos binaries we ship alongside
# it. The Electron, Python and VC++ runtime components are deliberately
# not signed by us and so are not listed here.
- name: Check the component signatures
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$root = 'C:\pgadmin4-test'
# The publisher is taken from the installer rather than hard coded,
# so that a component signed by somebody else is caught without this
# needing an edit every time the certificate is renewed.
$expected = (Get-AuthenticodeSignature installer.exe).SignerCertificate.Subject
Write-Output "Expected publisher: $expected"
# winpgbuild does not always ship these four, and Make.bat copies them
# only when they are present, so an empty match is not a failure.
$optional = @('libintl-*.dll', 'libiconv-*.dll', 'liblz4.dll', 'libzstd.dll')
foreach ($pattern in @(
'pgAdmin4.exe',
'libpq.dll', 'libcrypto-*-x64.dll', 'libssl-*-x64.dll', 'zlib1.dll',
'pg_dump.exe', 'pg_dumpall.exe', 'pg_restore.exe', 'psql.exe',
'kinit.exe', 'krb5_64.dll', 'comerr64.dll', 'k5sprt64.dll',
'gssapi64.dll', 'krbcc64.dll', 'ccapiserver.exe') + $optional) {
$files = @(Get-ChildItem -Path "$root\runtime\$pattern" -ErrorAction SilentlyContinue)
if ($files.Count -eq 0) {
if ($optional -contains $pattern) {
Write-Output "absent, and optional: $pattern"
continue
}
throw "Missing from the installation: $root\runtime\$pattern"
}
foreach ($f in $files) {
$sig = Get-AuthenticodeSignature $f.FullName
Write-Output "$($f.Name): $($sig.Status) / $($sig.SignerCertificate.Subject)"
if ($sig.Status -ne 'Valid') {
throw "$($f.Name) signature is $($sig.Status)"
}
if ($sig.SignerCertificate.Subject -ne $expected) {
throw "$($f.Name) was signed by $($sig.SignerCertificate.Subject)"
}
}
}
# The macOS disk image as published, rather than the bundle as built. The
# snapshot workflow checks the bundle it has just made; this checks what a
# user downloads, which has been through a DMG, a web server and a browser's
# quarantine attribute.
macos:
needs: check
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- { name: 'arm64', runner: 'macos-15' }
- { name: 'x64', runner: 'macos-26-intel' }
steps:
- name: Download, mount and check
env:
BASE_URL: ${{ inputs.base-url }}
ARCH: ${{ matrix.name }}
run: |
set -euo pipefail
name=$(curl -fsS "${BASE_URL}/" \
| grep -oE "pgadmin4-[0-9.]+-${ARCH}\.dmg" | sort -u | tail -1)
[ -n "${name}" ] || { echo "No ${ARCH} disk image found" >&2; exit 1; }
echo "Disk image: ${name}"
curl -fsS -o image.dmg "${BASE_URL}/${name}"
# Quarantine it as a browser would, so Gatekeeper is actually
# consulted rather than bypassed because the file arrived by curl.
xattr -w com.apple.quarantine \
"0081;$(printf '%x' "$(date +%s)");Safari;" image.dmg
hdiutil attach image.dmg -nobrowse -readonly -mountpoint /tmp/pga
app="/tmp/pga/pgAdmin 4.app"
test -d "${app}"
test -x "${app}/Contents/MacOS/pgAdmin 4"
test -x "${app}/Contents/SharedSupport/pg_dump"
test -f "${app}/Contents/Resources/web/pgAdmin4.py"
# Gatekeeper first, because that is what decides whether a user can
# open this. codesign --strict comes after and is allowed to have its
# own opinion: the disk image deliberately carries a FinderInfo xattr
# on the bundle, set by SetFile -a E in _create_dmg to hide the .app
# extension in the window, and --strict rejects any xattr at all.
echo "=== notarisation and Gatekeeper ==="
xcrun stapler validate "${app}"
spctl --assess --type execute --verbose=4 "${app}"
echo "=== signature ==="
codesign -dvvv "${app}" 2>&1 | grep -E 'Authority|TeamIdentifier'
codesign --verify --deep --verbose=2 "${app}"
# Reported rather than enforced. If this ever starts failing whilst
# spctl still passes, it is the extension-hiding attribute and not a
# broken signature; if spctl fails too, the build is broken.
if ! codesign --verify --deep --strict --verbose=2 "${app}" 2>/tmp/strict.log; then
echo "note: --strict verification failed, Gatekeeper having passed:"
tail -2 /tmp/strict.log
fi
# Nothing in the bundle may reference a build machine. This is what
# catches a dependency that was linked but not relocated, which is
# how an ICU or OpenSSL path would escape.
echo "=== linkage of the bundled client binaries ==="
for b in pg_dump pg_dumpall pg_restore psql; do
echo "--- ${b} ---"
otool -L "${app}/Contents/SharedSupport/${b}" | tail -n +2
done
if otool -L "${app}/Contents/SharedSupport/"* \
| grep -E '/opt/pgbuild|/opt/homebrew|/usr/local/(lib|opt)'; then
echo "A bundled binary still points outside the bundle" >&2
exit 1
fi
hdiutil detach /tmp/pga
# The downloads nobody installs: the wheel, the tarballs and the documents.
# Shallow by design, but it does verify every detached signature from the
# published URL rather than on the server, which is what a user would get.
artefacts:
needs: check
runs-on: ubuntu-24.04
steps:
- name: Fetch and check
env:
BASE_URL: ${{ inputs.base-url }}
run: |
set -euo pipefail
mkdir -p dl && cd dl
listing=$(curl -fsS "${BASE_URL}/")
fetch() {
local pattern=$1 name
name=$(printf '%s' "${listing}" | grep -oE "${pattern}" | sort -u | tail -1)
[ -n "${name}" ] || { echo "Nothing matching ${pattern}" >&2; exit 1; }
curl -fsS -O "${BASE_URL}/${name}"
echo "${name}"
}
tarball=$(fetch 'pgadmin4-[0-9.]+\.tar\.gz')
wheel=$(fetch 'pgadmin4-[0-9.]+-py3-none-any\.whl')
docs=$(fetch 'pgadmin4-[0-9.]+-docs\.tar\.gz')
pdf=$(fetch 'pgadmin4-[0-9.]+\.pdf')
epub=$(fetch 'pgadmin4-[0-9.]+\.epub')
echo "=== signatures, as a user would verify them ==="
export GNUPGHOME=$(mktemp -d); chmod 700 "${GNUPGHOME}"
curl -fsS https://www.pgadmin.org/static/packages_pgadmin_org.pub | gpg --import
for f in "${tarball}" "${wheel}" "${docs}" "${pdf}" "${epub}"; do
curl -fsS -O "${BASE_URL}/${f}.asc"
gpg --verify "${f}.asc" "${f}"
done
echo "=== the documents are what they claim to be ==="
file "${pdf}" | grep -q 'PDF document'
file "${epub}" | grep -q 'EPUB'
# A truncated PDF still says PDF, so size is checked too.
[ "$(stat -c%s "${pdf}")" -gt 1000000 ] || { echo "PDF is implausibly small" >&2; exit 1; }
echo "=== the tarballs contain what they should ==="
tar tzf "${tarball}" | grep -E '/web/pgAdmin4\.py$' >/dev/null
tar tzf "${tarball}" | grep -E '/requirements\.txt$' >/dev/null
tar tzf "${docs}" | grep -E 'index\.html$' >/dev/null
- name: Install the wheel
run: |
set -euo pipefail
cd dl
python3 -m venv /tmp/wheeltest
/tmp/wheeltest/bin/pip install --quiet pgadmin4-*-py3-none-any.whl
/tmp/wheeltest/bin/python -c 'import pgadmin4; print("imported", pgadmin4.__file__)'
+157 -5
View File
@@ -1,23 +1,175 @@
name: Check container build
on:
# Callable, so that a workflow which needs a container build gets this one
# rather than a second definition of it that can drift. Snapshot does not
# call it today, the image not being part of the download tree.
workflow_call:
inputs:
publish:
description: >-
Build for both architectures and push to the registry, tagged
with the location below. A build check does neither: it proves
the Dockerfile still works and throws the image away.
type: boolean
required: false
default: false
location:
description: The tag to push, normally the build's date
type: string
required: false
default: ''
secrets:
DOCKERHUB_USERNAME:
required: false
DOCKERHUB_TOKEN:
required: false
push:
branches: [ "master" ]
paths:
- 'Dockerfile'
- 'pkg/docker/**'
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'requirements.txt'
- 'docs/**'
- '.dockerignore'
- 'LICENSE'
- '.github/workflows/check-container-build.yml'
pull_request:
branches: [ "master" ]
paths:
- 'Dockerfile'
- 'pkg/docker/**'
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'requirements.txt'
- 'docs/**'
- '.dockerignore'
- 'LICENSE'
- '.github/workflows/check-container-build.yml'
workflow_dispatch:
inputs:
publish:
description: Build for both architectures and push to the registries
type: boolean
required: false
default: false
location:
description: The tag to push, normally the build's date
type: string
required: false
default: ''
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
# The workflow's own name, spelled out rather than taken from
# github.workflow, because in a reusable workflow that expression is
# the CALLER's name. Every workflow Snapshot calls would otherwise
# share one group and, with cancel-in-progress, cancel each other.
# github.event_name is in the key because a called workflow inherits the
# caller's ref: once this is on master, the nightly Snapshot's deb build
# and an ordinary push's deb build would otherwise share a group and,
# with cancel-in-progress, kill each other. A push landing mid-nightly
# would cancel the snapshot's build and skip the publish entirely.
group: 'check-container-build @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} @ ${{ github.event_name }}'
cancel-in-progress: true
# Read-only by default, as everywhere else here. The publish job below names
# the wider set it genuinely needs, and a job-level block replaces this one
# rather than adding to it, so its packages: write is unaffected.
permissions:
contents: read
jobs:
# The check. No environment, and so no access to the registry credentials:
# this runs on every pull request, and a build check has no business being
# able to push anything.
build-container:
runs-on: ubuntu-latest
if: ${{ !inputs.publish }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
with:
fetch-depth: 2
- name: Build the container
run: docker build .
- name: Check the container builds
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
push: false
context: .
# The publish. Declared on the publishing environment, which is where the
# Docker Hub credentials live: an environment secret is not available to a
# job that does not name the environment, which is what secrets: inherit
# alone does not solve.
publish-container:
if: inputs.publish
runs-on: ubuntu-22.04
environment: publishing
permissions:
contents: read
# For GHCR, which takes the workflow's own token rather than a stored
# registry credential.
packages: write
steps:
# Before anything is logged in to, because this value becomes a tag in
# a job holding the Docker Hub credentials, and the tags input is
# newline separated: an unchecked value could name a second tag, and a
# tag can name another repository. The shape is the one the wrapper
# requires of a build location.
- name: Check the location
env:
LOCATION: ${{ inputs.location }}
run: |
set -euo pipefail
printf '%s' "${LOCATION}" \
| grep -Eq '^[0-9]{4}-[0-9]{2}-[0-9]{2}(-([1-9][0-9]?|[A-Za-z][A-Za-z0-9]*))?$' || {
echo "Not a build location: ${LOCATION}" >&2; exit 1; }
- uses: actions/checkout@v7
with:
fetch-depth: 2
# Emulation is slow, so only the publishing path pays for it.
- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
- name: Set up Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Log in to Docker Hub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GHCR
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Tagged with the build's location rather than a version. Promotion
# re-tags this exact image, so what ships is the manifest that was
# tested rather than a rebuild of the same source.
- name: Build and push the container
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
push: true
context: .
platforms: linux/amd64,linux/arm64
tags: |
dpage/pgadmin4:${{ inputs.location }}
ghcr.io/pgadmin-org/pgadmin4:${{ inputs.location }}
+140
View File
@@ -0,0 +1,140 @@
# Replaces the pgadmin4-deb-qa Jenkins job. That job runs `make debian` on a
# dedicated EC2 VM per distribution; here each distribution is a container on a
# hosted runner instead, which is the same build in a reproducible environment
# and no VMs to maintain.
#
# Triggered on master and by hand rather than on pull requests, matching what
# the Jenkins job does today (it polls git every five minutes). Running the
# full matrix on every PR is a separate decision.
name: Check DEB builds
on:
# Callable from snapshot.yml, so that what gets published is the
# same build that runs on every push rather than a second
# definition of it that can drift.
workflow_call:
push:
branches: [ "master" ]
paths:
- 'pkg/debian/**'
- 'pkg/linux/**'
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'docs/**'
- 'requirements.txt'
- 'Makefile'
- 'tools/setup-python-env.sh'
- '.github/workflows/check-deb-build.yml'
workflow_dispatch:
concurrency:
# The workflow's own name, spelled out rather than taken from
# github.workflow, because in a reusable workflow that expression is
# the CALLER's name. Every workflow Snapshot calls would otherwise
# share one group and, with cancel-in-progress, cancel each other.
# github.event_name is in the key because a called workflow inherits the
# caller's ref: once this is on master, the nightly Snapshot's deb build
# and an ordinary push's deb build would otherwise share a group and,
# with cancel-in-progress, kill each other. A push landing mid-nightly
# would cancel the snapshot's build and skip the publish entirely.
group: 'check-deb-build @ ${{ github.ref }} @ ${{ github.event_name }}'
cancel-in-progress: true
permissions:
contents: read
jobs:
build-deb:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
# "name" exists only because artifact names may not contain a colon.
- { name: 'debian-12', image: 'debian:12' }
- { name: 'debian-13', image: 'debian:13' }
- { name: 'ubuntu-2204', image: 'ubuntu:22.04' }
- { name: 'ubuntu-2404', image: 'ubuntu:24.04' }
- { name: 'ubuntu-2604', image: 'ubuntu:26.04' }
container: ${{ matrix.image }}
steps:
# Before checkout, so the action has git available and the container has
# the certificates it needs to fetch anything.
- name: Install the build environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
dh-exec \
dpkg-dev \
fakeroot \
git \
libffi-dev \
libkrb5-dev \
libpq-dev \
libreadline-dev \
libssl-dev \
lsb-release \
python3-dev \
python3-pip \
python3-sphinx \
python3-venv \
python3-wheel \
unzip \
wget \
zlib1g-dev
# sphinxcontrib-youtube has no distro package. --break-system-packages is
# needed from Debian 12 and Ubuntu 24.04 onwards (PEP 668), and is
# harmless before that, but the flag itself only exists on newer pip, so
# fall back rather than fail.
- name: Install the Sphinx extensions
run: |
python3 -m pip install --break-system-packages sphinxcontrib-youtube \
|| python3 -m pip install sphinxcontrib-youtube
- name: Install syft
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/v1.52.0/install.sh | sh -s -- -b /usr/local/bin v1.52.0
- uses: actions/setup-node@v7
with:
node-version: '20.x'
- uses: actions/checkout@v7
# The container runs as root while the workspace is owned by the runner
# user, so git refuses to operate on it ("detected dubious ownership").
# The build shells out to git for the commit hash during `yarn run
# bundle`, which fails with exit 128 without this.
- name: Mark the workspace as a safe git directory
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
# Corepack provisions the pinned Yarn from the packageManager field,
# matching run-javascript-tests.yml. The distro nodejs packages are
# avoided entirely: on Ubuntu 26.04 the distro node ships without npm,
# which is why the buildfarm has to pin NodeSource above it.
- name: Enable Corepack
run: corepack enable
- name: Check the DEB build
run: make debian
- name: Archive the packages
uses: actions/upload-artifact@v7
with:
name: pgadmin4-deb-build-output-${{ matrix.name }}
if-no-files-found: error
path: dist/*.deb
+41 -6
View File
@@ -1,23 +1,55 @@
name: Check documentation builds
on:
# Callable from snapshot.yml, so that what gets published is the
# same build that runs on every push rather than a second
# definition of it that can drift.
workflow_call:
push:
branches: [ "master" ]
paths:
- 'docs/**'
- 'web/version.py'
- 'web/branding.py'
- 'requirements.txt'
- 'Makefile'
- 'web/config.py'
- 'tools/setup-python-env.sh'
- '.github/workflows/check-doc-builds.yml'
pull_request:
branches: [ "master" ]
paths:
- 'docs/**'
- 'web/version.py'
- 'web/branding.py'
- 'requirements.txt'
- 'Makefile'
- 'web/config.py'
- 'tools/setup-python-env.sh'
- '.github/workflows/check-doc-builds.yml'
workflow_dispatch:
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
# The workflow's own name, spelled out rather than taken from
# github.workflow, because in a reusable workflow that expression is
# the CALLER's name. Every workflow Snapshot calls would otherwise
# share one group and, with cancel-in-progress, cancel each other.
# github.event_name is in the key because a called workflow inherits the
# caller's ref: once this is on master, the nightly Snapshot's deb build
# and an ordinary push's deb build would otherwise share a group and,
# with cancel-in-progress, kill each other. A push landing mid-nightly
# would cancel the snapshot's build and skip the publish entirely.
group: 'check-doc-builds @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} @ ${{ github.event_name }}'
cancel-in-progress: true
jobs:
build-docs:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
- name: Install platform dependencies
run: |
@@ -33,9 +65,10 @@ jobs:
make docs
- name: Archive HTML
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: pgadmin4-html-build-output
if-no-files-found: error
path: docs/en_US/_build/html/*
- name: Check the ePub build
@@ -44,9 +77,10 @@ jobs:
make docs-epub
- name: Archive ePub
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: pgadmin4-epub-build-output
if-no-files-found: error
path: docs/en_US/_build/epub/pgAdmin4.epub
- name: Check the PDF build
@@ -55,7 +89,8 @@ jobs:
make docs-pdf
- name: Archive PDF
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: pgadmin4-pdf-build-output
if-no-files-found: error
path: docs/en_US/_build/latex/pgadmin4.pdf
+59
View File
@@ -0,0 +1,59 @@
# Replaces the pgadmin4-helm-buildx-qa Jenkins job, which runs
# `helm package pkg/helm` and nothing else. Helm is installed explicitly rather
# than relied upon from the runner image, since what the images ship changes
# between versions.
name: Check Helm chart build
on:
# Callable from snapshot.yml, so that what gets published is the
# same build that runs on every push rather than a second
# definition of it that can drift.
workflow_call:
push:
branches: [ "master" ]
paths:
- 'pkg/helm/**'
- '.github/workflows/check-helm-build.yml'
workflow_dispatch:
concurrency:
# The workflow's own name, spelled out rather than taken from
# github.workflow, because in a reusable workflow that expression is
# the CALLER's name. Every workflow Snapshot calls would otherwise
# share one group and, with cancel-in-progress, cancel each other.
# github.event_name is in the key because a called workflow inherits the
# caller's ref: once this is on master, the nightly Snapshot's deb build
# and an ordinary push's deb build would otherwise share a group and,
# with cancel-in-progress, kill each other. A push landing mid-nightly
# would cancel the snapshot's build and skip the publish entirely.
group: 'check-helm-build @ ${{ github.ref }} @ ${{ github.event_name }}'
cancel-in-progress: true
permissions:
contents: read
jobs:
build-chart:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- name: Install Helm
run: |
curl -fsSL https://raw.githubusercontent.com/helm/helm/v4.3.0/scripts/get-helm-3 -o get-helm-3
chmod 700 get-helm-3
./get-helm-3
- name: Check the chart build
run: helm package pkg/helm
- name: Archive the chart
uses: actions/upload-artifact@v7
with:
name: pgadmin4-helm-build-output
if-no-files-found: error
path: pgadmin4-helm-*.tgz
+24 -7
View File
@@ -3,8 +3,24 @@ name: Check Javascript style
on:
push:
branches: [ "master" ]
paths:
- 'web/**/*.js'
- 'web/**/*.jsx'
- 'web/package.json'
- 'web/yarn.lock'
- 'web/.eslintrc.js'
- 'web/.yarnrc.yml'
- '.github/workflows/check-javascript-style.yml'
pull_request:
branches: [ "master" ]
paths:
- 'web/**/*.js'
- 'web/**/*.jsx'
- 'web/package.json'
- 'web/yarn.lock'
- 'web/.eslintrc.js'
- 'web/.yarnrc.yml'
- '.github/workflows/check-javascript-style.yml'
workflow_dispatch:
@@ -14,20 +30,21 @@ concurrency:
jobs:
check-javascript-style:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
- name: Upgrade yarn
run: |
yarn set version berry
yarn set version 3
# Corepack reads packageManager from web/package.json and provisions
# exactly that Yarn: a single pinned download, with nothing written
# into the checkout.
- name: Enable Corepack
run: corepack enable
- name: Install Node modules
run: |
cd web
yarn install
yarn install --immutable
- name: Run the linter
run: |
+126
View File
@@ -0,0 +1,126 @@
# Replaces the pgadmin4-macos-qa Jenkins job. That job runs `make appbundle` on
# the two EC2 Mac workers; this runs the same build on hosted runners, which
# cover both architectures.
#
# The build is unsigned and unnotarised: pkg/mac/build.sh sets CODESIGN=0 and
# NOTARIZE=0 when pkg/mac/codesign.conf and pkg/mac/notarization.conf are
# absent, so this needs no secrets. Signing belongs to the release and snapshot
# builds.
#
# PostgreSQL comes from Homebrew for pg_config (psycopg builds against it) and
# for the four client binaries copied into the bundle. The release build uses
# a PostgreSQL built against its own OpenSSL and Kerberos; that difference
# does not matter for a build check, and _fixup_imports relocates Homebrew's
# libraries into the bundle correctly (verified by _verify_bundle_linkage,
# which fails the build if anything still points outside it).
name: Check macOS builds
on:
push:
branches: [ "master" ]
paths:
- 'pkg/mac/**'
- '.github/actions/install-pgbuild-deps/action.yml'
# Which build of each dependency this compiles against, so a
# change to it changes what the installer contains.
- 'pkg/pgbuild-deps.lock'
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'docs/**'
- 'requirements.txt'
- 'Makefile'
- 'tools/setup-python-env.sh'
- '.github/workflows/check-macos-build.yml'
workflow_dispatch:
concurrency:
# The workflow's own name, spelled out rather than taken from
# github.workflow, because in a reusable workflow that expression is
# the CALLER's name. Every workflow Snapshot calls would otherwise
# share one group and, with cancel-in-progress, cancel each other.
group: 'check-macos-build @ ${{ github.ref }}'
cancel-in-progress: true
permissions:
contents: read
jobs:
build-appbundle:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
# "arch" is pgbuild's spelling of the architecture, which differs
# from the one this build uses internally (x64 rather than x86_64).
- { name: 'arm64', arch: 'arm64', runner: 'macos-15' }
# macos-26-intel rather than macos-15-intel: create-dmg's unmount
# scales with how much real Mach-O content lands on the volume, and
# the macos-15-intel image is slow enough that the real bundle
# crosses hdiutil's 120-second DiskArbitration timeout. Measured with
# an identical payload, unmount to "Disk image done": 19s on arm64,
# 41s on macos-26-intel, 82s on macos-15-intel, and that was with a
# lighter stand-in than the real bundle. It is also the newer image,
# which we would move to regardless since macOS 15 retires first.
- { name: 'x64', arch: 'x86_64', runner: 'macos-26-intel' }
timeout-minutes: 120
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '20.x'
- name: Enable Corepack
run: corepack enable
# syft generates the SBOM, wget fetches Electron. PostgreSQL and its
# dependencies no longer come from Homebrew; see below.
- name: Install the build dependencies
run: brew install syft wget
# The dependencies come from pgadmin-org/pgbuild, built against each
# other with --with-zstd --with-lz4 and a 14.0 deployment target, which
# is what the release build ships. Homebrew's PostgreSQL was only ever a
# stand-in: it has no zstd or lz4 support (issue #9425), links Homebrew's
# OpenSSL rather than ours, and carries whatever minimum OS Homebrew
# happened to build for.
- name: Install the PostgreSQL build dependencies
uses: ./.github/actions/install-pgbuild-deps
with:
arch: ${{ matrix.arch }}
- name: Show what pg_dump expects
run: otool -L /opt/pgbuild/postgresql/bin/pg_dump
- name: Check the appbundle build
run: |
export PGADMIN_POSTGRES_DIR=/opt/pgbuild/postgresql
# cryptography publishes arm64-only macOS wheels (checked against
# 50.0.1), so on Intel pip builds it from the sdist and its
# openssl-sys crate links whatever OpenSSL it finds on the build
# host. _fixup_imports deliberately skips _rust.abi3.so, so that
# reference would survive into the bundle and _verify_bundle_linkage
# would fail the build. Linking statically leaves no external
# reference at all, and against our own OpenSSL rather than a
# different one from Homebrew. See issue #10123.
export OPENSSL_DIR=/opt/pgbuild/openssl
export OPENSSL_STATIC=1
make appbundle
- name: Archive the disk image
uses: actions/upload-artifact@v7
with:
name: pgadmin4-macos-build-output-${{ matrix.name }}
if-no-files-found: error
path: dist/*.dmg
+47 -4
View File
@@ -1,23 +1,65 @@
name: Check Python build
on:
# Callable from snapshot.yml, so that what gets published is the
# same build that runs on every push rather than a second
# definition of it that can drift.
workflow_call:
push:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'pkg/pip/**'
- 'requirements.txt'
- 'Makefile'
- 'docs/**'
- 'LICENSE'
- 'README.md'
- 'tools/setup-python-env.sh'
- '.github/workflows/check-python-build.yml'
pull_request:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'pkg/pip/**'
- 'requirements.txt'
- 'Makefile'
- 'docs/**'
- 'LICENSE'
- 'README.md'
- 'tools/setup-python-env.sh'
- '.github/workflows/check-python-build.yml'
workflow_dispatch:
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
# The workflow's own name, spelled out rather than taken from
# github.workflow, because in a reusable workflow that expression is
# the CALLER's name. Every workflow Snapshot calls would otherwise
# share one group and, with cancel-in-progress, cancel each other.
# github.event_name is in the key because a called workflow inherits the
# caller's ref: once this is on master, the nightly Snapshot's deb build
# and an ordinary push's deb build would otherwise share a group and,
# with cancel-in-progress, kill each other. A push landing mid-nightly
# would cancel the snapshot's build and skip the publish entirely.
group: 'check-python-build @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} @ ${{ github.event_name }}'
cancel-in-progress: true
jobs:
build-python-package:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
- name: Install platform dependencies
run: |
@@ -33,7 +75,8 @@ jobs:
make pip
- name: Archive Python wheel
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: pgadmin4-python-build-output
if-no-files-found: error
path: dist/*
+10 -2
View File
@@ -3,8 +3,16 @@ name: Check Python style
on:
push:
branches: [ "master" ]
paths:
- '**.py'
- '.pycodestyle'
- '.github/workflows/check-python-style.yml'
pull_request:
branches: [ "master" ]
paths:
- '**.py'
- '.pycodestyle'
- '.github/workflows/check-python-style.yml'
workflow_dispatch:
@@ -14,10 +22,10 @@ concurrency:
jobs:
check-python-style:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
- name: Install Python dependencies
run: |
+173
View File
@@ -0,0 +1,173 @@
# Replaces the pgadmin4-rpm-qa Jenkins job, as check-deb-build.yml replaces the
# DEB one: a container per distribution on a hosted runner, rather than a
# dedicated EC2 VM per distribution.
#
# Unlike the DEB build, the PGDG repository is not optional here.
# pkg/redhat/build.sh opens with `export PATH=$(ls -d /usr/pgsql-1* | ...)` and
# runs under `set -e`, so the build dies immediately without a PGDG PostgreSQL
# installed.
#
# The QA job does not sign anything; `rpmsign --resign` is a separate step in
# the release and snapshot jobs.
name: Check RPM builds
on:
# Callable from snapshot.yml, so that what gets published is the
# same build that runs on every push rather than a second
# definition of it that can drift.
workflow_call:
push:
branches: [ "master" ]
paths:
- 'pkg/redhat/**'
- 'pkg/linux/**'
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'docs/**'
- 'requirements.txt'
- 'Makefile'
- 'tools/setup-python-env.sh'
- '.github/workflows/check-rpm-build.yml'
workflow_dispatch:
concurrency:
# The workflow's own name, spelled out rather than taken from
# github.workflow, because in a reusable workflow that expression is
# the CALLER's name. Every workflow Snapshot calls would otherwise
# share one group and, with cancel-in-progress, cancel each other.
# github.event_name is in the key because a called workflow inherits the
# caller's ref: once this is on master, the nightly Snapshot's deb build
# and an ordinary push's deb build would otherwise share a group and,
# with cancel-in-progress, kill each other. A push landing mid-nightly
# would cancel the snapshot's build and skip the publish entirely.
group: 'check-rpm-build @ ${{ github.ref }} @ ${{ github.event_name }}'
cancel-in-progress: true
permissions:
contents: read
jobs:
build-rpm:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
# "name" exists only because artifact names may not contain a colon.
# "repo" selects the PGDG repository RPM, which is built per
# distribution family and major version.
- name: 'el-9'
image: 'almalinux:9'
repo: 'https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm'
- name: 'el-10'
image: 'almalinux:10'
repo: 'https://download.postgresql.org/pub/repos/yum/reporpms/EL-10-x86_64/pgdg-redhat-repo-latest.noarch.rpm'
- name: 'fedora-43'
image: 'fedora:43'
repo: 'https://download.postgresql.org/pub/repos/yum/reporpms/F-43-x86_64/pgdg-fedora-repo-latest.noarch.rpm'
- name: 'fedora-44'
image: 'fedora:44'
repo: 'https://download.postgresql.org/pub/repos/yum/reporpms/F-44-x86_64/pgdg-fedora-repo-latest.noarch.rpm'
container: ${{ matrix.image }}
steps:
# Before checkout, so the action has git available.
- name: Install the build environment
env:
PGDG_REPO: ${{ matrix.repo }}
run: |
dnf install -y dnf-plugins-core
# EL needs EPEL and CRB for the build dependencies; Fedora has
# everything in the main repositories.
if [ ! -f /etc/fedora-release ]; then
dnf install -y epel-release
dnf config-manager --set-enabled crb
fi
# The distro's own PostgreSQL module would shadow PGDG's packages.
dnf -qy module disable postgresql || true
dnf install -y --nogpgcheck "${PGDG_REPO}"
# The compiler toolchain is not optional: psycopg-c and gssapi are
# both built from source (pkg/linux/build-functions.sh passes
# --no-binary psycopg), and rpmbuild needs redhat-rpm-config. The
# buildfarm gets these from the @development-tools group; they are
# listed individually here so the container stays small.
dnf install -y \
diffutils \
expect \
fakeroot \
file \
findutils \
gcc \
gcc-c++ \
git \
krb5-devel \
libpq5-devel \
make \
openssl-devel \
patch \
postgresql18-devel \
python3-devel \
python3-pip \
python3-sphinx \
redhat-rpm-config \
rpm-build \
rpm-sign \
unzip \
wget \
yum-utils \
zlib-devel
# pkg/redhat/build.sh:229 shells out to yumdownloader, and a missing
# one surfaces as a bare exit 127 twelve minutes into the build,
# after the docs and the webpack bundle. Fail here instead, where the
# message is obvious. dnf5 distributions (EL10, Fedora 41+) get
# yumdownloader through yum-utils' compatibility shims rather than
# from yum itself, so it is worth checking rather than assuming.
command -v yumdownloader >/dev/null || {
echo "ERROR: yumdownloader is not on PATH; pkg/redhat/build.sh needs it." >&2
exit 1
}
- name: Install the Sphinx extensions
run: python3 -m pip install --break-system-packages sphinxcontrib-youtube || python3 -m pip install sphinxcontrib-youtube
- name: Install syft
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/v1.52.0/install.sh | sh -s -- -b /usr/local/bin v1.52.0
- uses: actions/setup-node@v7
with:
node-version: '20.x'
- uses: actions/checkout@v7
# The container runs as root while the workspace is owned by the runner
# user, so git refuses to operate on it ("detected dubious ownership").
# The build shells out to git for the commit hash during `yarn run
# bundle`, which fails with exit 128 without this.
- name: Mark the workspace as a safe git directory
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Enable Corepack
run: corepack enable
- name: Check the RPM build
run: make redhat
- name: Archive the packages
uses: actions/upload-artifact@v7
with:
name: pgadmin4-rpm-build-output-${{ matrix.name }}
if-no-files-found: error
path: dist/*.rpm
+47 -4
View File
@@ -1,23 +1,65 @@
name: Check tarball build
on:
# Callable from snapshot.yml, so that what gets published is the
# same build that runs on every push rather than a second
# definition of it that can drift.
workflow_call:
push:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'docs/**'
- 'pkg/src/**'
- 'requirements.txt'
- 'Makefile'
- 'LICENSE'
- 'README.md'
- 'tools/setup-python-env.sh'
- '.github/workflows/check-tarball-build.yml'
pull_request:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'docs/**'
- 'pkg/src/**'
- 'requirements.txt'
- 'Makefile'
- 'LICENSE'
- 'README.md'
- 'tools/setup-python-env.sh'
- '.github/workflows/check-tarball-build.yml'
workflow_dispatch:
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
# The workflow's own name, spelled out rather than taken from
# github.workflow, because in a reusable workflow that expression is
# the CALLER's name. Every workflow Snapshot calls would otherwise
# share one group and, with cancel-in-progress, cancel each other.
# github.event_name is in the key because a called workflow inherits the
# caller's ref: once this is on master, the nightly Snapshot's deb build
# and an ordinary push's deb build would otherwise share a group and,
# with cancel-in-progress, kill each other. A push landing mid-nightly
# would cancel the snapshot's build and skip the publish entirely.
group: 'check-tarball-build @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} @ ${{ github.event_name }}'
cancel-in-progress: true
jobs:
build-tarball:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
- name: Install platform dependencies
run: |
@@ -33,7 +75,8 @@ jobs:
make src
- name: Archive source tarball
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: pgadmin4-tarball-build-output
if-no-files-found: error
path: dist/*
+10 -2
View File
@@ -3,8 +3,16 @@ name: Check translations
on:
push:
branches: [ "master" ]
paths:
- 'web/**'
- 'Makefile'
- '.github/workflows/check-translations.yml'
pull_request:
branches: [ "master" ]
paths:
- 'web/**'
- 'Makefile'
- '.github/workflows/check-translations.yml'
workflow_dispatch:
@@ -14,10 +22,10 @@ concurrency:
jobs:
check-translations:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
- name: Install platform dependencies
run: |
+149
View File
@@ -0,0 +1,149 @@
# Replaces the pgadmin4-windows-x64-qa Jenkins job.
#
# This runs on a hosted runner, not a self-hosted one. Code signing in Make.bat
# is conditional on PGADMIN_WINDOWS_CSC being set (see :SIGN_FILES,
# :CREATE_INSTALLER and :VERIFY_SIGNATURE in Make.bat), so an unsigned build
# check needs neither the Certum hardware token nor the machine it is plugged
# into. Only the release and snapshot builds, which do sign, need the
# self-hosted runner.
#
# Dependencies come from dpage/winpgbuild, which is exactly where the
# buildfarm's winpgbuild-update job gets them, so the toolchain matches what
# the release build uses rather than being an approximation of it.
#
# UNTESTED as written: unlike the macOS equivalent this has not yet had a
# successful run, so expect the first few attempts to need adjustment.
name: Check Windows build
on:
push:
branches: [ "master" ]
paths:
- 'Make.bat'
- 'pkg/win32/**'
- 'pkg/python-version.txt'
- '.github/actions/install-pgbuild-deps/action.yml'
# Which build of each dependency this compiles against, so a
# change to it changes what the installer contains.
- 'pkg/pgbuild-deps.lock'
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'docs/**'
- 'requirements.txt'
- '.github/workflows/check-windows-build.yml'
workflow_dispatch:
concurrency:
# The workflow's own name, spelled out rather than taken from
# github.workflow, because in a reusable workflow that expression is
# the CALLER's name. Every workflow Snapshot calls would otherwise
# share one group and, with cancel-in-progress, cancel each other.
group: 'check-windows-build @ ${{ github.ref }}'
cancel-in-progress: true
permissions:
contents: read
jobs:
build-installer:
runs-on: windows-2025
timeout-minutes: 120
env:
# The major version of the PostgreSQL release to pull from pgbuild,
# matching DEFAULT_POSTGRESQL_VERSION on the buildfarm.
POSTGRES_MAJOR: '18'
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '20.x'
- name: Enable Corepack
run: corepack enable
# None of these are on the hosted image. wget matters most: Make.bat's
# Electron download is an unbounded retry loop (Make.bat:370), so without
# it the build spins on error 9009 until the job times out rather than
# failing. syft generates the SBOM, and its absence is silent, since
# :GENERATE_SBOM redirects into sbom.json and returns 0 regardless. The
# buildfarm's Windows worker installs all three via Chocolatey too.
- name: Install Inno Setup, syft and wget
run: choco install innosetup syft wget -y --no-progress
# From pgadmin-org/pgbuild, which supersedes dpage/winpgbuild and is
# where the macOS dependencies come from too, so both platforms build
# against one manifest of pinned versions. The archives unpack to
# <DEPS_DIR>\postgresql and <DEPS_DIR>\krb5.
# Unpacked under the runner's own temp directory rather than a fixed
# path. C:\build64 was the obvious choice and the wrong one: it is what
# the buildfarm's winpgbuild-update job manages on the Windows worker,
# deleting and re-extracting postgresql and krb5 inside it. Since the
# signing builds will run on that same machine as a self-hosted runner,
# a shared path would have the two systems overwriting each other's
# dependencies, and the resulting Jenkins failures would look nothing
# like their cause.
- name: Install the PostgreSQL and Kerberos dependencies
id: deps
uses: ./.github/actions/install-pgbuild-deps
with:
arch: x86_64
postgres-major: ${{ env.POSTGRES_MAJOR }}
- name: Record the dependency location
shell: pwsh
run: '"DEPS_DIR=${{ steps.deps.outputs.prefix }}" | Out-File -FilePath $env:GITHUB_ENV -Append'
# The hosted image ships Visual Studio Enterprise at a path that differs
# from the Community install Make.bat defaults to, and the redistributable
# version directory changes with every VS update, so both are discovered
# rather than hardcoded.
- name: Locate the Visual Studio toolchain
shell: pwsh
run: |
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vs = & $vswhere -latest -products * -property installationPath
if (-not $vs) { throw "Could not locate a Visual Studio installation" }
Write-Output "Visual Studio: $vs"
$redist = Get-ChildItem "$vs\VC\Redist\MSVC" -Directory |
Where-Object { Test-Path "$($_.FullName)\vc_redist.x64.exe" } |
Sort-Object Name -Descending |
Select-Object -First 1
if (-not $redist) { throw "Could not locate vc_redist.x64.exe under $vs" }
Write-Output "VC++ redistributable: $($redist.FullName)"
"VS_INSTALL_DIR=$vs" | Out-File -FilePath $env:GITHUB_ENV -Append
"PGADMIN_VCREDIST_DIR=$($redist.FullName)" | Out-File -FilePath $env:GITHUB_ENV -Append
# psycopg[c] compiles against libpq, so the build needs the MSVC
# environment. vcvars64.bat only sets it for its own process, hence
# invoking it and Make.bat in a single cmd session, as the Jenkins job
# does.
#
# No Python is set up for this job: Make.bat downloads the version named
# in pkg/python-version.txt, so the build gets the same interpreter here
# as it does on the signing host and on a developer's machine.
- name: Check the installer build
shell: cmd
run: |
SET "PGADMIN_POSTGRES_DIR=%DEPS_DIR%\postgresql"
SET "PGADMIN_KRB5_DIR=%DEPS_DIR%\krb5"
SET "PGADMIN_INNOTOOL_DIR=C:\Program Files (x86)\Inno Setup 6"
CALL "%VS_INSTALL_DIR%\VC\Auxiliary\Build\vcvars64.bat" || EXIT /b 1
CALL Make.bat || EXIT /b 1
- name: Archive the installer
uses: actions/upload-artifact@v7
with:
name: pgadmin4-windows-build-output
if-no-files-found: error
path: dist/*.exe
+447
View File
@@ -0,0 +1,447 @@
# Promote a tested release candidate to the download server.
#
# This is the irreversible one. Everything before it produces something that
# can be rebuilt or deleted without anybody noticing; this puts packages in
# front of every pgAdmin user, and within the hour they are on the PostgreSQL
# mirror network and in the S3 archive, which has no --delete and therefore no
# undo.
#
# So it builds nothing. It takes a candidate that already exists on the
# development server, having been built, signed, indexed and installed from by
# the acceptance test, and moves it across. If a candidate needs changing, the
# answer is a new candidate rather than a repair applied here.
#
# The version is separate from the location deliberately: 2026-09-21-1 is a
# build, 9.18 is what users will call it, and conflating them is how somebody
# publishes the wrong tree under the right name.
name: Promote release
on:
workflow_dispatch:
inputs:
version:
description: 'Version to publish, for example 9.18'
required: true
type: string
location:
description: 'Candidate to promote, for example 2026-09-21-1'
required: true
type: string
confirm:
description: 'Type the version again to confirm'
required: true
type: string
container-tags:
description: >-
Space separated tags for the container, for example
"9 9.18 9.18.0 latest". Required when scope is everything.
required: false
type: string
default: ''
scope:
description: >-
How much to do. "everything" is a real promotion. "files" stops
before the website and the S3 archive, neither of which can be
undone. "release-directory" stops before the package
repositories as well, touching only v<VERSION>, which is the
only setting that leaves the live repositories alone and so the
only one safe to rehearse the download server with.
"registries" is the other half: it skips the download server
entirely and runs only the container re-tag and the chart push,
so those can be exercised against a candidate tag without a
release. It does not upload to PyPI, there being no published
wheel to upload.
type: choice
required: true
default: release-directory
options:
- release-directory
- files
- everything
- registries
concurrency:
group: 'promote-release'
cancel-in-progress: false
permissions:
contents: read
jobs:
# Every input is checked here, before either of the jobs that act on one
# runs, because the checks used to live in promote and the registries scope
# skips that job: under that scope the confirmation gate did not apply to
# the step that moves the latest tag.
check:
runs-on: ubuntu-24.04
steps:
- name: Check the request
env:
VERSION: ${{ inputs.version }}
LOCATION: ${{ inputs.location }}
CONFIRM: ${{ inputs.confirm }}
TAGS: ${{ inputs.container-tags }}
SCOPE: ${{ inputs.scope }}
run: |
set -euo pipefail
# Typed twice, because the cost of getting this wrong is a version
# published from the wrong tree and no way to unpublish it.
if [ "${VERSION}" != "${CONFIRM}" ]; then
echo "The confirmation does not match the version." >&2
exit 1
fi
# The same shapes the wrapper enforces, checked here so a mistake
# costs a second rather than a round trip.
printf '%s' "${VERSION}" | grep -Eq '^[0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?$' || {
echo "Not a version: ${VERSION}" >&2; exit 1; }
printf '%s' "${LOCATION}" | grep -Eq '^[0-9]{4}-[0-9]{2}-[0-9]{2}(-[1-9][0-9]?)?$' || {
echo "Not a build location: ${LOCATION}" >&2; exit 1; }
# Only the scopes that publish containers need tags, but when they
# are given they are checked whatever the scope, so a bad value is
# not discovered halfway through a promotion.
if [ "${SCOPE}" = "everything" ] || [ "${SCOPE}" = "registries" ]; then
[ -n "${TAGS}" ] || {
echo "container-tags is required for scope ${SCOPE}." >&2
exit 1; }
fi
# -f, because an unquoted expansion is also a glob: a tag of * would
# otherwise be replaced by whatever is in the working directory.
set -f
for tag in ${TAGS}; do
printf '%s' "${tag}" | grep -Eq '^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$' || {
echo "Not a container tag: ${tag}" >&2; exit 1; }
done
set +f
echo "Request accepted: ${VERSION} from ${LOCATION}, scope ${SCOPE}."
promote:
needs: check
# Skipped entirely when only the registries are being exercised, so a
# rehearsal of those never touches the download server.
if: ${{ inputs.scope != 'registries' }}
runs-on: [self-hosted, publish]
environment: publishing
steps:
# The inputs are checked in the job above; this is about the runner.
- name: Check the runner
env:
DOWNLOAD: ${{ vars.DOWNLOAD_SSH_TARGET }}
PUBLISH_KEY: ${{ vars.PUBLISH_SSH_KEY || '~/.ssh/pga-publish' }}
run: |
set -euo pipefail
[ -n "${DOWNLOAD}" ] || { echo "DOWNLOAD_SSH_TARGET is not set." >&2; exit 1; }
# Both variables reach option positions: the target is the first
# positional argument to every ssh below, and the key path follows
# -i, so a value beginning with a hyphen would be read as an option
# rather than as the host or the path it is meant to be. Only an
# administrator can set a repository variable, which makes this
# defence in depth rather than a live hole, but it is checked here,
# once, before anything is published; the -- at each call site
# closes the same gap from the other end.
TARGET_RE='^[A-Za-z0-9][A-Za-z0-9._-]*(@[A-Za-z0-9][A-Za-z0-9.-]*)?$'
printf '%s' "${DOWNLOAD}" | grep -Eq "${TARGET_RE}" || {
echo "DOWNLOAD_SSH_TARGET is not a [user@]host." >&2; exit 1; }
KEY="${PUBLISH_KEY/#\~/$HOME}"
printf '%s' "${KEY}" | grep -Eq '^/[A-Za-z0-9._/-]+$' || {
echo "PUBLISH_SSH_KEY is not a plain absolute path." >&2
exit 1; }
[ -r "${KEY}" ] || { echo "Missing SSH key: ${KEY}" >&2; exit 1; }
if head -c 4 "${KEY}" | grep -q '^ssh-'; then
echo "${KEY} is a public key; -i needs the private one." >&2
exit 1
fi
# Checked before anything is created, so that a version published by
# mistake is caught here rather than by release-create failing halfway
# through and leaving a directory behind.
- name: Refuse to republish
env:
VERSION: ${{ inputs.version }}
DOWNLOAD: ${{ vars.DOWNLOAD_SSH_TARGET }}
PUBLISH_KEY: ${{ vars.PUBLISH_SSH_KEY || '~/.ssh/pga-publish' }}
run: |
set -euo pipefail
publish() {
ssh -i "${PUBLISH_KEY/#\~/$HOME}" -o BatchMode=yes \
-o StrictHostKeyChecking=yes -- "${DOWNLOAD}" "$@"
}
if publish release-exists "${VERSION}" 2>/dev/null; then
echo "Version ${VERSION} is already published." >&2
echo "Publishing is single-shot; a correction needs a new version." >&2
exit 1
fi
echo "Version ${VERSION} is not yet published."
- name: Publish the release directory
env:
VERSION: ${{ inputs.version }}
LOCATION: ${{ inputs.location }}
DOWNLOAD: ${{ vars.DOWNLOAD_SSH_TARGET }}
PUBLISH_KEY: ${{ vars.PUBLISH_SSH_KEY || '~/.ssh/pga-publish' }}
run: |
set -euo pipefail
publish() {
echo "+ $*"
ssh -i "${PUBLISH_KEY/#\~/$HOME}" -o BatchMode=yes \
-o StrictHostKeyChecking=yes -- "${DOWNLOAD}" "$@"
}
# The downloads first: the directory, then the files sorted into it,
# then the packages into the live repository trees. Nothing is
# visible to a package manager until the indices are rebuilt below,
# so an interruption here leaves packages that nothing points at
# rather than a repository describing packages that are not there.
publish release-create "${VERSION}"
publish release-fetch "${VERSION}" "${LOCATION}"
# Separate from the step above because this is where a promotion stops
# being reversible in practice. The step above creates one directory that
# can simply be deleted; this copies packages into the live repositories
# and re-signs the indices every client reads.
- name: Publish the packages
if: ${{ inputs.scope != 'release-directory' }}
env:
VERSION: ${{ inputs.version }}
LOCATION: ${{ inputs.location }}
DOWNLOAD: ${{ vars.DOWNLOAD_SSH_TARGET }}
PUBLISH_KEY: ${{ vars.PUBLISH_SSH_KEY || '~/.ssh/pga-publish' }}
run: |
set -euo pipefail
publish() {
echo "+ $*"
ssh -i "${PUBLISH_KEY/#\~/$HOME}" -o BatchMode=yes \
-o StrictHostKeyChecking=yes -- "${DOWNLOAD}" "$@"
}
# The auto-updater archives, which release-fetch deliberately left
# behind because they belong outside the release directory.
publish autoupdate-publish "${VERSION}"
publish packages-fetch "${LOCATION}"
# The indices, which is the point at which the new packages become
# installable.
for codename in bookworm trixie jammy noble resolute; do
publish rebuild-apt "${codename}"
done
publish rebuild-yum redhat rhel 9 x86_64
publish rebuild-yum redhat rhel 10 x86_64
publish rebuild-yum fedora fedora 43 x86_64
publish rebuild-yum fedora fedora 44 x86_64
# The platform tables carry the release history, so they change with
# every release rather than only when a platform is added.
publish rebuild-readme apt
publish rebuild-readme yum
- name: Update the website
if: ${{ inputs.scope == 'everything' }}
env:
VERSION: ${{ inputs.version }}
DOWNLOAD: ${{ vars.DOWNLOAD_SSH_TARGET }}
PUBLISH_KEY: ${{ vars.PUBLISH_SSH_KEY || '~/.ssh/pga-publish' }}
run: |
set -euo pipefail
publish() {
echo "+ $*"
ssh -i "${PUBLISH_KEY/#\~/$HOME}" -o BatchMode=yes \
-o StrictHostKeyChecking=yes -- "${DOWNLOAD}" "$@"
}
# Separate from the packages, and after them, because the website
# announcing a release whose files are not there yet is worse than
# files sitting there unannounced for a minute.
publish create-release "${VERSION}"
publish load-docs "${VERSION}"
publish purge-cache
- name: Archive to S3
if: ${{ inputs.scope == 'everything' }}
env:
DOWNLOAD: ${{ vars.DOWNLOAD_SSH_TARGET }}
PUBLISH_KEY: ${{ vars.PUBLISH_SSH_KEY || '~/.ssh/pga-publish' }}
run: |
set -euo pipefail
# Last, and on its own, because it is the slowest step and the one
# with no undo: the sync has no --delete, so anything it copies is
# in the archive permanently.
echo "+ sync-s3"
ssh -i "${PUBLISH_KEY/#\~/$HOME}" -o BatchMode=yes \
-o StrictHostKeyChecking=yes -- "${DOWNLOAD}" sync-s3
- name: Note what was skipped
if: ${{ inputs.scope != 'everything' }}
env:
SCOPE: ${{ inputs.scope }}
VERSION: ${{ inputs.version }}
run: |
echo "scope was ${SCOPE}, so this was not a full promotion."
if [ "${SCOPE}" = "release-directory" ]; then
echo "Only /var/ftp/pgadmin4/v${VERSION} was written. The package"
echo "repositories, the website and the S3 archive are untouched,"
echo "so removing that directory undoes this entirely."
else
echo "The website was not updated and nothing was archived to S3."
echo "The packages are live and will reach the mirrors at the next"
echo "hourly sync."
fi
# The registries, which need none of the publishing keys and no self-hosted
# runner:
# nothing here touches our servers. Separate so that a Docker Hub outage
# cannot leave a half-finished promotion on the download server, and so the
# runner holding the SSH keys never handles registry credentials.
registries:
needs: [check, promote]
# always(), because under the registries scope promote is skipped rather
# than run, and a plain needs would skip this with it. check is never
# skipped, so requiring its success is what keeps the inputs validated on
# both paths.
if: >-
${{ always()
&& needs.check.result == 'success'
&& (inputs.scope == 'everything' || inputs.scope == 'registries')
&& (needs.promote.result == 'success'
|| needs.promote.result == 'skipped') }}
runs-on: ubuntu-24.04
environment: publishing
permissions:
contents: read
# For PyPI trusted publishing, which exchanges this for a short-lived
# upload credential rather than using a stored API token.
id-token: write
# For GHCR, which needs no stored credential at all.
packages: write
steps:
- uses: actions/checkout@v7
# By commit rather than by tag, since this script is piped into a shell
# in the same job that then logs in to two registries, and a tag can be
# moved. bec5b06 is v4.3.0.
- name: Install Helm
run: |
set -euo pipefail
curl -fsSL https://raw.githubusercontent.com/helm/helm/bec5b06ed841fe5269972d864d5177944fd5970f/scripts/get-helm-3 -o get-helm-3
chmod +x get-helm-3
./get-helm-3
# Re-tagged rather than rebuilt, so what ships is the manifest the
# acceptance test ran against. imagetools works registry-side, so
# nothing is pulled or pushed through this runner.
- name: Publish the container
env:
LOCATION: ${{ inputs.location }}
TAGS: ${{ inputs.container-tags }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ github.actor }}
run: |
set -euo pipefail
# Validated by the check job. -f so that the word splitting below
# does not also glob against the workspace.
set -f
printf '%s' "${DOCKERHUB_TOKEN}" \
| docker login -u "${DOCKERHUB_USERNAME}" --password-stdin
printf '%s' "${GITHUB_TOKEN}" \
| docker login ghcr.io -u "${GITHUB_ACTOR}" --password-stdin
# Docker Hub stays canonical, because every tutorial, compose file
# and manifest in the world names dpage/pgadmin4. GHCR is published
# alongside it: organisation owned, no stored credential, and not
# subject to Docker Hub's anonymous pull limits.
for tag in ${TAGS}; do
echo "+ ${LOCATION} -> :${tag}"
docker buildx imagetools create \
--tag "dpage/pgadmin4:${tag}" \
--tag "ghcr.io/pgadmin-org/pgadmin4:${tag}" \
"dpage/pgadmin4:${LOCATION}"
done
docker logout ghcr.io
docker logout
# The chart carries the release version from pkg/helm/Chart.yaml, so
# unlike the container there is no candidate copy to re-tag: it is
# packaged and pushed once, here.
#
# To GHCR rather than Docker Hub. The chart's install base is a small
# fraction of the container's, so moving it breaks far less than moving
# the image would, oci://docker.io/dpage was an odd home for a chart in
# the first place, and it needs no stored credential here.
- name: Publish the Helm chart
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ github.actor }}
run: |
set -euo pipefail
printf '%s' "${GITHUB_TOKEN}" \
| helm registry login ghcr.io -u "${GITHUB_ACTOR}" --password-stdin
helm package pkg/helm
helm push pgadmin4-helm-*.tgz oci://ghcr.io/pgadmin-org
helm registry logout ghcr.io
# Fetched from the published release rather than rebuilt, so what
# reaches PyPI is the file the acceptance test installed.
- name: Collect the wheel
if: ${{ inputs.scope == 'everything' }}
env:
VERSION: ${{ inputs.version }}
run: |
set -euo pipefail
mkdir -p pypi-dist
BASE="https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v${VERSION}"
WHEEL="pgadmin4-${VERSION}-py3-none-any.whl"
curl -fsS -o "pypi-dist/${WHEEL}" "${BASE}/pip/${WHEEL}"
# Beside the wheel rather than in pypi-dist, because everything in
# that directory is uploaded and PyPI has not accepted detached
# signatures since 2023.
curl -fsS -o "${WHEEL}.asc" "${BASE}/pip/${WHEEL}.asc"
ls -l pypi-dist
# The wheel arrives over TLS, which says it came from the mirror and
# nothing about what the mirror was given: the tree is replicated from
# our download server to machines we do not run, and the signature that
# has been sitting beside the file all along is the only thing that ties
# these bytes back to the key on the publishing server. Checking it
# costs a second and turns the last hop of a release into something an
# attacker cannot quietly alter.
- name: Verify the wheel before uploading it
if: ${{ inputs.scope == 'everything' }}
env:
VERSION: ${{ inputs.version }}
run: |
set -euo pipefail
curl -fsS -o packages_pgadmin_org.pub \
https://www.pgadmin.org/static/packages_pgadmin_org.pub
# A keyring of its own, holding that one key and nothing the runner
# image happened to trust already, so a signature made by any other
# key fails for want of a public key rather than passing on the
# strength of somebody else's.
GNUPGHOME=$(mktemp -d)
export GNUPGHOME
gpg --batch --import packages_pgadmin_org.pub
gpg --batch --verify "pgadmin4-${VERSION}-py3-none-any.whl.asc" \
"pypi-dist/pgadmin4-${VERSION}-py3-none-any.whl"
echo "Signature verified; the upload may proceed."
# Trusted publishing: PyPI verifies this workflow's OIDC identity, so
# there is no API token to hold, rotate or leak.
- name: Upload to PyPI
if: ${{ inputs.scope == 'everything' }}
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
with:
packages-dir: pypi-dist
+54
View File
@@ -0,0 +1,54 @@
# Purge the cache in front of the website.
#
# Promotion purges it once, but the website edits that follow a release, the
# downloads being activated, the current version record and the news article,
# all happen afterwards and are all cached. This is the button for that, and
# for the times somebody edits the site outside a release.
#
# It takes no arguments: the verb behind it clears everything, and there is
# nothing for a caller to choose.
name: Purge website cache
on:
workflow_dispatch:
concurrency:
group: 'purge-website-cache'
cancel-in-progress: true
permissions:
contents: read
jobs:
purge:
runs-on: [self-hosted, publish]
environment: publishing
steps:
- name: Purge
env:
DOWNLOAD: ${{ vars.DOWNLOAD_SSH_TARGET }}
PUBLISH_KEY: ${{ vars.PUBLISH_SSH_KEY || '~/.ssh/pga-publish' }}
run: |
set -euo pipefail
[ -n "${DOWNLOAD}" ] || { echo "DOWNLOAD_SSH_TARGET is not set." >&2; exit 1; }
# The target is the first positional argument to ssh and the key
# path follows -i, so a value beginning with a hyphen would be read
# as an option rather than as what it is meant to be. Only an
# administrator can set a repository variable, so this is defence in
# depth rather than a live hole, but it costs a line and rules out a
# whole shape of mistake; the -- below does the same job from the
# other direction.
TARGET_RE='^[A-Za-z0-9][A-Za-z0-9._-]*(@[A-Za-z0-9][A-Za-z0-9.-]*)?$'
printf '%s' "${DOWNLOAD}" | grep -Eq "${TARGET_RE}" || {
echo "DOWNLOAD_SSH_TARGET is not a [user@]host." >&2; exit 1; }
KEY="${PUBLISH_KEY/#\~/$HOME}"
printf '%s' "${KEY}" | grep -Eq '^/[A-Za-z0-9._/-]+$' || {
echo "PUBLISH_SSH_KEY is not a plain absolute path." >&2
exit 1; }
ssh -i "${KEY}" -o BatchMode=yes \
-o StrictHostKeyChecking=yes -- "${DOWNLOAD}" purge-cache
+426
View File
@@ -0,0 +1,426 @@
# Release candidate builds, replacing the buildfarm's pgadmin4-*-build jobs.
#
# The same builds as the nightly snapshot, published to the development server
# instead of the download server. That difference is the point: a snapshot is
# finished when it is published, whereas a candidate is published in order to
# be tested, and promoted to the download server only afterwards.
#
# developer.pgadmin.org serves this tree over HTTP as soon as it is written, so
# a candidate's repositories can be added and installed from immediately,
# rather than waiting on the hourly sync between the download server and the
# mirrors.
#
# Never scheduled. A candidate exists because somebody decided to make one.
name: Release candidate
on:
workflow_dispatch:
inputs:
location:
description: >-
Build directory name, normally today's date. A second
candidate on the same day needs a -N suffix, for example
2026-09-17-2.
required: false
default: ''
publish:
description: Upload to the development server when the build succeeds
type: boolean
required: false
default: false
concurrency:
# One candidate at a time, and never cancelled: a cancelled run can abandon a
# notarisation already submitted to Apple, and leaves the signing token in an
# unknown state.
group: 'release-candidate'
cancel-in-progress: false
permissions:
contents: read
jobs:
# The directory name, decided once. Two jobs need it and they must agree:
# the repo RPMs carry the candidate's own URL inside them, so if that job and
# the assemble job each called date(1) a run straddling midnight would ship a
# repository configuration pointing at a build that does not exist.
location:
runs-on: ubuntu-24.04
outputs:
name: ${{ steps.pick.outputs.name }}
steps:
- id: pick
env:
REQUESTED: ${{ inputs.location }}
run: |
set -euo pipefail
NAME="${REQUESTED:-}"
[ -n "${NAME}" ] || NAME=$(date +%Y-%m-%d)
# Validated here so that everything downstream, including a shell on
# the machine holding the publishing keys, is working with a name
# that cannot be anything but a date and an optional suffix. The
# wrapper on the server applies its own rule to the same value; this
# one exists so a bad input fails in five seconds rather than after
# an hour of building.
if ! printf '%s' "${NAME}" | grep -Eq '^[0-9]{4}-[0-9]{2}-[0-9]{2}(-[1-9][0-9]?)?$'; then
echo "Not a valid build location: ${NAME}" >&2
echo "Expected YYYY-MM-DD, optionally with a -N suffix." >&2
exit 1
fi
echo "Build location: ${NAME}"
echo "name=${NAME}" >> "${GITHUB_OUTPUT}"
deb:
uses: ./.github/workflows/check-deb-build.yml
rpm:
uses: ./.github/workflows/check-rpm-build.yml
tarball:
uses: ./.github/workflows/check-tarball-build.yml
wheel:
uses: ./.github/workflows/check-python-build.yml
docs:
uses: ./.github/workflows/check-doc-builds.yml
# The container, pushed to the registry under this candidate's location so
# that it can be tested and then re-tagged at promotion. Not part of the
# download tree, which is why it is not in assemble's needs.
container:
needs: location
if: inputs.publish
uses: ./.github/workflows/check-container-build.yml
with:
publish: true
location: ${{ needs.location.outputs.name }}
secrets: inherit
# The Helm chart is built as a check but not published here. Its version
# comes from pkg/helm/Chart.yaml, so pushing it would publish the release
# version before the release, and the registry has no notion of a candidate
# the way the download server does. It goes out at promotion.
helm:
uses: ./.github/workflows/check-helm-build.yml
# The repository configuration RPMs. These are not built by the QA
# workflows, because they are not a build of pgAdmin: they are a one-file
# package carrying a .repo pointing at the tree they ship in, which is why
# the URL has to be known before they are built.
repo-rpm:
needs: location
runs-on: ubuntu-24.04
container: almalinux:9
steps:
- name: Install the build environment
run: dnf install -y --setopt=install_weak_deps=False rpm-build python3 git
- uses: actions/checkout@v7
- name: Mark the workspace as a safe git directory
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Build the repository RPMs
env:
LOCATION: ${{ needs.location.outputs.name }}
run: |
# Through the environment rather than interpolated into the script.
# The location is a dispatch input, so it is text somebody chose, and
# workflow expression substitution happens before the shell ever sees the
# line, so a crafted location would otherwise become shell text.
export PGADMIN_REPO_DIR="https://developer.pgadmin.org/builds/${LOCATION}/yum"
echo "Repositories will point at ${PGADMIN_REPO_DIR}"
pkg/redhat/repo-rpm.sh
- name: Archive the repository RPMs
uses: actions/upload-artifact@v7
with:
name: pgadmin4-repo-rpm-build-output
if-no-files-found: error
path: dist/*.noarch.rpm
# snapshot-macos.yml and snapshot-windows.yml are the signed-build
# workflows rather than snapshot-only ones; the name predates there being
# a second caller.
macos:
uses: ./.github/workflows/snapshot-macos.yml
secrets: inherit
windows:
uses: ./.github/workflows/snapshot-windows.yml
secrets: inherit
assemble:
needs: [location, deb, rpm, tarball, wheel, docs, repo-rpm, macos, windows]
# the runner, not a hosted runner. This job assembles a tree of several
# hundred megabytes and then, when publishing, sends it to the development
# server; splitting the two meant uploading that tree as an artifact and
# immediately downloading it again on the runner, having first queued for a
# hosted runner behind whatever else the organisation was building.
runs-on: [self-hosted, publish]
# For the variables naming the keys and the target, which live here. The
# environment carries no protection rules, so a run that is not publishing
# is not gated by it.
environment: publishing
# Everything must have built except Windows. That is the one runner which
# can legitimately be offline, and a candidate without the installer is
# still worth having; a candidate missing its documentation, source tarball,
# wheel or repository RPMs is not, and the repository RPMs are worse than
# missing, since install-repo-readme.py then fails after the packages have
# been uploaded and signed, leaving half a candidate on the server.
if: >-
always()
&& needs.location.result == 'success'
&& needs.deb.result == 'success'
&& needs.rpm.result == 'success'
&& needs.tarball.result == 'success'
&& needs.wheel.result == 'success'
&& needs.docs.result == 'success'
&& needs.repo-rpm.result == 'success'
&& needs.macos.result == 'success'
steps:
- uses: actions/checkout@v7
- name: Collect the build artefacts
uses: actions/download-artifact@v7
with:
path: artefacts
# The layout is the one the publishing scripts and the download site
# expect, and is what the wrapper's stage-create verb creates on the
# staging server.
# The Debian architecture comes from the package filename rather than a
# table, since dpkg already encodes it there; the codename does not, so
# that mapping is explicit.
- name: Assemble the staging tree
env:
LOCATION: ${{ needs.location.outputs.name }}
run: |
set -euo pipefail
# Flat, beside apt/ and yum/, which is how both the staging server
# and the snapshots tree are laid out. The docs/macos/pip/source/
# windows subdivision belongs to a published release, and it is the
# promotion step that sorts files into it on the way there.
# Explicitly, rather than trusting the checkout to have cleaned it.
# This runs on a self-hosted runner whose workspace persists between
# jobs, and a previous run's tree left behind here is indistinguishable
# from this one's until something downstream has to choose between
# them.
rm -rf stage
STAGE="stage/${LOCATION}"
mkdir -p "${STAGE}/yum"
# An artefact can be legitimately absent: the Windows signing host is
# allowed to be offline, and a failed matrix leg is reported by its
# own job rather than by a confusing cp error here.
copy_into() {
DEST=$1; shift
for SRC in "$@"; do
[ -e "${SRC}" ] || continue
mkdir -p "${DEST}"
cp "${SRC}" "${DEST}/"
done
}
codename_for() {
case "$1" in
debian-12) echo bookworm ;;
debian-13) echo trixie ;;
ubuntu-2204) echo jammy ;;
ubuntu-2404) echo noble ;;
ubuntu-2604) echo resolute ;;
*) echo "Unknown Debian build name: $1" >&2; exit 1 ;;
esac
}
for DIR in artefacts/pgadmin4-deb-build-output-*; do
[ -d "${DIR}" ] || continue
CODENAME=$(codename_for "${DIR##*-output-}")
for DEB in "${DIR}"/*.deb; do
ARCH=$(basename "${DEB}" .deb); ARCH=${ARCH##*_}
TARGET="${STAGE}/apt/${CODENAME}/dists/pgadmin4/main/binary-${ARCH}"
mkdir -p "${TARGET}"
cp "${DEB}" "${TARGET}/"
done
done
# RPM trees are named for the distribution, which the build name
# already carries: el-9 becomes redhat/rhel-9-x86_64.
for DIR in artefacts/pgadmin4-rpm-build-output-*; do
[ -d "${DIR}" ] || continue
NAME=${DIR##*-output-}
case "${NAME}" in
el-*) FAMILY=redhat; TREE="rhel-${NAME#el-}" ;;
fedora-*) FAMILY=fedora; TREE="${NAME}" ;;
*) echo "Unknown RPM build name: ${NAME}" >&2; exit 1 ;;
esac
# Every RPM for a distribution goes in that distribution's
# tree, including the noarch ones. Taking the directory from the
# package's own architecture would file pgadmin4 and
# pgadmin4-web, both noarch, under rhel-9-noarch, where no
# client looks: dnf asks for <name>-<version>-$basearch. The
# RPM matrix is x86_64 only for now, so this is a constant; when
# aarch64 arrives it becomes a property of the build.
TARGET="${STAGE}/yum/${FAMILY}/${TREE}-x86_64"
mkdir -p "${TARGET}"
cp "${DIR}"/*.rpm "${TARGET}/"
done
copy_into "${STAGE}" artefacts/pgadmin4-tarball-build-output/*
copy_into "${STAGE}" artefacts/pgadmin4-python-build-output/*
# The version is read once here and used for the documentation
# filenames, which the build leaves unversioned as pgadmin4.pdf and
# pgAdmin4.epub whilst the download site has always carried
# pgadmin4-<version>.pdf and .epub.
VERSION=$(python3 -c "import sys; sys.path.insert(0, 'web'); import version; print(version.APP_VERSION)")
for SRC in artefacts/pgadmin4-pdf-build-output/*.pdf; do
[ -e "${SRC}" ] && cp "${SRC}" "${STAGE}/pgadmin4-${VERSION}.pdf"
done
for SRC in artefacts/pgadmin4-epub-build-output/*.epub; do
[ -e "${SRC}" ] && cp "${SRC}" "${STAGE}/pgadmin4-${VERSION}.epub"
done
# The docs tarball is what load-docs.sh unpacks on the web server, so
# it ships as a tarball rather than as the directory of files the
# build produces.
if [ -d artefacts/pgadmin4-html-build-output ]; then
# Under a pgadmin4-<version>-docs/ directory, not flat. The
# web server's load-docs.sh unpacks this into the docs root
# and then hands docloader that directory name, so a flat
# archive would scatter several hundred files across the root
# and then fail on a directory that does not exist. Every
# released tarball has carried that top level; the tar here
# had not.
DOCS_DIR="pgadmin4-${VERSION}-docs"
rm -rf "artefacts/${DOCS_DIR}"
mv artefacts/pgadmin4-html-build-output "artefacts/${DOCS_DIR}"
tar -czf "${STAGE}/pgadmin4-${VERSION}-docs.tar.gz" \
-C artefacts "${DOCS_DIR}"
fi
# At the root of yum/, beside the family directories, which is
# where the README instructions tell people to fetch them from.
copy_into "${STAGE}/yum" artefacts/pgadmin4-repo-rpm-build-output/*
copy_into "${STAGE}" artefacts/pgadmin4-macos-snapshot-*/*
copy_into "${STAGE}" artefacts/pgadmin4-windows-snapshot/*
find "${STAGE}" -type f | sort
- name: Check the keys are present
if: inputs.publish
env:
STAGING: ${{ vars.STAGING_SSH_TARGET }}
PUBLISH_KEY: ${{ vars.PUBLISH_SSH_KEY || '~/.ssh/pga-publish' }}
UPLOAD_KEY: ${{ vars.UPLOAD_SSH_KEY || '~/.ssh/pga-upload' }}
run: |
set -euo pipefail
for TOOL in ssh rsync; do
command -v "${TOOL}" >/dev/null || {
echo "This runner has no ${TOOL}." >&2; exit 1; }
done
# These three variables reach option positions. The target is the
# first positional argument to ssh, and the key paths are spliced
# into the -e string that rsync splits on whitespace before exec'ing
# it, so a value beginning with a hyphen, or one carrying a space,
# would be read as an option or as a second word rather than as the
# host or the path it is meant to be. Only an administrator can set
# a repository variable, which makes this defence in depth rather
# than a live hole, but it is checked here, once, rather than at
# each point of use; the -- in the publish step below closes the
# same gap from the other end.
TARGET_RE='^[A-Za-z0-9][A-Za-z0-9._-]*(@[A-Za-z0-9][A-Za-z0-9.-]*)?$'
printf '%s' "${STAGING}" | grep -Eq "${TARGET_RE}" || {
echo "STAGING_SSH_TARGET is not a [user@]host." >&2; exit 1; }
for KEY in "${PUBLISH_KEY/#\~/$HOME}" "${UPLOAD_KEY/#\~/$HOME}"; do
printf '%s' "${KEY}" | grep -Eq '^/[A-Za-z0-9._/-]+$' || {
echo "Not a plain absolute path: ${KEY}" >&2; exit 1; }
if [ ! -r "${KEY}" ]; then
echo "Missing or unreadable SSH key: ${KEY}" >&2
exit 1
fi
# A public key is readable too, and pointing -i at one fails
# later inside ssh with a message that does not mention which
# file was wrong. Both halves of a pair sit in the same
# directory with names one suffix apart, so this is an easy
# thing to configure wrongly and a cheap thing to catch.
if head -c 4 "${KEY}" | grep -q '^ssh-'; then
echo "${KEY} is a public key; -i needs the private one." >&2
echo "Drop the .pub suffix from the variable that names it." >&2
exit 1
fi
done
if [ ! -r ~/.ssh/known_hosts ]; then
echo "This runner has no ~/.ssh/known_hosts, so host key" >&2
echo "checking would fail. Add the servers' host keys." >&2
exit 1
fi
- name: Publish the candidate
if: inputs.publish
env:
STAGING: ${{ vars.STAGING_SSH_TARGET }}
LOCATION: ${{ inputs.location }}
PUBLISH_KEY: ${{ vars.PUBLISH_SSH_KEY || '~/.ssh/pga-publish' }}
UPLOAD_KEY: ${{ vars.UPLOAD_SSH_KEY || '~/.ssh/pga-upload' }}
run: |
set -euo pipefail
if [ -z "${STAGING}" ]; then
echo "The STAGING_SSH_TARGET variable is not set." >&2
exit 1
fi
# One directory came out of assemble, named for the date. An explicit
# location overrides it so that a test run does not land on the
# build the buildfarm is still writing on the same server.
# assemble produces exactly one directory, named for the date.
# Anything else means the artefact is not what this step thinks it
# is, and guessing which one to publish is not a decision to make at
# three in the morning.
if [ "$(find stage -mindepth 1 -maxdepth 1 -type d | wc -l)" != "1" ]; then
echo "Expected one directory in the build artefact:" >&2
ls -l stage >&2
exit 1
fi
BUILT=$(basename "$(find stage -mindepth 1 -maxdepth 1 -type d)")
DEST=${LOCATION:-${BUILT}}
echo "Publishing ${BUILT} as ${DEST}"
publish() {
ssh -i "${PUBLISH_KEY/#\~/$HOME}" -o BatchMode=yes \
-o StrictHostKeyChecking=yes -- "${STAGING}" "$@"
}
publish stage-create "${DEST}"
# No --delete, deliberately: rrsync refuses it anyway, and a
# publishing step that can remove things is a publishing step that
# can remove the wrong things.
rsync -rlt --safe-links --no-specials --no-devices \
-e "ssh -i ${UPLOAD_KEY/#\~/$HOME} -o BatchMode=yes -o StrictHostKeyChecking=yes" \
"stage/${BUILT}/" "${STAGING}:${DEST}/"
# Signing before indexing: the metadata has to describe the signed
# packages rather than the unsigned ones just uploaded.
publish stage-sign "${DEST}"
publish stage-index-apt "${DEST}"
publish stage-index-yum "${DEST}"
# Installing from the candidate, which is the only check that proves a user
# could have. It gates nothing automatically yet, promotion still being a
# human decision, but a red result here is a candidate that must not be
# promoted.
acceptance:
needs: [location, assemble]
if: inputs.publish
uses: ./.github/workflows/acceptance-test.yml
with:
base-url: https://developer.pgadmin.org/builds/${{ needs.location.outputs.name }}
+42 -16
View File
@@ -3,8 +3,28 @@ name: Run feature tests on EPAS
on:
push:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'requirements.txt'
- 'Makefile'
- 'tools/setup-python-env.sh'
- '.github/workflows/run-feature-tests-epas.yml'
pull_request:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'requirements.txt'
- 'Makefile'
- 'tools/setup-python-env.sh'
- '.github/workflows/run-feature-tests-epas.yml'
workflow_dispatch:
@@ -21,23 +41,26 @@ jobs:
strategy:
fail-fast: false
matrix:
pgver: [12, 13, 14, 15, 16]
pgver: [14, 15, 16, 17, 18]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
- name: Setup the EDB APT repo on Linux
run: |
sudo su -c 'echo "deb [arch=amd64] https://apt.enterprisedb.com/$(lsb_release -cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb-$(lsb_release -cs).list'
sudo su -c 'echo "machine apt.enterprisedb.com login ${{ secrets.EDB_REPO_USERNAME }} password ${{ secrets.EDB_REPO_PASSWORD }}" > /etc/apt/auth.conf.d/edb.conf'
sudo wget -q -O - https://apt.enterprisedb.com/edb-deb.gpg.key | sudo apt-key add -
curl -1sLf 'https://downloads.enterprisedb.com/${{ secrets.CLOUDSMITH_TOKEN }}/enterprise/setup.deb.sh' | sudo -E bash
- name: Install platform dependencies
run: |
sudo apt update
sudo apt install -y libpq-dev libffi-dev libssl-dev libkrb5-dev zlib1g-dev edb-as${{ matrix.pgver }}-server edb-as${{ matrix.pgver }}-server-pldebugger edb-as${{ matrix.pgver }}-pgagent
sudo apt install -y libpq-dev libffi-dev libssl-dev libkrb5-dev zlib1g-dev edb-as${{ matrix.pgver }}-server edb-as${{ matrix.pgver }}-server-pldebugger
- name: Install pgagent on Linux
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.pgver <= 16 }}
run: |
sudo apt install -y edb-as${{ matrix.pgver }}-pgagent
- name: Create the tablespace directory
run: |
@@ -58,7 +81,9 @@ jobs:
sleep 2
done
psql -U enterprisedb -d postgres -p 58${{ matrix.pgver }} -c 'CREATE EXTENSION IF NOT EXISTS pgagent;'
- name: Create pgagent extension on Linux
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.pgver <= 16 }}
run: psql -U enterprisedb -d postgres -p 58${{ matrix.pgver }} -c 'CREATE EXTENSION IF NOT EXISTS pgagent;'
- name: Install Python dependencies
run: make install-python-testing
@@ -136,15 +161,16 @@ jobs:
}
EOF
- name: Upgrade yarn
run: |
yarn set version berry
yarn set version 3
# Corepack reads packageManager from web/package.json and provisions
# exactly that Yarn: a single pinned download, with nothing written
# into the checkout.
- name: Enable Corepack
run: corepack enable
- name: Build the JS bundle
run: |
cd web
yarn install
yarn install --immutable
yarn run bundle
- name: Run the tests
@@ -157,21 +183,21 @@ jobs:
- name: Archive server log
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: server-log-pg${{ matrix.pgver }}
path: var/pgadmin4.log
- name: Archive regression log
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: regression-log-pg${{ matrix.pgver }}
path: web/regression/regression.log
- name: Archive screenshots
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: screenshots-pg${{ matrix.pgver }}
path: web/regression/screenshots
+45 -12
View File
@@ -6,8 +6,28 @@ name: Run feature tests on PostgreSQL
on:
push:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'requirements.txt'
- 'Makefile'
- 'tools/setup-python-env.sh'
- '.github/workflows/run-feature-tests-pg.yml'
pull_request:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'requirements.txt'
- 'Makefile'
- 'tools/setup-python-env.sh'
- '.github/workflows/run-feature-tests-pg.yml'
workflow_dispatch:
@@ -20,18 +40,30 @@ jobs:
strategy:
fail-fast: false
matrix:
pgver: [12, 13, 14, 15, 16]
pgver: [14, 15, 16, 17, 18]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
- name: Setup the PGDG APT repo
run: |
sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
- name: Uninstall PostgreSQL if already present
run: |
if [ -n "$(ls /etc/postgresql/*/*/postgresql.conf 2>/dev/null)" ]; then
# Extract the major version from pg_config
installed_pg_version=$( pg_config --version | cut -d ' ' -f 2 | cut -d '.' -f 1 )
echo "Installed PostgreSQL version: $installed_pg_version"
if [ $installed_pg_version != ${{ matrix.pgver }} ]; then
sudo pg_dropcluster $installed_pg_version main --stop
sudo apt-get -y remove "postgresql-${installed_pg_version}"
fi
fi
- name: Install platform dependencies
run: |
sudo apt update
@@ -119,7 +151,7 @@ jobs:
"comment": "PostgreSQL ${{ matrix.pgver }} Server",
"db_username": "postgres",
"host": "/var/run/postgresql",
"db_password": "postgres",
"db_password": "",
"db_port": 59${{ matrix.pgver }},
"maintenance_db": "postgres",
"sslmode": "prefer",
@@ -139,15 +171,16 @@ jobs:
}
EOF
- name: Upgrade yarn
run: |
yarn set version berry
yarn set version 3
# Corepack reads packageManager from web/package.json and provisions
# exactly that Yarn: a single pinned download, with nothing written
# into the checkout.
- name: Enable Corepack
run: corepack enable
- name: Build the JS bundle
run: |
cd web
yarn install
yarn install --immutable
yarn run bundle
- name: Run the tests
@@ -160,21 +193,21 @@ jobs:
- name: Archive server log
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: server-log-pg${{ matrix.pgver }}
path: var/pgadmin4.log
- name: Archive regression log
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: regression-log-pg${{ matrix.pgver }}
path: web/regression/regression.log
- name: Archive screenshots
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: screenshots-pg${{ matrix.pgver }}
path: web/regression/screenshots
+32 -9
View File
@@ -3,8 +3,30 @@ name: Run Javascript tests
on:
push:
branches: [ "master" ]
paths:
- 'web/**/*.js'
- 'web/**/*.jsx'
- 'web/package.json'
- 'web/yarn.lock'
- 'web/jest.config.js'
- 'web/webpack.shim.js'
- 'web/regression/javascript/**'
- 'web/.yarnrc.yml'
- 'web/babel.config.json'
- '.github/workflows/run-javascript-tests.yml'
pull_request:
branches: [ "master" ]
paths:
- 'web/**/*.js'
- 'web/**/*.jsx'
- 'web/package.json'
- 'web/yarn.lock'
- 'web/jest.config.js'
- 'web/webpack.shim.js'
- 'web/regression/javascript/**'
- 'web/.yarnrc.yml'
- 'web/babel.config.json'
- '.github/workflows/run-javascript-tests.yml'
workflow_dispatch:
@@ -17,26 +39,27 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest, ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v7
with:
node-version: '18.x'
node-version: '20.x'
- uses: actions/checkout@v3
- uses: actions/checkout@v7
- name: Upgrade yarn
run: |
yarn set version berry
yarn set version 3
# Corepack reads packageManager from web/package.json and provisions
# exactly that Yarn: a single pinned download, with nothing written
# into the checkout.
- name: Enable Corepack
run: corepack enable
- name: Install Node modules
run: |
cd web
yarn install
yarn install --immutable
- name: Run the tests
run: |
+73 -12
View File
@@ -13,8 +13,30 @@ name: Run Python tests on EPAS
on:
push:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'requirements.txt'
- 'Makefile'
- 'tools/setup-python-env.sh'
- 'tools/get_sb_package.py'
- '.github/workflows/run-python-tests-epas.yml'
pull_request:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'requirements.txt'
- 'Makefile'
- 'tools/setup-python-env.sh'
- 'tools/get_sb_package.py'
- '.github/workflows/run-python-tests-epas.yml'
workflow_dispatch:
@@ -32,25 +54,44 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-latest]
pgver: [12, 13, 14, 15, 16]
pgver: [14, 15, 16, 17, 18]
postgisver: [34]
exclude:
- pgver: 18
postgisver: 34
include:
- os: ubuntu-22.04
pgver: 18
postgisver: 36
- os: windows-latest
pgver: 18
postgisver: 36
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
- name: Update python version
uses: actions/setup-python@v7
with:
python-version: '3.10'
- name: Setup the EDB APT repo on Linux
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
sudo su -c 'echo "deb [arch=amd64] https://apt.enterprisedb.com/$(lsb_release -cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb-$(lsb_release -cs).list'
sudo su -c 'echo "machine apt.enterprisedb.com login ${{ secrets.EDB_REPO_USERNAME }} password ${{ secrets.EDB_REPO_PASSWORD }}" > /etc/apt/auth.conf.d/edb.conf'
sudo wget -q -O - https://apt.enterprisedb.com/edb-deb.gpg.key | sudo apt-key add -
curl -1sLf 'https://downloads.enterprisedb.com/${{ secrets.CLOUDSMITH_TOKEN }}/enterprise/setup.deb.sh' | sudo -E bash
- name: Install platform dependencies on Linux
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
sudo apt update
sudo apt install -y libpq-dev libffi-dev libssl-dev libkrb5-dev zlib1g-dev edb-as${{ matrix.pgver }}-server edb-as${{ matrix.pgver }}-server-pldebugger edb-as${{ matrix.pgver }}-pgagent
sudo apt install -y libpq-dev libffi-dev libssl-dev libkrb5-dev zlib1g-dev edb-as${{ matrix.pgver }}-server edb-as${{ matrix.pgver }}-server-pldebugger edb-as${{ matrix.pgver }}-postgis${{ matrix.postgisver }}
- name: Install pgagent on Linux
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.pgver <= 16 }}
run: |
sudo apt install -y edb-as${{ matrix.pgver }}-pgagent
- name: Install platform dependencies on Windows
if: ${{ matrix.os == 'windows-latest' }}
@@ -65,6 +106,14 @@ jobs:
IF %ERRORLEVEL% EQU 3010 cmd /c "exit /b 0"
shell: cmd
- name: Add pg_config path to PATH
shell: pwsh
run: |
$pgPath = "C:\\EPAS\\${{ matrix.pgver }}\\bin"
Write-Output $pgPath
Add-Content -Path $env:GITHUB_PATH -Value $pgPath
pg_config --version
- name: Create the tablespace directory on Linux
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
@@ -78,6 +127,12 @@ jobs:
icacls "C:\EPAS\${{ matrix.pgver }}\tablespaces" /grant "NETWORK SERVICE":(OI)(CI)F /T
shell: cmd
- name: Add edb_job_scheduler into config file.
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.pgver >= 16 }}
run: |
sudo sed -i "s/shared_preload_libraries = '/shared_preload_libraries = '\$libdir\/edb_job_scheduler,/g" /etc/edb-as/${{ matrix.pgver }}/main/postgresql.conf
sudo su -c "echo \"edb_job_scheduler.database_list = 'test_dbms_job_scheduler'\" >> /etc/edb-as/${{ matrix.pgver }}/main/postgresql.conf"
- name: Start PostgreSQL on Linux
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
@@ -92,8 +147,14 @@ jobs:
>&2 echo "EPAS is unavailable - sleeping for 2 seconds"
sleep 2
done
psql -U enterprisedb -d postgres -p 58${{ matrix.pgver }} -c 'CREATE EXTENSION IF NOT EXISTS pgagent;'
- name: Create pgagent extension on Linux
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.pgver <= 16 }}
run: psql -U enterprisedb -d postgres -p 58${{ matrix.pgver }} -c 'CREATE EXTENSION IF NOT EXISTS pgagent;'
- name: Create postgis extension on Linux
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: psql -U enterprisedb -d postgres -p 58${{ matrix.pgver }} -c 'CREATE EXTENSION IF NOT EXISTS postgis;'
- name: Install Python dependencies on Linux
if: ${{ matrix.os == 'ubuntu-22.04' }}
@@ -272,14 +333,14 @@ jobs:
- name: Archive server log
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: server-log-epas${{ matrix.pgver }}
name: server-log-epas-${{ matrix.os }}-pg${{ matrix.pgver }}
path: var/pgadmin4.log
- name: Archive regression log
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: regression-log-epas${{ matrix.pgver }}
name: regression-log-epas-${{ matrix.os }}-pg${{ matrix.pgver }}
path: web/regression/regression.log
+139 -36
View File
@@ -6,10 +6,37 @@ name: Run Python tests on PostgreSQL
on:
push:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'requirements.txt'
- 'Makefile'
- 'tools/setup-python-env.sh'
- 'tools/get_sb_package.py'
- '.github/workflows/run-python-tests-pg.yml'
pull_request:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'requirements.txt'
- 'Makefile'
- 'tools/setup-python-env.sh'
- 'tools/get_sb_package.py'
- '.github/workflows/run-python-tests-pg.yml'
workflow_dispatch:
inputs:
pg_timetable_version:
description: 'pg_timetable version to install for the tests'
required: false
type: string
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
@@ -17,35 +44,57 @@ concurrency:
jobs:
run-python-tests-pg:
env:
PG_TIMETABLE_VERSION: ${{ inputs.pg_timetable_version || '6.3.0' }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
pgver: [12, 13, 14, 15, 16]
os: [macos-latest, ubuntu-22.04, windows-latest]
pgver: [14, 15, 16, 17, 18]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
- name: Update python version
uses: actions/setup-python@v7
with:
python-version: '3.10'
- name: Setup the PGDG APT repo on Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
- name: Uninstall PostgreSQL if already present on linux
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
if [ -n "$(ls /etc/postgresql/*/*/postgresql.conf 2>/dev/null)" ]; then
# Extract the major version from pg_config
installed_pg_version=$( pg_config --version | cut -d ' ' -f 2 | cut -d '.' -f 1 )
echo "Installed PostgreSQL version: $installed_pg_version"
if [ $installed_pg_version != ${{ matrix.pgver }} ]; then
sudo pg_dropcluster $installed_pg_version main --stop
sudo apt-get -y remove "postgresql-${installed_pg_version}"
fi
fi
- name: Install platform dependencies on Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
sudo apt update
sudo apt install -y libpq-dev libffi-dev libssl-dev libkrb5-dev zlib1g-dev postgresql-${{ matrix.pgver }} postgresql-${{ matrix.pgver }}-pldebugger pgagent
sudo apt install -y libpq-dev libffi-dev libssl-dev libkrb5-dev zlib1g-dev postgresql-${{ matrix.pgver }} postgresql-${{ matrix.pgver }}-pldebugger pgagent postgresql-${{ matrix.pgver }}-postgis-3
- name: Install platform dependencies on macOS
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install postgresql@${{ matrix.pgver }}
echo "/opt/homebrew/opt/postgresql@${{ matrix.pgver }}/bin" >> $GITHUB_PATH
- name: Uninstall PostgreSQL if already present
- name: Uninstall PostgreSQL if already present on windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
if exist "C:\Program Files\PostgreSQL\{{ matrix.pgver }}\uninstall-postgresql.exe" (
@@ -59,15 +108,23 @@ jobs:
run: |
FOR /f "delims=" %%F IN ('python tools\get_sb_package.py "https://www.postgresql.org/applications-v2.xml" "postgresql_${{ matrix.pgver }}" "windows-x64"') DO SET INSTALLER_EXE=%%F
ECHO Running %INSTALLER_EXE%...
%INSTALLER_EXE% --prefix C:\PostgreSQL\${{ matrix.pgver }} --datadir C:\PostgreSQL\${{ matrix.pgver }}\data --serverport 59${{ matrix.pgver }} --superpassword postgres --install_runtimes 0 --mode unattended --unattendedmodeui none --disable-components pgAdmin,stackbuilder --enable-components server,commandlinetools"
%INSTALLER_EXE% --prefix C:\PostgreSQL_custom\${{ matrix.pgver }} --datadir C:\PostgreSQL_custom\${{ matrix.pgver }}\data --serverport 59${{ matrix.pgver }} --superpassword postgres --install_runtimes 0 --mode unattended --unattendedmodeui none --disable-components pgAdmin,stackbuilder --enable-components server,commandlinetools"
choco install -y mitkerberos
REM Ignore error 3010 (reboot required)
IF %ERRORLEVEL% EQU 3010 cmd /c "exit /b 0"
shell: cmd
- name: Add pg_config path to PATH
shell: pwsh
run: |
$pgPath = "C:\\PostgreSQL_custom\\${{ matrix.pgver }}\\bin"
Write-Output $pgPath
Add-Content -Path $env:GITHUB_PATH -Value $pgPath
pg_config --version
- name: Create the tablespace directory on Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
sudo mkdir -p /var/lib/postgresql/tablespaces/${{ matrix.pgver }}
sudo chown postgres:postgres /var/lib/postgresql/tablespaces/${{ matrix.pgver }}
@@ -75,7 +132,7 @@ jobs:
- name: Create the tablespace directory on macOS
if: ${{ matrix.os == 'macos-latest' }}
run: |
mkdir -p /usr/local/var/tablespaces/${{ matrix.pgver }}
mkdir -p /opt/homebrew/var/tablespaces/${{ matrix.pgver }}
- name: Create the tablespace directory on Windows
if: ${{ matrix.os == 'windows-latest' }}
@@ -85,37 +142,70 @@ jobs:
shell: cmd
- name: Start PostgreSQL on Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
sudo su -c "echo local all all trust > /etc/postgresql/${{ matrix.pgver }}/main/pg_hba.conf"
sudo sed -i "s/port = 543[0-9]/port = 59${{ matrix.pgver }}/g" /etc/postgresql/${{ matrix.pgver }}/main/postgresql.conf
sudo sed -i "s/#shared_preload_libraries = ''/shared_preload_libraries = '\$libdir\/plugin_debugger'/g" /etc/postgresql/${{ matrix.pgver }}/main/postgresql.conf
sudo su - postgres -c "/usr/lib/postgresql/${{ matrix.pgver }}/bin/postgres -D /var/lib/postgresql/${{ matrix.pgver }}/main -c config_file=/etc/postgresql/${{ matrix.pgver }}/main/postgresql.conf &"
until sudo runuser -l postgres -c "pg_isready -p 59${{ matrix.pgver }}" 2>/dev/null; do
>&2 echo "Postgres is unavailable - sleeping for 2 seconds"
sleep 2
done
psql -U postgres -p 59${{ matrix.pgver }} -c 'CREATE EXTENSION pgagent;'
psql -U postgres -p 59${{ matrix.pgver }} -c 'CREATE EXTENSION pldbgapi;'
psql -U postgres -p 59${{ matrix.pgver }} -c 'CREATE EXTENSION postgis;'
- name: Start PostgreSQL on macOS
if: ${{ matrix.os == 'macos-latest' }}
run: |
echo local all all trust > /usr/local/var/postgresql@${{ matrix.pgver }}/pg_hba.conf
sed -i '' "s/#port = 543[0-9]/port = 59${{ matrix.pgver }}/g" /usr/local/var/postgresql@${{ matrix.pgver }}/postgresql.conf
echo local all all trust > /opt/homebrew/var/postgresql@${{ matrix.pgver }}/pg_hba.conf
sed -i '' "s/#port = 543[0-9]/port = 59${{ matrix.pgver }}/g" /opt/homebrew/var/postgresql@${{ matrix.pgver }}/postgresql.conf
brew services restart postgresql@${{ matrix.pgver }}
until /usr/local/opt/postgresql@${{ matrix.pgver }}/bin/pg_isready -p 59${{ matrix.pgver }} 2>/dev/null; do
until /opt/homebrew/opt/postgresql@${{ matrix.pgver }}/bin/pg_isready -p 59${{ matrix.pgver }} 2>/dev/null; do
>&2 echo "Postgres is unavailable - sleeping for 2 seconds"
sleep 2
done
psql postgres -p 59${{ matrix.pgver }} -c 'CREATE ROLE postgres SUPERUSER LOGIN;'
# pg_timetable tables are created by the agent and need the agent to test run_now.
- name: Install and start pg_timetable on Linux
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
wget --quiet -O /tmp/pg_timetable.tar.gz https://github.com/cybertec-postgresql/pg_timetable/releases/download/v${{ env.PG_TIMETABLE_VERSION }}/pg_timetable_Linux_x86_64.tar.gz
tar -xzf /tmp/pg_timetable.tar.gz -C /tmp --strip-components=1
/tmp/pg_timetable --init --clientname=runner "host=/var/run/postgresql port=59${{ matrix.pgver }} dbname=postgres user=postgres"
nohup /tmp/pg_timetable --clientname=runner "host=/var/run/postgresql port=59${{ matrix.pgver }} dbname=postgres user=postgres" > /tmp/pg_timetable.log 2>&1 &
echo $! > /tmp/pg_timetable.pid
sleep 2
- name: Install and start pg_timetable on macOS
if: ${{ matrix.os == 'macos-latest' }}
run: |
curl -sSL -o /tmp/pg_timetable.tar.gz https://github.com/cybertec-postgresql/pg_timetable/releases/download/v${{ env.PG_TIMETABLE_VERSION }}/pg_timetable_Darwin_arm64.tar.gz
tar -xzf /tmp/pg_timetable.tar.gz -C /tmp --strip-components=1
/tmp/pg_timetable --init --clientname=runner "host=/tmp port=59${{ matrix.pgver }} dbname=postgres user=postgres"
nohup /tmp/pg_timetable --clientname=runner "host=/tmp port=59${{ matrix.pgver }} dbname=postgres user=postgres" > /tmp/pg_timetable.log 2>&1 &
echo $! > /tmp/pg_timetable.pid
sleep 2
- name: Install and start pg_timetable on Windows
if: ${{ matrix.os == 'windows-latest' }}
shell: pwsh
run: |
$env:PGPASSWORD = 'postgres'
curl.exe -sSL -o pg_timetable.zip https://github.com/cybertec-postgresql/pg_timetable/releases/download/v${{ env.PG_TIMETABLE_VERSION }}/pg_timetable_Windows_x86_64.zip
Expand-Archive -Path pg_timetable.zip -DestinationPath .
& .\pg_timetable_Windows_x86_64\pg_timetable.exe --init --clientname=runner "postgresql://postgres:postgres@127.0.0.1:59${{ matrix.pgver }}/postgres"
Start-Process -FilePath .\pg_timetable_Windows_x86_64\pg_timetable.exe -ArgumentList @('--clientname=runner', "postgresql://postgres:postgres@127.0.0.1:59${{ matrix.pgver }}/postgres") -RedirectStandardError .\pg_timetable_Windows_x86_64\pg_timetable.err -NoNewWindow
Start-Sleep -Seconds 3
- name: Install Python dependencies on Linux and macOS
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-22.04' }}
run: make install-python-testing
- name: Install Python dependencies on Windows
@@ -130,25 +220,25 @@ jobs:
shell: cmd
- name: Create the test configuration on Linux and macOS
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-22.04' }}
run: |
cat <<EOF > web/config_local.py
from config import *
# Debug mode
DEBUG = True
# App mode
SERVER_MODE = False
# Log
CONSOLE_LOG_LEVEL = DEBUG
FILE_LOG_LEVEL = DEBUG
DEFAULT_SERVER = '127.0.0.1'
UPGRADE_CHECK_ENABLED = False
LOG_FILE = "$(pwd)/var/pgadmin4.log"
SESSION_DB_PATH = "$(pwd)/var/sessions"
STORAGE_DIR = "$(pwd)/var/storage"
@@ -156,7 +246,7 @@ jobs:
TEST_SQLITE_PATH = "$(pwd)/var/pgadmin4.db"
AZURE_CREDENTIAL_CACHE_DIR = "$(pwd)/var/azurecredentialcache"
EOF
cat <<EOF > web/regression/test_config.json
{
"pgAdmin4_login_credentials": {
@@ -180,15 +270,15 @@ jobs:
"name": "PostgreSQL ${{ matrix.pgver }}",
"comment": "PostgreSQL ${{ matrix.pgver }} Server",
"db_username": "postgres",
"host": "${{ matrix.os == 'macos-latest' && '/tmp' || matrix.os == 'ubuntu-latest' && '/var/run/postgresql' || '127.0.0.1' }}",
"host": "${{ matrix.os == 'macos-latest' && '/tmp' || matrix.os == 'ubuntu-22.04' && '/var/run/postgresql' || '127.0.0.1' }}",
"db_password": "postgres",
"db_port": 59${{ matrix.pgver }},
"maintenance_db": "postgres",
"sslmode": "prefer",
"tablespace_path": "${{ matrix.os == 'macos-latest' && format('/usr/local/var/tablespaces/{0}', matrix.pgver) || format('/var/lib/postgresql/tablespaces/{0}', matrix.pgver) }}",
"tablespace_path": "${{ matrix.os == 'macos-latest' && format('/opt/homebrew/var/tablespaces/{0}', matrix.pgver) || format('/var/lib/postgresql/tablespaces/{0}', matrix.pgver) }}",
"enabled": true,
"default_binary_paths": {
"pg": "${{ matrix.os == 'macos-latest' && format('/usr/local/opt/postgresql@{0}/bin', matrix.pgver) || format('/usr/lib/postgresql/{0}/bin', matrix.pgver) }}",
"pg": "${{ matrix.os == 'macos-latest' && format('/opt/homebrew/opt/postgresql@{0}/bin', matrix.pgver) || format('/usr/lib/postgresql/{0}/bin', matrix.pgver) }}",
"ppas": ""
}
}
@@ -205,7 +295,7 @@ jobs:
if: ${{ matrix.os == 'windows-latest' }}
run: |
FOR /f "delims=" %%D IN ('python -c "import os; print(os.getcwd().replace('\\', '\\\\'))"') DO SET WORKING_DIR=%%D
> web\config_local.py (
@echo.from config import *
@echo.
@@ -230,7 +320,7 @@ jobs:
@echo.TEST_SQLITE_PATH = "%WORKING_DIR%\\var\\test_pgadmin4.db"
@echo.AZURE_CREDENTIAL_CACHE_DIR = "%WORKING_DIR%\\var\\azurecredentialcache"
)
> web\regression\test_config.json (
@echo.{
@echo. "pgAdmin4_login_credentials": {
@@ -277,7 +367,7 @@ jobs:
shell: cmd
- name: Run the tests on Linux and macOS
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-22.04' }}
run: |
. venv/bin/activate
make check-python
@@ -289,16 +379,29 @@ jobs:
python web\regression\runtests.py --exclude feature_tests
shell: cmd
- name: Stop pg_timetable on Linux and macOS
if: always() && (matrix.os == 'macos-latest' || matrix.os == 'ubuntu-22.04')
run: |
if [ -f /tmp/pg_timetable.pid ]; then
kill $(cat /tmp/pg_timetable.pid) 2>/dev/null || true
fi
- name: Stop pg_timetable on Windows
if: always() && matrix.os == 'windows-latest'
shell: pwsh
run: |
Get-Process -Name pg_timetable -ErrorAction SilentlyContinue | Stop-Process -Force
- name: Archive server log
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: server-log-${{ matrix.os }}-pg${{ matrix.pgver }}
path: var/pgadmin4.log
- name: Archive regression log
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: regression-log-${{ matrix.os }}-pg${{ matrix.pgver }}
path: web/regression/regression.log
@@ -0,0 +1,224 @@
name: Run Python tests in server mode (data isolation)
# This workflow runs the data-isolation tests with SERVER_MODE=True.
# The main run-python-tests-pg.yml workflow runs everything with
# SERVER_MODE=False, so any test that gates itself on `config.SERVER_MODE`
# (notably web/pgadmin/browser/server_groups/tests/test_sg_data_isolation.py
# and web/pgadmin/browser/server_groups/servers/tests/test_server_data_isolation.py)
# skips itself in CI. That gap allowed the admin-bypass regression in
# 9a76ed8 to ship; this workflow exists so regressions to the centralized
# access-control helpers in web/pgadmin/utils/server_access.py are caught.
#
# Scope is intentionally narrow: one OS, one PG version, only the
# data-isolation modules. Keep it cheap to run on every PR.
on:
push:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'requirements.txt'
- 'Makefile'
- 'tools/setup-python-env.sh'
- '.github/workflows/run-python-tests-server-mode.yml'
pull_request:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'requirements.txt'
- 'Makefile'
- 'tools/setup-python-env.sh'
- '.github/workflows/run-python-tests-server-mode.yml'
workflow_dispatch:
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
run-python-tests-server-mode:
runs-on: ubuntu-24.04
env:
PG_VER: 18
steps:
- uses: actions/checkout@v7
with:
# We don't run any authenticated git operations after checkout
# (no push, no submodule fetch, no comment back to the PR), so
# persisting the token in the local git config only widens the
# blast radius of an unrelated step compromise.
persist-credentials: false
- name: Update python version
uses: actions/setup-python@v7
with:
python-version: '3.10'
- name: Setup the PGDG APT repo
# apt-key is deprecated on Ubuntu 24.04+; install the key into
# /etc/apt/keyrings/ and reference it via signed-by= in the
# sources.list entry instead.
run: |
sudo install -d -m 0755 /etc/apt/keyrings
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc \
| sudo gpg --dearmor -o /etc/apt/keyrings/pgdg.gpg
sudo sh -c 'echo "deb [signed-by=/etc/apt/keyrings/pgdg.gpg] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
- name: Uninstall PostgreSQL if already present
run: |
if [ -n "$(ls /etc/postgresql/*/*/postgresql.conf 2>/dev/null)" ]; then
installed_pg_version=$( pg_config --version | cut -d ' ' -f 2 | cut -d '.' -f 1 )
echo "Installed PostgreSQL version: $installed_pg_version"
if [ $installed_pg_version != ${PG_VER} ]; then
sudo pg_dropcluster $installed_pg_version main --stop
sudo apt-get -y remove "postgresql-${installed_pg_version}"
fi
fi
- name: Install platform dependencies
run: |
sudo apt update
sudo apt install -y libpq-dev libffi-dev libssl-dev libkrb5-dev zlib1g-dev postgresql-${PG_VER}
- name: Start PostgreSQL
run: |
sudo su -c "echo local all all trust > /etc/postgresql/${PG_VER}/main/pg_hba.conf"
sudo sed -i "s/port = 543[0-9]/port = 59${PG_VER}/g" /etc/postgresql/${PG_VER}/main/postgresql.conf
sudo su - postgres -c "/usr/lib/postgresql/${PG_VER}/bin/postgres -D /var/lib/postgresql/${PG_VER}/main -c config_file=/etc/postgresql/${PG_VER}/main/postgresql.conf &"
# Bounded readiness wait: 60 attempts × 2s = 120s cap. If PG
# never becomes ready, fail fast with logs rather than hanging
# until the job timeout.
for attempt in $(seq 1 60); do
if sudo runuser -l postgres -c "pg_isready -p 59${PG_VER}" 2>/dev/null; then
break
fi
>&2 echo "Postgres is unavailable (attempt ${attempt}/60) - sleeping for 2 seconds"
sleep 2
if [ "$attempt" -eq 60 ]; then
>&2 echo "Postgres failed to become ready within 120 seconds"
sudo tail -n 200 /var/log/postgresql/postgresql-${PG_VER}-main.log || true
exit 1
fi
done
- name: Install Python dependencies
run: make install-python-testing
- name: Create the test configuration (SERVER_MODE=True)
run: |
mkdir -p var
cat <<EOF > web/config_local.py
from config import *
# Debug mode
DEBUG = True
# App mode — this is the whole point of this workflow.
SERVER_MODE = True
# Log
CONSOLE_LOG_LEVEL = DEBUG
FILE_LOG_LEVEL = DEBUG
DEFAULT_SERVER = '127.0.0.1'
UPGRADE_CHECK_ENABLED = False
LOG_FILE = "$(pwd)/var/pgadmin4.log"
SESSION_DB_PATH = "$(pwd)/var/sessions"
STORAGE_DIR = "$(pwd)/var/storage"
SQLITE_PATH = "$(pwd)/var/pgadmin4.db"
TEST_SQLITE_PATH = "$(pwd)/var/pgadmin4.db"
AZURE_CREDENTIAL_CACHE_DIR = "$(pwd)/var/azurecredentialcache"
EOF
cat <<EOF > web/regression/test_config.json
{
"pgAdmin4_login_credentials": {
"new_password": "NEWPASSWORD",
"login_password": "PASSWORD",
"login_username": "USER@EXAMPLE.COM"
},
"pgAdmin4_test_user_credentials": {
"new_password": "NEWPASSWORD",
"login_password": "PASSWORD",
"login_username": "USER2@EXAMPLE.COM"
},
"pgAdmin4_test_non_admin_credentials": {
"new_password": "NEWPASSWORD",
"login_password": "PASSWORD",
"login_username": "USER3@EXAMPLE.COM"
},
"server_group": 1,
"server_credentials": [
{
"name": "PostgreSQL ${{ env.PG_VER }}",
"comment": "PostgreSQL ${{ env.PG_VER }} Server",
"db_username": "postgres",
"host": "/var/run/postgresql",
"db_password": "postgres",
"db_port": 59${{ env.PG_VER }},
"maintenance_db": "postgres",
"sslmode": "prefer",
"tablespace_path": "/var/lib/postgresql/tablespaces/${{ env.PG_VER }}",
"enabled": true,
"default_binary_paths": {
"pg": "/usr/lib/postgresql/${{ env.PG_VER }}/bin",
"ppas": ""
}
}
],
"server_update_data": [
{
"comment": "This is test update comment"
}
]
}
EOF
- name: Run server-group data isolation tests
run: |
. venv/bin/activate
python web/regression/runtests.py --pkg browser.server_groups.tests --modules test_sg_data_isolation
- name: Run server data isolation tests
run: |
. venv/bin/activate
python web/regression/runtests.py --pkg browser.server_groups.servers.tests --modules test_server_data_isolation
- name: Run SQL Editor unauth-pickle regression test
# Regression guard for the CSRF-only-no-auth chain on
# /sqleditor/close and /sqleditor/.../update_connection: both
# endpoints reach pickle.loads via close_sqleditor_session() /
# check_transaction_status(), so they must require an
# authenticated session. This test is a no-op in DESKTOP mode
# (auto-re-authentication) so it can only run here.
run: |
. venv/bin/activate
python web/regression/runtests.py --pkg tools.sqleditor --modules test_close_requires_auth
- name: Archive server log
if: success() || failure()
uses: actions/upload-artifact@v7
with:
name: server-log-server-mode
path: var/pgadmin4.log
- name: Archive regression log
if: success() || failure()
uses: actions/upload-artifact@v7
with:
name: regression-log-server-mode
path: web/regression/regression.log
+168
View File
@@ -0,0 +1,168 @@
# Signed, notarised macOS snapshot builds, replacing the buildfarm's
# pgadmin4-appbundle-snapshot job.
#
# Unlike check-macos-build.yml this produces something distributable: the
# bundle is signed with the Developer ID, notarised by Apple and stapled, and a
# ZIP is built alongside the DMG because the Electron auto-updater consumes the
# ZIP whilst the DMG is the primary download.
#
# Uploading is deliberately not wired up yet. This proves the signed build
# works; publishing comes after.
#
# Triggered by hand for now rather than nightly, so it cannot start signing
# things before we mean it to.
name: Snapshot - macOS
on:
# Callable from snapshot.yml so that the orchestrator produces one
# complete tree. Signing stays here rather than moving to the
# servers like the GPG signing did, because the Apple and Certum
# credentials cannot follow it.
workflow_call:
workflow_dispatch:
concurrency:
# Not cancel-in-progress, unlike the QA builds. Cancelling a signing build
# partway through wastes forty minutes of work and, worse, can abandon a
# notarisation already submitted to Apple, leaving a request sitting in their
# queue for a build nobody will collect. Queue instead.
# Spelled out rather than taken from github.workflow, which in a
# reusable workflow is the CALLER's name, so every workflow Snapshot
# calls would otherwise share one group.
group: 'snapshot-macos @ ${{ github.ref }}'
cancel-in-progress: false
permissions:
contents: read
jobs:
appbundle:
runs-on: ${{ matrix.runner }}
# The signing credentials live on an environment rather than loose on the
# repository, so only the workflows that should be signing can reach them.
environment: signing
strategy:
fail-fast: false
matrix:
include:
- { name: 'arm64', arch: 'arm64', runner: 'macos-15' }
- { name: 'x64', arch: 'x86_64', runner: 'macos-26-intel' }
timeout-minutes: 180
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '20.x'
- name: Enable Corepack
run: corepack enable
- name: Install the build dependencies
run: brew install syft wget
- name: Install the PostgreSQL build dependencies
uses: ./.github/actions/install-pgbuild-deps
with:
arch: ${{ matrix.arch }}
# The buildfarm keeps the Developer ID in the worker's login keychain and
# unlocks it with devkeys/unlock-csc.sh. A hosted runner has no such
# keychain, so one is created for this job alone and destroyed after it,
# which is also why the password is generated rather than configured: it
# never outlives the job.
- name: Import the signing certificate
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
run: |
KEYCHAIN="${RUNNER_TEMP}/build.keychain"
KEYCHAIN_PASSWORD=$(uuidgen)
echo "KEYCHAIN=${KEYCHAIN}" >> "${GITHUB_ENV}"
echo "${MACOS_CERTIFICATE}" | base64 --decode > "${RUNNER_TEMP}/cert.p12"
security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}"
security set-keychain-settings -lut 21600 "${KEYCHAIN}"
security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}"
security import "${RUNNER_TEMP}/cert.p12" \
-k "${KEYCHAIN}" \
-P "${MACOS_CERTIFICATE_PASSWORD}" \
-T /usr/bin/codesign
# Without this, codesign prompts for permission to use the key, which
# on a headless runner means hanging until the job times out.
security set-key-partition-list -S apple-tool:,apple:,codesign: \
-s -k "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" > /dev/null
security list-keychain -d user -s "${KEYCHAIN}" login.keychain
rm -f "${RUNNER_TEMP}/cert.p12"
echo "Identities available to codesign:"
security find-identity -v -p codesigning "${KEYCHAIN}"
# build.sh decides whether to sign and notarise purely by whether these
# files exist, which is what keeps the QA build credential-free.
- name: Write the signing configuration
env:
MACOS_DEVELOPER_ID: ${{ secrets.MACOS_DEVELOPER_ID }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
printf 'DEVELOPER_ID="%s"\n' "${MACOS_DEVELOPER_ID}" > pkg/mac/codesign.conf
{
printf 'DEVELOPER_USER=%s\n' "${APPLE_ID}"
printf 'DEVELOPER_ASP=%s\n' "${APPLE_APP_SPECIFIC_PASSWORD}"
printf 'DEVELOPER_TEAM_ID=%s\n' "${APPLE_TEAM_ID}"
} > pkg/mac/notarization.conf
# --zip as well as the DMG: the DMG is the download, the ZIP is what the
# Electron auto-updater fetches. The buildfarm's snapshot job does the
# same.
- name: Build the signed appbundle
run: |
export PGADMIN_POSTGRES_DIR=/opt/pgbuild/postgresql
export OPENSSL_DIR=/opt/pgbuild/openssl
export OPENSSL_STATIC=1
make appbundle BUILD_OPTS="--zip"
- name: Verify the signature and notarisation
run: |
APP="mac-build/pgAdmin 4.app"
echo "=== codesign ==="
codesign --verify --deep --strict --verbose=2 "${APP}"
codesign -dvvv "${APP}" 2>&1 | grep -E 'Authority|TeamIdentifier|Identifier='
echo "=== gatekeeper assessment ==="
spctl --assess --type execute --verbose=4 "${APP}"
echo "=== stapled notarisation ==="
xcrun stapler validate "${APP}"
for F in dist/*.dmg; do
echo "--- ${F} ---"
xcrun stapler validate "${F}"
done
- name: Archive the disk image and zip
uses: actions/upload-artifact@v7
with:
name: pgadmin4-macos-snapshot-${{ matrix.name }}
if-no-files-found: error
path: |
dist/*.dmg
dist/*.zip
# Runs even on failure: a keychain holding a Developer ID key must not
# outlive the job that created it, and the conf files carry the Apple
# credentials.
- name: Clean up the credentials
if: always()
run: |
rm -f pkg/mac/codesign.conf pkg/mac/notarization.conf
if [ -n "${KEYCHAIN:-}" ] && [ -f "${KEYCHAIN}" ]; then
security delete-keychain "${KEYCHAIN}"
fi
+180
View File
@@ -0,0 +1,180 @@
# Signed Windows snapshot builds, replacing the buildfarm's
# pgadmin4-windows-x64-snapshot job.
#
# This is the one workflow that cannot use a hosted runner. The certificate is
# on a Certum hardware token plugged into a machine we host ourselves, reached
# through the Windows machine certificate store, and a PIN handler answers the
# prompt from the interactive desktop session. None of that can be moved to a
# runner GitHub provides.
#
# Uploading is not wired up yet; this proves the signed build works.
#
# The runner must be running in the logged-in interactive session, not as a
# Windows service. A service runs in session 0 with no desktop, so the PIN
# prompt appears where the handler cannot see it and signing hangs rather than
# failing.
name: Snapshot - Windows
on:
# Callable from snapshot.yml so that the orchestrator produces one
# complete tree. Signing stays here rather than moving to the
# servers like the GPG signing did, because the Apple and Certum
# credentials cannot follow it.
workflow_call:
workflow_dispatch:
concurrency:
# Serialised deliberately, and not cancel-in-progress. There is one hardware
# token, and two builds signing through it at once is a good way to find out
# what proCertum does under contention. Jenkins may also be using it.
group: 'windows-signing'
cancel-in-progress: false
permissions:
contents: read
jobs:
installer:
runs-on: [self-hosted, windows-x64]
timeout-minutes: 120
environment: signing
env:
POSTGRES_MAJOR: '18'
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '20.x'
- name: Enable Corepack
run: corepack enable
# No Python step, and none needed. actions/setup-python hangs on this
# runner: it installs Python rather than unpacking it, and anything
# raising a UAC prompt in the auto-logged-in session waits forever with
# nobody to answer it, exactly as the card's PIN dialog would. The first
# attempt sat on that step for thirty minutes against eleven seconds for
# setup-node. Using whatever Python is on PATH avoids the hang and is
# worse: this machine has 3.14 installed whilst the released installers
# carry 3.13, so it would have quietly shipped a different interpreter
# from the one the macOS build ships.
#
# Make.bat now downloads the version named in pkg/python-version.txt
# itself, as a plain tarball with no installer and so no prompt, which
# settles both problems and means this host needs no Python at all.
# Unlike the hosted build, nothing is installed here. This machine is
# configured by hand rather than by Ansible, it is the only one in the
# pipeline that cannot simply be rebuilt, and a CI job has no business
# mutating it. So check, and stop with something useful to act on rather
# than failing halfway through a build.
- name: Verify the build prerequisites
shell: powershell
run: |
$missing = @()
if (-not (Test-Path "C:\Program Files (x86)\Inno Setup 6\ISCC.exe")) { $missing += "innosetup" }
foreach ($tool in @('syft', 'wget')) {
if (-not (Get-Command $tool -ErrorAction SilentlyContinue)) { $missing += $tool }
}
if ($missing.Count) {
throw ("Missing build prerequisites on this runner: $($missing -join ', '). " +
"Install with: choco install $($missing -join ' ') -y")
}
Write-Output "All prerequisites present."
- name: Install the PostgreSQL and Kerberos dependencies
id: deps
uses: ./.github/actions/install-pgbuild-deps
with:
arch: x86_64
postgres-major: ${{ env.POSTGRES_MAJOR }}
- name: Record the dependency location
shell: powershell
run: '"DEPS_DIR=${{ steps.deps.outputs.prefix }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append'
# Discovered rather than hardcoded. The buildfarm pins these to specific
# paths in its Jenkins node configuration, which needs editing every time
# Visual Studio or the Windows SDK updates, and that configuration is
# going away with the buildfarm.
- name: Locate the toolchain
shell: powershell
run: |
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vs = & $vswhere -latest -products * -property installationPath
if (-not $vs) { throw "Could not locate a Visual Studio installation" }
$redist = Get-ChildItem "$vs\VC\Redist\MSVC" -Directory |
Where-Object { Test-Path "$($_.FullName)\vc_redist.x64.exe" } |
Sort-Object Name -Descending | Select-Object -First 1
if (-not $redist) { throw "Could not locate vc_redist.x64.exe under $vs" }
# signtool lives under the SDK's versioned bin directory, and also in
# the App Certification Kit, which is where the buildfarm points at.
# Take the newest SDK copy, falling back to the ACK one.
$signtool = Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\bin" `
-Filter signtool.exe -Recurse -ErrorAction SilentlyContinue |
Where-Object { $_.FullName -match '\\x64\\' } |
Sort-Object FullName -Descending | Select-Object -First 1
if (-not $signtool) {
$ack = "${env:ProgramFiles(x86)}\Windows Kits\10\App Certification Kit\signtool.exe"
if (Test-Path $ack) { $signtool = Get-Item $ack }
}
if (-not $signtool) { throw "Could not locate signtool.exe" }
Write-Output "Visual Studio: $vs"
Write-Output "VC++ redist: $($redist.FullName)"
Write-Output "signtool: $($signtool.DirectoryName)"
"VS_INSTALL_DIR=$vs" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
"PGADMIN_VCREDIST_DIR=$($redist.FullName)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
"PGADMIN_SIGNTOOL_DIR=$($signtool.DirectoryName)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
# Setting PGADMIN_WINDOWS_CSC is what makes Make.bat sign: it selects the
# certificate by subject name from the machine store, where proCertum
# installed it. Kept in a repository variable rather than the tree, so a
# certificate renewal is a settings change rather than a commit.
- name: Build the signed installer
shell: cmd
env:
PGADMIN_WINDOWS_CSC: ${{ vars.PGADMIN_WINDOWS_CSC }}
run: |
IF "%PGADMIN_WINDOWS_CSC%" == "" (
ECHO ERROR: the PGADMIN_WINDOWS_CSC repository variable is not set,
ECHO so Make.bat would silently produce an unsigned build.
EXIT /b 1
)
SET "PGADMIN_POSTGRES_DIR=%DEPS_DIR%\postgresql"
SET "PGADMIN_KRB5_DIR=%DEPS_DIR%\krb5"
SET "PGADMIN_INNOTOOL_DIR=C:\Program Files (x86)\Inno Setup 6"
CALL "%VS_INSTALL_DIR%\VC\Auxiliary\Build\vcvars64.bat" || EXIT /b 1
CALL Make.bat || EXIT /b 1
# Make.bat now fails the build if either signature fails, the executable
# inside the installer included, so this is a second opinion rather than
# the only check. It verifies what is in dist/, which is the installer;
# the executable within it is covered by Make.bat refusing to continue.
- name: Verify the signatures
shell: powershell
run: |
$signtool = Join-Path $env:PGADMIN_SIGNTOOL_DIR 'signtool.exe'
Get-ChildItem dist\*.exe | ForEach-Object {
Write-Output "--- $($_.Name) ---"
& $signtool verify /pa /v $_.FullName
if ($LASTEXITCODE -ne 0) { throw "Signature verification failed for $($_.Name)" }
}
- name: Archive the installer
uses: actions/upload-artifact@v7
with:
name: pgadmin4-windows-snapshot
if-no-files-found: error
path: dist/*.exe
+465
View File
@@ -0,0 +1,465 @@
# Nightly snapshot builds, replacing the buildfarm's pgadmin4-all-snapshot job
# and the dozen per-artefact snapshot jobs it drives.
#
# Nothing here is a second definition of a build. Every artefact comes from the
# same workflow that runs on each push, called rather than copied, so a
# snapshot cannot quietly diverge from what QA tested. That was not true of the
# buildfarm, where pgadmin4-deb-build and pgadmin4-deb-snapshot were separate
# job definitions carrying the same commands.
#
# Nothing here signs anything either, beyond the macOS notarisation and the
# Windows Authenticode signature, which have to happen where their credentials
# are. The GPG key that signs the RPMs and the repository metadata stays on the
# servers: this workflow assembles the tree and uploads it, and asks the
# staging server to
# index and sign, so a compromised workflow run can ask for a signature but
# never holds the means to make one.
name: Snapshot
on:
workflow_dispatch:
inputs:
location:
description: >-
Snapshot directory name, normally today's date. The buildfarm
writes <date> on the same server, so a test run wants a -N
suffix, for example 2026-09-17-2.
required: false
default: ''
publish:
description: Upload to the download server when the build succeeds
type: boolean
required: false
default: false
# Nightly, matching the buildfarm's pgadmin4-all-snapshot, which ran at
# 01:01. GitHub's scheduler is best-effort and runs late under load, which
# does not matter for a snapshot: the directory is named for the date the
# run assembles it, not for the minute it started.
schedule:
- cron: '1 1 * * *'
concurrency:
# One snapshot at a time, and never cancelled: a cancelled run can abandon a
# notarisation already submitted to Apple, and leaves the signing token in an
# unknown state.
group: 'snapshot'
cancel-in-progress: false
permissions:
contents: read
jobs:
# The directory name, decided once. Two jobs need it and they must agree:
# the repo RPMs carry the snapshot's own URL inside them, so if that job and
# the assemble job each called date(1) a run straddling midnight would ship a
# repository configuration pointing at a snapshot that does not exist.
#
# It is also where a scheduled run on a fork stops. A fork with Actions
# enabled inherits the schedule but none of the signing secrets or
# self-hosted runners, so the macOS jobs would fail at the certificate and
# the Windows job would queue for a day. Every other job waits on this one,
# so skipping it skips the run. A dispatch still runs anywhere.
location:
if: >-
github.event_name != 'schedule'
|| github.repository == 'pgadmin-org/pgadmin4'
runs-on: ubuntu-24.04
outputs:
name: ${{ steps.pick.outputs.name }}
# Whether a location was asked for by name, which decides both what the
# published directory is called and whether retention runs. It travels
# as a flag so that the steps downstream never need the raw input to
# work out what was requested: this job is where that input is checked,
# and a value that has not been through the check below has no business
# reaching the machine holding the publishing keys.
named: ${{ steps.pick.outputs.named }}
steps:
- id: pick
env:
REQUESTED: ${{ inputs.location }}
run: |
set -euo pipefail
NAME="${REQUESTED:-}"
if [ -n "${NAME}" ]; then NAMED=yes; else NAMED=no; fi
[ -n "${NAME}" ] || NAME=$(date +%Y-%m-%d)
# Validated here so that everything downstream, including a shell on
# the machine holding the publishing keys, is working with a name
# that cannot be anything but a date and an optional suffix. The
# wrapper on the server applies its own rule to the same value; this
# one exists so a bad input fails in five seconds rather than after
# an hour of building.
if ! printf '%s' "${NAME}" | grep -Eq '^[0-9]{4}-[0-9]{2}-[0-9]{2}(-[1-9][0-9]?)?$'; then
echo "Not a valid snapshot location: ${NAME}" >&2
echo "Expected YYYY-MM-DD, optionally with a -N suffix." >&2
exit 1
fi
echo "Snapshot location: ${NAME}"
echo "name=${NAME}" >> "${GITHUB_OUTPUT}"
echo "named=${NAMED}" >> "${GITHUB_OUTPUT}"
deb:
needs: location
uses: ./.github/workflows/check-deb-build.yml
rpm:
needs: location
uses: ./.github/workflows/check-rpm-build.yml
tarball:
needs: location
uses: ./.github/workflows/check-tarball-build.yml
wheel:
needs: location
uses: ./.github/workflows/check-python-build.yml
docs:
needs: location
uses: ./.github/workflows/check-doc-builds.yml
# No helm job here. The chart is not part of the download tree: the
# buildfarm pushed it to an OCI registry, which nothing in this workflow
# does yet. Calling the build and then discarding its artefact, which is what
# happened before, cost a runner and proved nothing that check-helm-build
# does not already prove on every push.
# The repository configuration RPMs. These are not built by the QA
# workflows, because they are not a build of pgAdmin: they are a one-file
# package carrying a .repo pointing at the tree they ship in, which is why
# the URL has to be known before they are built.
repo-rpm:
needs: location
runs-on: ubuntu-24.04
container: almalinux:9
steps:
- name: Install the build environment
run: dnf install -y --setopt=install_weak_deps=False rpm-build python3 git
- uses: actions/checkout@v7
- name: Mark the workspace as a safe git directory
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Build the repository RPMs
env:
LOCATION: ${{ needs.location.outputs.name }}
run: |
# Through the environment rather than interpolated into the script.
# The location is a dispatch input, so it is text somebody chose, and
# workflow expression substitution happens before the shell ever sees the
# line, so a crafted location would otherwise become shell text.
export PGADMIN_REPO_DIR="https://ftp.postgresql.org/pub/pgadmin/pgadmin4/snapshots/${LOCATION}/yum"
echo "Repositories will point at ${PGADMIN_REPO_DIR}"
pkg/redhat/repo-rpm.sh
- name: Archive the repository RPMs
uses: actions/upload-artifact@v7
with:
name: pgadmin4-repo-rpm-build-output
if-no-files-found: error
path: dist/*.noarch.rpm
macos:
needs: location
uses: ./.github/workflows/snapshot-macos.yml
secrets: inherit
windows:
needs: location
uses: ./.github/workflows/snapshot-windows.yml
secrets: inherit
assemble:
needs: [location, deb, rpm, tarball, wheel, docs, repo-rpm, macos, windows]
# the runner, not a hosted runner. This job assembles a tree of several
# hundred megabytes and then, when publishing, sends it to the download
# server; splitting the two meant uploading that tree as an artifact and
# immediately downloading it again on the runner, having first queued for a
# hosted runner behind whatever else the organisation was building.
runs-on: [self-hosted, publish]
# For the variables naming the keys and the target, which live here. The
# environment carries no protection rules, so a run that is not publishing
# is not gated by it.
environment: publishing
# Everything must have built except Windows. That is the one runner which
# can legitimately be offline, and a snapshot without the installer is
# still worth having; a snapshot missing its documentation, source tarball,
# wheel or repository RPMs is not, and the repository RPMs are worse than
# missing, since install-repo-readme.py then fails after the packages have
# been uploaded and signed, leaving half a snapshot on the download server.
if: >-
always()
&& needs.location.result == 'success'
&& needs.deb.result == 'success'
&& needs.rpm.result == 'success'
&& needs.tarball.result == 'success'
&& needs.wheel.result == 'success'
&& needs.docs.result == 'success'
&& needs.repo-rpm.result == 'success'
&& needs.macos.result == 'success'
steps:
- uses: actions/checkout@v7
- name: Collect the build artefacts
uses: actions/download-artifact@v7
with:
path: artefacts
# The layout is the one the publishing scripts and the download site
# expect, and is what the wrapper's stage-create verb creates on the
# staging server.
# The Debian architecture comes from the package filename rather than a
# table, since dpkg already encodes it there; the codename does not, so
# that mapping is explicit.
- name: Assemble the staging tree
env:
LOCATION: ${{ needs.location.outputs.name }}
run: |
set -euo pipefail
# Flat, beside apt/ and yum/, which is how both the staging server
# and the snapshots tree are laid out. The docs/macos/pip/source/
# windows subdivision belongs to a published release, and it is the
# promotion step that sorts files into it on the way there.
# Explicitly, rather than trusting the checkout to have cleaned it.
# This runs on a self-hosted runner whose workspace persists between
# jobs, and a previous run's tree left behind here is indistinguishable
# from this one's until something downstream has to choose between
# them.
rm -rf stage
STAGE="stage/${LOCATION}"
mkdir -p "${STAGE}/yum"
# An artefact can be legitimately absent: the Windows signing host is
# allowed to be offline, and a failed matrix leg is reported by its
# own job rather than by a confusing cp error here.
copy_into() {
DEST=$1; shift
for SRC in "$@"; do
[ -e "${SRC}" ] || continue
mkdir -p "${DEST}"
cp "${SRC}" "${DEST}/"
done
}
codename_for() {
case "$1" in
debian-12) echo bookworm ;;
debian-13) echo trixie ;;
ubuntu-2204) echo jammy ;;
ubuntu-2404) echo noble ;;
ubuntu-2604) echo resolute ;;
*) echo "Unknown Debian build name: $1" >&2; exit 1 ;;
esac
}
for DIR in artefacts/pgadmin4-deb-build-output-*; do
[ -d "${DIR}" ] || continue
CODENAME=$(codename_for "${DIR##*-output-}")
for DEB in "${DIR}"/*.deb; do
ARCH=$(basename "${DEB}" .deb); ARCH=${ARCH##*_}
TARGET="${STAGE}/apt/${CODENAME}/dists/pgadmin4/main/binary-${ARCH}"
mkdir -p "${TARGET}"
cp "${DEB}" "${TARGET}/"
done
done
# RPM trees are named for the distribution, which the build name
# already carries: el-9 becomes redhat/rhel-9-x86_64.
for DIR in artefacts/pgadmin4-rpm-build-output-*; do
[ -d "${DIR}" ] || continue
NAME=${DIR##*-output-}
case "${NAME}" in
el-*) FAMILY=redhat; TREE="rhel-${NAME#el-}" ;;
fedora-*) FAMILY=fedora; TREE="${NAME}" ;;
*) echo "Unknown RPM build name: ${NAME}" >&2; exit 1 ;;
esac
# Every RPM for a distribution goes in that distribution's
# tree, including the noarch ones. Taking the directory from the
# package's own architecture would file pgadmin4 and
# pgadmin4-web, both noarch, under rhel-9-noarch, where no
# client looks: dnf asks for <name>-<version>-$basearch. The
# RPM matrix is x86_64 only for now, so this is a constant; when
# aarch64 arrives it becomes a property of the build.
TARGET="${STAGE}/yum/${FAMILY}/${TREE}-x86_64"
mkdir -p "${TARGET}"
cp "${DIR}"/*.rpm "${TARGET}/"
done
copy_into "${STAGE}" artefacts/pgadmin4-tarball-build-output/*
copy_into "${STAGE}" artefacts/pgadmin4-python-build-output/*
# The version is read once here and used for the documentation
# filenames, which the build leaves unversioned as pgadmin4.pdf and
# pgAdmin4.epub whilst the download site has always carried
# pgadmin4-<version>.pdf and .epub.
VERSION=$(python3 -c "import sys; sys.path.insert(0, 'web'); import version; print(version.APP_VERSION)")
for SRC in artefacts/pgadmin4-pdf-build-output/*.pdf; do
[ -e "${SRC}" ] && cp "${SRC}" "${STAGE}/pgadmin4-${VERSION}.pdf"
done
for SRC in artefacts/pgadmin4-epub-build-output/*.epub; do
[ -e "${SRC}" ] && cp "${SRC}" "${STAGE}/pgadmin4-${VERSION}.epub"
done
# The docs tarball is what load-docs.sh unpacks on the web server, so
# it ships as a tarball rather than as the directory of files the
# build produces.
if [ -d artefacts/pgadmin4-html-build-output ]; then
# Under a pgadmin4-<version>-docs/ directory, not flat. The
# web server's load-docs.sh unpacks this into the docs root
# and then hands docloader that directory name, so a flat
# archive would scatter several hundred files across the root
# and then fail on a directory that does not exist. Every
# released tarball has carried that top level; the tar here
# had not.
DOCS_DIR="pgadmin4-${VERSION}-docs"
rm -rf "artefacts/${DOCS_DIR}"
mv artefacts/pgadmin4-html-build-output "artefacts/${DOCS_DIR}"
tar -czf "${STAGE}/pgadmin4-${VERSION}-docs.tar.gz" \
-C artefacts "${DOCS_DIR}"
fi
# At the root of yum/, beside the family directories, which is
# where the README instructions tell people to fetch them from.
copy_into "${STAGE}/yum" artefacts/pgadmin4-repo-rpm-build-output/*
copy_into "${STAGE}" artefacts/pgadmin4-macos-snapshot-*/*
copy_into "${STAGE}" artefacts/pgadmin4-windows-snapshot/*
find "${STAGE}" -type f | sort
- name: Check the keys are present
# A scheduled run always publishes, that being the entire point of the
# nightly; the input exists so that a dispatched test run does not.
# It has to be spelled out because a schedule event carries no inputs
# at all, so `inputs.publish` is null rather than false, and the two
# publishing steps were quietly skipped on every nightly.
if: ${{ github.event_name == 'schedule' || inputs.publish }}
env:
DOWNLOAD: ${{ vars.DOWNLOAD_SSH_TARGET }}
PUBLISH_KEY: ${{ vars.PUBLISH_SSH_KEY || '~/.ssh/pga-publish' }}
UPLOAD_KEY: ${{ vars.UPLOAD_SSH_KEY || '~/.ssh/pga-upload' }}
run: |
set -euo pipefail
for TOOL in ssh rsync; do
command -v "${TOOL}" >/dev/null || {
echo "This runner has no ${TOOL}." >&2; exit 1; }
done
# These three variables reach option positions. The target is the
# first positional argument to ssh, and the key paths are spliced
# into the -e string that rsync splits on whitespace before exec'ing
# it, so a value beginning with a hyphen, or one carrying a space,
# would be read as an option or as a second word rather than as the
# host or the path it is meant to be. Only an administrator can set
# a repository variable, which makes this defence in depth rather
# than a live hole, but it is checked here, once, rather than at
# each point of use; the -- in the publish step below closes the
# same gap from the other end.
TARGET_RE='^[A-Za-z0-9][A-Za-z0-9._-]*(@[A-Za-z0-9][A-Za-z0-9.-]*)?$'
printf '%s' "${DOWNLOAD}" | grep -Eq "${TARGET_RE}" || {
echo "DOWNLOAD_SSH_TARGET is not a [user@]host." >&2; exit 1; }
for KEY in "${PUBLISH_KEY/#\~/$HOME}" "${UPLOAD_KEY/#\~/$HOME}"; do
printf '%s' "${KEY}" | grep -Eq '^/[A-Za-z0-9._/-]+$' || {
echo "Not a plain absolute path: ${KEY}" >&2; exit 1; }
if [ ! -r "${KEY}" ]; then
echo "Missing or unreadable SSH key: ${KEY}" >&2
exit 1
fi
# A public key is readable too, and pointing -i at one fails
# later inside ssh with a message that does not mention which
# file was wrong. Both halves of a pair sit in the same
# directory with names one suffix apart, so this is an easy
# thing to configure wrongly and a cheap thing to catch.
if head -c 4 "${KEY}" | grep -q '^ssh-'; then
echo "${KEY} is a public key; -i needs the private one." >&2
echo "Drop the .pub suffix from the variable that names it." >&2
exit 1
fi
done
if [ ! -r ~/.ssh/known_hosts ]; then
echo "This runner has no ~/.ssh/known_hosts, so host key" >&2
echo "checking would fail. Add the servers' host keys." >&2
exit 1
fi
- name: Publish the snapshot
if: ${{ github.event_name == 'schedule' || inputs.publish }}
env:
DOWNLOAD: ${{ vars.DOWNLOAD_SSH_TARGET }}
# From the location job rather than from inputs.location, so the
# name reaching the publishing key is the one that job checked the
# shape of. The two agree today, which is exactly why it is worth
# fixing: the validation sat upstream of this step by coincidence
# rather than by construction.
LOCATION: ${{ needs.location.outputs.name }}
NAMED: ${{ needs.location.outputs.named }}
PUBLISH_KEY: ${{ vars.PUBLISH_SSH_KEY || '~/.ssh/pga-publish' }}
UPLOAD_KEY: ${{ vars.UPLOAD_SSH_KEY || '~/.ssh/pga-upload' }}
run: |
set -euo pipefail
if [ -z "${DOWNLOAD}" ]; then
echo "The DOWNLOAD_SSH_TARGET variable is not set." >&2
exit 1
fi
# One directory came out of assemble, named for the date. An explicit
# location overrides it so that a test run does not land on the
# snapshot the buildfarm is still writing on the same server.
# assemble produces exactly one directory, named for the date.
# Anything else means the artefact is not what this step thinks it
# is, and guessing which one to publish is not a decision to make at
# three in the morning.
if [ "$(find stage -mindepth 1 -maxdepth 1 -type d | wc -l)" != "1" ]; then
echo "Expected one directory in the snapshot artefact:" >&2
ls -l stage >&2
exit 1
fi
BUILT=$(basename "$(find stage -mindepth 1 -maxdepth 1 -type d)")
# An empty input still means "whatever assemble called it", which is
# why this turns on the flag rather than on the name being empty:
# the location job fills a blank input in with today's date, so the
# name itself no longer says whether anybody asked for one.
if [ "${NAMED}" = "yes" ]; then
DEST=${LOCATION}
else
DEST=${BUILT}
fi
echo "Publishing ${BUILT} as ${DEST}"
publish() {
ssh -i "${PUBLISH_KEY/#\~/$HOME}" -o BatchMode=yes \
-o StrictHostKeyChecking=yes -- "${DOWNLOAD}" "$@"
}
publish snapshot-create "${DEST}"
# No --delete, deliberately: rrsync refuses it anyway, and a
# publishing step that can remove things is a publishing step that
# can remove the wrong things.
rsync -rlt --safe-links --no-specials --no-devices \
-e "ssh -i ${UPLOAD_KEY/#\~/$HOME} -o BatchMode=yes -o StrictHostKeyChecking=yes" \
"stage/${BUILT}/" "${DOWNLOAD}:${DEST}/"
# Signing before indexing: the metadata has to describe the signed
# packages rather than the unsigned ones just uploaded.
publish snapshot-sign "${DEST}"
publish snapshot-index-apt "${DEST}"
publish snapshot-index-yum "${DEST}"
# Retention, which the buildfarm did with ls | tail | xargs rm. The
# verb takes no argument: it cannot be asked to remove a particular
# snapshot, only to enforce the retention the server already has.
#
# Skipped when the directory was named by hand, because that is a
# test run, and a test run has no business deciding which of the
# real snapshots are old enough to delete.
if [ "${NAMED}" = "yes" ]; then
echo "Named location, so leaving retention alone."
else
publish snapshot-purge
fi
-58
View File
@@ -1,58 +0,0 @@
# This workflow requires the following configuration in Github
#
# Variables:
# SONARQUBE_PROJECT_KEY - The project key in SonarQube
#
# Secrets:
# SONARQUBE_TOKEN - SonarQube API token
# SONARQUBE_HOST - The URL of the SonarQube host
name: SonarQube scan
on:
push:
branches: [ "master" ]
concurrency:
group: sonarqube
cancel-in-progress: false
jobs:
run-sonarqube-scan:
# Only run if the project key is set
if: vars.SONARQUBE_PROJECT_KEY != null
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create the scan properties file
run: |
cat <<EOF > sonar-project.properties
sonar.projectKey=${{ vars.SONARQUBE_PROJECT_KEY }}
sonar.projectName=pgAdmin 4
sonar.projectVersion=%VERSION%
# Ignore templates and SQL scripts as they confuse the scanner
sonar.exclusions=**/templates/**/*, **/*.sql
# Let SonarQube know where tests can be found
sonar.test.inclusions=**/tests/**, web/regression
# Python compatibility
sonar.python.version=3.7, 3.8, 3.9, 3.10, 3.11
EOF
APP_RELEASE=`grep "^APP_RELEASE" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
APP_REVISION=`grep "^APP_REVISION" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
APP_LONG_VERSION=${APP_RELEASE}.${APP_REVISION}
sed -i "s/%VERSION%/${APP_LONG_VERSION}/g" sonar-project.properties
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }}
+4
View File
@@ -9,6 +9,7 @@
.DS_Store
.idea
.vscode
.sonarlint
.yarn
/*.diff
/*.patch
@@ -38,6 +39,7 @@ runtime/pgAdmin4.app/
runtime/pgAdmin4.pro.user*
runtime/pgAdmin4_resource.rc
runtime/release/
runtime/dev_config.json
runtime/ui_BrowserWindow.h
web/config_local.py
web/pgadmin/misc/themes/pgadmin.themes.json
@@ -48,6 +50,7 @@ node_modules/
web/pgAdmin/static/js/generated
web/pgadmin/static/js/generated
web/yarn-error.log
web/commit_hash
/web/cacert.pem
auditjs.html
auditpy.txt
@@ -56,5 +59,6 @@ auditpy.txt
web/coverage/
web/.coverage
web/regression/.coverage
.worktree/
web/regression/covhtml/
web/regression/htmlcov/
+1 -1
View File
@@ -6,4 +6,4 @@ show-source = False
show-pep8 = False
count = True
format = pylint
exclude = migrations,node_modules,config_local.py,config_distro.py
exclude = node_modules,config_local.py,config_distro.py
+341
View File
@@ -0,0 +1,341 @@
# Contributing to pgAdmin 4
Thank you for your interest in contributing to pgAdmin 4.
## Contents
- Getting Started
- Reporting Issues
- Making Changes
- Pull Requests
- AI-assisted Contributions
- Development Setup
- Database Migrations
- Security Issues
- Community and Support
- License
## Getting Started
Before starting work, please review the project documentation and familiarize yourself with the architecture and development workflow.
### Architecture
pgAdmin 4 is written as a web application with Python (Flask) on the server side and ReactJS, HTML5 with CSS for the client side processing and UI.
Although developed using web technologies, pgAdmin 4 can be deployed either on a web server using a browser, or standalone on a workstation. The [runtime/](runtime/) subdirectory contains an Electron-based runtime application intended to allow this, which will fork a Python server process and display the UI.
For a fuller introduction to the codebase, see the [code overview](docs/en_US/code_overview.rst).
If you are new to the codebase, consider starting with smaller bug fixes or documentation improvements before working on larger changes.
The Sphinx documentation also includes contributor guidance for [coding standards](docs/en_US/coding_standards.rst), [submitting pull requests](docs/en_US/submitting_pull_requests.rst), [code review](docs/en_US/code_review.rst), and [translations](docs/en_US/translations.rst).
## Reporting Issues
When reporting a bug:
- Search existing issues first.
- If a similar issue exists, add any additional information or context you have. Do not create a duplicate issue.
- Provide clear steps to reproduce the issue.
- Include relevant environment and version information.
- Attach screenshots, logs, or error messages when appropriate.
For feature requests, describe the problem being solved and the expected behavior.
## Making Changes
When working on a contribution:
- Keep changes focused and easy to review.
- Follow existing coding patterns and conventions, including the [coding standards](docs/en_US/coding_standards.rst).
- Avoid unrelated refactoring and changes in the same commit.
- Keep commit messages clear and descriptive.
- Update tests or documentation when necessary.
## Pull Requests
Before opening a pull request:
- Ensure your changes build successfully.
- Test your changes locally.
- Review your code before submission.
- Update your branch with the latest changes from `master` upstream when appropriate.
When opening a pull request:
- Clearly describe the change.
- Explain the reason for the change.
- Include screenshots or recordings for UI-related changes when applicable.
- Submit any changes as Pull Requests against the `master` branch of the [pgadmin-org/pgadmin4](https://github.com/pgadmin-org/pgadmin4) repository.
Use a clear pull request title that describes the change. Short prefixes such as `feat:`, `fix:`, `docs:`, `test:`, `refactor:`, and `chore:` are useful when they match the change being made. Branch names are contributor-local and do not need to follow a project-specific naming convention.
For more detail, see the [pull request submission guide](docs/en_US/submitting_pull_requests.rst) and [code review guide](docs/en_US/code_review.rst).
## AI-assisted Contributions
Contributors are responsible for understanding, testing, and standing behind everything they submit, whether or not AI tools were used. Please do not open large numbers of auto-generated issues or pull requests without first discussing that work with the maintainers.
## Development Setup
In the following documentation and examples, `$PGADMIN4_SRC` is used to denote the top-level directory of your copy of the pgAdmin source tree (either from a tarball or a git checkout).
### Prerequisites
1. Install Node.js 20 and above (https://nodejs.org/en/download)
2. yarn (https://yarnpkg.com/getting-started/install)
3. Python 3.9 and above (https://www.python.org/downloads/)
4. PostgreSQL server (https://www.postgresql.org/download)
Start by enabling Corepack, if it isn't already; this will add the yarn binary to your PATH:
```bash
corepack enable
```
### Building Web Assets
pgAdmin is dependent on a number of third-party JavaScript libraries. These, along with its own JavaScript code, CSS code and images must be compiled into a "bundle" which is transferred to the browser for execution and rendering. This is far more efficient than simply requesting each asset as it is needed by the client.
To create the bundle, you will need the 'yarn' package management tool to be installed. Then, you can run the following commands on a *nix system to download the required packages and build the bundle:
```bash
$ cd $PGADMIN4_SRC
$ make install-node
$ make bundle
```
On Windows systems (where "make" is not available), the following commands can be used:
```bat
C:\> cd $PGADMIN4_SRC\web
C:\$PGADMIN4_SRC\web> yarn install
C:\$PGADMIN4_SRC\web> yarn run bundle
```
### Python Environment
In order to run the Python code, a suitable runtime environment is required. Python version 3.9 and later are currently supported. It is recommended that a Python virtual environment is set up for this purpose, rather than using the system Python environment. On Linux and Mac systems, the process is fairly simple - adapt as required for your distribution:
1. Create a virtual environment in an appropriate directory. The last argument is the name of the environment; that can be changed as desired:
```bash
$ python3 -m venv venv
```
2. Now activate the virtual environment:
```bash
$ source venv/bin/activate
```
On Windows:
```bash
venv\Scripts\activate
```
3. Some of the components used by pgAdmin require a very recent version of *pip*, so update that to the latest:
```bash
(venv) $ pip install --upgrade pip
```
4. Ensure that a PostgreSQL installation's bin/ directory is in the path (so pg_config can be found for building psycopg3), and install the required packages:
```bash
(venv) $ PATH=$PATH:/usr/local/pgsql/bin pip install -r $PGADMIN4_SRC/requirements.txt
```
If you are planning to run the regression tests, you also need to install additional requirements from `web/regression/requirements.txt`:
```bash
(venv) $ pip install -r $PGADMIN4_SRC/web/regression/requirements.txt
```
### Configuration
Create a local configuration file for pgAdmin. Edit `$PGADMIN4_SRC/web/config_local.py` and add any desired configuration options (use the `config.py` file as a reference - any settings duplicated in `config_local.py` will override those in `config.py`). A typical development configuration may look like:
```python
import os
import logging
# Change pgAdmin data directory
DATA_DIR = '/Users/myuser/.pgadmin_dev'
# Change pgAdmin server and port
DEFAULT_SERVER = '127.0.0.1'
DEFAULT_SERVER_PORT = 5051
# Switch between server and desktop mode
SERVER_MODE = True
# Change pgAdmin config DB path in case an external DB is used.
CONFIG_DATABASE_URI="postgresql://postgres:postgres@localhost:5436/pgadmin"
# Set up SMTP
MAIL_SERVER = 'smtp.gmail.com'
MAIL_PORT = 465
MAIL_USE_SSL = True
MAIL_USERNAME = 'user@gmail.com'
MAIL_PASSWORD = 'xxxxxxxxxx'
# Change log level
CONSOLE_LOG_LEVEL = logging.INFO
FILE_LOG_LEVEL = logging.INFO
# Use a different config DB for each server mode.
if SERVER_MODE == False:
SQLITE_PATH = os.path.join(
DATA_DIR,
'pgadmin4-desktop.db'
)
else:
SQLITE_PATH = os.path.join(
DATA_DIR,
'pgadmin4-server.db'
)
```
This configuration allows easy switching between server and desktop modes for testing.
### Running pgAdmin
The initial setup of the configuration database is interactive in server mode, and non-interactive in desktop mode. You can run it either by running:
```bash
(venv) $ python3 $PGADMIN4_SRC/web/setup.py
```
or by starting pgAdmin 4:
```bash
(venv) $ python3 $PGADMIN4_SRC/web/pgAdmin4.py
```
Whilst it is possible to automatically run setup in desktop mode by running the runtime, that will not work in server mode as the runtime doesn't allow command line interaction with the setup program.
At this point you will be able to run pgAdmin 4 from the command line in either server or desktop mode, and access it from a web browser using the URL shown in the terminal once pgAdmin has started up.
Setup of an environment on Windows is somewhat more complicated unfortunately, please see `pkg/win32/README.md` for complete details.
### Building the documentation
In order to build the docs, an additional Python package is required in the virtual environment. This can be installed with the pip package manager:
```bash
$ source venv/bin/activate
(venv) $ pip install Sphinx
(venv) $ pip install sphinxcontrib-youtube
```
The docs can then be built using the Makefile in `$PGADMIN4_SRC`, e.g.
```bash
(venv) $ make docs
```
The output can be found in `$PGADMIN4_SRC/docs/en_US/_build/html/index.html`
### Runtime Development
For Electron runtime development:
1. Navigate to the `runtime` directory.
2. Install dependencies:
```bash
yarn install
```
3. Copy:
```text
dev_config.json.in
```
to:
```text
dev_config.json
```
4. Update the paths to your Python executable and `pgAdmin4.py`.
Start the runtime:
```bash
yarn run start
```
### Building packages
Most packages can be built using the Makefile in `$PGADMIN4_SRC`, provided all the setup and configuration above has been completed.
To build a source tarball:
```bash
(venv) $ make src
```
To build a PIP Wheel, activate either a Python 3 virtual environment, configured with all the required packages, and then run:
```bash
(venv) $ make pip
```
To build the macOS AppBundle, please see `pkg/mac/README.md`.
To build the Windows installer, please see `pkg/win32/README.md`.
## Database Migrations
In order to make changes to the SQLite DB, navigate to the 'web' directory:
```bash
(venv) $ cd $PGADMIN4_SRC/web
```
Create a migration file with the following command:
```bash
(venv) $ FLASK_APP=pgAdmin4.py flask db revision
```
This will create a file in `$PGADMIN4_SRC/web/migrations/versions/`. Add any changes to the `upgrade` function.
When making schema changes, update the `SCHEMA_VERSION` value in:
```text
web/pgadmin/model/__init__.py
```
There is no need to increment the `SETTINGS_SCHEMA_VERSION`.
## Security Issues
**Do not report security vulnerabilities through GitHub issues.**
Potential security issues should be reported to:
`security@pgadmin.org`.
Note that this **address should only be used for reporting security issues** that you believe you've found in the design or code of pgAdmin, pgAgent, and the pgAdmin website. It **should not be used to ask security questions**.
If you are unsure whether an issue is a security vulnerability, please lean on the side of caution and report it to the above address. The pgAdmin team will review the report and respond as appropriate.
## Community and Support
For development discussions, use:
`pgadmin-hackers@postgresql.org`
For support options, visit the [pgAdmin support page](https://www.pgadmin.org/support/).
Use the [GitHub issue tracker](https://github.com/pgadmin-org/pgadmin4/issues) for reporting bugs and requesting features, but please follow the guidelines outlined in the "Reporting Issues" section above.
## License
By contributing to pgAdmin 4, you agree that your contributions will be licensed under the project's existing and future license terms.
-586
View File
@@ -1,586 +0,0 @@
pgAdmin 4 Dependency Inventory
==============================
pgAdmin 4 is built on Python, Javascript and NW.js (node-webkit), and is
dependent on various third party libraries. These are automatically compiled
from the system, requirements.txt and packages.json and listed below.
Runtime Dependencies
====================
Name Version Licence URL
---- ------- ------- ---
Python 3.6+ PSF https://www.python.org/
nw 0.50.2 MIT git://github.com/nwjs/npm-installer.git
asynckit 0.4.0 MIT git+https://github.com/alexindigo/asynckit.git
axios 1.4.0 MIT https://github.com/axios/axios.git
bootstrap 4.6.2 MIT git+https://github.com/twbs/bootstrap.git
combined-stream 1.0.8 MIT git://github.com/felixge/node-combined-stream.git
delayed-stream 1.0.0 MIT git://github.com/felixge/node-delayed-stream.git
follow-redirects 1.15.2 MIT git@github.com:follow-redirects/follow-redirects.git
form-data 4.0.0 MIT git://github.com/form-data/form-data.git
mime-db 1.52.0 MIT https://github.com/jshttp/mime-db.git
mime-types 2.1.35 MIT https://github.com/jshttp/mime-types.git
proxy-from-env 1.1.0 MIT https://github.com/Rob--W/proxy-from-env.git
12 dependencies listed.
Python Dependencies
===================
Name Version Licence URL
---- ------- ------- ---
Flask 2.2.4 BSD-3-Clause https://palletsprojects.com/p/flask
Flask-Gravatar 0.5.0 BSD https://github.com/zzzsochi/Flask-Gravatar/
Flask-Login 0.6.2 MIT https://github.com/maxcountryman/flask-login
Flask-Mail 0.9.1 BSD https://github.com/rduplain/flask-mail
Flask-Migrate 4.0.4 MIT https://github.com/miguelgrinberg/flask-migrate
Flask-SQLAlchemy 3.0.3 BSD-3-Clause Unknown
Flask-WTF 1.1.1 BSD-3-Clause https://github.com/wtforms/flask-wtf/
Flask-Compress 1.13 MIT https://github.com/colour-science/flask-compress
Flask-Paranoid 0.3.0 UNKNOWN https://github.com/miguelgrinberg/flask-paranoid
flask-babel 3.1.0 BSD-3-Clause https://github.com/python-babel/flask-babel
Flask-Security-Too 5.1.2 MIT https://github.com/Flask-Middleware/flask-security
Flask-SocketIO 5.3.3 Unknown https://github.com/miguelgrinberg/flask-socketio
WTForms 3.0.1 BSD-3-Clause https://wtforms.readthedocs.io/
passlib 1.7.4 BSD https://passlib.readthedocs.io
pytz 2023.3 MIT http://pythonhosted.org/pytz
speaklater3 1.4 UNKNOWN https://github.com/ThomasWaldmann/speaklater
sqlparse 0.4.4 Unknown Unknown
psutil 5.9.5 BSD-3-Clause https://github.com/giampaolo/psutil
psycopg 3.1.8 GNU Lesser General Public License v3 (LGPLv3) https://psycopg.org/psycopg3/
python-dateutil 2.8.2 Dual License https://github.com/dateutil/dateutil
SQLAlchemy 2.0.11 MIT https://www.sqlalchemy.org
bcrypt 4.0.1 Apache License, Version 2.0 https://github.com/pyca/bcrypt/
cryptography 40.0.2 (Apache-2.0 OR BSD-3-Clause) AND PSF-2.0 https://github.com/pyca/cryptography
sshtunnel 0.4.0 MIT https://github.com/pahaz/sshtunnel
ldap3 2.9.1 LGPL v3 https://github.com/cannatag/ldap3
gssapi 1.8.2 LICENSE.txt https://github.com/pythongssapi/python-gssapi
eventlet 0.33.3 Unknown http://eventlet.net
httpagentparser 1.9.5 http://www.opensource.org/licenses/mit-license.php https://github.com/shon/httpagentparser
user-agents 2.2.0 MIT https://github.com/selwin/python-user-agents
pywinpty 2.0.* Unknown Unknown
Authlib 1.2.0 BSD 3-Clause License https://authlib.org/
pyotp 2.8.0 MIT License https://github.com/pyotp/pyotp
qrcode 7.4.2 BSD https://github.com/lincolnloop/python-qrcode
Pillow 9.5.0 HPND https://python-pillow.org
boto3 1.26.121 Apache License 2.0 https://github.com/boto/boto3
botocore 1.29.121 Apache License 2.0 https://github.com/boto/botocore
urllib3 1.26.15 MIT https://urllib3.readthedocs.io/
azure-mgmt-rdbms 10.1.0 MIT License https://github.com/Azure/azure-sdk-for-python
azure-mgmt-resource 23.0.1 MIT License https://github.com/Azure/azure-sdk-for-python
azure-mgmt-subscription 3.1.1 MIT License https://github.com/Azure/azure-sdk-for-python
azure-identity 1.13.0 MIT License https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity
google-api-python-client 2.86.0 Apache 2.0 https://github.com/googleapis/google-api-python-client/
google-auth-oauthlib 1.0.0 Apache 2.0 https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib
Werkzeug 2.2.3 BSD-3-Clause https://palletsprojects.com/p/werkzeug/
keyring 23.13.1 Unknown https://github.com/jaraco/keyring
NOTE: This report was generated using Python 3.11. Full information may not be
shown for Python modules that are not required with this version.
45 dependencies listed.
Javascript Dependencies
=======================
Name Version Licence URL
---- ------- ------- ---
@ampproject/remapping 2.2.1 Apache-2.0 git+https://github.com/ampproject/remapping.git
anti-trojan-source 1.4.1 Apache-2.0 https://github.com/lirantal/anti-trojan-source.git
eve 0.5.4 Apache-2.0 git@github.com:adobe-webplatform/eve.git
jmespath 0.16.0 Apache-2.0 git://github.com/jmespath/jmespath.js
jsoneditor 9.10.2 Apache-2.0 https://github.com/josdejong/jsoneditor.git
paths-js 0.4.11 Apache-2.0 https://github.com/andreaferretti/paths-js.git
rc-dock 3.2.18 Apache-2.0 https://github.com/ticlo/rc-dock.git
rc-new-window 0.1.13 Apache-2.0 https://github.com/ticlo/rc-new-window.git
snapsvg 0.5.1 Apache-2.0 git@github.com:adobe-webplatform/Snap.svg.git
spdx-correct 3.2.0 Apache-2.0 https://github.com/jslicense/spdx-correct.js.git
validate-npm-package-license 3.0.4 Apache-2.0 https://github.com/kemitchell/validate-npm-package-license.js.git
@babel/code-frame 7.22.5 MIT https://github.com/babel/babel.git
@babel/compat-data 7.22.5 MIT https://github.com/babel/babel.git
@babel/core 7.22.5 MIT https://github.com/babel/babel.git
@babel/generator 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-annotate-as-pure 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-compilation-targets 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-create-class-features-plugin 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-environment-visitor 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-function-name 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-hoist-variables 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-member-expression-to-functions 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-module-imports 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-module-transforms 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-optimise-call-expression 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-plugin-utils 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-replace-supers 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-simple-access 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-skip-transparent-expression-wrappers 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-split-export-declaration 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-string-parser 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-validator-identifier 7.22.5 MIT https://github.com/babel/babel.git
@babel/helper-validator-option 7.22.5 MIT https://github.com/babel/babel.git
@babel/helpers 7.22.5 MIT https://github.com/babel/babel.git
@babel/highlight 7.22.5 MIT https://github.com/babel/babel.git
@babel/parser 7.22.5 MIT https://github.com/babel/babel.git
@babel/plugin-proposal-class-properties 7.18.6 MIT https://github.com/babel/babel.git
@babel/plugin-syntax-jsx 7.22.5 MIT https://github.com/babel/babel.git
@babel/plugin-transform-react-display-name 7.22.5 MIT https://github.com/babel/babel.git
@babel/plugin-transform-react-jsx 7.22.5 MIT https://github.com/babel/babel.git
@babel/plugin-transform-react-jsx-development 7.22.5 MIT https://github.com/babel/babel.git
@babel/plugin-transform-react-pure-annotations 7.22.5 MIT https://github.com/babel/babel.git
@babel/preset-react 7.22.5 MIT https://github.com/babel/babel.git
@babel/runtime 7.22.5 MIT https://github.com/babel/babel.git
@babel/template 7.22.5 MIT https://github.com/babel/babel.git
@babel/traverse 7.22.5 MIT https://github.com/babel/babel.git
@babel/types 7.22.5 MIT https://github.com/babel/babel.git
@date-io/core 1.3.13 MIT https://github.com/dmtrKovalenko/date-io
@date-io/date-fns 1.3.13 MIT https://github.com/dmtrKovalenko/date-io
@emotion/babel-plugin 11.11.0 MIT https://github.com/emotion-js/emotion/tree/main/packages/babel-plugin
@emotion/cache 11.11.0 MIT https://github.com/emotion-js/emotion/tree/main/packages/cache
@emotion/hash 0.8.0 MIT https://github.com/emotion-js/emotion/tree/master/packages/hash
@emotion/hash 0.9.1 MIT https://github.com/emotion-js/emotion/tree/main/packages/hash
@emotion/is-prop-valid 1.2.1 MIT https://github.com/emotion-js/emotion/tree/main/packages/is-prop-valid
@emotion/memoize 0.8.1 MIT https://github.com/emotion-js/emotion/tree/main/packages/memoize
@emotion/react 11.11.1 MIT https://github.com/emotion-js/emotion/tree/main/packages/react
@emotion/serialize 1.1.2 MIT https://github.com/emotion-js/emotion/tree/main/packages/serialize
@emotion/sheet 1.2.2 MIT https://github.com/emotion-js/emotion/tree/main/packages/sheet
@emotion/stylis 0.8.5 MIT https://github.com/emotion-js/emotion/tree/master/packages/stylis
@emotion/unitless 0.8.1 MIT https://github.com/emotion-js/emotion/tree/main/packages/unitless
@emotion/unitless 0.7.5 MIT https://github.com/emotion-js/emotion/tree/master/packages/unitless
@emotion/use-insertion-effect-with-fallbacks 1.0.1 MIT https://github.com/emotion-js/emotion/tree/main/packages/use-insertion-effect-with-fallbacks
@emotion/utils 1.2.1 MIT https://github.com/emotion-js/emotion/tree/main/packages/utils
@emotion/weak-memoize 0.3.1 MIT https://github.com/emotion-js/emotion/tree/main/packages/weak-memoize
@floating-ui/core 1.3.1 MIT https://github.com/floating-ui/floating-ui.git
@floating-ui/dom 1.4.2 MIT https://github.com/floating-ui/floating-ui.git
@istanbuljs/schema 0.1.3 MIT git+https://github.com/istanbuljs/schema.git
@jridgewell/gen-mapping 0.3.3 MIT https://github.com/jridgewell/gen-mapping
@jridgewell/resolve-uri 3.1.0 MIT https://github.com/jridgewell/resolve-uri
@jridgewell/set-array 1.1.2 MIT https://github.com/jridgewell/set-array
@jridgewell/sourcemap-codec 1.4.15 MIT git+https://github.com/jridgewell/sourcemap-codec.git
@jridgewell/sourcemap-codec 1.4.14 MIT git+https://github.com/jridgewell/sourcemap-codec.git
@jridgewell/trace-mapping 0.3.18 MIT git+https://github.com/jridgewell/trace-mapping.git
@material-ui/core 4.12.4 MIT https://github.com/mui-org/material-ui.git
@material-ui/icons 4.11.3 MIT https://github.com/mui-org/material-ui.git
@material-ui/lab 4.0.0-alpha.61 MIT https://github.com/mui-org/material-ui.git
@material-ui/pickers 3.3.10 MIT https://github.com/mui-org/material-ui-pickers
@material-ui/styles 4.11.5 MIT https://github.com/mui-org/material-ui.git
@material-ui/system 4.12.2 MIT https://github.com/mui-org/material-ui.git
@material-ui/types 5.1.0 MIT https://github.com/mui-org/material-ui.git
@material-ui/utils 4.11.3 MIT https://github.com/mui-org/material-ui.git
@nodelib/fs.scandir 2.1.5 MIT https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir
@nodelib/fs.stat 2.0.5 MIT https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat
@nodelib/fs.walk 1.2.8 MIT https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk
@projectstorm/geometry 6.7.4 MIT https://github.com/projectstorm/react-diagrams.git
@projectstorm/react-canvas-core 6.7.4 MIT https://github.com/projectstorm/react-diagrams.git
@projectstorm/react-diagrams 6.7.4 MIT https://github.com/projectstorm/react-diagrams.git
@projectstorm/react-diagrams-core 6.7.4 MIT https://github.com/projectstorm/react-diagrams.git
@projectstorm/react-diagrams-defaults 6.7.4 MIT https://github.com/projectstorm/react-diagrams.git
@projectstorm/react-diagrams-routing 6.7.4 MIT https://github.com/projectstorm/react-diagrams.git
@rc-component/portal 1.1.1 MIT https://github.com/react-component/portal.git
@rc-component/trigger 1.13.6 MIT https://github.com/react-component/trigger.git
@react-dnd/asap 5.0.2 MIT https://github.com/react-dnd/react-dnd
@react-dnd/invariant 4.0.2 MIT https://github.com/react-dnd/react-dnd
@react-dnd/shallowequal 4.0.2 MIT https://github.com/react-dnd/react-dnd
@remix-run/router 1.6.3 MIT https://github.com/remix-run/react-router
@simonwep/pickr 1.8.2 MIT https://github.com/Simonwep/pickr.git
@sindresorhus/is 0.7.0 MIT https://github.com/sindresorhus/is.git
@socket.io/component-emitter 3.1.0 MIT https://github.com/socketio/emitter.git
@szhsin/react-menu 2.3.4 MIT https://github.com/szhsin/react-menu.git
@types/classnames 2.3.1 MIT Unknown
@types/minimist 1.2.2 MIT https://github.com/DefinitelyTyped/DefinitelyTyped.git
@types/node 20.3.1 MIT https://github.com/DefinitelyTyped/DefinitelyTyped.git
@types/normalize-package-data 2.4.1 MIT https://github.com/DefinitelyTyped/DefinitelyTyped.git
@types/parse-json 4.0.0 MIT https://www.github.com/DefinitelyTyped/DefinitelyTyped.git
@types/prop-types 15.7.5 MIT https://github.com/DefinitelyTyped/DefinitelyTyped.git
@types/react 18.2.13 MIT https://github.com/DefinitelyTyped/DefinitelyTyped.git
@types/react 16.14.43 MIT https://github.com/DefinitelyTyped/DefinitelyTyped.git
@types/react 17.0.62 MIT https://github.com/DefinitelyTyped/DefinitelyTyped.git
@types/react-dom 17.0.20 MIT https://github.com/DefinitelyTyped/DefinitelyTyped.git
@types/react-transition-group 4.4.6 MIT https://github.com/DefinitelyTyped/DefinitelyTyped.git
@types/scheduler 0.16.3 MIT https://github.com/DefinitelyTyped/DefinitelyTyped.git
@types/styled-jsx 2.2.9 MIT https://github.com/DefinitelyTyped/DefinitelyTyped.git
ajv 8.12.0 MIT https://github.com/ajv-validator/ajv.git
ajv 6.12.6 MIT https://github.com/ajv-validator/ajv.git
ansi-styles 3.2.1 MIT https://github.com/chalk/ansi-styles.git
array-union 3.0.1 MIT https://github.com/sindresorhus/array-union.git
arrify 1.0.1 MIT https://github.com/sindresorhus/arrify.git
aspen-core 1.0.5 MIT git+https://github.com/neeksandhu/aspen-core.git
aspen-decorations 1.1.1 MIT git+https://github.com/neeksandhu/aspen-decorations.git
aspen-tree-model 1.0.5 MIT git+https://github.com/neeksandhu/aspen-tree-model.git
async 2.6.4 MIT https://github.com/caolan/async.git
attr-accept 2.2.2 MIT https://github.com/react-dropzone/attr-accept.git
axios 0.21.4 MIT https://github.com/axios/axios.git
babel-plugin-macros 3.1.0 MIT https://github.com/kentcdodds/babel-plugin-macros
babel-plugin-styled-components 2.1.3 MIT https://github.com/styled-components/babel-plugin-styled-components.git
babel-plugin-syntax-jsx 6.18.0 MIT https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-jsx
babelify 10.0.0 MIT https://github.com/babel/babelify.git
balanced-match 1.0.2 MIT git://github.com/juliangruber/balanced-match.git
base64-arraybuffer 1.0.2 MIT https://github.com/niklasvh/base64-arraybuffer
bignumber.js 9.1.1 MIT https://github.com/MikeMcl/bignumber.js.git
bootstrap 4.6.2 MIT git+https://github.com/twbs/bootstrap.git
bowser 2.11.0 MIT git+https://github.com/lancedikson/bowser.git
brace 0.11.1 MIT git://github.com/thlorenz/brace.git
brace-expansion 1.1.11 MIT git://github.com/juliangruber/brace-expansion.git
braces 3.0.2 MIT https://github.com/micromatch/braces.git
browserfs 1.4.3 MIT https://github.com/jvilk/BrowserFS.git
browserslist 4.21.9 MIT https://github.com/browserslist/browserslist.git
callsites 3.1.0 MIT https://github.com/sindresorhus/callsites.git
camelcase 6.3.0 MIT https://github.com/sindresorhus/camelcase.git
camelcase-keys 7.0.2 MIT https://github.com/sindresorhus/camelcase-keys.git
camelize 1.0.1 MIT git://github.com/ljharb/camelize.git
caniuse-api 3.0.0 MIT https://github.com/nyalab/caniuse-api.git
chalk 2.4.2 MIT https://github.com/chalk/chalk.git
chart.js 3.9.1 MIT https://github.com/chartjs/Chart.js.git
chartjs-plugin-zoom 2.0.1 MIT https://github.com/chartjs/chartjs-plugin-zoom.git
classnames 2.3.2 MIT https://github.com/JedWatson/classnames.git
closest 0.0.1 MIT https://github.com/ForbesLindesay/closest.git
clsx 1.2.1 MIT https://github.com/lukeed/clsx.git
codemirror 5.65.13 MIT https://github.com/codemirror/CodeMirror.git
color-convert 1.9.3 MIT https://github.com/Qix-/color-convert.git
color-name 1.1.3 MIT git@github.com:dfcreative/color-name.git
colord 2.9.3 MIT https://github.com/omgovich/colord.git
commander 7.2.0 MIT https://github.com/tj/commander.js.git
concat-map 0.0.1 MIT git://github.com/substack/node-concat-map.git
convert-source-map 1.9.0 MIT git://github.com/thlorenz/convert-source-map.git
convert-units 2.3.4 MIT git://github.com/ben-ng/convert-units.git
core-js 3.31.0 MIT https://github.com/zloirock/core-js.git
cosmiconfig 7.1.0 MIT git+https://github.com/davidtheclark/cosmiconfig.git
css-line-break 2.1.0 MIT git+ssh://git@github.com/niklasvh/css-line-break.git
css-to-react-native 3.2.0 MIT git+https://github.com/styled-components/css-to-react-native.git
css-tree 1.1.3 MIT https://github.com/csstree/csstree.git
css-vendor 2.0.8 MIT git@github.com:cssinjs/css-vendor.git
cssesc 3.0.0 MIT https://github.com/mathiasbynens/cssesc.git
cssnano 5.1.15 MIT https://github.com/cssnano/cssnano.git
cssnano-preset-default 5.2.14 MIT https://github.com/cssnano/cssnano.git
cssnano-utils 3.1.0 MIT https://github.com/cssnano/cssnano.git
csso 4.2.0 MIT https://github.com/css/csso.git
csstype 2.6.21 MIT https://github.com/frenic/csstype
csstype 3.1.2 MIT https://github.com/frenic/csstype
dagre 0.8.5 MIT https://github.com/dagrejs/dagre.git
date-fns 2.30.0 MIT https://github.com/date-fns/date-fns
debug 4.3.4 MIT git://github.com/debug-js/debug.git
decamelize 5.0.1 MIT https://github.com/sindresorhus/decamelize.git
decamelize 1.2.0 MIT https://github.com/sindresorhus/decamelize.git
decamelize-keys 1.1.1 MIT https://github.com/sindresorhus/decamelize-keys.git
deep-diff 1.0.2 MIT git://github.com/flitbit/diff.git
diff-arrays-of-objects 1.1.9 MIT git+https://github.com/malcolmvr/diff-arrays-of-objects.git
dir-glob 3.0.1 MIT https://github.com/kevva/dir-glob.git
dnd-core 16.0.1 MIT https://github.com/react-dnd/react-dnd.git
dom-align 1.12.4 MIT git@github.com:yiminghe/dom-align.git
dom-helpers 5.2.1 MIT git+https://github.com/react-bootstrap/dom-helpers.git
dom-serializer 1.4.1 MIT git://github.com/cheeriojs/dom-renderer.git
engine.io-client 6.5.0 MIT https://github.com/socketio/engine.io-client.git
engine.io-parser 5.1.0 MIT git@github.com:socketio/engine.io-parser.git
error-ex 1.3.2 MIT https://github.com/qix-/node-error-ex.git
escalade 3.1.1 MIT https://github.com/lukeed/escalade.git
escape-string-regexp 1.0.5 MIT https://github.com/sindresorhus/escape-string-regexp.git
escape-string-regexp 4.0.0 MIT https://github.com/sindresorhus/escape-string-regexp.git
fast-deep-equal 3.1.3 MIT git+https://github.com/epoberezkin/fast-deep-equal.git
fast-glob 3.2.12 MIT https://github.com/mrmlnc/fast-glob.git
fast-json-stable-stringify 2.1.0 MIT git://github.com/epoberezkin/fast-json-stable-stringify.git
fast-memoize 2.5.2 MIT git+https://github.com/caiogondim/fast-memoize.git
file-selector 0.6.0 MIT https://github.com/react-dropzone/file-selector.git
filename-reserved-regex 2.0.0 MIT https://github.com/sindresorhus/filename-reserved-regex.git
fill-range 7.0.1 MIT https://github.com/jonschlinkert/fill-range.git
find-root 1.1.0 MIT git@github.com:js-n/find-root.git
find-up 5.0.0 MIT https://github.com/sindresorhus/find-up.git
follow-redirects 1.15.2 MIT git@github.com:follow-redirects/follow-redirects.git
function-bind 1.1.1 MIT git://github.com/Raynos/function-bind.git
gensync 1.0.0-beta.2 MIT https://github.com/loganfsmyth/gensync.git
globals 11.12.0 MIT https://github.com/sindresorhus/globals.git
globby 12.2.0 MIT https://github.com/sindresorhus/globby.git
graphlib 2.1.8 MIT https://github.com/dagrejs/graphlib.git
hammerjs 2.0.8 MIT git://github.com/hammerjs/hammer.js.git
hard-rejection 2.1.0 MIT https://github.com/sindresorhus/hard-rejection.git
has 1.0.3 MIT git://github.com/tarruda/has.git
has-flag 3.0.0 MIT https://github.com/sindresorhus/has-flag.git
has-flag 4.0.0 MIT https://github.com/sindresorhus/has-flag.git
html-escaper 2.0.2 MIT https://github.com/WebReflection/html-escaper.git
html2canvas 1.4.1 MIT git@github.com:niklasvh/html2canvas.git
ignore 5.2.4 MIT git@github.com:kaelzhang/node-ignore.git
immutability-helper 3.1.1 MIT git+https://github.com/kolodny/immutability-helper.git
import-fresh 3.3.0 MIT https://github.com/sindresorhus/import-fresh.git
indent-string 5.0.0 MIT https://github.com/sindresorhus/indent-string.git
insert-if 1.2.0 MIT git+https://github.com/chipto/insert-if.git
ip-address 7.1.0 MIT git://github.com/beaugunderson/ip-address.git
is-any-array 2.0.1 MIT https://github.com/cheminfo-js/is-any-array.git
is-arrayish 0.2.1 MIT https://github.com/qix-/node-is-arrayish.git
is-core-module 2.12.1 MIT git+https://github.com/inspect-js/is-core-module.git
is-extglob 2.1.1 MIT https://github.com/jonschlinkert/is-extglob.git
is-glob 4.0.3 MIT https://github.com/micromatch/is-glob.git
is-in-browser 1.1.3 MIT git+https://github.com/tuxsudo/is-in-browser.git
is-number 7.0.0 MIT https://github.com/jonschlinkert/is-number.git
is-plain-obj 1.1.0 MIT https://github.com/sindresorhus/is-plain-obj.git
is-relative 1.0.0 MIT https://github.com/jonschlinkert/is-relative.git
is-unc-path 1.0.0 MIT https://github.com/jonschlinkert/is-unc-path.git
javascript-natural-sort 0.7.1 MIT https://github.com/Bill4Time/javascript-natural-sort.git
jquery 3.7.0 MIT https://github.com/jquery/jquery.git
jquery-contextmenu 2.9.2 MIT git://github.com/swisnl/jQuery-contextMenu.git
js-tokens 4.0.0 MIT https://github.com/lydell/js-tokens.git
jsbn 1.1.0 MIT https://github.com/andyperlitch/jsbn.git
jsesc 2.5.2 MIT https://github.com/mathiasbynens/jsesc.git
json-bignumber 1.1.1 MIT git@github.com:wbuss/JSONBigNumber.git
json-parse-even-better-errors 2.3.1 MIT https://github.com/npm/json-parse-even-better-errors
json-schema-traverse 1.0.0 MIT git+https://github.com/epoberezkin/json-schema-traverse.git
json-schema-traverse 0.4.1 MIT git+https://github.com/epoberezkin/json-schema-traverse.git
json-source-map 0.6.1 MIT git+https://github.com/epoberezkin/json-source-map.git
json5 2.2.3 MIT git+https://github.com/json5/json5.git
jss 10.10.0 MIT https://github.com/cssinjs/jss.git
jss-plugin-camel-case 10.10.0 MIT https://github.com/cssinjs/jss.git
jss-plugin-default-unit 10.10.0 MIT https://github.com/cssinjs/jss.git
jss-plugin-global 10.10.0 MIT https://github.com/cssinjs/jss.git
jss-plugin-nested 10.10.0 MIT https://github.com/cssinjs/jss.git
jss-plugin-props-sort 10.10.0 MIT https://github.com/cssinjs/jss.git
jss-plugin-rule-value-function 10.10.0 MIT https://github.com/cssinjs/jss.git
jss-plugin-vendor-prefixer 10.10.0 MIT https://github.com/cssinjs/jss.git
karma-coverage 2.2.0 MIT git://github.com/karma-runner/karma-coverage.git
kind-of 6.0.3 MIT https://github.com/jonschlinkert/kind-of.git
lilconfig 2.1.0 MIT https://github.com/antonk52/lilconfig
lines-and-columns 1.2.4 MIT https://github.com/eventualbuddha/lines-and-columns.git
locate-path 6.0.0 MIT https://github.com/sindresorhus/locate-path.git
lodash 4.17.21 MIT https://github.com/lodash/lodash.git
lodash._basebind 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash._basecreate 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash._basecreatecallback 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash._basecreatewrapper 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash._createwrapper 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash._objecttypes 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash._renative 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash._setbinddata 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash._shimkeys 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash._slice 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash.bind 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash.foreach 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash.forown 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash.identity 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash.isfunction 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash.isobject 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash.keys 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash.memoize 4.1.2 MIT https://github.com/lodash/lodash.git
lodash.noop 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash.support 2.3.0 MIT https://github.com/lodash/lodash-cli.git
lodash.uniq 4.5.0 MIT https://github.com/lodash/lodash.git
loose-envify 1.4.0 MIT git://github.com/zertosh/loose-envify.git
make-dir 3.1.0 MIT https://github.com/sindresorhus/make-dir.git
map-obj 4.3.0 MIT https://github.com/sindresorhus/map-obj.git
map-obj 1.0.1 MIT https://github.com/sindresorhus/map-obj.git
matches-selector 0.0.1 MIT https://github.com/ForbesLindesay/matches-selector.git
memoize-one 5.2.1 MIT https://github.com/alexreardon/memoize-one.git
memoize-one 6.0.0 MIT https://github.com/alexreardon/memoize-one.git
meow 10.1.5 MIT https://github.com/sindresorhus/meow.git
merge2 1.4.1 MIT git@github.com:teambition/merge2.git
micromatch 4.0.5 MIT https://github.com/micromatch/micromatch.git
min-indent 1.0.1 MIT https://github.com/thejameskyle/min-indent
minimist-options 4.1.0 MIT https://github.com/vadimdemedes/minimist-options.git
ml-array-max 1.2.4 MIT git+https://github.com/mljs/array.git
ml-array-min 1.2.3 MIT git+https://github.com/mljs/array.git
ml-array-rescale 1.3.7 MIT git+https://github.com/mljs/array.git
ml-matrix 6.10.4 MIT https://github.com/mljs/matrix.git
mobius1-selectr 2.4.13 MIT git+https://github.com/Mobius1/Selectr.git
moment 2.29.4 MIT https://github.com/moment/moment.git
moment-timezone 0.5.43 MIT https://github.com/moment/moment-timezone.git
ms 2.1.2 MIT https://github.com/zeit/ms.git
nanoid 3.3.6 MIT https://github.com/ai/nanoid.git
nanopop 2.3.0 MIT https://github.com/Simonwep/nanopop.git
node-releases 2.0.12 MIT https://github.com/chicoxyzzy/node-releases.git
normalize-url 6.1.0 MIT https://github.com/sindresorhus/normalize-url.git
notificar 1.0.1 MIT git+https://github.com/neeksandhu/notificar.git
notistack 1.0.10 MIT git+https://github.com/iamhosseindhv/notistack.git
object-assign 4.1.1 MIT https://github.com/sindresorhus/object-assign.git
p-limit 3.1.0 MIT https://github.com/sindresorhus/p-limit.git
p-locate 5.0.0 MIT https://github.com/sindresorhus/p-locate.git
p-reduce 1.0.0 MIT https://github.com/sindresorhus/p-reduce.git
p-series 1.1.0 MIT https://github.com/sindresorhus/p-series.git
parent-module 1.0.1 MIT https://github.com/sindresorhus/parent-module.git
parse-json 5.2.0 MIT https://github.com/sindresorhus/parse-json.git
path-exists 4.0.0 MIT https://github.com/sindresorhus/path-exists.git
path-fx 2.1.2 MIT git+https://github.com/NeekSandhu/path-fx.git
path-parse 1.0.7 MIT https://github.com/jbgutierrez/path-parse.git
path-type 4.0.0 MIT https://github.com/sindresorhus/path-type.git
pathfinding 0.4.18 MIT git://github.com/qiao/PathFinding.js.git
performance-now 2.1.0 MIT git://github.com/braveg1rl/performance-now.git
picomatch 2.3.1 MIT https://github.com/micromatch/picomatch.git
picomodal 3.0.0 MIT https://github.com/Nycto/PicoModal.git
popper.js 1.16.1-lts MIT git+https://github.com/FezVrasta/popper.js.git
popper.js 1.16.1 MIT git+https://github.com/FezVrasta/popper.js.git
postcss 8.4.24 MIT https://github.com/postcss/postcss.git
postcss-calc 8.2.4 MIT https://github.com/postcss/postcss-calc.git
postcss-colormin 5.3.1 MIT https://github.com/cssnano/cssnano.git
postcss-convert-values 5.1.3 MIT https://github.com/cssnano/cssnano.git
postcss-discard-comments 5.1.2 MIT https://github.com/cssnano/cssnano.git
postcss-discard-duplicates 5.1.0 MIT https://github.com/cssnano/cssnano.git
postcss-discard-empty 5.1.1 MIT https://github.com/cssnano/cssnano.git
postcss-discard-overridden 5.1.0 MIT https://github.com/cssnano/cssnano.git
postcss-merge-longhand 5.1.7 MIT https://github.com/cssnano/cssnano.git
postcss-merge-rules 5.1.4 MIT https://github.com/cssnano/cssnano.git
postcss-minify-font-values 5.1.0 MIT https://github.com/cssnano/cssnano.git
postcss-minify-gradients 5.1.1 MIT https://github.com/cssnano/cssnano.git
postcss-minify-params 5.1.4 MIT https://github.com/cssnano/cssnano.git
postcss-minify-selectors 5.2.1 MIT https://github.com/cssnano/cssnano.git
postcss-normalize-charset 5.1.0 MIT https://github.com/cssnano/cssnano.git
postcss-normalize-display-values 5.1.0 MIT https://github.com/cssnano/cssnano.git
postcss-normalize-positions 5.1.1 MIT https://github.com/cssnano/cssnano.git
postcss-normalize-repeat-style 5.1.1 MIT https://github.com/cssnano/cssnano.git
postcss-normalize-string 5.1.0 MIT https://github.com/cssnano/cssnano.git
postcss-normalize-timing-functions 5.1.0 MIT https://github.com/cssnano/cssnano.git
postcss-normalize-unicode 5.1.1 MIT https://github.com/cssnano/cssnano.git
postcss-normalize-url 5.1.0 MIT https://github.com/cssnano/cssnano.git
postcss-normalize-whitespace 5.1.1 MIT https://github.com/cssnano/cssnano.git
postcss-ordered-values 5.1.3 MIT https://github.com/cssnano/cssnano.git
postcss-reduce-initial 5.1.2 MIT https://github.com/cssnano/cssnano.git
postcss-reduce-transforms 5.1.0 MIT https://github.com/cssnano/cssnano.git
postcss-selector-parser 6.0.13 MIT https://github.com/postcss/postcss-selector-parser.git
postcss-svgo 5.1.0 MIT https://github.com/cssnano/cssnano.git
postcss-unique-selectors 5.1.1 MIT https://github.com/cssnano/cssnano.git
postcss-value-parser 4.2.0 MIT https://github.com/TrySound/postcss-value-parser.git
prop-types 15.8.1 MIT https://github.com/facebook/prop-types.git
punycode 2.3.0 MIT https://github.com/mathiasbynens/punycode.js.git
queue-microtask 1.2.3 MIT git://github.com/feross/queue-microtask.git
quick-lru 5.1.1 MIT https://github.com/sindresorhus/quick-lru.git
raf 3.4.1 MIT git://github.com/chrisdickinson/raf.git
rc-align 4.0.15 MIT git@github.com:react-component/align.git
rc-dropdown 3.6.2 MIT git@github.com:react-component/dropdown.git
rc-dropdown 4.0.1 MIT git@github.com:react-component/dropdown.git
rc-menu 9.9.2 MIT git@github.com:react-component/menu.git
rc-menu 9.6.4 MIT git@github.com:react-component/menu.git
rc-motion 2.7.3 MIT git@github.com:react-component/motion.git
rc-overflow 1.3.1 MIT git@github.com:react-component/overflow.git
rc-resize-observer 1.3.1 MIT git@github.com:react-component/resize-observer.git
rc-tabs 11.16.1 MIT git@github.com:react-component/tabs.git
rc-trigger 5.3.4 MIT https://github.com/react-component/trigger.git
rc-util 5.34.0 MIT git@github.com:react-component/util.git
re-resizable 6.9.6 MIT https://github.com/bokuweb/react-resizable-box.git
react 17.0.2 MIT https://github.com/facebook/react.git
react-aspen 1.2.0 MIT https://github.com/neeksandhu/react-aspen.git
react-checkbox-tree 1.8.0 MIT https://github.com/jakezatecky/react-checkbox-tree
react-data-grid 7.0.0-beta.14 MIT https://github.com/adazzle/react-data-grid.git
react-dnd 16.0.1 MIT https://github.com/react-dnd/react-dnd.git
react-dnd-html5-backend 16.0.1 MIT https://github.com/react-dnd/react-dnd.git
react-dom 17.0.2 MIT https://github.com/facebook/react.git
react-draggable 4.4.5 MIT https://github.com/react-grid-layout/react-draggable.git
react-dropzone 14.2.3 MIT https://github.com/react-dropzone/react-dropzone.git
react-is 17.0.2 MIT https://github.com/facebook/react.git
react-is 16.13.1 MIT https://github.com/facebook/react.git
react-resize-detector 9.1.0 MIT git+https://github.com/maslianok/react-resize-detector.git
react-rnd 10.4.1 MIT https://github.com/bokuweb/react-rnd.git
react-router 6.13.0 MIT https://github.com/remix-run/react-router
react-router-dom 6.13.0 MIT https://github.com/remix-run/react-router
react-select 5.7.3 MIT https://github.com/JedWatson/react-select/tree/master/packages/react-select
react-table 7.8.0 MIT https://github.com/tannerlinsley/react-table
react-transition-state 1.1.5 MIT https://github.com/szhsin/react-transition-state.git
react-virtualized-auto-sizer 1.0.20 MIT https://github.com/bvaughn/react-virtualized-auto-sizer.git
react-window 1.8.9 MIT https://github.com/bvaughn/react-window.git
read-pkg 6.0.0 MIT https://github.com/sindresorhus/read-pkg.git
read-pkg-up 8.0.0 MIT https://github.com/sindresorhus/read-pkg-up.git
redent 4.0.0 MIT https://github.com/sindresorhus/redent.git
redux 4.2.1 MIT https://github.com/reduxjs/redux.git
regenerator-runtime 0.13.11 MIT https://github.com/facebook/regenerator/tree/main/packages/runtime
require-from-string 2.0.2 MIT https://github.com/floatdrop/require-from-string.git
resize-observer-polyfill 1.5.1 MIT https://github.com/que-etc/resize-observer-polyfill.git
resolve 1.22.2 MIT git://github.com/browserify/resolve.git
resolve-from 4.0.0 MIT https://github.com/sindresorhus/resolve-from.git
reusify 1.0.4 MIT git+https://github.com/mcollina/reusify.git
rifm 0.7.0 MIT https://github.com/istarkov/rifm.git
run-parallel 1.2.0 MIT git://github.com/feross/run-parallel.git
scheduler 0.20.2 MIT https://github.com/facebook/react.git
shallowequal 1.1.0 MIT https://github.com/dashed/shallowequal.git
slash 4.0.0 MIT https://github.com/sindresorhus/slash.git
snapsvg-cjs 0.0.6 MIT git+https://github.com/geelen/Snap.svg-cjs.git
socket.io-client 4.7.0 MIT https://github.com/socketio/socket.io-client.git
socket.io-parser 4.2.4 MIT https://github.com/socketio/socket.io-parser.git
spdx-expression-parse 3.0.1 MIT https://github.com/jslicense/spdx-expression-parse.js.git
split.js 1.6.5 MIT https://github.com/nathancahill/split
stable 0.1.8 MIT https://github.com/Two-Screen/stable.git
strip-indent 4.0.0 MIT https://github.com/sindresorhus/strip-indent.git
styled-components 5.3.11 MIT git+https://github.com/styled-components/styled-components.git
stylehacks 5.1.1 MIT https://github.com/cssnano/cssnano.git
stylis 4.2.0 MIT https://github.com/thysultan/stylis.js
supports-color 5.5.0 MIT https://github.com/chalk/supports-color.git
supports-color 7.2.0 MIT https://github.com/chalk/supports-color.git
supports-preserve-symlinks-flag 1.0.0 MIT git+https://github.com/inspect-js/node-supports-preserve-symlinks-flag.git
svgo 2.8.0 MIT git://github.com/svg/svgo.git
tempusdominus-core 5.19.3 MIT https://github.com/tempusdominus/core.git
text-segmentation 1.0.3 MIT git+ssh://git@github.com/niklasvh/text-segmentation.git
tiny-warning 1.0.3 MIT https://github.com/alexreardon/tiny-warning.git
to-fast-properties 2.0.0 MIT https://github.com/sindresorhus/to-fast-properties.git
to-regex-range 5.0.1 MIT https://github.com/micromatch/to-regex-range.git
trim-newlines 4.1.1 MIT https://github.com/sindresorhus/trim-newlines.git
unc-path-regex 0.1.2 MIT https://github.com/regexhq/unc-path-regex.git
update-browserslist-db 1.0.11 MIT https://github.com/browserslist/update-db.git
uplot 1.6.24 MIT git+https://github.com/leeoniya/uPlot.git
uplot-react 1.1.4 MIT https://github.com/skalinichev/uplot-wrappers.git
use-isomorphic-layout-effect 1.1.2 MIT git+https://github.com/Andarist/use-isomorphic-layout-effect.git
util-deprecate 1.0.2 MIT git://github.com/TooTallNate/util-deprecate.git
utrie 1.0.2 MIT git+ssh://git@github.com/niklasvh/utrie.git
valid-filename 2.0.1 MIT https://github.com/sindresorhus/valid-filename.git
wkx 0.5.0 MIT http://github.com/cschwarz/wkx.git
ws 8.11.0 MIT https://github.com/websockets/ws.git
xmlhttprequest-ssl 2.0.0 MIT git://github.com/mjwwit/node-XMLHttpRequest.git
xterm 4.19.0 MIT https://github.com/xtermjs/xterm.js
xterm-addon-fit 0.5.0 MIT https://github.com/xtermjs/xterm.js
xterm-addon-search 0.8.2 MIT https://github.com/xtermjs/xterm.js
xterm-addon-web-links 0.4.0 MIT https://github.com/xtermjs/xterm.js
yocto-queue 0.1.0 MIT https://github.com/sindresorhus/yocto-queue.git
@fortawesome/fontawesome-free 5.15.4 (CC-BY-4.0 AND OFL-1.1 AND MIT) https://github.com/FortAwesome/Font-Awesome
@react-leaflet/core 1.1.1 Hippocratic-2.1 https://github.com/PaulLeCam/react-leaflet.git
react-leaflet 3.2.5 Hippocratic-2.1 https://github.com/PaulLeCam/react-leaflet.git
@sphinxxxx/color-conversion 2.2.2 ISC git+https://github.com/Sphinxxxx/color-conversion.git
@trysound/sax 0.2.0 ISC git://github.com/svg/sax.git
boolbase 1.0.0 ISC https://github.com/fb55/boolbase
css-color-keywords 1.0.0 ISC https://github.com/sonicdoe/css-color-keywords.git
css-declaration-sorter 6.4.0 ISC https://github.com/Siilwyn/css-declaration-sorter.git
electron-to-chromium 1.4.437 ISC https://github.com/kilian/electron-to-chromium/
fastq 1.15.0 ISC git+https://github.com/mcollina/fastq.git
glob-parent 5.1.2 ISC https://github.com/gulpjs/glob-parent.git
hosted-git-info 4.1.0 ISC git+https://github.com/npm/hosted-git-info.git
jsonrepair 3.2.0 ISC https://github.com/josdejong/jsonrepair.git
lru-cache 6.0.0 ISC git://github.com/isaacs/node-lru-cache.git
lru-cache 5.1.1 ISC git://github.com/isaacs/node-lru-cache.git
minimatch 3.1.2 ISC git://github.com/isaacs/minimatch.git
picocolors 1.0.0 ISC https://github.com/alexeyraspopov/picocolors.git
react-timer-hook 3.0.6 ISC git+https://github.com/amrlabib/react-timer-hook.git
semver 6.3.0 ISC https://github.com/npm/node-semver
semver 7.5.2 ISC https://github.com/npm/node-semver.git
vanilla-picker 2.12.1 ISC https://github.com/Sphinxxxx/vanilla-picker.git
yallist 4.0.0 ISC git+https://github.com/isaacs/yallist.git
yallist 3.1.1 ISC git+https://github.com/isaacs/yallist.git
yaml 1.10.2 ISC https://github.com/eemeli/yaml.git
yargs-parser 20.2.9 ISC https://github.com/yargs/yargs-parser.git
ace-builds 1.23.0 BSD-3-Clause https://github.com/ajaxorg/ace-builds.git
hoist-non-react-statics 3.3.2 BSD-3-Clause git://github.com/mridgway/hoist-non-react-statics.git
hyphenate-style-name 1.0.4 BSD-3-Clause git+ssh://git@github.com/rexxars/hyphenate-style-name.git
istanbul-lib-coverage 3.2.0 BSD-3-Clause git+ssh://git@github.com/istanbuljs/istanbuljs.git
istanbul-lib-instrument 5.2.1 BSD-3-Clause git+ssh://git@github.com/istanbuljs/istanbuljs.git
istanbul-lib-report 3.0.0 BSD-3-Clause git+ssh://git@github.com/istanbuljs/istanbuljs.git
istanbul-lib-source-maps 4.0.1 BSD-3-Clause git+ssh://git@github.com/istanbuljs/istanbuljs.git
istanbul-reports 3.1.5 BSD-3-Clause git+ssh://git@github.com/istanbuljs/istanbuljs.git
react-transition-group 4.4.5 BSD-3-Clause https://github.com/reactjs/react-transition-group.git
source-map 0.6.1 BSD-3-Clause http://github.com/mozilla/source-map.git
source-map 0.5.7 BSD-3-Clause http://github.com/mozilla/source-map.git
source-map-js 1.0.2 BSD-3-Clause https://github.com/7rulnik/source-map-js.git
sprintf-js 1.1.2 BSD-3-Clause https://github.com/alexei/sprintf.js.git
caniuse-lite 1.0.30001506 CC-BY-4.0 https://github.com/browserslist/caniuse-lite.git
css-select 4.3.0 BSD-2-Clause git://github.com/fb55/css-select.git
css-what 6.1.0 BSD-2-Clause https://github.com/fb55/css-what
domelementtype 2.3.0 BSD-2-Clause git://github.com/fb55/domelementtype.git
domhandler 4.3.1 BSD-2-Clause git://github.com/fb55/domhandler.git
domutils 2.8.0 BSD-2-Clause git://github.com/fb55/domutils.git
entities 2.2.0 BSD-2-Clause git://github.com/fb55/entities.git
leaflet 1.9.4 BSD-2-Clause git://github.com/Leaflet/Leaflet.git
normalize-package-data 3.0.3 BSD-2-Clause git://github.com/npm/normalize-package-data.git
nth-check 2.1.1 BSD-2-Clause https://github.com/fb55/nth-check
uri-js 4.4.1 BSD-2-Clause http://github.com/garycourt/uri-js
FileSaver 0.10.0 UNKNOWN Unknown
heap 0.2.5 UNKNOWN git://github.com/qiao/heap.js.git
mdn-data 2.0.14 CC0-1.0 https://github.com/mdn/data.git
spdx-license-ids 3.0.13 CC0-1.0 https://github.com/jslicense/spdx-license-ids.git
mousetrap 1.6.5 Apache-2.0 WITH LLVM-exception git://github.com/ccampbell/mousetrap.git
pako 1.0.11 (MIT AND Zlib) https://github.com/nodeca/pako.git
spdx-exceptions 2.3.0 CC-BY-3.0 https://github.com/kemitchell/spdx-exceptions.json.git
tslib 2.5.3 0BSD https://github.com/Microsoft/tslib.git
tslib 2.3.1 0BSD https://github.com/Microsoft/tslib.git
type-fest 1.4.0 (MIT OR CC0-1.0) https://github.com/sindresorhus/type-fest.git
webcabin-docker 2.2.5 MIT* Unknown
495 dependencies listed.
+69 -64
View File
@@ -2,7 +2,7 @@
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2024, The pgAdmin Development Team
# Copyright (C) 2013 - 2026, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
#########################################################################
@@ -31,47 +31,36 @@ RUN apk add --no-cache \
yarn \
zlib-dev
# Create the /pgadmin4 directory and copy the source into it. Explicitly
# remove the node_modules directory as we'll recreate a clean version, as well
# as various other files we don't want
# Create the /pgadmin4 directory and copy the source into it
COPY web /pgadmin4/web
RUN rm -rf /pgadmin4/web/*.log \
/pgadmin4/web/config_*.py \
/pgadmin4/web/node_modules \
/pgadmin4/web/regression \
`find /pgadmin4/web -type d -name tests` \
`find /pgadmin4/web -type f -name .DS_Store`
WORKDIR /pgadmin4/web
# Build the JS vendor code in the app-builder, and then remove the vendor source.
RUN export CPPFLAGS="-DPNG_ARM_NEON_OPT=0" && \
yarn set version berry && \
yarn set version 3 && \
yarn install && \
RUN --mount=type=bind,source=.git,target=/pgadmin4/.git \
--mount=type=tmpfs,target=node_modules \
--mount=type=tmpfs,target=pgadmin/static/js/generated/.cache \
export CPPFLAGS="-DPNG_ARM_NEON_OPT=0" && \
npm install -g corepack && \
corepack enable && \
yarn install --immutable && \
yarn run bundle && \
rm -rf node_modules \
yarn.lock \
rm -rf yarn.lock \
package.json \
.[^.]* \
babel.cfg \
webpack.* \
jest.config.js \
babel.* \
./pgadmin/static/js/generated/.cache
babel.*
#########################################################################
# Next, create the base environment for Python
#########################################################################
FROM alpine:latest AS env-builder
FROM python:3-alpine AS env-builder
# Install dependencies
COPY requirements.txt /
RUN apk add --no-cache \
make \
python3 \
py3-pip && \
RUN apk add --no-cache \
make && \
apk add --no-cache --virtual build-deps \
build-base \
openssl-dev \
@@ -82,12 +71,19 @@ RUN apk add --no-cache \
cargo \
zlib-dev \
libjpeg-turbo-dev \
libpng-dev \
python3-dev && \
python3 -m venv --system-site-packages --without-pip /venv && \
libpng-dev
COPY requirements.txt /
RUN python3 -m venv --system-site-packages --without-pip /venv && \
/venv/bin/python3 -m pip install --no-cache-dir -r requirements.txt && \
apk del --no-cache build-deps
# Remove the files pgAdmin never uses. The script reads the language list from
# web/config.py, so it is copied in separately to avoid a change to it
# reinstalling the requirements above.
COPY pkg/prune_site_packages.py /prune/pkg/
COPY web/config.py /prune/web/
RUN /venv/bin/python3 /prune/pkg/prune_site_packages.py /venv
#########################################################################
# Now, create a documentation build container for the Sphinx docs
#########################################################################
@@ -116,20 +112,16 @@ RUN rm -rf /pgadmin4/docs/en_US/_build/html/_static/*.png
# Create additional builders to get all of the PostgreSQL utilities
#########################################################################
FROM postgres:12-alpine AS pg12-builder
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 postgres:18-alpine AS pg18-builder
FROM alpine:latest AS tool-builder
# Copy the PG binaries
COPY --from=pg12-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-12/
COPY --from=pg12-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-12/
COPY --from=pg12-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-12/
COPY --from=pg12-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-12/
COPY --from=pg13-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-13/
COPY --from=pg13-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-13/
COPY --from=pg13-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-13/
@@ -150,25 +142,49 @@ 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/
COPY --from=pg18-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-18/
COPY --from=pg18-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-18/
COPY --from=pg18-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-18/
COPY --from=pg18-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-18/
#########################################################################
# Assemble everything into the final container.
#########################################################################
FROM alpine:latest
FROM python:3-alpine
# Install runtime dependencies
RUN apk update && apk upgrade && \
apk add \
bash \
postfix \
krb5-libs \
libcurl \
libjpeg-turbo \
shadow \
sudo \
tzdata \
libedit \
libldap \
libcap \
su-exec && \
rm -rf /var/cache/apk/*
# Copy in the Python packages
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.5 /usr/lib/
COPY --from=pg16-builder /usr/lib/liblz4.so.1.9.4 /usr/lib/
COPY --from=pg18-builder /usr/local/lib/libpq.so.5.18 /usr/local/lib/libpq-oauth-18.so /usr/lib/liblz4.so.1.10.0 /usr/lib/
RUN ln -s libpq.so.5.16 /usr/lib/libpq.so.5 && \
ln -s libpq.so.5.16 /usr/lib/libpq.so && \
ln -s libzstd.so.1.5.5 /usr/lib/libzstd.so.1 && \
ln -s liblz4.so.1.9.4 /usr/lib/liblz4.so.1
RUN ln -s libpq.so.5.18 /usr/lib/libpq.so.5 && \
ln -s libpq.so.5.18 /usr/lib/libpq.so && \
ln -s liblz4.so.1.10.0 /usr/lib/liblz4.so.1
WORKDIR /pgadmin4
ENV PYTHONPATH=/pgadmin4
@@ -176,42 +192,31 @@ ENV PYTHONPATH=/pgadmin4
# Copy in the code and docs
COPY --from=app-builder /pgadmin4/web /pgadmin4
COPY --from=docs-builder /pgadmin4/docs/en_US/_build/html/ /pgadmin4/docs
COPY pkg/docker/run_pgadmin.py /pgadmin4
COPY pkg/docker/gunicorn_config.py /pgadmin4
COPY pkg/docker/run_pgadmin.py pkg/docker/gunicorn_config.py /pgadmin4/
COPY pkg/docker/entrypoint.sh /entrypoint.sh
# License files
COPY LICENSE /pgadmin4/LICENSE
COPY DEPENDENCIES /pgadmin4/DEPENDENCIES
# Install runtime dependencies and configure everything in one RUN step
RUN apk add \
python3 \
py3-pip \
postfix \
krb5-libs \
libjpeg-turbo \
shadow \
sudo \
tzdata \
libedit \
libldap \
libcap && \
/venv/bin/python3 -m pip install --no-cache-dir gunicorn==20.1.0 && \
# Configure everything in one RUN step
RUN /venv/bin/python3 -m pip install --no-cache-dir gunicorn==23.0.0 && \
find / -type d -name '__pycache__' -exec rm -rf {} + && \
useradd -r -u 5050 -g root -s /sbin/nologin pgadmin && \
mkdir -p /var/lib/pgadmin && \
chown pgadmin:root /var/lib/pgadmin && \
chmod g=u /var/lib/pgadmin && \
mkdir -p /run/pgadmin /var/lib/pgadmin && \
chown pgadmin:root /run/pgadmin /var/lib/pgadmin && \
chmod g=u /run/pgadmin /var/lib/pgadmin && \
touch /pgadmin4/config_distro.py && \
chown pgadmin:root /pgadmin4/config_distro.py && \
chmod g=u /pgadmin4/config_distro.py && \
chmod g=u /etc/passwd && \
setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/python3.11 && \
PYBIN="$(ls /usr/local/bin/python3.[0-9][0-9] 2>/dev/null | head -n1)" && \
cp "$PYBIN" /usr/local/bin/python3-cap && \
setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/python3-cap && \
ln -s /usr/local/bin/python3-cap /venv/bin/python3-cap && \
echo "pgadmin ALL = NOPASSWD: /usr/sbin/postfix start" > /etc/sudoers.d/postfix && \
echo "pgadminr ALL = NOPASSWD: /usr/sbin/postfix start" >> /etc/sudoers.d/postfix
USER pgadmin
USER 5050
# Finish up
VOLUME /var/lib/pgadmin
+1 -1
View File
@@ -4,7 +4,7 @@ pgAdmin 4
This software is released under the PostgreSQL licence.
-------------------------------------------------------------------------------
Copyright (C) 2013 - 2024, The pgAdmin Development Team
Copyright (C) 2013 - 2026, The pgAdmin Development Team
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written agreement is
+343 -130
View File
@@ -20,15 +20,21 @@ IF "%1" == "clean" (
)
REM Main build sequence
REM
REM The clean runs first because :FETCH_PYTHON unpacks into the temp directory
REM that it removes, and the fetch runs before :SET_ENVIRONMENT because the
REM latter has no interpreter of its own to ask about the build.
CALL :CLEAN || EXIT /B 1
CALL :FETCH_PYTHON || EXIT /B 1
CALL :SET_ENVIRONMENT
CALL :VALIDATE_ENVIRONMENT || EXIT /B 1
CALL :CLEAN || EXIT /B 1
CALL :CREATE_VIRTUAL_ENV || EXIT /B 1
CALL :CREATE_PYTHON_ENV || EXIT /B 1
CALL :CREATE_RUNTIME_ENV || EXIT /B 1
CALL :SIGN_COMPONENTS || EXIT /B 1
CALL :GENERATE_SBOM || EXIT /B 1
CALL :CREATE_INSTALLER || EXIT /B 1
CALL :SIGN_INSTALLER || EXIT /B 1
CALL :VERIFY_SIGNATURE || EXIT /B 1
EXIT /B %ERRORLEVEL%
REM Main build sequence Ends
@@ -50,36 +56,93 @@ REM Main build sequence Ends
EXIT /B 0
:FETCH_PYTHON
REM Fetch the Python this build uses, rather than using whatever happens to
REM be installed on the machine running it. Which interpreter pgAdmin ships
REM is a decision recorded in pkg\python-version.txt, not a property of the
REM build agent, and this is the only place on Windows that reads it.
REM
REM The distribution comes from astral-sh/python-build-standalone: it is
REM relocatable, published per exact CPython version, and is a plain tarball
REM rather than an installer, so unpacking it raises no UAC prompt. That
REM matters on the signing host, where the desktop session is logged in
REM automatically and an elevation dialog waits forever for somebody who is
REM not there.
REM
REM curl.exe and tar.exe have shipped in Windows since 1803, so this needs
REM nothing installed to bootstrap itself, not even a Python.
ECHO Reading the Python version...
SET "PYTHON_VERSION="
SET "PYTHON_BUILD_STANDALONE_TAG="
FOR /F "eol=# usebackq tokens=1,2 delims==" %%a IN ("%WD%\pkg\python-version.txt") DO (
IF "%%a" == "PYTHON_VERSION" SET "PYTHON_VERSION=%%b"
IF "%%a" == "PYTHON_BUILD_STANDALONE_TAG" SET "PYTHON_BUILD_STANDALONE_TAG=%%b"
)
IF "%PYTHON_VERSION%" == "" (
ECHO PYTHON_VERSION is not set in pkg\python-version.txt.
EXIT /B 1
)
IF "%PYTHON_BUILD_STANDALONE_TAG%" == "" (
ECHO PYTHON_BUILD_STANDALONE_TAG is not set in pkg\python-version.txt.
EXIT /B 1
)
REM Split for the runtime build, where e.g. 3.13.15 becomes 313
FOR /F "tokens=1,2,3 delims=." %%a IN ("%PYTHON_VERSION%") DO (
SET "PYTHON_MAJOR=%%a"
SET "PYTHON_MINOR=%%b"
SET "PYTHON_REVISION=%%c"
)
SET "PGADMIN_PYTHON_DIR=%TMPDIR%\python"
SET "PYTHON_ARCHIVE=cpython-%PYTHON_VERSION%+%PYTHON_BUILD_STANDALONE_TAG%-x86_64-pc-windows-msvc-install_only.tar.gz"
IF NOT EXIST "%TMPDIR%" MKDIR "%TMPDIR%"
ECHO Downloading Python %PYTHON_VERSION%...
curl.exe --fail --location --silent --show-error --output "%TMPDIR%\python.tar.gz" "https://github.com/astral-sh/python-build-standalone/releases/download/%PYTHON_BUILD_STANDALONE_TAG%/%PYTHON_ARCHIVE%" || EXIT /B 1
ECHO Unpacking Python...
REM The archive unpacks to a single python\ directory.
tar -x -f "%TMPDIR%\python.tar.gz" -C "%TMPDIR%" || EXIT /B 1
DEL /q "%TMPDIR%\python.tar.gz" > nul 2>&1
"%PGADMIN_PYTHON_DIR%\python.exe" --version || EXIT /B 1
REM :CREATE_VIRTUAL_ENV needs virtualenv rather than the venv module, as it
REM relocates the result. pip is bundled with the distribution, but ask
REM ensurepip for it anyway so this does not quietly depend on that.
ECHO Installing virtualenv...
"%PGADMIN_PYTHON_DIR%\python.exe" -m ensurepip --upgrade || EXIT /B 1
"%PGADMIN_PYTHON_DIR%\python.exe" -m pip install --upgrade pip virtualenv || EXIT /B 1
EXIT /B 0
:SET_ENVIRONMENT
ECHO Configuring the environment...
IF "%PGADMIN_PYTHON_DIR%" == "" SET "PGADMIN_PYTHON_DIR=C:\Python38"
IF "%PGADMIN_KRB5_DIR%" == "" SET "PGADMIN_KRB5_DIR=C:\Program Files\MIT\Kerberos"
IF "%PGADMIN_POSTGRES_DIR%" == "" SET "PGADMIN_POSTGRES_DIR=C:\Program Files (x86)\PostgreSQL\12"
IF "%PGADMIN_KRB5_DIR%" == "" SET "PGADMIN_KRB5_DIR=C:\build64\krb5"
IF "%PGADMIN_POSTGRES_DIR%" == "" SET "PGADMIN_POSTGRES_DIR=C:\build64\postgresql"
IF "%PGADMIN_INNOTOOL_DIR%" == "" SET "PGADMIN_INNOTOOL_DIR=C:\Program Files (x86)\Inno Setup 6"
IF "%PGADMIN_VCREDIST_DIR%" == "" SET "PGADMIN_VCREDIST_DIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Redist\MSVC\14.16.27012"
IF "%PGADMIN_SIGNTOOL_DIR%" == "" SET "PGADMIN_SIGNTOOL_DIR=C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64"
REM Set REDIST_NAME (the filename)
set "VCREDIST_FILE=vcredist_x64.exe"
IF "%PGADMIN_VCREDIST_DIR%" == "" SET "PGADMIN_VCREDIST_DIR=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.40.33807"
IF "%PGADMIN_VCREDIST_FILE%" == "" SET "PGADMIN_VCREDIST_FILE=vc_redist.x64.exe"
IF "%PGADMIN_SIGNTOOL_DIR%" == "" SET "PGADMIN_SIGNTOOL_DIR=C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64"
IF "%PGADMIN_WINDOWS_CSC%" == "" SET "PGADMIN_WINDOWS_CSC="
REM Set additional variables we need
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_RELEASE =" %WD%\web\config.py') DO SET APP_MAJOR=%%a
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_REVISION =" %WD%\web\config.py') DO SET APP_MINOR=%%a
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_SUFFIX =" %WD%\web\config.py') DO SET APP_VERSION_SUFFIX=%%a
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_RELEASE =" %WD%\web\version.py') DO SET APP_MAJOR=%%a
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_REVISION =" %WD%\web\version.py') DO SET APP_MINOR=%%a
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_SUFFIX =" %WD%\web\version.py') DO SET APP_VERSION_SUFFIX=%%a
REM remove single quote from the string
SET APP_VERSION_SUFFIX=%APP_VERSION_SUFFIX:'=%
SET APP_NAME=""
FOR /F "tokens=2* DELims='" %%a IN ('findstr /C:"APP_NAME =" web\config.py') DO SET APP_NAME=%%a
FOR /F "tokens=2* DELims='" %%a IN ('findstr /C:"APP_NAME =" web\branding.py') DO SET APP_NAME=%%a
FOR /f "tokens=1 DELims=." %%G IN ('%PGADMIN_PYTHON_DIR%/python.exe -c "print('%APP_NAME%'.lower().replace(' ', ''))"') DO SET APP_SHORTNAME=%%G
SET APP_VERSION=%APP_MAJOR%.%APP_MINOR%
SET INSTALLERNAME=%APP_SHORTNAME%-%APP_MAJOR%.%APP_MINOR%-%APP_VERSION_SUFFIX%-x64.exe
IF "%APP_VERSION_SUFFIX%" == "" SET INSTALLERNAME=%APP_SHORTNAME%-%APP_MAJOR%.%APP_MINOR%-x64.exe
REM get Python version for the runtime build ex. 3.9.2 will be 39
FOR /f "tokens=1 DELims=." %%G IN ('%PGADMIN_PYTHON_DIR%/python.exe -c "import sys; print(sys.version.split(' ')[0])"') DO SET PYTHON_MAJOR=%%G
FOR /f "tokens=2 DELims=." %%G IN ('%PGADMIN_PYTHON_DIR%/python.exe -c "import sys; print(sys.version.split(' ')[0])"') DO SET PYTHON_MINOR=%%G
FOR /f "tokens=3 DELims=." %%G IN ('%PGADMIN_PYTHON_DIR%/python.exe -c "import sys; print(sys.version.split(' ')[0])"') DO SET PYTHON_REVISION=%%G
EXIT /B 0
@@ -91,16 +154,21 @@ REM Main build sequence Ends
ECHO Output directory: %DISTROOT%
ECHO Installer name: %INSTALLERNAME%
ECHO.
ECHO Python directory: %PGADMIN_PYTHON_DIR%
ECHO Python version: %PYTHON_MAJOR%.%PYTHON_MINOR%.%PYTHON_REVISION%
ECHO Python directory: %PGADMIN_PYTHON_DIR%
ECHO.
ECHO KRB5 directory: %PGADMIN_KRB5_DIR%
ECHO PostgreSQL directory: %PGADMIN_POSTGRES_DIR%
ECHO.
ECHO VC++ redist directory: %PGADMIN_VCREDIST_DIR%
ECHO VC++ redist file: %VCREDIST_FILE%
ECHO VC++ redist file: %PGADMIN_VCREDIST_FILE%
ECHO InnoTool directory: %PGADMIN_INNOTOOL_DIR%
ECHO signtool directory: %PGADMIN_SIGNTOOL_DIR%
IF "%PGADMIN_WINDOWS_CSC%" == "" (
ECHO Code signing certificate: [NONE - Signing disabled]
) ELSE (
ECHO Code signing certificate: %PGADMIN_WINDOWS_CSC%
)
ECHO.
ECHO App version: %APP_VERSION%
ECHO App version suffix: %APP_VERSION_SUFFIX%
@@ -109,41 +177,16 @@ REM Main build sequence Ends
ECHO ****************************************************************
ECHO Checking the environment...
IF NOT EXIST "%PGADMIN_INNOTOOL_DIR%" (
ECHO !PGADMIN_INNOTOOL_DIR! does not exist
ECHO Please install InnoTool and set the PGADMIN_INNOTOOL_DIR environment variable.
EXIT /B 1
)
IF NOT EXIST "%PGADMIN_VCREDIST_DIR%" (
ECHO !PGADMIN_VCREDIST_DIR! does not exist
ECHO Please install Microsoft Visual studio and set the PGADMIN_VCREDIST_DIR environment variable.
EXIT /B 1
)
IF NOT EXIST "%PGADMIN_KRB5_DIR%" (
ECHO !PGADMIN_KRB5_DIR! does not exist.
ECHO Please install MIT Kerberos for Windows and set the PGADMIN_KRB5_DIR environment variable.
EXIT /B 1
)
IF NOT EXIST "%PGADMIN_PYTHON_DIR%" (
ECHO !PGADMIN_PYTHON_DIR! does not exist.
ECHO Please install Python and set the PGADMIN_PYTHON_DIR environment variable.
EXIT /B 1
)
IF NOT EXIST "%PGADMIN_POSTGRES_DIR%" (
ECHO !PGADMIN_POSTGRES_DIR! does not exist.
ECHO Please install PostgreSQL and set the PGADMIN_POSTGRES_DIR environment variable.
EXIT /B 1
)
IF NOT EXIST "%PGADMIN_PYTHON_DIR%\Scripts\virtualenv.exe" (
ECHO !PGADMIN_PYTHON_DIR!\Scripts\virtualenv.exe does not exist.
ECHO Please install the virtualenv package in Python.
EXIT /B 1
)
REM The checks are made by :REQUIRE_DIR rather than inline, because the
REM message names the directory that was looked for, and a default such as
REM "C:\Program Files (x86)\Inno Setup 6" carries a closing parenthesis.
REM Inside a parenthesised block that parenthesis ends the block, as cmd
REM expands the variable when it parses the block rather than when it runs it,
REM so the block failed to parse whether or not the directory was there.
CALL :REQUIRE_DIR "%PGADMIN_INNOTOOL_DIR%" "Please install InnoTool and set the PGADMIN_INNOTOOL_DIR environment variable." || EXIT /B 1
CALL :REQUIRE_DIR "%PGADMIN_VCREDIST_DIR%" "Please install Microsoft Visual Studio and set the PGADMIN_VCREDIST_DIR environment variable." || EXIT /B 1
CALL :REQUIRE_DIR "%PGADMIN_KRB5_DIR%" "Please install MIT Kerberos for Windows, from the winpgbuild project or elsewhere, and set the PGADMIN_KRB5_DIR environment variable." || EXIT /B 1
CALL :REQUIRE_DIR "%PGADMIN_POSTGRES_DIR%" "Please install PostgreSQL, from the winpgbuild project or elsewhere, and set the PGADMIN_POSTGRES_DIR environment variable." || EXIT /B 1
SET "PATH=%PGADMIN_POSTGRES_DIR%\bin;%PATH%"
@@ -157,10 +200,14 @@ REM Main build sequence Ends
CD "%TMPDIR%"
REM Note that we must use virtualenv.exe here, as the venv module doesn't allow python.exe to relocate.
"%PGADMIN_PYTHON_DIR%\Scripts\virtualenv.exe" venv
"%PGADMIN_PYTHON_DIR%\Scripts\virtualenv.exe" venv || EXIT /B 1
XCOPY /S /I /E /H /Y "%PGADMIN_PYTHON_DIR%\DLLs" "%TMPDIR%\venv\DLLs" > nul || EXIT /B 1
XCOPY /S /I /E /H /Y "%PGADMIN_PYTHON_DIR%\Lib" "%TMPDIR%\venv\Lib" > nul || EXIT /B 1
REM Copy the standard library, but NOT site-packages: the venv already has its
REM own seeded pip there, and overwriting only the files the system Python also
REM has leaves a mix of two pip versions behind.
ROBOCOPY /E /R:3 /W:5 /NFL /NDL /NP "%PGADMIN_PYTHON_DIR%\Lib" "%TMPDIR%\venv\Lib" /XD site-packages
CALL :CHECK_ROBOCOPY_ERROR || EXIT /B 1
ECHO Activating virtual environment - %TMPDIR%\venv...
CALL "%TMPDIR%\venv\Scripts\activate" || EXIT /B 1
@@ -177,24 +224,29 @@ REM Main build sequence Ends
ECHO Staging Python...
MKDIR "%BUILDROOT%\python\Lib" || EXIT /B 1
ECHO Downloading embedded Python...
REM Get the python embeddable and extract it to %BUILDROOT%\python
CD "%TMPDIR%
%PGADMIN_PYTHON_DIR%\python -c "import sys; from urllib.request import urlretrieve; urlretrieve('https://www.python.org/ftp/python/' + sys.version.split(' ')[0] + '/python-' + sys.version.split(' ')[0] + '-embed-amd64.zip', 'python-embedded.zip')" || EXIT /B 1
%PGADMIN_PYTHON_DIR%\python -c "import zipfile; z = zipfile.ZipFile('python-embedded.zip', 'r'); z.extractall('../win-build/python/')" || EXIT /B 1
ECHO Downloading embedded Python %PYTHON_VERSION%...
REM What ships is the embeddable distribution from python.org, a different
REM build from the one :FETCH_PYTHON downloaded, and it has to be the same
REM CPython version: the extension modules in site-packages were compiled
REM against the build Python and are about to be run under this one. Both
REM therefore read pkg\python-version.txt, rather than either asking the
REM other what it is.
curl.exe --fail --location --silent --show-error --output "%TMPDIR%\python-embedded.zip" "https://www.python.org/ftp/python/%PYTHON_VERSION%/python-%PYTHON_VERSION%-embed-amd64.zip" || EXIT /B 1
tar -x -f "%TMPDIR%\python-embedded.zip" -C "%BUILDROOT%\python" || EXIT /B 1
ECHO Copying site-packages...
XCOPY /S /I /E /H /Y "%TMPDIR%\venv\Lib\site-packages" "%BUILDROOT%\python\Lib\site-packages" > nul || EXIT /B 1
REM This is done to the copy rather than the venv, which still needs pip to
REM install Sphinx for the docs in :CREATE_RUNTIME_ENV.
ECHO Removing unused files from the installed packages...
"%TMPDIR%\venv\Scripts\python.exe" "%WD%\pkg\prune_site_packages.py" "%BUILDROOT%\python\Lib\site-packages" || EXIT /B 1
REM NOTE: There is intentionally no space after "site" in the line below, to prevent Python barfing if there's one in the file
ECHO import site>> "%BUILDROOT%\python\python%PYTHON_MAJOR%%PYTHON_MINOR%._pth"
ECHO Staging Kerberos components...
COPY "%PGADMIN_KRB5_DIR%\bin\kinit.exe" "%BUILDROOT%\python" > nul || EXIT /B 1
COPY "%PGADMIN_KRB5_DIR%\bin\krb5_64.dll" "%BUILDROOT%\python" > nul || EXIT /B 1
COPY "%PGADMIN_KRB5_DIR%\bin\comerr64.dll" "%BUILDROOT%\python" > nul || EXIT /B 1
COPY "%PGADMIN_KRB5_DIR%\bin\k5sprt64.dll" "%BUILDROOT%\python" > nul || EXIT /B 1
COPY "%PGADMIN_KRB5_DIR%\bin\gssapi64.dll" "%BUILDROOT%\python" > nul || EXIT /B 1
REM NOTE: The Kerberos components are staged into the runtime directory
REM alongside libpq.dll, not here. See :CREATE_RUNTIME_ENV.
ECHO Cleaning up unnecessary .pyc and .pyo files...
FOR /R "%BUILDROOT%\python" %%f in (*.pyc *.pyo) do DEL /q "%%f" 1> nul 2>&1
@@ -212,12 +264,19 @@ REM Main build sequence Ends
RD /Q /S "%WD%\web\pgadmin\static\js\generated\.cache" 1> nul 2>&1
ECHO Copying web directory...
ROBOCOPY /S "%WD%\web" "%BUILDROOT%\web" > nul
CALL :CHECK_ROBOCOPY_ERROR
ROBOCOPY /S /NFL /NDL /NP "%WD%\web" "%BUILDROOT%\web"
CALL :CHECK_ROBOCOPY_ERROR || EXIT /B 1
ECHO Installing javascript dependencies...
CD "%BUILDROOT%\web"
CALL yarn install || EXIT /B 1
SET "YARN_VERSION="
FOR /f "delims=" %%v IN ('node -p "require('./package.json').packageManager.split('@')[1]"') DO SET "YARN_VERSION=%%v"
IF "%YARN_VERSION%"=="" (
ECHO ERROR: Could not determine Yarn version from package.json packageManager field.
EXIT /B 1
)
CALL yarn set version %YARN_VERSION% || EXIT /B 1
CALL yarn install --immutable || EXIT /B 1
CALL npm rebuild || EXIT /B 1
ECHO Bundling javascript...
@@ -231,13 +290,24 @@ REM Main build sequence Ends
RD /Q /S "%BUILDROOT%\web\regression" 1> nul 2>&1
ECHO Removing tools...
RD /Q /S "%BUILDROOT%\web\tools" 1> nul 2>&1
ECHO Removing the JavaScript build configuration...
RD /Q /S "%BUILDROOT%\web\.yarn" 1> nul 2>&1
DEL /q "%BUILDROOT%\web\yarn.lock" 1> nul 2>&1
DEL /q "%BUILDROOT%\web\.yarnrc.yml" 1> nul 2>&1
DEL /q "%BUILDROOT%\web\package.json" 1> nul 2>&1
DEL /q "%BUILDROOT%\web\jest.config.js" 1> nul 2>&1
DEL /q "%BUILDROOT%\web\babel.cfg" 1> nul 2>&1
DEL /q "%BUILDROOT%\web\babel.config.json" 1> nul 2>&1
DEL /q "%BUILDROOT%\web\webpack.config.js" 1> nul 2>&1
DEL /q "%BUILDROOT%\web\webpack.shim.js" 1> nul 2>&1
DEL /q "%BUILDROOT%\web\.eslintrc.js" 1> nul 2>&1
DEL /q "%BUILDROOT%\web\.editorconfig" 1> nul 2>&1
ECHO Removing any existing configurations...
DEL /q "%BUILDROOT%\web\pgadmin4.db" 1> nul 2>&1
DEL /q "%BUILDROOT%\web\config_local.py" 1> nul 2>&1
ECHO Staging license files...
COPY "%WD%\LICENSE" "%BUILDROOT%\" > nul || EXIT /B 1
COPY "%WD%\DEPENDENCIES" "%BUILDROOT%\" > nul || EXIT /B 1
ECHO Creating config_distro.py
ECHO SERVER_MODE = False > "%BUILDROOT%\web\config_distro.py"
@@ -260,74 +330,126 @@ REM Main build sequence Ends
RD /Q /S "%BUILDROOT%\docs\en_US\html\_sources" 1> nul 2>&1
ECHO Staging runtime components...
XCOPY /S /I /E /H /Y "%WD%\runtime\assets" "%BUILDROOT%\runtime\assets" > nul || EXIT /B 1
XCOPY /S /I /E /H /Y "%WD%\runtime\src" "%BUILDROOT%\runtime\src" > nul || EXIT /B 1
MKDIR "%BUILDROOT%\runtime\resources\app"
XCOPY /S /I /E /H /Y "%WD%\runtime\assets" "%BUILDROOT%\runtime\resources\app\assets" > nul || EXIT /B 1
XCOPY /S /I /E /H /Y "%WD%\runtime\src" "%BUILDROOT%\runtime\resources\app\src" > nul || EXIT /B 1
COPY "%WD%\runtime\package.json" "%BUILDROOT%\runtime\" > nul || EXIT /B 1
CD "%BUILDROOT%\runtime\"
CALL yarn install --production=true || EXIT /B 1
COPY "%WD%\runtime\package.json" "%BUILDROOT%\runtime\resources\app\" > nul || EXIT /B 1
COPY "%WD%\runtime\.yarnrc.yml" "%BUILDROOT%\runtime\resources\app\" > nul || EXIT /B 1
ECHO Downloading NWjs to %TMPDIR%...
REM Get a fresh copy of nwjs.
REM NOTE: The nw download servers seem to be very unreliable, so at the moment we're using wget which retries
CD "%BUILDROOT%\runtime\resources\app\"
REM YARN
REM CALL yarn --cwd "%TMPDIR%" add nw || EXIT /B
REM YARN END
SET "YARN_VERSION="
FOR /f "delims=" %%v IN ('node -p "require('./package.json').packageManager.split('@')[1]"') DO SET "YARN_VERSION=%%v"
IF "%YARN_VERSION%"=="" (
ECHO ERROR: Could not determine Yarn version from package.json packageManager field.
EXIT /B 1
)
CALL yarn set version %YARN_VERSION% || EXIT /B 1
CALL yarn workspaces focus --production || EXIT /B 1
REM WGET
REM Comment out the below line as the latest version having some
REM problem https://github.com/nwjs/nw.js/issues/7964, so for the time being
REM hardcoded the version to 0.77.0
REM FOR /f "tokens=2 delims='" %%i IN ('yarn info nw ^| findstr "latest: "') DO SET "NW_VERSION=%%i"
REM :GET_NW
REM wget https://dl.nwjs.io/v%NW_VERSION%/nwjs-v%NW_VERSION%-win-x64.zip -O "%TMPDIR%\nwjs-v%NW_VERSION%-win-x64.zip"
REM IF %ERRORLEVEL% NEQ 0 GOTO GET_NW
ECHO Removing yarn cache...
RD /Q /S "%BUILDROOT%\runtime\resources\app\.yarn" 1> nul 2>&1
SET "NW_VERSION=0.77.0"
wget https://dl.nwjs.io/v%NW_VERSION%/nwjs-v%NW_VERSION%-win-x64.zip -O "%TMPDIR%\nwjs-v%NW_VERSION%-win-x64.zip"
ECHO Downloading Electron to %TMPDIR%...
REM Get a fresh copy of electron.
tar -C "%TMPDIR%" -xvf "%TMPDIR%\nwjs-v%NW_VERSION%-win-x64.zip" || EXIT /B 1
REM WGET END
REM YARN
REM XCOPY /S /I /E /H /Y "%TMPDIR%\node_modules\nw\nwjs\*" "%BUILDROOT%\runtime" > nul || EXIT /B 1
REM YARN END
REM WGET
XCOPY /S /I /E /H /Y "%TMPDIR%\nwjs-v%NW_VERSION%-win-x64\*" "%BUILDROOT%\runtime" > nul || EXIT /B 1
REM WGET END
MOVE "%BUILDROOT%\runtime\nw.exe" "%BUILDROOT%\runtime\pgAdmin4.exe"
ECHO Attempting to sign the pgAdmin4.exe...
CALL "%PGADMIN_SIGNTOOL_DIR%\signtool.exe" sign /tr http://timestamp.digicert.com "%BUILDROOT%\runtime\pgAdmin4.exe"
IF %ERRORLEVEL% NEQ 0 (
ECHO.
ECHO ************************************************************
ECHO * Failed to sign the pgAdmin4.exe
ECHO ************************************************************
PAUSE
REM Resolve the electron version from runtime\yarn.lock, NOT from the npm
REM registry and NOT from the range in runtime\package.json. The registry's
REM `latest` dist-tag lands any newly published electron release in shipped
REM binaries without review, whilst the package.json range is only a lower
REM bound, so yarn is free to resolve it to a build other than the one we
REM ship. The lockfile is the single source of truth, and `yarn info`
REM reports its resolution without touching the network or needing
REM node_modules.
REM
REM It must run inside runtime\ though: outside a yarn project, `yarn info`
REM silently falls back to querying the registry and still exits 0, so check
REM the lockfile is present first and validate what comes back.
IF NOT EXIST "%WD%\runtime\yarn.lock" (
ECHO ERROR: "%WD%\runtime\yarn.lock" not found; cannot resolve the pinned Electron version.
EXIT /B 1
)
ECHO Replacing executable icon...
CALL yarn --cwd "%TMPDIR%" add winresourcer || EXIT /B
"%TMPDIR%\node_modules\winresourcer\bin\Resourcer.exe" -op:upd -src:"%BUILDROOT%\runtime\pgAdmin4.exe" -type:Icongroup -name:IDR_MAINFRAME -file:"%WD%\pkg\win32\Resources\pgAdmin4.ico"
SET "ELECTRON_VERSION="
PUSHD "%WD%\runtime" || EXIT /B 1
FOR /f "delims=" %%i IN ('yarn info electron --json ^| node -e "const lines=require('fs').readFileSync(0,'utf8').split('\n').filter(Boolean);const pkg=lines.map(l=>{try{return JSON.parse(l);}catch(e){return null;}}).find(o=>o&&typeof o.value==='string'&&o.value.startsWith('electron@npm:'));const version=(pkg&&pkg.children&&pkg.children.Version)||'';process.stdout.write(/^[0-9]+[.][0-9]+[.][0-9]+(-[0-9A-Za-z.-]+)?$/.test(version)?version:'');"') DO SET "ELECTRON_VERSION=%%i"
POPD
IF "%ELECTRON_VERSION%"=="" (
ECHO ERROR: Could not resolve the pinned Electron version from "%WD%\runtime\yarn.lock".
EXIT /B 1
)
REM WGET
:GET_NW
wget https://github.com/electron/electron/releases/download/v%ELECTRON_VERSION%/electron-v%ELECTRON_VERSION%-win32-x64.zip -O "%TMPDIR%\electron-v%ELECTRON_VERSION%-win32-x64.zip"
IF %ERRORLEVEL% NEQ 0 GOTO GET_NW
MKDIR "%TMPDIR%\electron-v%ELECTRON_VERSION%-win32-x64" || EXIT /B 1
tar -C "%TMPDIR%\electron-v%ELECTRON_VERSION%-win32-x64" -xvf "%TMPDIR%\electron-v%ELECTRON_VERSION%-win32-x64.zip" || EXIT /B 1
REM WGET END
REM XCOPY
XCOPY /S /I /E /H /Y "%TMPDIR%\electron-v%ELECTRON_VERSION%-win32-x64\*" "%BUILDROOT%\runtime" > nul || EXIT /B 1
REM XCOPY END
MOVE "%BUILDROOT%\runtime\electron.exe" "%BUILDROOT%\runtime\pgAdmin4.exe"
ECHO Downloading rcedit.exe...
wget https://github.com/electron/rcedit/releases/download/v2.0.0/rcedit-x64.exe -O "%TMPDIR%\rcedit-x64.exe"
ECHO Replacing executable icon, description, version...
%TMPDIR%\rcedit-x64.exe "%BUILDROOT%\runtime\pgAdmin4.exe" --set-icon "%WD%\pkg\win32\Resources\pgAdmin4.ico"
%TMPDIR%\rcedit-x64.exe "%BUILDROOT%\runtime\pgAdmin4.exe" --set-version-string "FileDescription" "%APP_NAME%"
%TMPDIR%\rcedit-x64.exe "%BUILDROOT%\runtime\pgAdmin4.exe" --set-version-string "ProductName" "%APP_NAME%"
%TMPDIR%\rcedit-x64.exe "%BUILDROOT%\runtime\pgAdmin4.exe" --set-product-version "%APP_VERSION%"
ECHO Staging PostgreSQL components...
COPY "%PGADMIN_POSTGRES_DIR%\bin\libpq.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_POSTGRES_DIR%\bin\libcrypto-*-x64.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_POSTGRES_DIR%\bin\libssl-*-x64.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
IF EXIST "%PGADMIN_POSTGRES_DIR%\bin\libintl-*.dll" COPY "%PGADMIN_POSTGRES_DIR%\bin\libintl-*.dll" "%BUILDROOT%\runtime" > nul
IF EXIST "%PGADMIN_POSTGRES_DIR%\bin\libiconv-*.dll" COPY "%PGADMIN_POSTGRES_DIR%\bin\libiconv-*.dll" "%BUILDROOT%\runtime" > nul
COPY "%PGADMIN_POSTGRES_DIR%\bin\zlib.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
IF EXIST "%PGADMIN_POSTGRES_DIR%\bin\libintl-*.dll" (
COPY "%PGADMIN_POSTGRES_DIR%\bin\libintl-*.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
)
IF EXIST "%PGADMIN_POSTGRES_DIR%\bin\libiconv-*.dll" (
COPY "%PGADMIN_POSTGRES_DIR%\bin\libiconv-*.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
)
IF EXIST "%PGADMIN_POSTGRES_DIR%\bin\liblz4.dll" (
COPY "%PGADMIN_POSTGRES_DIR%\bin\liblz4.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
)
IF EXIST "%PGADMIN_POSTGRES_DIR%\bin\libzstd.dll" (
COPY "%PGADMIN_POSTGRES_DIR%\bin\libzstd.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
)
COPY "%PGADMIN_POSTGRES_DIR%\bin\zlib1.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_POSTGRES_DIR%\bin\pg_dump.exe" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_POSTGRES_DIR%\bin\pg_dumpall.exe" "%BUILDROOT%\runtime" > nul || EXIT /B 1L%
COPY "%PGADMIN_POSTGRES_DIR%\bin\pg_dumpall.exe" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_POSTGRES_DIR%\bin\pg_restore.exe" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_POSTGRES_DIR%\bin\psql.exe" "%BUILDROOT%\runtime" > nul || EXIT /B 1
REM The Kerberos runtime belongs here, next to libpq.dll and the client
REM binaries: PostgreSQL 18 and later are built with GSSAPI support, so
REM libpq.dll has a load-time dependency on gssapi64.dll, and pg_dump.exe
REM and friends resolve it from their own directory. The pgAdmin server
REM process finds it here too, because the runtime prepends this directory
REM to PATH before spawning Python.
REM
REM krb5_64.dll loads krbcc64.dll dynamically rather than importing it, but
REM it is not optional: on Windows krb5 defaults the credential cache type
REM to CCAPI, and the entry points for that are left null when the DLL
REM cannot be loaded, so the first use of the default credential cache
REM calls address zero. ccapiserver.exe is the process krbcc64.dll drives.
ECHO Staging Kerberos components...
COPY "%PGADMIN_KRB5_DIR%\bin\kinit.exe" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_KRB5_DIR%\bin\krb5_64.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_KRB5_DIR%\bin\comerr64.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_KRB5_DIR%\bin\k5sprt64.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_KRB5_DIR%\bin\gssapi64.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_KRB5_DIR%\bin\krbcc64.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_KRB5_DIR%\bin\ccapiserver.exe" "%BUILDROOT%\runtime" > nul || EXIT /B 1
ECHO Staging VC++ runtime...
MKDIR "%BUILDROOT%\installer" || EXIT /B 1
COPY "%PGADMIN_VCREDIST_DIR%\%VCREDIST_FILE%" "%BUILDROOT%\installer" > nul || EXIT /B 1
COPY "%PGADMIN_VCREDIST_DIR%\%PGADMIN_VCREDIST_FILE%" "%BUILDROOT%\installer" > nul || EXIT /B 1
CD %WD%
EXIT /B 0
@@ -345,13 +467,21 @@ REM Main build sequence Ends
ECHO Processing installer configuration script...
CALL "%PGADMIN_PYTHON_DIR%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in" "-o" "%WD%\pkg\win32\installer.iss.in_stage1" "-s" MYAPP_FULLVERSION -r """%APP_VERSION%"""
CALL "%PGADMIN_PYTHON_DIR%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage1" "-o" "%WD%\pkg\win32\installer.iss.in_stage2" "-s" MYAPP_VERSION -r """v%APP_MAJOR%"""
CALL "%PGADMIN_PYTHON_DIR%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage2" "-o" "%WD%\pkg\win32\installer.iss" "-s" MYAPP_VCDIST -r """%PGADMIN_VCREDIST_DIRNAME%\%VCREDIST_FILE%"""
CALL "%PGADMIN_PYTHON_DIR%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage2" "-o" "%WD%\pkg\win32\installer.iss" "-s" MYAPP_VCDIST -r """%PGADMIN_VCREDIST_DIRNAME%\%PGADMIN_VCREDIST_FILE%"""
ECHO Cleaning up...
DEL /s "%WD%\pkg\win32\installer.iss.in_stage*" > nul
ECHO Creating windows installer using INNO tool...
CALL "%PGADMIN_INNOTOOL_DIR%\ISCC.exe" "%WD%\pkg\win32\installer.iss" || EXIT /B 1
REM Inno signs the installer and its uninstaller itself, one file per call,
REM through the same script as :SIGN_FILES. Inno replaces $q with a quote
REM and $f with the already-quoted file name. The outer pair of quotes is
REM for cmd /c, which strips the first and last quote of its command line.
IF NOT "%PGADMIN_WINDOWS_CSC%" == "" (
CALL "%PGADMIN_INNOTOOL_DIR%\ISCC.exe" "%WD%\pkg\win32\installer.iss" "/DSIGNED" "/SpgAdminSigntool=%ComSpec% /c $q$q%WD%\pkg\win32\sign-files.bat$q $q%PGADMIN_WINDOWS_CSC%$q $f$q" || EXIT /B 1
) ELSE (
CALL "%PGADMIN_INNOTOOL_DIR%\ISCC.exe" "%WD%\pkg\win32\installer.iss" || EXIT /B 1
)
ECHO Renaming installer...
MOVE "%WD%\pkg\win32\Output\pgadmin4-setup.exe" "%DISTROOT%\%INSTALLERNAME%" > nul || EXIT /B 1
@@ -366,20 +496,90 @@ REM Main build sequence Ends
ECHO Generating SBOM...
CALL syft "%BUILDROOT%" -o cyclonedx-json > "%BUILDROOT%\sbom.json"
:SIGN_INSTALLER
ECHO Attempting to sign the installer...
CALL "%PGADMIN_SIGNTOOL_DIR%\signtool.exe" sign /tr http://timestamp.digicert.com "%DISTROOT%\%INSTALLERNAME%"
IF %ERRORLEVEL% NEQ 0 (
EXIT /B 0
:VERIFY_SIGNATURE
IF "%PGADMIN_WINDOWS_CSC%" == "" (
ECHO Skipping signature verification ^(PGADMIN_WINDOWS_CSC is not set^)...
EXIT /B 0
)
ECHO Verifying the installer signature...
CALL "%PGADMIN_SIGNTOOL_DIR%\signtool.exe" verify /pa /v "%DISTROOT%\%INSTALLERNAME%"
REM PAUSE was the old handler here, which on the signing host either returns
REM immediately, leaving the build to carry on with an unverified installer,
REM or blocks until the job times out. There is nobody at that machine to
REM press a key.
IF ERRORLEVEL 1 (
ECHO.
ECHO ************************************************************
ECHO * Failed to sign the installer
ECHO * Failed to verify signature of the installer
ECHO ************************************************************
PAUSE
EXIT /B 1
)
EXIT /B 0
REM Sign one or more files, passed as quoted arguments, with a SHA-256 file
REM digest. pkg\win32\sign-files.bat does the work, in signtool's split
REM digest, sign and ingest steps, because the one-step form cannot use a
REM SHA-2 digest with the card's key; the script explains why. All the files
REM go in one call because each call costs one PIN prompt, and their names
REM must be unique, which the script checks.
:SIGN_FILES
IF "%PGADMIN_WINDOWS_CSC%" == "" EXIT /B 0
CALL "%WD%\pkg\win32\sign-files.bat" "%PGADMIN_WINDOWS_CSC%" %*
REM IF ERRORLEVEL, not IF %ERRORLEVEL%: the latter would be expanded before
REM the script had run were this ever moved inside a parenthesised block.
IF ERRORLEVEL 1 (
ECHO.
ECHO ************************************************************
ECHO * Failed to sign one or more files
ECHO ************************************************************
EXIT /B 1
)
EXIT /B 0
REM Sign the components that we build ourselves: the runtime executable, and
REM the PostgreSQL and Kerberos utilities and libraries obtained from the
REM winpgbuild project, all of which are staged into the runtime directory by
REM :CREATE_RUNTIME_ENV. The Electron, Python and VC++ runtime components are
REM deliberately left alone, as they are third party binaries that we do not
REM build, and signing them would replace any signature of their own. Names
REM are matched as patterns as some of the libraries include version numbers,
REM and some of them are optional.
:SIGN_COMPONENTS
IF "%PGADMIN_WINDOWS_CSC%" == "" (
ECHO Skipping code signing ^(PGADMIN_WINDOWS_CSC is not set^)...
EXIT /B 0
)
ECHO Attempting to sign the pgAdmin, PostgreSQL and Kerberos components...
SETLOCAL EnableDelayedExpansion
SET "COMPONENTS="
FOR %%p IN (pgAdmin4.exe libpq.dll libcrypto-*-x64.dll libssl-*-x64.dll libintl-*.dll libiconv-*.dll liblz4.dll libzstd.dll zlib1.dll pg_dump.exe pg_dumpall.exe pg_restore.exe psql.exe kinit.exe krb5_64.dll comerr64.dll k5sprt64.dll gssapi64.dll krbcc64.dll ccapiserver.exe) DO (
FOR /F "delims=" %%f IN ('DIR /B "%BUILDROOT%\runtime\%%p" 2^>nul') DO SET "COMPONENTS=!COMPONENTS! "%BUILDROOT%\runtime\%%f""
)
IF "!COMPONENTS!" == "" (
ECHO.
ECHO ************************************************************
ECHO * No components were found to sign
ECHO ************************************************************
ENDLOCAL
EXIT /B 1
)
CALL :SIGN_FILES !COMPONENTS! || EXIT /B 1
ENDLOCAL
EXIT /B 0
:USAGE
ECHO Invalid command line options.
ECHO Usage: "Make.bat [clean]"
@@ -390,3 +590,16 @@ REM Main build sequence Ends
:CHECK_ROBOCOPY_ERROR
IF %ERRORLEVEL% GEQ 8 EXIT /B %ERRORLEVEL%
EXIT /B 0
REM Check that a prerequisite directory exists, reporting the path that was
REM looked for and how to correct it if it does not. The first argument is the
REM directory and the second the hint; both are echoed here, outside any
REM parenthesised block, so a parenthesis in either is just a character.
:REQUIRE_DIR
IF EXIST "%~1" EXIT /B 0
ECHO %~1 does not exist.
ECHO %~2
EXIT /B 1
+8 -6
View File
@@ -2,16 +2,16 @@
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2024, The pgAdmin Development Team
# Copyright (C) 2013 - 2026, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
#########################################################################
SHELL = /bin/sh
APP_NAME := $(shell grep ^APP_NAME web/config.py | awk -F"=" '{print $$NF}' | tr -d '[:space:]' | tr -d "'" | awk '{print tolower($$0)}')
APP_RELEASE := $(shell grep ^APP_RELEASE web/config.py | awk -F"=" '{print $$NF}' | tr -d '[:space:]')
APP_REVISION := $(shell grep ^APP_REVISION web/config.py | awk -F"=" '{print $$NF}' | tr -d '[:space:]')
APP_NAME := $(shell grep ^APP_NAME web/branding.py | awk -F"=" '{print $$NF}' | tr -d '[:space:]' | tr -d "'" | awk '{print tolower($$0)}')
APP_RELEASE := $(shell grep ^APP_RELEASE web/version.py | awk -F"=" '{print $$NF}' | tr -d '[:space:]')
APP_REVISION := $(shell grep ^APP_REVISION web/version.py | awk -F"=" '{print $$NF}' | tr -d '[:space:]')
#########################################################################
# High-level targets
@@ -20,11 +20,12 @@ APP_REVISION := $(shell grep ^APP_REVISION web/config.py | awk -F"=" '{print $$N
# Include only platform-independent builds in all
all: docs pip src
# Add BUILD_OPTS variable to pass arguments
appbundle:
./pkg/mac/build.sh
./pkg/mac/build.sh $(BUILD_OPTS)
install-node:
cd web && yarn install
cd web && yarn install --immutable
install-python:
./tools/setup-python-env.sh
@@ -118,6 +119,7 @@ debian:
docker:
echo $(APP_NAME)
git checkout HEAD
docker build --pull -t ${APP_NAME} -t $(APP_NAME):latest -t $(APP_NAME):$(APP_RELEASE) -t $(APP_NAME):$(APP_RELEASE).$(APP_REVISION) .
docs:
+89 -97
View File
@@ -9,46 +9,58 @@ tarball or a git checkout.
## Architecture
pgAdmin 4 is written as a web application with Python(Flask) on the server side
pgAdmin 4 is written as a web application with Python (Flask) on the server side
and ReactJS, HTML5 with CSS for the client side processing and UI.
Although developed using web technologies, pgAdmin 4 can be deployed either on
a web server using a browser, or standalone on a workstation. The runtime/
subdirectory contains an NWjs based runtime application intended to allow this,
which will execute the Python server and display the UI.
subdirectory contains an Electron-based runtime application intended to allow this,
which will fork a Python server process and display the UI.
## Building the Runtime
To build the runtime, the following packages must be installed:
* NodeJS 16+
* Yarn
Change into the runtime directory, and run *yarn install*. This will install the
dependencies required.
In order to use the runtime in a development environment, you'll need to copy
*dev_config.json.in* file to *dev_config.json*, and edit the paths to the Python
executable and *pgAdmin.py* file, otherwise the runtime will use the default
paths it would expect to find in the standard package for your platform.
You can then execute the runtime by running something like:
## Prerequisites
1. Install Node.js 20 and above (https://nodejs.org/en/download)
2. yarn (https://yarnpkg.com/getting-started/install)
3. Python 3.9 and above (https://www.python.org/downloads/)
4. PostgreSQL server (https://www.postgresql.org/download)
Start by enabling Corepack, if it isn't already;
this will add the yarn binary to your PATH:
```bash
node_modules/nw/nwjs/nw .
corepack enable
```
or on macOS:
# Building the Web Assets
pgAdmin is dependent on a number of third-party JavaScript libraries. These,
along with its own JavaScript code, CSS code and images must be
compiled into a "bundle" which is transferred to the browser for execution
and rendering. This is far more efficient than simply requesting each
asset as it is needed by the client.
To create the bundle, you will need the 'yarn' package management tool to be
installed. Then, you can run the following commands on a *nix system to
download the required packages and build the bundle:
```bash
node_modules/nw/nwjs/nwjs.app/Contents/MacOS/nwjs .
$ cd $PGADMIN4_SRC
$ make install-node
$ make bundle
```
On Windows systems (where "make" is not available), the following commands
can be used:
```
C:\> cd $PGADMIN4_SRC\web
C:\$PGADMIN4_SRC\web> yarn install
C:\$PGADMIN4_SRC\web> yarn run bundle
```
# Configuring the Python Environment
In order to run the Python code, a suitable runtime environment is required.
Python version 3.7 and later are currently supported. It is recommended that a
Python Virtual Environment is setup for this purpose, rather than using the
Python version 3.9 and later are currently supported. It is recommended that a
Python virtual environment is set up for this purpose, rather than using the
system Python environment. On Linux and Mac systems, the process is fairly
simple - adapt as required for your distribution:
@@ -69,7 +81,7 @@ simple - adapt as required for your distribution:
so update that to the latest:
```bash
$ pip install --upgrade pip
(venv) $ pip install --upgrade pip
```
4. Ensure that a PostgreSQL installation's bin/ directory is in the path (so
@@ -94,36 +106,44 @@ simple - adapt as required for your distribution:
configuration may look like:
```python
from config import *
import os
import logging
# Debug mode
DEBUG = True
# Change pgAdmin data directory
DATA_DIR = '/Users/myuser/.pgadmin_dev'
# App mode
SERVER_MODE = True
# Change pgAdmin server and port
DEFAULT_SERVER = '127.0.0.1'
DEFAULT_SERVER_PORT = 5051
# Enable the test module
MODULE_BLACKLIST.remove('test')
# Switch between server and desktop mode
SERVER_MODE = True
# Log
CONSOLE_LOG_LEVEL = DEBUG
FILE_LOG_LEVEL = DEBUG
# Change pgAdmin config DB path in case an external DB is used.
CONFIG_DATABASE_URI="postgresql://postgres:postgres@localhost:5436/pgadmin"
DEFAULT_SERVER = '127.0.0.1'
# Set up SMTP
MAIL_SERVER = 'smtp.gmail.com'
MAIL_PORT = 465
MAIL_USE_SSL = True
MAIL_USERNAME = 'user@gmail.com'
MAIL_PASSWORD = 'xxxxxxxxxx'
UPGRADE_CHECK_ENABLED = True
# Change log level
CONSOLE_LOG_LEVEL = logging.INFO
FILE_LOG_LEVEL = logging.INFO
# Use a different config DB for each server mode.
if SERVER_MODE == False:
SQLITE_PATH = os.path.join(
DATA_DIR,
'pgadmin4-desktop.db'
)
else:
SQLITE_PATH = os.path.join(
DATA_DIR,
'pgadmin4-server.db'
)
# Use a different config DB for each server mode.
if SERVER_MODE == False:
SQLITE_PATH = os.path.join(
DATA_DIR,
'pgadmin4-desktop.db'
)
else:
SQLITE_PATH = os.path.join(
DATA_DIR,
'pgadmin4-server.db'
)
```
This configuration allows easy switching between server and desktop modes
@@ -143,59 +163,16 @@ simple - adapt as required for your distribution:
(venv) $ python3 $PGADMIN4_SRC/web/pgAdmin4.py
```
Whilst it is possible to automatically run setup in desktop mode by running
the runtime, that will not work in server mode as the runtime doesn't allow
command line interaction with the setup program.
Whilst it is possible to automatically run setup in desktop mode by running
the runtime, that will not work in server mode as the runtime doesn't allow
command line interaction with the setup program.
At this point you will be able to run pgAdmin 4 from the command line in either
server or desktop mode, and access it from a web browser using the URL shown in
the terminal once pgAdmin has started up.
Setup of an environment on Windows is somewhat more complicated unfortunately,
please see *pkg/win32/README.txt* for complete details.
# Building the Web Assets
pgAdmin is dependent on a number of third party Javascript libraries. These,
along with it's own Javascript code, SCSS/CSS code and images must be
compiled into a "bundle" which is transferred to the browser for execution
and rendering. This is far more efficient than simply requesting each
asset as it's needed by the client.
To create the bundle, you will need the 'yarn' package management tool to be
installed. Then, you can run the following commands on a *nix system to
download the required packages and build the bundle:
```bash
(venv) $ cd $PGADMIN4_SRC
(venv) $ make install-node
(venv) $ make bundle
```
On Windows systems (where "make" is not available), the following commands
can be used:
```
C:\> cd $PGADMIN4_SRC\web
C:\$PGADMIN4_SRC\web> yarn install
C:\$PGADMIN4_SRC\web> yarn run bundle
```
# Creating pgAdmin themes
To create a pgAdmin theme, you need to create a directory under
*web/pgadmin/static/scss/resources*.
Copy the sample file *_theme.variables.scss.sample* to the new directory and
rename it to *_theme.variables.scss*. Change the desired hexadecimal values of
the colors and bundle pgAdmin. You can also add a preview image in the theme
directory with the name as *\<dir name>_preview.png*. It is recommended that the
preview image should not be larger in size as it may take time to load on slow
networks. Run the *yarn run bundle* and you're good to go. No other changes are
required, pgAdmin bundle will read the directory and create other required
entries to make them available in preferences.
The name of the theme is derived from the directory name. Underscores (_) and
hyphens (-) will be replaced with spaces and the result will be camel cased.
please see *pkg/win32/README.md* for complete details.
# Building the documentation
@@ -216,6 +193,21 @@ The docs can then be built using the Makefile in *$PGADMIN4_SRC*, e.g.
The output can be found in *$PGADMIN4_SRC/docs/en_US/_build/html/index.html*
## Building the Runtime
Change into the runtime directory, and run *yarn install*. This will install the
dependencies required.
In order to use the runtime in a development environment, you'll need to copy
*dev_config.json.in* file to *dev_config.json*, and edit the paths to the Python
executable and *pgAdmin.py* file, otherwise the runtime will use the default
paths it would expect to find in the standard package for your platform.
You can then execute the runtime by running something like:
```bash
yarn run start
```
# Building packages
Most packages can be built using the Makefile in $PGADMIN4_SRC, provided all
@@ -234,9 +226,9 @@ with all the required packages, and then run:
(venv) $ make pip
```
To build the macOS AppBundle, please see *pkg/mac/README*.
To build the macOS AppBundle, please see *pkg/mac/README.md*.
To build the Windows installer, please see *pkg/win32/README.txt*.
To build the Windows installer, please see *pkg/win32/README.md*.
# Create Database Migrations
In order to make changes to the SQLite DB, navigate to the 'web' directory:
+82
View File
@@ -0,0 +1,82 @@
# Security Policy
## Supported Versions
Only the latest version receives security updates. Users are encouraged to upgrade to the latest stable release.
## Reporting a Vulnerability
We take security seriously and appreciate your efforts to responsibly disclose vulnerabilities. If you believe you have found a vulnerability, please follow the guidelines below to submit a report.
### **What to Include in Your Report**
To help us quickly understand and address the issue, please include the following sections in your report:
#### 1. **Summary**
- A brief description of the vulnerability.
#### 2. **Affected Versions**
- The version(s) of the project affected by the vulnerability.
- Example: "Affects versions 3.4.0 to 3.6.23."
#### 3. **Details**
- A detailed explanation of the vulnerability, including:
- How to reproduce the issue (step-by-step instructions).
- The code or component where the vulnerability exists.
- The expected vs. actual behavior.
#### 4. **Proof of Concept (PoC)**
- Provide a proof of concept to demonstrate the vulnerability. This could be:
- Code snippets.
- Screenshots or videos.
- A minimal reproducible example.
#### 5. **Patches (if applicable)**
- If you have a suggested fix or patch, include it in your report.
- Example: "Sanitize user input using `DOMPurify`."
#### 6. **Impact**
- Describe the potential impact of the vulnerability, such as:
- Remote Code Execution.
- CSRF.
- Data exposure.
- Denial of service.
### **What to Expect**
- **Acknowledgement**: You will receive an acknowledgement of your report within **48 hours**.
- **Timeline**: We will provide a timeline for investigating and addressing the issue.
- **Updates**: You will receive regular updates on the progress of the vulnerability resolution.
- **CVE ID**: If the vulnerability is confirmed, we will request a CVE ID to acknowledge the issue officially and include it in the release notes.
### **Out of Scope**
The following issues are considered out of scope for security reports:
- Vulnerabilities in outdated or unsupported versions.
- Issues related to non-security-impacting bugs or feature requests.
- Vulnerabilities requiring physical access to the device or social engineering.
## Security Updates
We are committed to providing timely security updates for supported versions. Here’s our process:
1. **Assessment**:
- All reported vulnerabilities are assessed for severity and impact.
2. **Patch Development**:
- Patches are developed and tested in a private repository to prevent premature disclosure.
3. **Release**:
- Security patches are released as soon as possible, along with a detailed advisory.
## Acknowledgments
We deeply appreciate the efforts of security researchers and users who help us improve the security of our project.
## Contact
For any questions or concerns regarding security, please contact us at `security@pgadmin.org`.
+281
View File
@@ -0,0 +1,281 @@
.. _ai_tools:
*******************
`AI Reports`:index:
*******************
**AI Reports** is a feature that provides AI-powered database analysis and insights
using Large Language Models (LLMs). Use the *Tools → AI Reports* menu to access
the various AI-powered reports.
The AI Reports feature allows you to:
* Generate security reports to identify potential security vulnerabilities and configuration issues.
* Create performance reports with optimization recommendations for queries and configurations.
* Perform design reviews to analyze database schema structure and suggest improvements.
**Prerequisites:**
Before using AI Reports, you must:
1. Ensure AI features are enabled in the server configuration (set ``LLM_ENABLED`` to ``True`` in ``config.py``).
2. Configure an LLM provider in :ref:`Preferences → AI <preferences>`.
**Note:**
* AI Reports using cloud providers (Anthropic, OpenAI) require an active internet connection.
Local providers (Ollama, Docker Model Runner) do not require internet access.
* API usage may incur costs depending on your LLM provider's pricing model.
Local providers (Ollama, Docker Model Runner) are free to use.
* The quality and accuracy of reports depend on the LLM provider and model configured.
Configuring AI Reports
**********************
To configure AI Reports, navigate to *File → Preferences → AI* (or click the *Settings*
button and select *AI*).
.. image:: images/preferences_ai.png
:alt: AI preferences
:align: center
Select your preferred LLM provider from the dropdown:
**Anthropic**
Use Claude models from Anthropic, or any Anthropic-compatible API provider.
* **API URL**: Custom API endpoint URL (leave empty for default: https://api.anthropic.com/v1).
* **API Key File**: Path to a file containing your Anthropic API key (obtain from https://console.anthropic.com/). This path refers to the filesystem where the pgAdmin server is running (e.g., inside the container if using Docker). The ``~`` prefix is expanded to the home directory of the user running the pgAdmin server process. Optional when using a custom URL with a provider that does not require authentication.
* **Model**: Select from available Claude models (e.g., claude-sonnet-4-20250514).
**OpenAI**
Use GPT models from OpenAI, or any OpenAI-compatible API provider (e.g.,
LiteLLM, LM Studio, EXO, or other local inference servers).
* **API URL**: Custom API endpoint URL (leave empty for default: https://api.openai.com/v1). Include the ``/v1`` path prefix if required by your provider.
* **API Key File**: Path to a file containing your OpenAI API key (obtain from https://platform.openai.com/). This path refers to the filesystem where the pgAdmin server is running (e.g., inside the container if using Docker). The ``~`` prefix is expanded to the home directory of the user running the pgAdmin server process. Optional when using a custom URL with a provider that does not require authentication.
* **Model**: Select from available GPT models (e.g., gpt-4).
**Ollama**
Use locally-hosted open-source models via Ollama. Requires a running Ollama instance.
* **API URL**: The URL of your Ollama server (default: http://localhost:11434).
* **Model**: Enter the name of the Ollama model to use (e.g., llama2, mistral).
**Docker Model Runner**
Use models running in Docker Desktop's built-in model runner (available in Docker Desktop 4.40+).
No API key is required.
* **API URL**: The URL of the Docker Model Runner API (default: http://localhost:12434).
* **Model**: Select from available models or enter a custom model name.
.. note:: You can also use the *OpenAI* provider with a custom API URL for any
OpenAI-compatible endpoint, including Docker Model Runner and other local
inference servers.
After configuring your provider, click *Save* to apply the changes.
.. _ai_data_handling:
Data Handling and Provider Selection
************************************
When a cloud LLM provider is configured, pgAdmin transmits information about
your database to that provider's API. Depending on the feature in use, this may
include schema definitions such as table, column, index and constraint names
and data types; server and database configuration settings read from
``pg_settings``; query text; and EXPLAIN plan output. The *AI Assistant* in the
Query Tool is also able to run queries against your database, within a read-only
transaction and limited to 1000 rows, so row data may be included where the
assistant determines it is needed to answer a question.
None of this is transmitted unless you invoke an AI feature, and none of it is
transmitted at all when no provider has been configured, which is the default;
when AI features have been disabled by the administrator through the
``LLM_ENABLED`` setting; or when a locally hosted provider such as Ollama or
Docker Model Runner is configured.
Each provider processes this data under its own terms of service, privacy policy
and legal jurisdiction, and operates its infrastructure in locations of its own
choosing. If you work in an environment subject to data residency requirements,
procurement policies, or sector-specific rules governing the handling of
database metadata, review both the provider's terms and your own organisation's
policies before enabling a cloud provider.
The providers listed in pgAdmin reflect the APIs that pgAdmin is able to
communicate with. Their inclusion is not a recommendation, and no provider is
enabled by default.
Security Reports
****************
Security Reports analyze your PostgreSQL server, database, or schema for potential
security vulnerabilities and configuration issues.
To generate a security report:
1. In the *Browser* tree, select a server, database, or schema.
2. Choose *Tools → AI Reports → Security* from the menu, or right-click the
object and select *Security* from the context menu.
3. The report will be generated and displayed in a new tab.
.. image:: images/ai_security_report.png
:alt: AI security report
:align: center
**Security Report Scope:**
* **Server Level**: Analyzes server configuration, authentication settings, roles, and permissions.
* **Database Level**: Reviews database-specific security settings, roles with database access, and object permissions.
* **Schema Level**: Examines schema permissions, object ownership, and access controls.
Each report includes:
* **Security Findings**: Identified vulnerabilities or security concerns.
* **Risk Assessment**: Severity levels for each finding (Critical, High, Medium, Low).
* **Recommendations**: Specific actions to remediate security issues.
* **Best Practices**: General security recommendations for PostgreSQL.
Performance Reports
*******************
Performance Reports analyze query performance, configuration settings, and provide
optimization recommendations.
To generate a performance report:
1. In the *Browser* tree, select a server or database.
2. Choose *Tools → AI Reports → Performance* from the menu, or right-click the
object and select *Performance* from the context menu.
3. The report will be generated and displayed in a new tab.
**Performance Report Scope:**
* **Server Level**: Analyzes server configuration parameters, resource utilization, and overall server performance metrics.
* **Database Level**: Reviews database-specific configuration, query performance, index usage, and table statistics.
Each report includes:
* **Performance Metrics**: Key performance indicators and statistics.
* **Configuration Analysis**: Review of relevant configuration parameters.
* **Query Optimization**: Recommendations for improving slow queries.
* **Index Recommendations**: Suggestions for adding, removing, or modifying indexes.
* **Capacity Planning**: Resource utilization trends and recommendations.
Design Review Reports
*********************
Design Review Reports analyze your database schema structure and suggest
improvements for normalization, naming conventions, and best practices.
To generate a design review report:
1. In the *Browser* tree, select a database or schema.
2. Choose *Tools → AI Reports → Design* from the menu, or right-click the
object and select *Design* from the context menu.
3. The report will be generated and displayed in a new tab.
**Design Review Scope:**
* **Database Level**: Reviews overall database structure, schema organization, and cross-schema dependencies.
* **Schema Level**: Analyzes tables, views, functions, and other objects within the schema.
Each report includes:
* **Schema Structure Analysis**: Review of table structures, relationships, and constraints.
* **Normalization Review**: Recommendations for database normalization (1NF, 2NF, 3NF, etc.).
* **Naming Conventions**: Suggestions for consistent naming patterns.
* **Data Type Usage**: Review of data type choices and recommendations.
* **Index Design**: Analysis of indexing strategy.
* **Best Practices**: General PostgreSQL schema design recommendations.
Working with Reports
********************
All AI reports are displayed in a dedicated panel with the following features:
**Report Display**
Reports are formatted as Markdown and rendered with syntax highlighting for SQL code.
**Toolbar Actions**
* **Stop** - Cancel the current report generation. This is useful if the report
is taking too long or if you want to change parameters.
* **Regenerate** - Generate a new report for the same object. Useful when you
want to get a fresh analysis or if data has changed.
* **Download** - Download the report as a Markdown (.md) file. The filename
includes the report type, object name, and date for easy identification.
**Multiple Reports**
You can generate and view multiple reports simultaneously. Each report opens in
a new tab, allowing you to compare reports across different servers, databases,
or schemas.
**Report Management**
Each report tab can be closed individually by clicking the *X* in the tab.
Panel titles show the object name and report type for easy identification.
**Copying Content**
You can select and copy text from reports to use in documentation or share with
your team.
Troubleshooting
***************
**"AI features are disabled in the server configuration"**
The administrator has disabled AI features on the server. Contact your
pgAdmin administrator to enable the ``LLM_ENABLED`` configuration option.
**"Please configure an LLM provider in Preferences"**
You need to configure an LLM provider before using AI Reports. See *Configuring AI Reports* above.
**"Please connect to the server/database first"**
You must establish a connection to the server or database before generating reports.
**API Connection Errors**
* Verify your API key is correct (for Anthropic and OpenAI).
* Check your internet connection (for cloud providers).
* For Ollama, ensure the Ollama server is running and accessible.
* For Docker Model Runner, ensure Docker Desktop 4.40+ is running with the model runner enabled.
* Check that your firewall allows connections to the LLM provider's API.
**Report Generation Fails**
* Check the pgAdmin logs for detailed error messages.
* Verify the database connection is still active.
* Ensure the selected model is available for your account/subscription.
File diff suppressed because it is too large. Load diff
+96
View File
@@ -0,0 +1,96 @@
Auto-Update of pgAdmin 4 Desktop Application
********************************************
pgAdmin 4's desktop application includes an automated update system built using
Electron's ``autoUpdater`` module. This feature enables users to receive and install
updates seamlessly, ensuring they always have access to the latest features and security fixes.
Supported Platforms
===================
- **macOS:** Fully supported with automatic updates enabled by default
- **Windows:** Not supported
- **Linux:** Not supported
Update Process Overview
=======================
1. **Check for Updates:**
- Automatic check on application startup
- Manual check available via pgAdmin 4 menu > Check for Updates
- Uses Electron's ``autoUpdater`` API to query update server
2. **Download Process:**
- Updates download automatically when detected
- Progress shown via notifications
- Background download prevents interruption of work
3. **Installation Flow:**
- User prompted to Install & Restart or Restart Later when update ready
- Update applied during application restart
The flow chart for the update process is as follows:
.. image:: images/auto_update_desktop_app.png
:alt: Auto-update Desktop App
:align: center
User Interface Components
=========================
1. **Notification Types:**
- Update available
- Download progress
- Update ready to install
- Error notifications
2. **Menu Integration:**
- Check for Updates option in pgAdmin 4 menu
- Restart to Update option when update available
Error Handling
==============
The system includes comprehensive error handling:
1. **Network Errors:**
- Connection timeouts
- Download failures
- Server unavailability
2. **Installation Errors:**
- Corrupted downloads
3. **Recovery Mechanisms:**
- Fallback to manual update
- Error reporting to logs
Security Considerations
=======================
The update system implements below security measures:
1. **Secure Communication:**
- Protected update metadata
Platform-Specific Notes
=======================
1. **macOS:**
- Uses native update mechanisms
- Requires signed packages
References
==========
- `Electron autoUpdater API Documentation <https://www.electronjs.org/docs/latest/api/auto-updater>`_
+84 -37
View File
@@ -77,13 +77,13 @@ tab to provide options related to data or pgAdmin objects that correspond to *pg
* Move switches in the **Sections** field box to select a portion of the object
that will be backed up.
* Move the switch next to *Pre-data* towards right position to include all
* Move the switch next to *Pre-data* to the *Yes* position to include all
data definition items not included in the data or post-data item lists.
* Move the switch next to *Data* towards right position to backup actual table
* Move the switch next to *Data* to the *Yes* position to backup actual table
data, large-object contents, and sequence values.
* Move the switch next to *Post-data* towards right position to include
* Move the switch next to *Post-data* to the *Yes* position to include
definitions of indexes, triggers, rules, and constraints other than
validated check constraints.
@@ -94,13 +94,17 @@ tab to provide options related to data or pgAdmin objects that correspond to *pg
* Move switches in the **Type of objects** field box to specify details about
the type of objects that will be backed up.
* Move the switch next to *Only data* towards right position to limit the back
* Move the switch next to *Only data* to the *Yes* position to limit the back
up to data.
* Move the switch next to *Only schemas* to limit the back up to schema-level
database objects.
* Move the switch next to *Blobs* towards left position to exclude large
* Move the switch next to *Only statistics* to the *Yes* position to limit
the back up to optimizer statistics. **Note:** This option is visible only
for database server greater than or equal to 18.
* Move the switch next to *Blobs* to the *No* position to exclude large
objects in the backup.
.. image:: images/backup_do_not_save.png
@@ -110,39 +114,55 @@ tab to provide options related to data or pgAdmin objects that correspond to *pg
* Move switches in the **Do not save** field box to select the objects that will
not be included in the backup.
* Move the switch next to *Owner* towards right position to exclude commands
* Move the switch next to *Owner* to the *Yes* position to exclude commands
that set object ownership.
* Move the switch next to *Privileges* towards right position to exclude
* Move the switch next to *Privileges* to the *Yes* position to exclude
commands that create access privileges.
* Move the switch next to *Tablespaces* towards right position to exclude
* Move the switch next to *Tablespaces* to the *Yes* position to exclude
tablespaces.
* Move the switch next to *Unlogged table data* towards right position to
* Move the switch next to *Unlogged table data* to the *Yes* position to
exclude the contents of unlogged tables.
* Move the switch next to *Comments* towards right position to exclude
* Move the switch next to *Comments* to the *Yes* position to exclude
commands that set the comments. **Note:** This option is visible only for
database server greater than or equal to 11.
* Move the switch next to *Publications* towards right position to exclude
* Move the switch next to *Publications* to the *Yes* position to exclude
publications.
* Move the switch next to *Subscriptions* towards right position to exclude
* Move the switch next to *Subscriptions* to the *Yes* position to exclude
subscriptions.
* Move the switch next to *Security labels* towards right position to exclude
* Move the switch next to *Security labels* to the *Yes* position to exclude
Security labels.
* Move the switch next to *Toast compressions* towards right position to exclude
* Move the switch next to *Toast compressions* to the *Yes* position to exclude
Toast compressions. **Note:** This option is visible only for
database server greater than or equal to 14.
* Move the switch next to *Table access methods* towards right position to exclude
* Move the switch next to *Table access methods* to the *Yes* position to exclude
Table access methods. **Note:** This option is visible only for
database server greater than or equal to 15.
* Move the switch next to *Row security policies* to the *Yes* position to
exclude row security policies. **Note:** This option is visible only for
database server greater than or equal to 18.
* Move the switch next to *Data* to the *Yes* position to exclude data from
the backup. **Note:** This option is visible only for database server
greater than or equal to 18.
* Move the switch next to *Schema* to the *Yes* position to exclude schema
(the data definitions) from the backup. **Note:** This option is visible
only for database server greater than or equal to 18.
* Move the switch next to *Statistics* to the *Yes* position to exclude
optimizer statistics. **Note:** This option is visible only for database
server greater than or equal to 18.
.. image:: images/backup_queries.png
:alt: Queries option on backup dialog
:align: center
@@ -150,7 +170,7 @@ tab to provide options related to data or pgAdmin objects that correspond to *pg
Click the *Query Options* tab to continue. Use these additional fields to specify
the type of statements that should be included in the backup.
* Move the switch next to *Use INSERT commands* towards right position to
* Move the switch next to *Use INSERT commands* to the *Yes* position to
dump the data in the form of INSERT statements rather than using a COPY
command. Please note: this may make restoration from backup slow.
@@ -165,16 +185,16 @@ the type of statements that should be included in the backup.
**Note:** This option is visible only for database server greater than or
equal to 12.
* Move the switch next to *Include CREATE DATABASE statement* towards right
* Move the switch next to *Include CREATE DATABASE statement* to the *Yes*
position to include a command in the backup that creates a new database
when restoring the backup.
* Move the switch next to *Include DROP DATABASE statement* towards right
* Move the switch next to *Include DROP DATABASE statement* to the *Yes*
position to include a command in the backup that will drop any existing
database object with the same name before recreating the object during a
backup.
* Move the switch next to *Include IF EXISTS clause* towards right
* Move the switch next to *Include IF EXISTS clause* to the *Yes*
position to add an IF EXISTS clause to drop databases and other objects.
This option is not valid unless *Include DROP DATABASE statement* is also set.
@@ -185,26 +205,44 @@ the type of statements that should be included in the backup.
Click the *Table Options* tab to continue. Use the fields in the *Table Options*
tab related to tables that should be included in the backup.
* Move the switch next to *Use Column INSERTS* towards right position to dump
* Move the switch next to *Use Column INSERTS* to the *Yes* position to dump
the data in the form of INSERT statements and include explicit column
names. Please note: this may make restoration from backup slow.
* Move the switch next to *Load via partition root* towards right position,
* Move the switch next to *Load via partition root* to the *Yes* position,
so when dumping a COPY or INSERT statement for a partitioned table, target
the root of the partitioning hierarchy which contains it rather than the
partition itself. **Note:** This option is visible only for database server
greater than or equal to 11.
* Move the switch next to *Enable row security* towards right position to
* Move the switch next to *Enable row security* to the *Yes* position to
set row_security to on instead, allowing the user to dump the parts of the
contents of the table that they have access to. This option is relevant
only when dumping the contents of a table which has row security.
* Move the switch next to *With OIDs* towards right position to include object
identifiers as part of the table data for each table.
* Use the *Include table(s) and Children* field to dump the tables and any partitions
or inheritance child tables of the tables matching the pattern.
**Note:** This option is visible only for database server greater than or
equal to 16.
* The Exclude patterns field is utilized to exclude patterns in the following manner:
* Use the *Exclude table data* field to not dump data for any tables
matching the table pattern.
* Use the *Table(s)* field to not dump the tables matching the
pattern. Multiple patterns can be given separated by space.
* Use the *Table(s) data* field to not dump data for any tables
matching the pattern. Multiple patterns can be given separated by
spaces.
* Use the *Table(s) and children* field to not dump the tables and any
partitions or inheritance child tables of the tables matching the pattern.
**Note:** This option is visible only for database server greater than or
equal to 16.
* Use the *Table(s) data and children* field to not dump data for the
tables and any partitions or inheritance child tables of the tables matching
the table pattern. **Note:** This option is visible only for database server
greater than or equal to 16.
Click the *Options* tab to continue. Use the fields in the *Options*
tab to provide other backup options.
@@ -217,10 +255,10 @@ tab to provide other backup options.
that should be excluded from the backup.
* Move the switch next to *Triggers* (active when creating a data-only backup)
towards right position to include commands that will disable triggers on the
to the *Yes* position to include commands that will disable triggers on the
target table while the data is being loaded.
* Move the switch next to *$ quoting* towards right position to enable dollar
* Move the switch next to *$ quoting* to the *Yes* position to enable dollar
quoting within function bodies; if disabled, the function body will be
quoted using SQL standard string syntax.
@@ -231,25 +269,34 @@ tab to provide other backup options.
* Move switches in the **Miscellaneous** field box to specify miscellaneous
backup options.
* Move the switch next to *Verbose messages* towards left position to instruct
* Move the switch next to *Verbose messages* to the *No* position to instruct
*pg_dump* to exclude verbose messages.
* Move the switch next to *Force double quotes on identifiers* towards right
* Move the switch next to *Force double quotes on identifiers* to the *Yes*
position to force the quoting of all identifiers.
* Move the switch next to *Use SET SESSION AUTHORIZATION* towards right
* Move the switch next to *Use SET SESSION AUTHORIZATION* to the *Yes*
position to include a statement that will use a SET SESSION AUTHORIZATION
command to determine object ownership (instead of an ALTER OWNER command).
* Move the switch next to *Dump statistics* to the *Yes* position to include
optimizer statistics in the backup. It cannot be combined with *Only
data*, *Only schemas* or *Do not save* *Statistics*. **Note:** This option
is visible only for database server greater than or equal to 18.
* Move the switch next to *Sequence data* to the *Yes* position to include
sequence data that would normally be excluded. **Note:** This option is
visible only for database server greater than or equal to 18.
* Use the *Exclude schema* field to not dump schemas whose name matches
pattern.
* Use the *Extra float digits* field to use the specified value when dumping
floating-point data, instead of the maximum available precision.
* Use the *Lock wait timeout* field to do not wait forever to acquire shared
table locks at the beginning of the dump. Instead, fail if unable to lock a
table within the specified timeout.
* Use the *Lock wait timeout* field to specify a timeout rather than waiting
indefinitely to acquire shared table locks at the beginning of the dump.
If unable to lock a table within the specified timeout, the operation will fail.
Click the *Objects* tab to continue.
@@ -269,6 +316,6 @@ command:
* Click the *Cancel* button to exit without saving work.
pgAdmin will run the backup process in background. You can view all the background
process with there running status and logs on the :ref:`Processes <processes>`
tab
pgAdmin will run the backup process in the background. You can view all the background
processes with their running status and logs on the :ref:`Processes <processes>`
tab.
+3 -3
View File
@@ -34,6 +34,6 @@ statements that should be included in the backup.
Click the *Backup* button to build and execute a command based on your
selections; click the *Cancel* button to exit without saving work.
pgAdmin will run the backup process in background. You can view all the background
process with there running status and logs on the :ref:`Processes <processes>`
tab
pgAdmin will run the backup process in the background. You can view all the background
processes with their running status and logs on the :ref:`Processes <processes>`
tab.
+57 -31
View File
@@ -34,7 +34,7 @@ tab to provide options related to data or pgAdmin objects that correspond to *pg
* Move switches in the **Type of objects** field box to specify details about
the type of objects that will be backed up.
* Move the switch next to *Only data* towards right position to limit the back
* Move the switch next to *Only data* to the *Yes* position to limit the back
up to data.
* Move the switch next to *Only schemas* to limit the back up to schema-level
@@ -45,6 +45,10 @@ tab to provide options related to data or pgAdmin objects that correspond to *pg
* Move the switch next to *Only roles* to limit the back up to roles only.
* Move the switch next to *Only statistics* to the *Yes* position to limit
the back up to optimizer statistics. **Note:** This option is visible only
for database server greater than or equal to 18.
.. image:: images/backup_server_do_not_save.png
:alt: Do not save option on backup server dialog
:align: center
@@ -52,42 +56,58 @@ tab to provide options related to data or pgAdmin objects that correspond to *pg
* Move switches in the **Do not save** field box to select the objects that will
not be included in the backup.
* Move the switch next to *Owner* towards right position to exclude commands
* Move the switch next to *Owner* to the *Yes* position to exclude commands
that set object ownership.
* Move the switch next to *Role passwords* towards right position to exclude
* Move the switch next to *Role passwords* to the *Yes* position to exclude
passwords for roles.
* Move the switch next to *Privileges* towards right position to exclude
* Move the switch next to *Privileges* to the *Yes* position to exclude
commands that create access privileges.
* Move the switch next to *Tablespaces* towards right position to exclude
* Move the switch next to *Tablespaces* to the *Yes* position to exclude
tablespaces.
* Move the switch next to *Unlogged table data* towards right position to
* Move the switch next to *Unlogged table data* to the *Yes* position to
exclude the contents of unlogged tables.
* Move the switch next to *Comments* towards right position to exclude
* Move the switch next to *Comments* to the *Yes* position to exclude
commands that set the comments. **Note:** This option is visible only for
database server greater than or equal to 11.
* Move the switch next to *Publications* towards right position to exclude
* Move the switch next to *Publications* to the *Yes* position to exclude
publications.
* Move the switch next to *Subscriptions* towards right position to exclude
* Move the switch next to *Subscriptions* to the *Yes* position to exclude
subscriptions.
* Move the switch next to *Security labels* towards right position to exclude
* Move the switch next to *Security labels* to the *Yes* position to exclude
Security labels.
* Move the switch next to *Toast compressions* towards right position to exclude
* Move the switch next to *Toast compressions* to the *Yes* position to exclude
Toast compressions. **Note:** This option is visible only for
database server greater than or equal to 14.
* Move the switch next to *Table access methods* towards right position to exclude
* Move the switch next to *Table access methods* to the *Yes* position to exclude
Table access methods. **Note:** This option is visible only for
database server greater than or equal to 15.
* Move the switch next to *Row security policies* to the *Yes* position to
exclude row security policies. **Note:** This option is visible only for
database server greater than or equal to 18.
* Move the switch next to *Data* to the *Yes* position to exclude data from
the backup. **Note:** This option is visible only for database server
greater than or equal to 18.
* Move the switch next to *Schema* to the *Yes* position to exclude schema
(the data definitions) from the backup. **Note:** This option is visible
only for database server greater than or equal to 18.
* Move the switch next to *Statistics* to the *Yes* position to exclude
optimizer statistics. **Note:** This option is visible only for database
server greater than or equal to 18.
.. image:: images/backup_server_queries.png
:alt: Queries option on backup server dialog
:align: center
@@ -95,7 +115,7 @@ tab to provide options related to data or pgAdmin objects that correspond to *pg
Click the *Query Options* tab to continue. Use these additional fields to specify
the type of statements that should be included in the backup.
* Move the switch next to *Use INSERT commands* towards right position to
* Move the switch next to *Use INSERT commands* to the *Yes* position to
dump the data in the form of INSERT statements rather than using a COPY
command. Please note: this may make restoration from backup slow.
@@ -110,12 +130,12 @@ the type of statements that should be included in the backup.
**Note:** This option is visible only for database server greater than or
equal to 12.
* Move the switch next to *Include DROP DATABASE statement* towards right
* Move the switch next to *Include DROP DATABASE statement* to the *Yes*
position to include a command in the backup that will drop any existing
database object with the same name before recreating the object during a
backup.
* Move the switch next to *Include IF EXISTS clause* towards right
* Move the switch next to *Include IF EXISTS clause* to the *Yes*
position to add an IF EXISTS clause to drop databases and other objects.
This option is not valid unless *Include DROP DATABASE statement* is also set.
@@ -126,19 +146,16 @@ the type of statements that should be included in the backup.
Click the *Table Options* tab to continue. Use the fields in the *Table Options*
tab related to tables that should be included in the backup.
* Move the switch next to *Use Column INSERTS* towards right position to dump
* Move the switch next to *Use Column INSERTS* to the *Yes* position to dump
the data in the form of INSERT statements and include explicit column
names. Please note: this may make restoration from backup slow.
* Move the switch next to *Load via partition root* towards right position,
* Move the switch next to *Load via partition root* to the *Yes* position,
so when dumping a COPY or INSERT statement for a partitioned table, target
the root of the partitioning hierarchy which contains it rather than the
partition itself. **Note:** This option is visible only for database server
greater than or equal to 11.
* Move the switch next to *With OIDs* towards right position to include object
identifiers as part of the table data for each table.
Click the *Options* tab to continue. Use the fields in the *Options*
tab to provide other backup options.
@@ -150,10 +167,10 @@ tab to provide other backup options.
that should be excluded from the backup.
* Move the switch next to *Triggers* (active when creating a data-only backup)
towards right position to include commands that will disable triggers on the
to the *Yes* position to include commands that will disable triggers on the
target table while the data is being loaded.
* Move the switch next to *$ quoting* towards right position to enable dollar
* Move the switch next to *$ quoting* to the *Yes* position to enable dollar
quoting within function bodies; if disabled, the function body will be
quoted using SQL standard string syntax.
@@ -164,25 +181,34 @@ tab to provide other backup options.
* Move switches in the **Miscellaneous** field box to specify miscellaneous
backup options.
* Move the switch next to *Verbose messages* towards left position to instruct
* Move the switch next to *Verbose messages* to the *No* position to instruct
*pg_dumpall* to exclude verbose messages.
* Move the switch next to *Force double quotes on identifiers* towards right
* Move the switch next to *Force double quotes on identifiers* to the *Yes*
position to force the quoting of all identifiers.
* Move the switch next to *Use SET SESSION AUTHORIZATION* towards right
* Move the switch next to *Use SET SESSION AUTHORIZATION* to the *Yes*
position to include a statement that will use a SET SESSION AUTHORIZATION
command to determine object ownership (instead of an ALTER OWNER command).
* Move the switch next to *Dump statistics* to the *Yes* position to include
optimizer statistics in the backup. It cannot be combined with *Only
data*, *Only schemas* or *Do not save* *Statistics*. **Note:** This option
is visible only for database server greater than or equal to 18.
* Move the switch next to *Sequence data* to the *Yes* position to include
sequence data that would normally be excluded. **Note:** This option is
visible only for database server greater than or equal to 18.
* Use the *Exclude database* field to not dump databases whose name matches
pattern.
* Use the *Extra float digits* field to use the specified value when dumping
floating-point data, instead of the maximum available precision.
* Use the *Lock wait timeout* field to do not wait forever to acquire shared
table locks at the beginning of the dump. Instead, fail if unable to lock a
table within the specified timeout.
* Use the *Lock wait timeout* field to specify a timeout rather than waiting
indefinitely to acquire shared table locks at the beginning of the dump.
If unable to lock a table within the specified timeout, the operation will fail.
When you’ve specified the details that will be incorporated into the pg_dumpall
command:
@@ -192,6 +218,6 @@ command:
* Click the *Cancel* button to exit without saving work.
pgAdmin will run the backup process in background. You can view all the background
process with there running status and logs on the :ref:`Processes <processes>`
tab
pgAdmin will run the backup process in the background. You can view all the background
processes with their running status and logs on the :ref:`Processes <processes>`
tab.
+7 -5
View File
@@ -1,8 +1,8 @@
.. _change_password_dialog:
*******************************
`Change Password Dialog`:index:
*******************************
**************************************
`Change Server Password Dialog`:index:
**************************************
It is a good policy to routinely change your password to protect data, even in
what you may consider a 'safe' environment. In the workplace, failure to apply
@@ -30,7 +30,9 @@ comprehensive list and they **will not guarantee security**.
:alt: Change database password dialog
:align: center
Use the *Change Password* dialog to change your password:
Use the *Change Server Password* dialog to change the password of the role that
pgAdmin uses to connect to the database server, rather than the password you use
to log in to pgAdmin itself:
* The name displayed in the *User* field is the role for which you are modifying
the password; it is the role that is associated with the server connection
@@ -39,7 +41,7 @@ Use the *Change Password* dialog to change your password:
* Enter the desired password for in the *New Password* field.
* Re-enter the new password in the *Confirm Password* field.
Click the *Save* button to change your password.
Click the *Change* button to change your password.
Click the *Close* button to exit without changing your password.
+13 -6
View File
@@ -1,8 +1,8 @@
.. _change_user_password:
************************************
`Change User Password Dialog`:index:
************************************
***************************************
`Change pgAdmin Password Dialog`:index:
***************************************
It is a good policy to routinely change your password to protect data, even in
what you may consider a 'safe' environment. In the workplace, failure to apply
@@ -30,11 +30,18 @@ comprehensive list and they **will not guarantee security**.
:alt: Change current user password dialog
:align: center
Use the *Change Password* dialog to change your password:
Use the *Change pgAdmin Password* dialog to change the password you use to log
in to pgAdmin itself, rather than the password of a database server connection:
* Enter your existing password in the *Current Password* field.
* Enter the desired password for in the *New Password* field.
* Re-enter the new password in the *Confirm Password* field.
Click the *Change Password* button to change your password; click *Close* to
exit the dialog.
Click the *Change* button to change your password; click *Close* to exit the
dialog.
Changing your password signs out all of your other active sessions, so anyone
using your account elsewhere must sign in again with the new password. The
session you change it in stays signed in. When an administrator resets your
password from the :ref:`User Management <user_management>` page, all of your
sessions are signed out.
+2
View File
@@ -8,6 +8,7 @@ Use *Clear Saved Password* functionality to clear the saved password for the
database server.
.. image:: images/clear_saved_password.png
:alt: Clear saved password
:align: center
*Clear Saved Password* shows in the context menu for the selected server as well
@@ -17,6 +18,7 @@ Use *Clear SSH Tunnel Password* functionality to clear the saved password of SSH
Tunnel to connect to the database server.
.. image:: images/clear_tunnel_password.png
:alt: Clear SSH tunnel password
:align: center
*Clear SSH Tunnel Password* shows in the context menu for the selected server as
+2 -2
View File
@@ -91,8 +91,8 @@ button to deploy the instance on Amazon RDS.
Once you click on the finish, one background process will start which will
deploy the instance in the cloud and monitor the progress of the deployment.
You can view all the background process with there running status and logs
on the :ref:`Processes <processes>` tab
You can view all the background processes with their running status and logs
on the :ref:`Processes <processes>` tab.
The Server will be added to the tree with the cloud deployment icon. Once the
deployment is done, the server details will be updated.
+2 -2
View File
@@ -107,8 +107,8 @@ button to deploy the instance on Azure Database.
Once you click on the finish, one background process will start which will
deploy the instance in the cloud and monitor the progress of the deployment.
You can view all the background process with there running status and logs
on the :ref:`Processes <processes>` tab
You can view all the background processes with their running status and logs
on the :ref:`Processes <processes>` tab.
.. image:: images/cloud_azure_bg_process_watcher.png
:alt: Cloud Deployment
Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

+4 -4
View File
@@ -4,9 +4,9 @@
`PostgreSQL Cloud Deployment`:index:
*************************************
A PostgreSQL server can be deployed on the Amazon, EDB BigAnimal, Azure,
Google cloud using this module. In future more cloud provider options will
be available.
A PostgreSQL server can be deployed on the Amazon, Azure, Google cloud
or pgEdge Starfleet using this module. In future more cloud provider
options will be available.
To launch the *Cloud Deployment...* tool, right click on the *Server Group* or
*Server* of the tree control, and select *Deploy a Cloud Instance* from the
@@ -16,6 +16,6 @@ To launch the *Cloud Deployment...* tool, right click on the *Server Group* or
:maxdepth: 2
cloud_aws_rds
cloud_edb_biganimal
cloud_azure_database
cloud_google_cloud_sql
cloud_pgedge_starfleet
-110
View File
@@ -1,110 +0,0 @@
.. _cloud_edb_biganimal:
******************************************
`EDB BigAnimal Cloud Deployment`:index:
******************************************
To deploy a PostgreSQL server on the EDB BigAnimal cloud, follow the below steps.
.. image:: images/cloud_provider_for_postgresql.png
:alt: Cloud Deployment Provider
:align: center
Once you launch the tool, select the EDB BigAnimal option.
Click on the *Next* button to proceed further.
.. image:: images/cloud_biganimal_credentials.png
:alt: Cloud Deployment Provider
:align: center
The next steps is to authenticate the user to EDB BigAninal.
Click the given button to authenticate, by clicking the button, the user
will be redirected to the new tab for the verification.
Once you confirm the one time code, the pgAdmin will automatically detect it
and the next button will be enabled. To proceed further, click on the next button.
.. image:: images/cloud_biganimal_cluster.png
:alt: Cloud Deployment Provider
:align: center
* Use the *Project* field to choose a project in your Biganimal account.
* Use the *Cluster type* field to choose a cluster type.
* Use the *No. of Standby Replicas* field to specify the replicas if you have selected the High Availability cluster.
* Use the *Cluster provider* field to choose the provider.
.. image:: images/cloud_biganimal_instance.png
:alt: Cloud Deployment Provider
:align: center
Use the fields from the Instance Specification tab to specify the Instance
details.
* Use the *Cluster name* field to add a cluster name for the PostgreSQL
server; the name specified will be displayed in the *Object Explorer* too.
* Use the *Region* field to select the region.
* Use the *Public IP range* field to specify the IP Address range for permitting the
inbound traffic. Leave it blank for 0.0.0.0/0
* Use the *Instance type* field to select the instance type.
* Use the *Instance series* field to select the instance series.
* Use the *Instance size* field to allocate the computational, network, and
memory capacity required by planned workload of this DB instance.
* Use the *Volume type* field to select the instance storage type.
* Use the *Volume properties* field to specify the storage capacity. This field is specific to Azure.
* Use the *Volume size* field to specify the storage size. This field is specific to AWS.
* Use the *Volume IOPS* field to specify the storage IOPS. This field is specific to AWS.
* Use the *Disk throughput* field to specify the disk throughput. This field is specific to AWS.
.. image:: images/cloud_biganimal_database.png
:alt: Cloud Deployment Provider
:align: center
Use the fields from the Database Details tab to specify the Instance details.
* Use the drop-down list box in the *Server group* field to select the parent
node for the server; the server will be displayed in the *Object Explorer*
within the specified group.
* Use the *Database type* field to specify the PostgreSQL
type, EnterpriseDB PostgreSQL Advanced Server or PostgreSQL.
* Use the *PostgreSQL version* field to select the database version.
* Use the *Database Password* field to provide a password that will be supplied when
authenticating with the server.
* Use the *Confirm password* field to repeat the password.
.. image:: images/cloud_biganimal_review.png
:alt: Cloud Deployment Provider
:align: center
At the end, review the Cluster details that you provided. Click on Finish
button to deploy the instance on EDB BigAnimal.
.. image:: images/cloud_deployment_tree.png
:alt: Cloud Deployment Provider
:align: center
Once you click on the finish, one background process will start which will
deploy the instance in the cloud and monitor the progress of the deployment.
You can view all the background process with there running status and logs
on the :ref:`Processes <processes>` tab
The Server will be added to the tree with the cloud deployment icon. Once the
deployment is done, the server details will be updated.
+2 -2
View File
@@ -105,8 +105,8 @@ button to deploy the instance on Azure PostgreSQL.
Once you click on the finish, one background process will start which will
deploy the instance in the cloud and monitor the progress of the deployment.
You can view all the background process with there running status and logs
on the :ref:`Processes <processes>` tab
You can view all the background processes with their running status and logs
on the :ref:`Processes <processes>` tab.
The Server will be added to the tree with the cloud deployment icon. Once the
+102
View File
@@ -0,0 +1,102 @@
.. _cloud_pgedge_starfleet:
************************************************
`pgEdge Starfleet Deployment`:index:
************************************************
To deploy a PostgreSQL database on pgEdge Starfleet, follow the steps below.
pgAdmin creates a *Managed* database, which Starfleet hosts for you.
.. image:: images/cloud_provider_for_postgresql.png
:alt: Cloud Deployment Provider
:align: center
Once you launch the tool, select the pgEdge Starfleet option and click on the
*Next* button to proceed.
.. image:: images/cloud_starfleet_credentials.png
:alt: pgEdge Starfleet credentials
:align: center
In the Credentials step, enter the *Auth ID* and *Auth secret* of a Starfleet
API client. pgAdmin checks them with Starfleet when you click *Next*.
.. note:: Create the API client in the pgEdge Starfleet console, under
*Settings > API Clients*. The Auth secret is shown only when the client is
created, so keep a copy of it. See the
`pgEdge Starfleet documentation <https://docs.pgedge.com/pgedge-starfleet/>`_
for details.
.. image:: images/cloud_starfleet_instance.png
:alt: pgEdge Starfleet instance specification
:align: center
Use the fields from the Instance Specification step to specify the database
details.
* Use the *Database name* field to name the database. The name may contain
lowercase letters and digits only, must start with a letter, and can be up
to 50 characters long.
* Use the *Display name* field to optionally set a friendlier name, up to 25
characters long.
* Select the location to deploy the database to from the *Region* field.
* Use the *Size* field to select the size of the database.
* Use the *PostgreSQL version* field to select the PostgreSQL version.
* Use the *Allowed IP addresses* field to list the IPv4 addresses or CIDR
ranges that may connect to the database, separated by commas. The field is
prefilled with your public IP address. At least one and at most 50 entries
are required; IPv6 addresses are not accepted. Without a matching entry the
database will not accept connections from pgAdmin.
* Use the *Connect as* field to choose whether pgAdmin connects as *admin*
(the database administrator, which is not a superuser) or *app* (an
application user).
.. image:: images/cloud_starfleet_database.png
:alt: pgEdge Starfleet database details
:align: center
In the Database Details step, use the *pgAdmin server group* field to select
the server group the new server will be registered in.
.. image:: images/cloud_starfleet_review.png
:alt: pgEdge Starfleet review
:align: center
Finally, review the summary in the Review step and click *Finish* to start the
deployment. The progress of the deployment is shown in the same way as for the
other cloud providers, and the new server is added to the *Object Explorer*
when the database is available. pgAdmin connects with *sslmode* set to
*require* and *gssencmode* set to *disable*.
If the deployment fails after the database has been created, for example
because pgEdge Starfleet reports it as failed or it does not become available
within 30 minutes, pgAdmin removes the server from the *Object Explorer* but
does not delete the database. Check the pgEdge Starfleet console, and delete
the database there if it is not needed.
.. image:: images/cloud_starfleet_password.png
:alt: pgEdge Starfleet database password
:align: center
pgEdge Starfleet generates the database password. When the deployment
finishes, pgAdmin shows it once in the *pgEdge Starfleet database password*
dialog, together with the host and user name.
* Use the *Copy* button to copy the password to the clipboard.
* Use the *Save password* button to save the password with the server. This
button is only shown if saving passwords is permitted by the
:ref:`ALLOW_SAVE_PASSWORD <config_py>` setting.
The password is not shown again in pgAdmin after the dialog is closed. If you
lose it, reset it from the pgEdge Starfleet console.
.. note:: pgAdmin contacts the Starfleet API at the address given by the
*STARFLEET_API_URL* configuration setting, which defaults to
*https://api.pgedge.com*. The address must use HTTPS.
+2 -2
View File
@@ -7,12 +7,12 @@
The bulk of pgAdmin is a Python web application written using the Flask framework
on the backend, and HTML5 with CSS3,ReactJS on the front end. A
desktop runtime is also included for users that prefer a desktop application to
a web application, which is written using NWjs (Node Webkit).
a web application, which is written using Electron.
Runtime
*******
The runtime is based on NWjs which integrates a browser and the Python server
The runtime is based on Electron which integrates a browser and the Python server
creating a standalone application. The source code can be found in the
**/runtime** directory in the source tree.
+1 -1
View File
@@ -16,7 +16,7 @@ review process for any changes submitted for inclusion in pgAdmin.
bulk updates every year). The start date should always be 2013, and the end year
the current year, e.g.
Copyright (C) 2013 - 2024, The pgAdmin Development Team
Copyright (C) 2013 - 2026, The pgAdmin Development Team
* Ensure there's a blank line immediately following any copyright headers.
+1 -1
View File
@@ -120,7 +120,7 @@ with the required file header is shown below::
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2024, The pgAdmin Development Team
# Copyright (C) 2013 - 2026, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
+14 -3
View File
@@ -40,6 +40,9 @@ settings:
as the existing one, but will be an independent object. If you choose to copy
an existing collation, you cannot modify the collation properties displayed on
this tab.
* Use the drop-down listbox next to *Provider* to select a locale services associated
with the collation. Possible values are: icu, libc and builtin.
**Note:** The builtin option is available from v17 onwards.
* Use the *Locale* field to specify a locale; a locale specifies language and
language formatting characteristics. If you specify this, you cannot specify
either of the following parameters. To view a list of locales supported by
@@ -50,12 +53,20 @@ settings:
* Use the *LC_CTYPE* field to specify a locale with specified character
classification. The locale must be applicable to the current database encoding.
(See CREATE DATABASE for details.)
* Move the switch next to *Deterministic* to *YES* to specify whether the collation should use
deterministic comparisons. By default, this option is set to true. In a
deterministic comparison, strings that are not byte-wise equal are considered
unequal, even if they are considered logically equal in the comparison.
* Use the *Rules* field to specify rules for customizing the behavior of the collation.
It includes considerations such as character ordering, case sensitivity, and accent
sensitivity.
* Use the *Version* field to specify version string to store with the collation object.
Click the *SQL* tab to continue.
Your entries in the *Collation* dialog generate a SQL command (see an example b
elow). Use the *SQL* tab for review; revisit or switch tabs to make any changes
Your entries in the *Collation* dialog generate a SQL command (see an example
below). Use the *SQL* tab for review; revisit or switch tabs to make any changes
to the SQL command.
Example
@@ -69,7 +80,7 @@ the *Collation* dialog:
:align: center
The example shown demonstrates creating a collation named *french* that uses the
rules specified for the locale, *fr-BI-x-icu. The collation is owned by
rules specified for the locale, *fr-BI-x-icu*. The collation is owned by
*postgres*.
* Click the *Info* button (i) to access online help. For more information about
+3 -1
View File
@@ -43,6 +43,8 @@ are disabled if inapplicable.)
for the column. Compression is supported only for variable-width data types,
and is used only when the column's storage mode is main or extended. This
option is available from v14 and above.
* Use the drop-down listbox next to *Storage* to set the storage mode for the
column. This option is available from v16 and above.
Click the *Constraints* tab to continue.
@@ -142,7 +144,7 @@ the *Add* icon (+) to add each security label selection:
* Specify a security label provider in the *Provider* field. The named provider
must be loaded and must consent to the proposed labeling operation.
* Specify a a security label in the *Security Label* field. The meaning of a
* Specify a security label in the *Security Label* field. The meaning of a
given label is at the discretion of the label provider. PostgreSQL places no
restrictions on whether or how a label provider must interpret security
labels; it merely provides a mechanism for storing them.
+8
View File
@@ -239,6 +239,14 @@ latex_documents = [
# https://groups.google.com/forum/#!topic/sphinx-users/ZlQ95_QikXo
latex_elements = {
'fncychap': r'\usepackage[Sonny]{fncychap}',
# pdflatex's default utf8 inputenc covers Latin-1/Latin-Extended-A but
# not the Vietnamese precomposed code points that appear in CVE
# reporter names. Declare the specific characters we use rather than
# switching engines.
'preamble': r'''
\DeclareUnicodeCharacter{1EA1}{\d{a}}
\DeclareUnicodeCharacter{1EC1}{\`{\^e}}
''',
}
+9 -3
View File
@@ -1,8 +1,8 @@
.. _config_py:
***************************
`The config.py File`:index:
***************************
*****************************
`Configuration Files`:index:
*****************************
There are multiple configuration files that are read at startup by pgAdmin. These
files are used for configuration options that:
@@ -32,6 +32,12 @@ The configuration files are as follows:
and may be created by users in the same directory as ``config.py`` if
needed.
.. note:: On macOS, ``config.py`` is located inside the application bundle
(``pgAdmin 4.app/Contents/Resources/web/``), which is replaced in its
entirety when pgAdmin is upgraded, so a ``config_local.py`` file created
there will be lost. Use ``config_system.py`` instead, which is stored
outside the application bundle.
* ``config_system.py``: This file is read after ``config_local.py`` and is
intended for system administrators to include settings that are configured
system-wide from a secure location that users cannot normally modify and that
+2
View File
@@ -11,6 +11,7 @@ and select *Connect Server...* from the context menu.
.. image:: images/connect_to_server.png
:alt: Connect to server dialog
:align: center
Provide authentication information for the selected server:
@@ -26,6 +27,7 @@ Tunnel and Database server passwords if not already saved.
.. image:: images/connect_to_tunneled_server.png
:alt: Connect to server dialog
:align: center
Provide authentication information for the selected server:
+297 -20
View File
@@ -26,9 +26,9 @@ where *<tag name>* is one of the following:
+==========+===============================================================================+
| latest | The most recent release. |
+----------+-------------------------------------------------------------------------------+
| 7.4 | A specific version (7.4 in this case). |
| 8.4 | A specific version (8.4 in this case). |
+----------+-------------------------------------------------------------------------------+
| 7 | the latest release of a specific major version (major version 7 in this case).|
| 8 | the latest release of a specific major version (major version 8 in this case).|
+----------+-------------------------------------------------------------------------------+
| snapshot | The latest nightly test build. |
+----------+-------------------------------------------------------------------------------+
@@ -42,22 +42,23 @@ maintenance functions to be executed. Multiple versions are included in the
following directories to allow use with different versions of the database
server:
* PostgreSQL 11: */usr/local/pgsql-11*
* PostgreSQL 12: */usr/local/pgsql-12*
* PostgreSQL 13: */usr/local/pgsql-13*
* PostgreSQL 14: */usr/local/pgsql-14*
* PostgreSQL 15: */usr/local/pgsql-15*
* PostgreSQL 16: */usr/local/pgsql-16*
The default binary paths set in the container are as follows:
.. code-block:: bash
DEFAULT_BINARY_PATHS = {
'pg-18': '/usr/local/pgsql-18',
'pg-17': '/usr/local/pgsql-17',
'pg-16': '/usr/local/pgsql-16',
'pg-15': '/usr/local/pgsql-15',
'pg-14': '/usr/local/pgsql-14',
'pg-13': '/usr/local/pgsql-13',
'pg-12': '/usr/local/pgsql-12'
'pg-13': '/usr/local/pgsql-13'
}
this may be changed in the :ref:`preferences`.
@@ -132,7 +133,59 @@ than using the default.
Override the default file path for the server definition list. See the
/pgadmin4/servers.json mapped file below for more information. See the format
of the `JSON file <https://www.pgadmin.org/docs/pgadmin4/latest/import_export_servers.html#json-format>`_.
of the `Servers JSON file <https://www.pgadmin.org/docs/pgadmin4/latest/import_export_servers.html#json-format>`_.
**PGADMIN_REPLACE_SERVERS_ON_STARTUP**
*Default: null*
By default, the server definitions are only loaded on first launch, i.e. when initializing the configuration database. See PGADMIN_SERVER_JSON_FILE above.
If this variable is set to True, the server definitions will be replaced on every launch. This can be used to declaratively manage the server definitions.
**PGADMIN_PREFERENCES_JSON_FILE**
*Default: /pgadmin4/preferences.json*
Override the default file path for the preferences customization at the container creation. See the
/pgadmin4/preferences.json mapped file below for more information. See the format
of the `Preferences JSON file <https://www.pgadmin.org/docs/pgadmin4/latest/preferences.html#json-format>`_.
**PGADMIN_CUSTOM_CONFIG_DISTRO_FILE**
*Default: /pgadmin4/config_distro.py*
Override the default file path for the pgadmin configurations file.This can be used while provisioning
container with read only root file system to achieve a more secure pgadmin4 deployment for kubernetes.
Note that if you are externally mapping this file, then environment variables
passed using *PGADMIN_CONFIG_* suffix will be ignored only when that file
exists and is non-empty. A missing or empty file is generated with those
values.
**PGPASS_FILE**
*Default: <null>*
Set this variable to the path of a pgpass file if you want to supply passwords
for the servers added in pgAdmin. On startup, the file is copied into the
container and used as the ``.pgpass`` file.
**PUID**
*Default: 5050*
The user ID that pgAdmin runs as. This is only used when the container is
started as root (for example with ``--user root``), in which case the
*pgadmin* user is given this UID, the ownership of */var/lib/pgadmin* is
changed to match, and pgAdmin is then run as that user rather than as root.
It is ignored when the container is started as any other user, which is the
default. The value must be numeric, and may not be 0.
**PGID**
*Default: 0*
The group ID that pgAdmin runs as. As with *PUID*, this is only used when the
container is started as root.
**GUNICORN_ACCESS_LOGFILE**
@@ -162,20 +215,62 @@ where it may be increased.
This is a variable prefix that can be used to override any of the configuration
options in pgAdmin's *config.py* file. Add the *PGADMIN_CONFIG_* prefix to any
variable name from *config.py* and give the value in the format 'string value'
for strings, True/False for booleans or 123 for numbers. See below for an
example.
variable name from *config.py* and give the value as a Python expression:
``'string value'`` (including the quotes) for strings, ``True`` or ``False``
for booleans, or ``123`` for numbers. See below for an example.
Settings are written to */pgadmin4/config_distro.py* within the container, which
is read after */pgadmin4/config.py* and before */pgadmin4/config_local.py*.
Any settings given will therefore override anything in config.py, but can be
overridden by settings in config_local.py.
*PGADMIN_DEFAULT_* variables, including *PGADMIN_DEFAULT_EMAIL* and
*PGADMIN_DEFAULT_PASSWORD*, are ordinary text and take no Python literal
quotes. *PGADMIN_CONFIG_* values are written as Python code into
*/pgadmin4/config_distro.py*, or into the file named by
*PGADMIN_CUSTOM_CONFIG_DISTRO_FILE* if that is set. The values ``true`` and
``false``, in any letter case, are written as ``True`` and ``False``. A bare
hostname is a Python name, so ``MAIL_SERVER = mail.example.com`` raises
``NameError`` at startup.
Settings are only written to */pgadmin4/config_distro.py* once, typically on
first launch of the container. If */pgadmin4/config_distro.py* contains one or
more lines, then no changes are made; for example, if the container instance is
restarted, or */pgadmin4/config_distro.py* is mapped to a file on persistent
storage (not recommended - use */pgadmin4/config_local.py* instead)!
Quoting added by the shell or by YAML sits outside that Python expression and
is removed before the value is written. The *docker run* example below keeps
the Python quotes inside shell quotes, for example
``-e 'PGADMIN_CONFIG_LOGIN_BANNER="Authorised users only!"'``.
In Docker Compose map syntax, YAML consumes the quotes around a scalar. A
YAML-only quoted hostname, ``PGADMIN_CONFIG_MAIL_SERVER: "mail.example.com"``
or ``PGADMIN_CONFIG_MAIL_SERVER: 'mail.example.com'``, reaches the container
as ``mail.example.com`` and cannot serve as a Python string. Nest the Python
quotes inside the scalar:
``PGADMIN_CONFIG_MAIL_SERVER: "'mail.example.com'"``. The container then
writes ``MAIL_SERVER = 'mail.example.com'``. ``"587"`` and ``"True"`` are
already valid Python, so they need no nested quotes. The list form keeps
single quotes, as ``docker run -e`` does
(``- PGADMIN_CONFIG_MAIL_SERVER='mail.example.com'``); nesting them there
produces ``"'mail.example.com'"``, which is valid Python but puts stray
quote characters into the value and fails silently rather than at startup.
An ``env_file`` value strips one layer of quotes, so the same nesting as the
map form applies there. The Compose example in the Examples section uses the
map form for an SMTP server, username, password, and *SECURITY_EMAIL_SENDER*.
Compose substitutes ``$VAR`` and ``${VAR}`` in Compose file values, and in
double-quoted ``env_file`` values, so write a literal dollar as ``$$``.
``"'pa$word'"`` reaches the container as ``'pa'``, with only a warning about
an unset variable. The entrypoint does not expand the value again, so ``$$``
is the only escaping required.
Settings are written to */pgadmin4/config_distro.py* within the container (or
to the file named by *PGADMIN_CUSTOM_CONFIG_DISTRO_FILE*), which is read after
*/pgadmin4/config.py* and before */pgadmin4/config_local.py*. Any settings
given will therefore override anything in config.py, but can be overridden by
settings in config_local.py.
The file is generated only when it is missing or empty, typically on first
launch, and a non-empty file is left unchanged, including when the container
is restarted. To apply corrected *PGADMIN_CONFIG_* values, recreate the
container (``docker compose up -d`` does this when the environment changes,
whereas ``docker compose restart`` does not), keeping the */var/lib/pgadmin*
mapping to retain your data. If the file is on persistent storage, either
because it is mapped (not recommended; use */pgadmin4/config_local.py*
instead) or because *PGADMIN_CUSTOM_CONFIG_DISTRO_FILE* points there,
recreating the container is not enough: edit the file, or empty it so that it
is regenerated.
See :ref:`config_py` for more information on the available configuration settings.
@@ -187,13 +282,37 @@ host machine to allow configuration to be customised and shared between
instances.
.. warning:: Warning: pgAdmin runs as the *pgadmin* user (UID: 5050) in the
*pgadmin* group (GID: 5050) in the container. You must ensure that all files
*root* group (GID: 0) in the container. You must ensure that all files
are readable, and where necessary (e.g. the working/session directory)
writeable for this user on the host machine. For example:
.. code-block:: bash
sudo chown -R 5050:5050 <host_directory>
sudo chown -R 5050:0 <host_directory>
When using rootless Podman, user IDs in the container are mapped to a
range of subordinate IDs on the host, so changing the ownership of a host
directory to 5050 as shown above does not make it writeable by the
container. Instead, either add the *U* option to the volume, which has
Podman recursively change the ownership of the directory and everything
in it to match the container's user, for example:
.. code-block:: bash
-v /path/to/pgadmin-data:/var/lib/pgadmin:U
or start the container as root, which in a rootless container is your own
user on the host. The container will change the ownership of
*/var/lib/pgadmin* and then run pgAdmin as the *pgadmin* user; see *PUID*
and *PGID* above. For example:
.. code-block:: bash
--user root
Neither option changes SELinux labels, so on a host with SELinux enforcing,
the volume also needs the *z* (shared) or *Z* (private) option to relabel
it, for example ``-v /path/to/pgadmin-data:/var/lib/pgadmin:Z,U``.
On some filesystems that do not support extended attributes, it may not be
possible to run pgAdmin without specifying a value for *PGADMIN_LISTEN_PORT*
@@ -228,6 +347,14 @@ pgAdmin in the container. Note that server definitions are only loaded on first
launch, i.e. when the configuration database is created, and not on subsequent
launches using the same configuration database.
**/pgadmin4/preferences.json**
If this file is mapped, preferences defined in it will be updated at launch
time. This allows customization of preferences settings into the instance of
pgAdmin in the container. Note that preferences are only set on first
launch, i.e. when the configuration database is created, and not on subsequent
launches using the same configuration database.
**/certs/server.cert**
If TLS is enabled, this file will be used as the servers TLS certificate.
@@ -263,6 +390,37 @@ Run a simple container over port 80, setting some configuration options:
-e 'PGADMIN_CONFIG_CONSOLE_LOG_LEVEL=10' \
-d dpage/pgadmin4
Run pgAdmin with Docker Compose, publishing port 80 and sending mail through
an external SMTP server. *PGADMIN_DEFAULT_EMAIL* and
*PGADMIN_DEFAULT_PASSWORD* are ordinary strings. Each *PGADMIN_CONFIG_*
string below includes the Python quotes that YAML would otherwise remove.
*PGADMIN_DISABLE_POSTFIX* may be any non-empty value; it is ordinary text,
not a Python expression. The named volume keeps */var/lib/pgadmin* when the
container is recreated:
.. code-block:: yaml
services:
pgadmin:
image: dpage/pgadmin4
ports:
- "80:80"
environment:
PGADMIN_DEFAULT_EMAIL: user@domain.com
PGADMIN_DEFAULT_PASSWORD: SuperSecret
PGADMIN_DISABLE_POSTFIX: "1"
PGADMIN_CONFIG_MAIL_SERVER: "'mail.example.com'"
PGADMIN_CONFIG_MAIL_PORT: "587"
PGADMIN_CONFIG_MAIL_USE_TLS: "True"
PGADMIN_CONFIG_MAIL_USERNAME: "'smtp-user'"
PGADMIN_CONFIG_MAIL_PASSWORD: "'s3cret=value'"
PGADMIN_CONFIG_SECURITY_EMAIL_SENDER: "'pgadmin@example.com'"
volumes:
- pgadmin-data:/var/lib/pgadmin
volumes:
pgadmin-data:
Run a TLS secured container using a shared config/storage directory in
/private/var/lib/pgadmin on the host, and servers pre-loaded from
/tmp/servers.json on the host:
@@ -280,6 +438,44 @@ Run a TLS secured container using a shared config/storage directory in
-e 'PGADMIN_ENABLE_TLS=True' \
-d dpage/pgadmin4
Restricted Security Contexts (OpenShift, ``--cap-drop=ALL``)
************************************************************
Some platforms refuse to honor Linux file capabilities. The two situations
the pgAdmin container handles automatically are:
- ``--cap-drop=ALL`` (or an equivalent restricted Kubernetes SecurityContext
such as OpenShift's ``restricted-v2`` SCC), which zeros the bounding set
and removes ``CAP_NET_BIND_SERVICE``. Exec of a capability-tagged binary
then fails with ``Operation not permitted``.
- ``--security-opt=no-new-privileges`` (or
``allowPrivilegeEscalation: false``), which causes the kernel to silently
strip file capabilities on exec. The binary runs, but a subsequent
``bind()`` to a port below 1024 fails with ``EPERM``.
The container's entrypoint reads ``/proc/self/status`` at startup, detects
either condition, switches gunicorn to the non-capability python
interpreter, and (when *PGADMIN_LISTEN_PORT* is not set) defaults the
listen port to **8080** for plain HTTP and **8443** for TLS instead of
80/443. A message is logged so the choice is visible.
In practice this means a typical OpenShift deployment requires no special
build, no setcap, and no custom configuration — only a Service / Route
that targets the chosen non-privileged port:
.. code-block:: bash
docker run --rm -p 8080:8080 \
--security-opt=no-new-privileges \
--cap-drop=ALL \
-e 'PGADMIN_DEFAULT_EMAIL=user@domain.com' \
-e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \
dpage/pgadmin4
If you explicitly set *PGADMIN_LISTEN_PORT*, that value is honored in both
the restricted and unrestricted paths.
Reverse Proxying
****************
@@ -486,3 +682,84 @@ the container is typically launched per the example below:
-e "SCRIPT_NAME=/pgadmin4" \
-l "traefik.frontend.pgadmin4.rule=Host(`host.example.com`) && PathPrefix(`/pgadmin4`)" \
-d dpage/pgadmin4
Sharing the data volume across containers (Kubernetes init containers)
----------------------------------------------------------------------
A common Kubernetes pattern is to bootstrap a pgAdmin deployment with one or
more init containers that share the ``/var/lib/pgadmin`` volume with the main
pgAdmin container — for example, an init container that runs
``setup.py load-servers`` to import a ``servers.json`` definition file at
each rollout.
**The image tag of any such sidecar/init container must NOT be newer than
the main pgAdmin container's tag.** pgAdmin's configuration database
(``pgadmin4.db``) is migrated forward only — destructive operations such as
dropping a column are part of normal upgrades. If an init container running
``pgadmin4:latest`` (or any newer tag) executes ``setup.py`` against a
``pgadmin4.db`` that the main, older pgAdmin will then read, the init
container's migrations will advance the schema past what the main container's
ORM understands, and the main container will fail at runtime with errors
like ``no such column: <table>.<column>``.
The safe configuration is to pin **both** the main container and every
sidecar/init container that touches the data volume to the **same**
explicit version tag, and upgrade them together:
.. code-block:: yaml
# Deployment manifest (spec.template.spec): pin every container that
# touches the data volume to the same explicit tag. Do NOT use :latest.
spec:
template:
spec:
initContainers:
- name: import-servers-json
image: docker.io/dpage/pgadmin4:9.14 # match the main container
# ... rest of the init container spec ...
containers:
- name: pgadmin
image: docker.io/dpage/pgadmin4:9.14 # main pgAdmin container
If you deploy pgAdmin with a Helm chart, set the equivalent image-tag values
for both the main container and every init/sidecar container rather than the
raw fields shown above. When upgrading pgAdmin, change every reference to the
image tag at the same time so that the main container and any sidecar/init
containers move forward together.
Use ``strategy: Recreate``, not ``RollingUpdate``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Even when every container's image tag is pinned correctly, **a rolling
upgrade across pgAdmin versions is unsafe** when the old and new pods share
a data volume. Kubernetes' default ``RollingUpdate`` strategy starts the
new pod, waits for it to become healthy, and only *then* terminates the
old pod. During that overlap window:
1. The new pod's startup runs ``db_upgrade()`` and applies any pending
migrations to the shared ``pgadmin4.db`` — including destructive ones
(column drops, table renames, type changes).
2. The new pod becomes healthy. The old pod is still alive and still has
``pgadmin4.db`` open with its older ORM schema metadata.
3. Until Kubernetes terminates the old pod, requests routed to it
generate queries that reference the pre-migration schema. Those
queries now fail at runtime against the migrated database — for
example, ``no such column: <table>.<column>`` when a column was
dropped in this release.
Because pgAdmin's migrations are forward-only with single-step destructive
operations (a column dropped in release N+1 is gone immediately, not after
a deprecation cycle), there is no safe way for an N-version pod to keep
serving against a migrated N+1 schema. Set the deployment strategy to
``Recreate``, which terminates the old pod *before* starting the new one:
.. code-block:: yaml
spec:
strategy:
type: Recreate # not RollingUpdate
The trade-off is a few seconds of downtime during each upgrade, in
exchange for not serving traffic from a pod whose ORM is misaligned with
the database schema underneath it. This is the supported upgrade
strategy for pgAdmin K8s deployments today.
+9 -6
View File
@@ -44,8 +44,9 @@ Use the *Definition* tab to set properties for the database:
* Select the strategy from the drop-down listbox in the *Strategy* field while
creating a new database. This option is available from v15 and above.
* Select the locale provider from the drop-down listbox in the *Locale Provider*
field to set the default collation for this database. Possible values are: icu, libc.
This option is available from v15 and above.
field to set the default collation for this database. Possible values are: icu, libc and builtin.
This option is available from v15 and above. **Note:** The icu and libc options are available
from v15 and builtin option is available from v17 onwards.
* Select the collation order from the drop-down listbox in the *Collation* field.
* Select the character classification from the drop-down listbox in the
*Character Type* field. This affects the categorization of characters, e.g.
@@ -57,10 +58,12 @@ Use the *Definition* tab to set properties for the database:
* Specify the icu rules in the *ICU Rules* field as additional collation
rules to customize the behavior of the default collation of this database.
This option is available from v16 and above.
* Select the builtin locale from the drop-down listbox in the *Builtin Locale* if the
builtin locale provider is used. This option is available from v17 and above.
* Specify a connection limit in the *Connection Limit* field to configure the
maximum number of connection requests. The default value (*-1*) allows
unlimited connections to the database.
* If the *templates?* is set to true, then database will be a template database.
* If *Template?* is set to *Yes*, the database will be a template database.
Click the *Security* tab to continue.
@@ -86,7 +89,7 @@ database. Click the *Add* icon (+) to add each security label selection:
* Specify a security label provider in the *Provider* field. The named provider
must be loaded and must consent to the proposed labeling operation.
* Specify a a security label in the *Security Label* field. The meaning of a
* Specify a security label in the *Security Label* field. The meaning of a
given label is at the discretion of the label provider. PostgreSQL places no
restrictions on whether or how a label provider must interpret security
labels; it merely provides a mechanism for storing them.
@@ -122,8 +125,8 @@ Use the *Advanced* tab to set advanced parameters for the database.
* Use *Schema restriction* field to provide a SQL restriction that will be used
against the pg_namespace table to limit the schemas that you see.
For example, you might enter: *public* so that only *public* are shown in
the pgAdmin browser.Separate entries with a comma or tab as you type.
For example, you might enter: *public* so that only *public* is shown in
the pgAdmin browser. Separate entries with a comma or tab as you type.
Click the *SQL* tab to continue.
+108
View File
@@ -0,0 +1,108 @@
.. _dbms_job:
*****************
`DBMS Job`:index:
*****************
Use the *DBMS Job* dialog to create a DBMS Job.
.. image:: images/dbms_job_general.png
:alt: DBMS Job dialog general tab
:align: center
Use the fields in the *General* tab to create job:
* Use the *Name* field to add a descriptive name for the job. The name will
be displayed in the *pgAdmin* object explorer.
* Use the *Enabled?* switch to indicate that job should be enabled or disabled.
* Use the *Job Type* field to select the type of the job. Type could be SELF-CONTAINED or PRE-DEFINED.
If the Job Type is Self-Contained you need to specify the action and repeat interval in the Action and Repeat tabs respectively.
If the Job Type is Pre-Defined you need to specify the existing Program and Schedule names in the Pre-Defined tab.
* Store notes about the job in the *Comment* field.
Click the *Action* tab to continue.
.. image:: images/dbms_job_action.png
:alt: DBMS Job dialog action tab
:align: center
Use the *Action* tab to select the action for the job. This tab is only enabled when the job type is 'SELF-CONTAINED'.
* Use the *Type* field to select the type of the job. Type could be PLSQL BLOCK or STORED PROCEDURE.
* Use the *Procedure* field to select an existing procedure that executes when the job is invoked.
* *Number of Arguments* field is read-only and indicates the quantity of arguments necessary for the chosen procedure.
Click the *Code* tab to continue.
.. image:: images/dbms_job_code.png
:alt: DBMS Job dialog code tab
:align: center
* Use the *Code* field to write the code that executes when the job is invoked.
This tab is only enabled when the job type is 'SELF-CONTAINED' and type of the action is set to 'PLSQL BLOCK'.
Click the *Arguments* tab to continue.
.. image:: images/dbms_job_arguments.png
:alt: DBMS Job dialog arguments tab
:align: center
* *Arguments* tab outlines the arguments required by the selected procedure in the 'Action' tab. This tab is only enabled when the job type is 'SELF-CONTAINED'.
Click the *Repeat* tab to continue.
.. image:: images/dbms_job_repeat.png
:alt: DBMS Job dialog repeat tab
:align: center
Use the *Repeat* tab to select the repeat interval for the job. This tab is only enabled when the job type is 'SELF-CONTAINED'.
* Use the calendar selector in the *Start* field to specify the starting date
and time for the job.
* Use the calendar selector in the *End* field to specify the ending date and
time for the job.
* Use the *Frequency* field to select the frequency. Frequency is one of the following:
YEARLY, MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY.
* Use the *Date* field to select the date on which job will execute.Date is YYYYMMDD.
* Use the *Months* field to select the months in which the job will execute.
* Use the *Week Days* field to select the days on which the job will execute.
* Use the *Month Days* field to select the numeric days on which the job will
execute.
* Use the *Hours* field to select the hour at which the job will execute.
* Use the *Minutes* field to select the minute at which the job will execute.
Click the *Pre-Defined* tab to continue.
.. image:: images/dbms_job_predefined.png
:alt: DBMS Job dialog predefined tab
:align: center
Use the *Pre-Defined* tab to select the existing program and schedule to create the job.
This tab is only enabled when the job type is 'PRE-DEFINED'.
* Use the *Program Name* field to select the existing program.
* Use the *Schedule Name* field to select an existing schedule.
Click the *SQL* tab to continue.
Your entries in the *DBMS Job* dialog generate a SQL command (see an example below).
Use the *SQL* tab for review; revisit or switch tabs to make any changes to the
SQL command.
**Example**
The following is an example of the sql command generated by user selections in
the *DBMS Job* dialog:
.. image:: images/dbms_job_sql.png
:alt: DBMS Job dialog sql tab
:align: center
* Click the *Info* button (i) to access online help.
* Click the *Help* button (?) to access dialog help.
* Click the *Save* button to save work.
* Click the *Close* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+45
View File
@@ -0,0 +1,45 @@
.. _dbms_job_scheduler:
********************************
`Using EDB Job Scheduler`:index:
********************************
In the past versions of EPAS, DBMS_SCHEDULER or DBMS_JOBS required the configuration
of pgAgent, an essential service for their functionality. Maintaining pgAgent in a
production environment is cumbersome. The need for correct configuration, regular updates,
and ensuring the service’s health added complexity.
EPAS 16 revolutionizes job scheduling by eliminating the need for the pgAgent component.
The new version introduces EDB Job Scheduler which is an extension that runs the job scheduler
as a background process for the DBMS_SCHEDULER and DBMS_JOB packages.
The EDB Job Scheduler has a scheduler process that starts when the database cluster starts.
To start the scheduler process, load the EDB Job Scheduler extension using the **shared_preload_libraries**
parameter. After you load the extension, create the extension **'edb_job_scheduler'** and **'dbms_scheduler'** using
the CREATE EXTENSION command. The database in which you're creating the extension must be listed in the
**edb_job_scheduler.database_list** parameter.
Instructions for configuring the EDB Job Scheduler can be found in the
`Configuring EDB Job Scheduler <https://www.enterprisedb.com/docs/pg_extensions/edb_job_scheduler/configuring/>`_.
.. image:: images/dbms_job_scheduler.png
:alt: DBMS Job Scheduler Object Browser
:align: center
Check the status of all the jobs
********************************
To check the running status of all the jobs select the 'DBMS Job Scheduler' collection node from the object
explorer and select the Properties tab.
.. image:: images/dbms_job_details.png
:alt: DBMS Job Details
:align: center
.. toctree::
:maxdepth: 1
dbms_job
dbms_program
dbms_schedule
+71
View File
@@ -0,0 +1,71 @@
.. _dbms_program:
*********************
`DBMS Program`:index:
*********************
Use the *DBMS Program* dialog to create a DBMS Program.
.. image:: images/dbms_program_general.png
:alt: DBMS Program dialog general tab
:align: center
Use the fields in the *General* tab to create program:
* Use the *Name* field to add a descriptive name for the program. The name will
be displayed in the *pgAdmin* object explorer.
* Use the *Enabled?* switch to indicate that program should be enabled or disabled.
* Store notes about the program in the *Comment* field.
Click the *Action* tab to continue.
.. image:: images/dbms_program_action.png
:alt: DBMS Program dialog action tab
:align: center
Use the *Action* tab to select the action for the program:
* Use the *Type* field to select the type of the program. Type could be PLSQL BLOCK or STORED PROCEDURE.
* Use the *Procedure* field to select an existing procedure that executes when the program is invoked.
* *Number of Arguments* field is read-only and indicates the quantity of arguments necessary for the chosen procedure.
Click the *Code* tab to continue.
.. image:: images/dbms_program_code.png
:alt: DBMS Program dialog code tab
:align: center
* Use the *Code* field to write the code that executes when the program is invoked.
This tab is only enabled when the type of the program is set to 'PLSQL BLOCK'.
Click the *Arguments* tab to continue.
.. image:: images/dbms_program_arguments.png
:alt: DBMS Program dialog arguments tab
:align: center
* *Arguments* tab is a read-only section that outlines the arguments required by the selected procedure in the 'Action' tab.
Click the *SQL* tab to continue.
Your entries in the *DBMS Program* dialog generate a SQL command (see an example below).
Use the *SQL* tab for review; revisit or switch tabs to make any changes to the
SQL command.
**Example**
The following is an example of the sql command generated by user selections in
the *DBMS Program* dialog:
.. image:: images/dbms_program_sql.png
:alt: DBMS Program dialog sql tab
:align: center
* Click the *Info* button (i) to access online help.
* Click the *Help* button (?) to access dialog help.
* Click the *Save* button to save work.
* Click the *Close* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+61
View File
@@ -0,0 +1,61 @@
.. _dbms_schedule:
**********************
`DBMS Schedule`:index:
**********************
Use the *DBMS Schedule* dialog to create a DBMS Schedule.
.. image:: images/dbms_schedule_general.png
:alt: DBMS Schedule dialog general tab
:align: center
Use the fields in the *General* tab to create schedule:
* Use the *Name* field to add a descriptive name for the schedule. The name will
be displayed in the *pgAdmin* object explorer.
* Store notes about the schedule in the *Comment* field.
Click the *Repeat* tab to continue.
.. image:: images/dbms_schedule_repeat.png
:alt: DBMS Schedule dialog repeat tab
:align: center
Use the *Repeat* tab to select the repeat interval for the schedule:
* Use the calendar selector in the *Start* field to specify the starting date
and time for the schedule.
* Use the calendar selector in the *End* field to specify the ending date and
time for the schedule.
* Use the *Frequency* field to select the frequency. Frequency is one of the following:
YEARLY, MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY.
* Use the *Date* field to select the date on which schedule will execute.Date is YYYYMMDD.
* Use the *Months* field to select the months in which the schedule will execute.
* Use the *Week Days* field to select the days on which the schedule will execute.
* Use the *Month Days* field to select the numeric days on which the schedule will
execute.
* Use the *Hours* field to select the hour at which the schedule will execute.
* Use the *Minutes* field to select the minute at which the schedule will execute.
Click the *SQL* tab to continue.
Your entries in the *DBMS Schedule* dialog generate a SQL command (see an example below).
Use the *SQL* tab for review; revisit or switch tabs to make any changes to the
SQL command.
**Example**
The following is an example of the sql command generated by user selections in
the *DBMS Schedule* dialog:
.. image:: images/dbms_schedule_sql.png
:alt: DBMS Schedule dialog sql tab
:align: center
* Click the *Info* button (i) to access online help.
* Click the *Help* button (?) to access dialog help.
* Click the *Save* button to save work.
* Click the *Close* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+24 -19
View File
@@ -61,6 +61,7 @@ values required by the program:
.. image:: images/debug_params.png
:alt: Debugger parameter dialog
:align: center
Use the fields on the *Debugger* dialog to provide a value for each parameter:
@@ -100,25 +101,29 @@ The toolbar options are:
:alt: Debugger navigation toolbar
:align: center
+-------------------------+-----------------------------------------------------------------------------------------------------------+
| Option | Action |
+=========================+===========================================================================================================+
| *Step into* | Click the *Step into* icon to execute the currently highlighted line of code. |
+-------------------------+-----------------------------------------------------------------------------------------------------------+
| *Step over* | Click the *Step over* icon to execute a line of code, stepping over any sub-functions invoked by the code.|
| | The sub-function executes, but is not debugged unless it contains a breakpoint. |
+-------------------------+-----------------------------------------------------------------------------------------------------------+
| *Continue/Start* | Click the *Continue/Start* icon to execute the highlighted code, and continue until the program |
| | encounters a breakpoint or completes. |
+-------------------------+-----------------------------------------------------------------------------------------------------------+
| *Toggle breakpoint* | Use the *Toggle breakpoint* icon to enable or disable a breakpoint (without removing the breakpoint). |
+-------------------------+-----------------------------------------------------------------------------------------------------------+
| *Clear all breakpoints* | Click the *Clear all breakpoints* icon to remove all breakpoints from the program. |
+-------------------------+-----------------------------------------------------------------------------------------------------------+
| *Stop* | Click the *Stop* icon to halt the execution of a program. |
+-------------------------+-----------------------------------------------------------------------------------------------------------+
| *Help* | Click the *Help* icon to open debugger documentation. |
+-------------------------+-----------------------------------------------------------------------------------------------------------+
.. table::
:class: longtable
:widths: 1 4 1
+-------------------------+-----------------------------------------------------------------------------------------------------------+------------------------+
| Option | Action | Shortcut |
+=========================+===========================================================================================================+========================+
| *Step into* | Click the *Step into* icon to execute the currently highlighted line of code. | Option/Alt + Shift + I |
+-------------------------+-----------------------------------------------------------------------------------------------------------+------------------------+
| *Step over* | Click the *Step over* icon to execute a line of code, stepping over any sub-functions invoked by the code.| Option/Alt + Shift + O |
| | The sub-function executes, but is not debugged unless it contains a breakpoint. | |
+-------------------------+-----------------------------------------------------------------------------------------------------------+------------------------+
| *Continue/Start* | Click the *Continue/Start* icon to execute the highlighted code, and continue until the program | Option/Alt + Shift + C |
| | encounters a breakpoint or completes. | |
+-------------------------+-----------------------------------------------------------------------------------------------------------+------------------------+
| *Toggle breakpoint* | Use the *Toggle breakpoint* icon to enable or disable a breakpoint (without removing the breakpoint). | Option/Alt + Shift + T |
+-------------------------+-----------------------------------------------------------------------------------------------------------+------------------------+
| *Clear all breakpoints* | Click the *Clear all breakpoints* icon to remove all breakpoints from the program. | Option/Alt + Shift + X |
+-------------------------+-----------------------------------------------------------------------------------------------------------+------------------------+
| *Stop* | Click the *Stop* icon to halt the execution of a program. | Option/Alt + Shift + S |
+-------------------------+-----------------------------------------------------------------------------------------------------------+------------------------+
| *Help* | Click the *Help* icon to open debugger documentation. | |
+-------------------------+-----------------------------------------------------------------------------------------------------------+------------------------+
The top panel of the debugger window displays the program body; click in the
grey margin next to a line number to add a breakpoint. The highlighted line in
+15 -17
View File
@@ -36,43 +36,34 @@ See :ref:`config_py` for more information on configuration settings.
Desktop Runtime Standalone Application
======================================
The Desktop Runtime is based on `NWjs <https://nwjs.io/>`_ which integrates a
The Desktop Runtime is based on `Electron <https://www.electronjs.org/>`_ which integrates a
browser and the Python server creating a standalone application.
.. image:: images/runtime_standalone.png
:alt: Runtime Standalone
:align: center
Runtime Menu
------------
Runtime Menu Items
------------------
.. image:: images/runtime_menu.png
:alt: Runtime Menu
:align: center
Use the *File Menu* to access the *Runtime Menu*:
Use the *File Menu* to access the runtime menu items:
+-------------------------+---------------------------------------------------------------------------------------------------------+
| Option | Action |
+=========================+=========================================================================================================+
| *Configure...* | Click to open configuration dialog to configure fixed port, port number and connection timeout. |
| *View logs...* | Click to open the view log dialog to view the pgAdmin 4 logs. |
+-------------------------+---------------------------------------------------------------------------------------------------------+
| *View log...* | Click to open the view log dialog to view the pgAdmin 4 logs. |
+-------------------------+---------------------------------------------------------------------------------------------------------+
| *Enter Full Screen* | Click to enter/exit the full screen mode. Keyboard Shortcuts: OSX (Cmd + Ctrl + F), Other OS (F10). |
+-------------------------+---------------------------------------------------------------------------------------------------------+
| *Actual Size* | Click to change the window size to it original size. Keyboard Shortcuts: OSX (Cmd + 0), |
| | Other OS (Ctrl + 0). |
+-------------------------+---------------------------------------------------------------------------------------------------------+
| *Zoom In* | Click to increase the zoom level. Keyboard Shortcuts: OSX (Cmd + +), Other OS (Ctrl + +). |
+-------------------------+---------------------------------------------------------------------------------------------------------+
| *Zoom Out* | Click to decrease the zoom level. Keyboard Shortcuts: OSX (Cmd + -), Other OS (Ctrl + -). |
| *Configure runtime...* | Click to open configuration dialog to configure fixed port, port number and connection timeout. |
+-------------------------+---------------------------------------------------------------------------------------------------------+
Configuration Dialog
--------------------
Use the *Runtime Menu* to access the *Configuration* dialog:
Use the *Configure runtime...* option to access the *Configuration* dialog:
.. image:: images/runtime_configuration.png
:alt: Runtime Configuration
@@ -101,7 +92,7 @@ Timeout*, and 'Open Documentation in Default Browser?' configuration parameters:
Log dialog
----------
Use the *Runtime Menu* to access the *Log* dialog:
Use the *File Menu* to access the *View Logs* dialog:
.. image:: images/runtime_view_log.png
:alt: Runtime View Log
@@ -137,3 +128,10 @@ The configuration settings are stored in *runtime_config.json* file, which
will be available on Unix systems (~/.local/share/pgadmin/),
on Mac OS X (~/Library/Preferences/pgadmin),
and on Windows (%APPDATA%/pgadmin).
For details on the auto-update system for the desktop application, see
.. toctree::
:maxdepth: 1
auto_update_desktop_app
+1
View File
@@ -17,3 +17,4 @@ PL/SQL code.
schema_diff
erd_tool
psql_tool
ai_tools
+87
View File
@@ -0,0 +1,87 @@
.. _directory_dialog:
*************************
`Directory Dialog`:index:
*************************
Use the Directory dialog to create an alias for a file system directory path.
To create directories, you must have the CREATE ANY DIRECTORY system privilege.
When you create a directory, you are automatically granted READ and WRITE privileges
on the directory, and you can grant READ and WRITE privileges to other users and roles.
The superuser can also grant these privileges to other users and roles.
Please note that directories are supported when connected to EDB Postgres Advanced Server.
For more information about using directories, please see the EDB Postgres Advanced Server Guide, available at:
https://www.enterprisedb.com/docs/epas/latest/epas_compat_sql/
The *Directory* dialog organizes the definition of a directory through the
following tabs: *General*, *Definition*, *Security*, and *SQL*.
The *SQL* tab displays the SQL code generated by dialog selections.
.. image:: images/directory_general.png
:alt: Directory general tab
:align: center
Use the fields on the *General* tab to specify directory attributes:
* Use the *Name* field to add a directory alias name. This name will be displayed in the object explorer.
* Select the owner of the directory from the drop-down listbox in the *Owner*
field.
Click the *Definition* tab to continue.
.. image:: images/directory_definition.png
:alt: Directory dialog definition tab
:align: center
* Use the *Location* field to specify a fully qualified directory path represented
by the alias name. The CREATE DIRECTORY command doesn't create the operating system directory.
The physical directory must be created independently using operating system commands.
Click the *Security* tab to continue.
.. image:: images/directory_security.png
:alt: Directory dialog security tab
:align: center
NOTE:- This *Security* tab will be only available for EPAS 17.
Use the *Security* tab to assign privileges for the directory.
Use the *Privileges* panel to assign security privileges. Click the *Add* icon
(+) to assign a set of privileges:
* Select the name of the role from the drop-down listbox in the *Grantee* field.
* The current user, who is the default grantor for granting the privilege, is displayed in the *Grantor* field.
* Click inside the *Privileges* field. Check the boxes to the left of one or
more privileges to grant the selected privileges to the specified user.
Click the *Add* icon to assign additional sets of privileges; to discard a
privilege, click the trash icon to the left of the row and confirm deletion in
the *Delete Row* popup.
Click the *SQL* tab to continue.
Your entries in the *Directory* dialog generate a SQL command (see an example
below). Use the *SQL* tab for review; revisit or switch tabs to make any changes
to the SQL command.
Example
*******
The following is an example of the sql command generated by user selections in
the *Directory* dialog:
.. image:: images/directory_sql.png
:alt: Directory dialog sql tab
:align: center
The example shown demonstrates creating a directory named *test1*. It has a
*location* value equal to */home/test_dir*.
* Click the *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Close* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+1 -1
View File
@@ -89,7 +89,7 @@ Use the *Security Labels* panel to assign security labels. Click the *Add* icon
* Specify a security label provider in the *Provider* field. The named provider
must be loaded and must consent to the proposed labeling operation.
* Specify a a security label in the *Security Label* field. The meaning of a
* Specify a security label in the *Security Label* field. The meaning of a
given label is at the discretion of the label provider. PostgreSQL places no
restrictions on whether or how a label provider must interpret security
labels; it merely provides a mechanism for storing them.
+36 -23
View File
@@ -15,8 +15,15 @@ to specify the number of rows you would like to display in the editor panel.
To modify the content of a table, each row in the table must be uniquely
identifiable. If the table definition does not include an OID or a primary key,
the displayed data is read only. Note that views cannot be edited; updatable
views (using rules) are not supported.
the displayed data is read only. Simple, automatically-updatable views (a
single base table, with no ``INSTEAD OF`` triggers or rewrite rules, whose
base table's primary key columns are all exposed in the view under their
original names) can also be edited; updating and deleting rows is supported,
but inserting new rows through a view is not, so the *Add row* and *Paste*
buttons are disabled when editing a view. Materialized views, views based
on more than one table, views exposing only part of a composite primary key,
and views relying on ``INSTEAD OF`` triggers or rules created with
``CREATE RULE`` remain read only.
The editor features a toolbar that allows quick access to frequently used
options, and a work environment divided into two panels:
@@ -49,7 +56,7 @@ To modify the displayed data:
* To change a numeric value within the grid, double-click the value to select
the field. Modify the content in the square in which it is displayed.
* To change a non-numeric value within the grid, double-click the content to
access the edit bubble. After modifying the contentof the edit bubble, click
access the edit bubble. After modifying the content of the edit bubble, click
the *Ok* button to display your changes in the data grid, or *Cancel* to
exit the edit bubble without saving.
@@ -62,7 +69,7 @@ table. As soon as you store the data, the row is assigned a row number, and a
fresh empty line is added to the data grid.
To write a SQL NULL to the table, simply leave the field empty. When you store
the new row, the will server fill in the default value for that column. If you
the new row, the server will fill in the default value for that column. If you
store a change to an existing row, the value NULL will explicitly be written.
To write an empty string to the table, enter the special string '' (two single
@@ -101,6 +108,11 @@ properties of the geometries directly in map, just click the specific geometry:
viewer will render geometries with the same SRID in the map. If SRID=4326 the
OSM tile layer will be added into the map.
- *Custom tile provider:* A custom map tile provider ({z}/{x}/{y} URL template,
in EPSG:3857, EPSG:4326 or EPSG:3395) can be configured as a base layer via
*Preferences > Query Tool > Geometry Viewer*. When configured, it is
selected as the default base layer.
- *Data size:* For performance reasons, the viewer will render no more than
100000 geometries, totaling up to 20MB.
@@ -110,9 +122,9 @@ properties of the geometries directly in map, just click the specific geometry:
**JSON Data Editor**
A built in json editor is provided for *JSON/JSONB Data*.Double clicking on json/jsonb
data type cell in data grid will open JSON Editor.Editor provides different mode to
view and edit json data.
A built-in JSON editor is provided for *JSON/JSONB Data*. Double-clicking on a JSON/JSONB
data type cell in the data grid will open the JSON Editor. The editor provides different modes to
view and edit JSON data.
.. image:: images/json_editor_modes.png
@@ -120,21 +132,21 @@ view and edit json data.
:align: center
*Code Mode*:
Provides way to format & compact json data.Also provides ability to repair json data
by fixing quotes and escape characters, removing comments and JSONP notation and
turn JavaScript objects into JSON.
Provides a way to format and compact JSON data. Also provides the ability to repair JSON data
by fixing quotes and escape characters, removing comments and JSONP notation, and
turning JavaScript objects into JSON.
*Tree Mode*:
Enabled to change, add, move, remove, and duplicate fields and values.Provides ability
to searh & hilight data.
Enables changing, adding, moving, removing, and duplicating fields and values. Provides the ability
to search and highlight data.
*Form Mode*:
Allows only to edit values in json data there by providing ability to keep data structure
Allows editing only the values in JSON data, thereby providing the ability to keep the data structure
unchanged while editing.
*Preview Mode*:
Provides ability to check data before saving and also shows size of current json data.
Format and compact json data as well.
Provides the ability to check data before saving and also shows the size of the current JSON data.
Allows formatting and compacting JSON data as well.
*Editor Toolbar*
@@ -170,18 +182,18 @@ Tree/Form mode:
+----------------------+----------------------------------------------------------------------------------------+---------------------------+
| *Transform* | Click to *Transform* to filter data using JSME query language. | Code, Preview, Tree |
+----------------------+----------------------------------------------------------------------------------------+---------------------------+
| *Undo* | Click to *Undo* to undo last action performed on data . | Code, Preview, Tree, From |
| *Undo* | Click to *Undo* to undo last action performed on data. | Code, Preview, Tree, Form |
+----------------------+----------------------------------------------------------------------------------------+---------------------------+
| *Redo* | Click to *Redo* to repat last action performed on data . | Code, Preview, Tree, From |
| *Redo* | Click to *Redo* to repeat last action performed on data. | Code, Preview, Tree, Form |
+----------------------+----------------------------------------------------------------------------------------+---------------------------+
| *Mode* | Click to *Mode* dropdown to change dipaly mode of editor.Different modes avaialble | Code, Tree, From, Preview |
| | are Code, Preview, Tree, From. | |
| *Mode* | Click the *Mode* dropdown to change the display mode of the editor. Different modes | Code, Tree, Form, Preview |
| | available are Code, Preview, Tree, and Form. | |
+----------------------+----------------------------------------------------------------------------------------+---------------------------+
| *Expand All* | Click to *Expand All* to expand json data. | Tree, From |
| *Expand All* | Click *Expand All* to expand JSON data. | Tree, Form |
+----------------------+----------------------------------------------------------------------------------------+---------------------------+
| *Collapse All* | Click to *Redo* to collapse json data. | Tree, From |
| *Collapse All* | Click *Collapse All* to collapse JSON data. | Tree, Form |
+----------------------+----------------------------------------------------------------------------------------+---------------------------+
| *Search Box* | Enter partial/complete string to search in data. | Tree, From |
| *Search Box* | Enter partial/complete string to search in data. | Tree, Form |
+----------------------+----------------------------------------------------------------------------------------+---------------------------+
@@ -212,6 +224,7 @@ To add new column(s) in data sorting grid, click on the [+] icon.
* Use the drop-down *Column* to select the column you want to sort.
* Use the drop-down *Order* to select the sort order for the column.
* Use the drop-down *NULLs* to select the NULL values order for the column.
To delete a row from the grid, click the trash icon.
@@ -234,6 +247,6 @@ A View/Edit Data tab can be converted to a Query Tool Tab just by editing the qu
:alt: Promote View/Edit Data tab to Query Tool tab warning
:align: center
You can disable the dialog by selecting the "Don't Ask again" checkbox. If you wish to resume the confirmation dialog, you can do it from "Prefrences -> Query Tool -> Editor -> Show View/Edit Data Promotion Warning?"
You can disable the dialog by selecting the "Don't Ask again" checkbox. If you wish to resume the confirmation dialog, you can do it from "Preferences -> Query Tool -> Editor -> Show View/Edit Data Promotion Warning?"
Once you chose to continue, you won't be able to use the features of View/Edit mode like the filter and sorting options, limit, etc. It is a one-way conversion. It will be a query tool now.
+36 -14
View File
@@ -48,9 +48,9 @@ File Options
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| Icon | Behavior | Shortcut |
+======================+===================================================================================================+================+
| *Open File* | Click the *Open File* icon to load a previously saved diagram. | Ctrl + O |
| *Open File* | Click the *Open File* icon to load a previously saved diagram. | Cmd/Ctrl + O |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Save* | Click the *Save* icon to perform a quick-save of a previously saved diagram, or to save the | Ctrl + S |
| *Save* | Click the *Save* icon to perform a quick-save of a previously saved diagram, or to save the | Cmd/Ctrl + S |
| | diagram to a file. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Save as* | Click the *Save As* to open a new browser dialog and specify a new location to save the diagram. | Ctrl + Shift + |
@@ -67,13 +67,13 @@ Export Options
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| Icon | Behavior | Shortcut |
+======================+===================================================================================================+================+
| *Generate SQL* | Click the *Generate SQL* icon to generate the DDL SQL for the diagram and open a query tool | Option + Ctrl +|
| | with the generated SQL ready for execution. | S |
| *Generate SQL* | Click the *Generate SQL* icon to generate the DDL SQL for the diagram and open a query tool | Option/Alt + |
| | with the generated SQL ready for execution. | Ctrl + S |
| | You can select the option *With DROP Table* if you wish to have DROP Table DDL statements before | |
| | each CREATE Table DDL. You can see the option by clicking the down arrow beside the SQL button. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Download image* | Click the *Download image* icon to save the ERD diagram in a image formate | Option + Ctrl +|
| | | I |
| *Download image* | Click the *Download image* icon to save the ERD diagram in an image format. | Option/Alt + |
| | | Ctrl + I |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
Editing Options
@@ -86,6 +86,9 @@ Editing Options
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| Icon | Behavior | Shortcut |
+======================+===================================================================================================+================+
| *Search table* | Click to search for a table in the diagram. Selecting a table from the search results will bring | Option/Alt + |
| | it into view and highlight it. | Ctrl + F |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Add table* | Click this button to add a new table to the diagram. On clicking, this will open a table dialog | Option/Alt + |
| | where you can put the table details. | Ctrl + A |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
@@ -109,11 +112,14 @@ Table Relationship Options
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| Icon | Behavior | Shortcut |
+======================+===================================================================================================+================+
| *1M* | Click this button to open a one-to-many relationship dialog to add a relationship between the | Option/Alt + |
| *1-1* | Click this button to open a one-to-one relationship dialog to add a relationship between the | Option/Alt + |
| | two tables. The selected table becomes the referencing table. | Ctrl + B |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *1-M* | Click this button to open a one-to-many relationship dialog to add a relationship between the | Option/Alt + |
| | two tables. The selected table becomes the referencing table and will have the *many* endpoint of | Ctrl + O |
| | the link. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *MM* | Click this button to open a many-to-many relationship dialog to add a relationship between the | Option/Alt + |
| *M-M* | Click this button to open a many-to-many relationship dialog to add a relationship between the | Option/Alt + |
| | two tables. This option will create a new table based on the selected columns for the two relating| Ctrl + M |
| | tables and link them. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
@@ -129,7 +135,7 @@ Node Color Options
| Icon | Behavior |
+======================+==========================================================================================================+
| *Fill Color* | Use Fill Color to change the background color of a table node. This is helpful if you want to |
| | identify a of group tables. Once set, all the newly added tables will take the same color. |
| | identify a group of tables. Once set, all the newly added tables will take the same color. |
+----------------------+----------------------------------------------------------------------------------------------------------+
| *Text Color* | Use Text Color to change the text color of a table node based on the fill color to make text |
| | easily readable. |
@@ -148,7 +154,7 @@ Utility Options
| *Add/Edit note* | Click this button to make notes on tables nodes while designing the database. | Option/Alt + |
| | | Ctrl + N |
+-------------------------+------------------------------------------------------------------------------------------------+----------------+
| *Auto align* | Click this button to auto align all tables and links to make it look more cleaner. | Option/Alt + |
| *Auto align* | Click this button to auto-align all tables and links to make them look cleaner. | Option/Alt + |
| | | Ctrl + L |
+-------------------------+------------------------------------------------------------------------------------------------+----------------+
| *Show details* | Click this button to toggle the column details visibility. It allows you to show few or more | Option/Alt + |
@@ -188,7 +194,7 @@ Table Dialog
The table dialog allows you to:
* Change the table structure details.
* It can be used edit an existing table or add a new one.
* It can be used to edit an existing table or add a new one.
* Refer :ref:`table dialog <table_dialog>` for information on different fields.
Table Node
@@ -200,13 +206,29 @@ Table Node
The table node shows table details in a graphical representation:
* The top bar has a *details toggle button* that is used to toggle column details visibility. There is also a *note button* that is visible only if there is some note added. you can click on this button to quickly change the note.
* The top bar has a *details toggle button* that is used to toggle column details visibility. There is also a *note button* that is visible only if there is some note added. You can click on this button to quickly change the note.
* The first row shows the schema name of the table. Eg. *public* in above image.
* The second row shows the table name. Eg. *users* in above image.
* All other rows below the table name are the columns of the table along with data type. If the column is a primary key then it will have lock key icon eg. id is the primary key in above image. Otherwise, it will have column icon.
* you can click on the node and drag to move on the canvas.
* You can click on the node and drag to move on the canvas.
* Upon double click on the table node or by clicking the edit button from the toolbar, the table dialog opens where you can change the table details. Refer :ref:`table dialog <table_dialog>` for information on different fields.
The One to One Link Dialog
***************************
.. image:: images/erd_11_dialog.png
:alt: ERD tool 1-1 dialog
:align: center
The one to one link dialog allows you to:
* Add a one to one relationship between two tables.
* *Local Table* is the table that references a table and has the *one* end point.
* *Local Column* the column that references.
* *Select Constraint* To implement a one-to-one relationship, the *Local Column* must have a primary key or unique constraint. The default is a unique constraint. Please note that this field is visible only when the selected *Local Column* does not have either of the mentioned constraints.
* *Referenced Table* is the table that is being referred and has the *one* end point.
* *Referenced Column* the column that is being referred.
The One to Many Link Dialog
***************************
@@ -250,7 +272,7 @@ The table link shows relationship between tables:
* The single line endpoint of the link shows the column that is being referred.
* The three line endpoint of the link shows the column that refers.
* If one of the columns that is being referred or that refers is removed from the table then the link will get dropped.
* you can click on the link and drag to move on the canvas.
* You can click on the link and drag to move on the canvas.
The Table Notes
+1 -1
View File
@@ -67,7 +67,7 @@ in the *Delete Row* popup.
Click the *SQL* tab to continue.
Your entries in the *Event Trigger* dialog generate a generate a SQL command.
Your entries in the *Event Trigger* dialog generate a SQL command.
Use the *SQL* tab for review; revisit or switch tabs to make any changes to the
SQL command.
+91
View File
@@ -0,0 +1,91 @@
.. _export_data_using_query:
***************************************
`Export Data Using Query Dialog`:index:
***************************************
Use the *Export Data Using Query* dialog to copy data to a file.
The *Export Data Using Query* dialog organizes the export of data through the
*General*, *Options* and *Query* tabs.
.. image:: images/export_query_general.png
:alt: Export data using query dialog general tab
:align: center
Use the fields in the *General* tab to specify export preferences:
* Enter the name of the target file in the *Filename* field.
Optionally, select the *Browse* icon (ellipsis) to the right to navigate
into a directory and select a file.
* Use the drop-down listbox in the *Format* field to specify the file type.
Select:
* *binary* for a .bin file.
* *csv* for a .csv file.
* *text* for a .txt file.
* Use the drop-down listbox in the *Encoding* field to specify the type of
character encoding.
.. image:: images/export_query_options.png
:alt: Export data using query dialog options tab
:align: center
* Use the fields in the *Options* tab to specify additional information:
* Move the *Header* switch to the *Yes* position to include the table header
with the data rows. If you include the table header, the first row of the
file will contain the column names.
* If you are exporting data, specify the delimiter that will separate the
columns within the target file in the *Delimiter* field. The separating
character can be a colon, semicolon, a vertical bar, or a tab.
* Specify a quoting character used in the *Quote* field. Quoting can be
applied to string columns only (i.e. numeric columns will not be quoted)
or all columns regardless of data type. The character used for quoting can
be a single quote or a double quote.
* Specify a character that should appear before a data character that matches
the *QUOTE* value in the *Escape* field.
* Use the *NULL String* field to specify a string that will represent a null
value within the source or target file.
Click the *Query* tab to continue.
.. image:: images/export_query.png
:alt: Export data using query dialog query tab
:align: center
Use the fields in the *Query* tab to write the query that will be exported:
* Use the *Export Data Query* field to specify a SELECT, VALUES, INSERT, UPDATE,
DELETE, or MERGE command whose results are to be copied.
* Use *Force Quote columns* field to forces quoting to be used for all non-NULL
values in each specified column. NULL output is never quoted. This is a creatable
select control. If you would like to quote all columns then provide only '*' in
the field.
After completing the *Export Data Using Query* dialog, click the *OK* button to
perform the export. pgAdmin will notify you when the background
process completes:
.. image:: images/export_query_complete.png
:alt: Export data using query completion notification
:align: center
Use the *View Processes* button on the notification to open the *Process
Watcher* and review detailed information about the execution of the command
that performed the export:
Use the **End Process** button to end the Export process.
.. image:: images/export_query_pw.png
:alt: Export data using query process watcher
:align: center
.. note:: If you are running *pgAdmin* in *Server Mode* you can click on the |sm_icon| icon in the process watcher window to open the file location in the Storage Manager. You can use the :ref:`Storage Manager <storage_manager>` to download the exported file on the client machine .
.. |sm_icon| image:: images/sm_icon.png
+1 -1
View File
@@ -23,7 +23,7 @@ Use the fields in the *General* tab to identify an extension:
* Use the drop-down listbox in the *Name* field to select the extension. Each
extension must have a unique name.
* Move the switch next to *Cascade?* towards right position to automatically
* Move the switch next to *Cascade?* to the *Yes* position to automatically
install any extensions that this extension depends on that are not already
installed.
* Store notes about the extension in the *Comment* field.
+1 -1
View File
@@ -131,7 +131,7 @@ function. Click the *Add* icon (+) to add each security label selection:
* Specify a security label provider in the *Provider* field. The named provider
must be loaded and must consent to the proposed labeling operation.
* Specify a a security label in the *Security Label* field. The meaning of a
* Specify a security label in the *Security Label* field. The meaning of a
given label is at the discretion of the label provider. PostgreSQL places no
restrictions on whether or how a label provider must interpret security
labels; it merely provides a mechanism for storing them.
+9 -6
View File
@@ -39,8 +39,13 @@ Use the fields in the *Definition* tab to define the function:
* Use the drop-down listbox next to *Return type* to select the data type
returned by the function, if any. If *Custom return type?* is enabled this field
will change to an input text field.
* Move the *Returns a set?* switch to indicate if the function returns a set
that includes multiple rows. The default is *No*.
* Use the drop-down listbox next to *Language* to select the implementation
language. The default is *sql*.
* Use the drop-down listbox next to *Depends on extensions* to select the extension that this function
depends on (for example, plpgsql). If set, dropping the extension will automatically drop the
function as well.
* Use the fields in the *Arguments* to define an argument. Click the *Add*
icon (+) to set parameters and values for the argument:
@@ -85,8 +90,6 @@ function:
* *IMMUTABLE* indicates that the function cannot modify the database and
always returns the same result when given the same argument values.
* Move the *Returns a Set?* switch to indicate if the function returns a set
that includes multiple rows. The default is *No*.
* Move the *Strict?* switch to indicate if the function always returns NULL
whenever any of its arguments are NULL. If *Yes*, the function is not executed
when there are NULL arguments; instead a NULL result is assumed
@@ -153,7 +156,7 @@ function. Click the *Add* icon (+) to add each security label selection:
* Specify a security label provider in the *Provider* field. The named provider
must be loaded and must consent to the proposed labeling operation.
* Specify a a security label in the *Security Label* field. The meaning of a
* Specify a security label in the *Security Label* field. The meaning of a
given label is at the discretion of the label provider. PostgreSQL places no
restrictions on whether or how a label provider must interpret security
labels; it merely provides a mechanism for storing them.
@@ -164,7 +167,7 @@ in the *Delete Row* popup.
Click the *SQL* tab to continue.
Your entries in the *Function* dialog generate a generate a SQL command (see an
Your entries in the *Function* dialog generate a SQL command (see an
example below). Use the *SQL* tab for review; revisit or switch tabs to make any
changes to the SQL command.
@@ -178,8 +181,8 @@ the *Function* dialog:
:alt: Function dialog sql tab
:align: center
The example demonstrates creating an *plpgsql* function named *hire_salesmen*. The
function have three columns (p_ename, p_sal and p_comm).
The example demonstrates creating a *plpgsql* function named *hire_salesmen*. The
function has three columns (p_ename, p_sal and p_comm).
* Click the *Info* button (i) to access online help.
* Click the *Save* button to save work.
+1 -1
View File
@@ -46,7 +46,7 @@ Use the fields in the *Privileges Selection* window to grant
privileges. If you grant a privilege WITH GRANT OPTION, the Grantee will have
the right to grant privileges on the object to others. If WITH GRANT OPTION is
subsequently revoked, any role who received access to that object from that
Grantee (directly or through a chain of grants) will lose thier privileges on
Grantee (directly or through a chain of grants) will lose their privileges on
the object.
* Click the *Add* icon (+) to assign a set of privileges.
Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Loaded 100 of 4600 files, more files were not shown because too many files have changed in this diff. Show more