Skip to content

Fix an issue where pgAdmin4 app on macOS cannot auto-update while run…#9582

Merged
adityatoshniwal merged 2 commits intopgadmin-org:masterfrom
anilsahoo20:macos_autoupdate
Feb 2, 2026
Merged

Fix an issue where pgAdmin4 app on macOS cannot auto-update while run…#9582
adityatoshniwal merged 2 commits intopgadmin-org:masterfrom
anilsahoo20:macos_autoupdate

Conversation

@anilsahoo20
Copy link
Contributor

@anilsahoo20 anilsahoo20 commented Feb 2, 2026

…ning on a read-only volume even if present in /Applications folder. #9402

Summary by CodeRabbit

  • Chores
    • Updated macOS application category to "Developer Tools"
    • Prevented generation of build cache/bytecode so signed installers are cleaner
    • Adjusted server startup environment to avoid creating Python bytecode files during run-start

…ning on a read-only volume even if present in /Applications folder. pgadmin-org#9402
@coderabbitai
Copy link

coderabbitai bot commented Feb 2, 2026

Walkthrough

Removed a macOS quarantine flag and added an application category in the macOS Info.plist; prevented Python from writing .pyc files during build and runtime; added a purge of pycache and .pyc files before code signing.

Changes

Cohort / File(s) Summary
macOS Info.plist
pkg/mac/Info.plist.in
Deleted LSFileQuarantineEnabled (boolean). Added LSApplicationCategoryType = "public.app-category.developer-tools".
macOS build scripts
pkg/mac/build-functions.sh
In _create_python_env export PYTHONDONTWRITEBYTECODE=1. In _codesign_binaries add purge step to remove __pycache__ directories and *.pyc files and a log message before code signing.
Runtime startup
runtime/src/js/pgadmin.js
In startDesktopMode set environment variable PYTHONDONTWRITEBYTECODE = '1' before starting the server.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is truncated and does not fully convey the PR's main objective of fixing auto-update issues on read-only volumes. Provide the complete PR title. The truncated version prevents accurate assessment of whether it properly summarizes the complete fix being implemented.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@pkg/mac/build-functions.sh`:
- Around line 129-130: Move the export of PYTHONDONTWRITEBYTECODE into the start
of the _create_python_env() function so it is set before any Python commands run
(including ensurepip and pip install); locate the _create_python_env() function
and place the export PYTHONDONTWRITEBYTECODE=1 as the first statement in that
function to prevent generation of __pycache__/.pyc during those steps.

@adityatoshniwal adityatoshniwal merged commit 6000cc0 into pgadmin-org:master Feb 2, 2026
35 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants