Skip to content

fix: support postgressql access via docker exec when psql client not installed#11512

Open
lakshmimsft wants to merge 2 commits intomainfrom
lakshmimsft/upddebugfordockerpostgressel
Open

fix: support postgressql access via docker exec when psql client not installed#11512
lakshmimsft wants to merge 2 commits intomainfrom
lakshmimsft/upddebugfordockerpostgressel

Conversation

@lakshmimsft
Copy link
Copy Markdown
Contributor

Description

This pull request updates development tooling for PostgreSQL by enhancing the logic for detecting and interacting with PostgreSQL, whether running locally or in Docker. It also refactors and consolidates database initialization and cleanup routines. The changes ensure that both the start-radius.sh and stop-radius.sh scripts, as well as the Makefile prerequisites check, can handle setups where either the psql client or a Dockerized PostgreSQL instance is present.

Type of change

  • This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional).

Contributor checklist

Please verify that the PR meets the following requirements, where applicable:

  • An overview of proposed schema changes is included in a linked GitHub issue.
    • Yes
    • Not applicable
  • A design document PR is created in the design-notes repository, if new APIs are being introduced.
    • Yes
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Yes
    • Not applicable
  • A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
    • Yes
    • Not applicable
  • A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.
    • Yes
    • Not applicable

@lakshmimsft lakshmimsft requested a review from sylvainsf March 25, 2026 23:46
@lakshmimsft lakshmimsft requested a deployment to external-contributor-approval March 25, 2026 23:46 — with GitHub Actions Waiting
@lakshmimsft lakshmimsft changed the title local debug update: support postgressql access via docker exec when psql client not installed fix: support postgressql access via docker exec when psql client not installed Mar 25, 2026
…lled

Signed-off-by: lakshmimsft <ljavadekar@microsoft.com>
@lakshmimsft lakshmimsft force-pushed the lakshmimsft/upddebugfordockerpostgressel branch from 9dc113d to 9f685f3 Compare March 25, 2026 23:49
@lakshmimsft lakshmimsft requested a deployment to external-contributor-approval March 25, 2026 23:49 — with GitHub Actions Waiting
@lakshmimsft lakshmimsft marked this pull request as ready for review March 25, 2026 23:53
@lakshmimsft lakshmimsft requested review from a team as code owners March 25, 2026 23:53
Copilot AI review requested due to automatic review settings March 25, 2026 23:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Radius debug/development tooling to work when the local psql client is missing by falling back to docker exec against a running radius-postgres container, and refactors DB init/cleanup logic to be more centralized.

Changes:

  • Add docker exec fallback paths for PostgreSQL command execution in start-radius.sh and stop-radius.sh.
  • Refactor start-radius.sh DB initialization into a reusable init_db_tables helper.
  • Relax debug-check-prereqs to accept Dockerized PostgreSQL when psql is not installed.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
build/scripts/stop-radius.sh Adds docker exec fallback for DB cleanup when psql is unavailable.
build/scripts/start-radius.sh Adds docker exec fallback for DB init/connectivity detection; consolidates table creation.
build/debug.mk Updates prereq checks to allow Dockerized PostgreSQL when psql is absent.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 26, 2026

Unit Tests

    2 files  ±0    415 suites  ±0   6m 44s ⏱️ ±0s
4 862 tests ±0  4 860 ✅ ±0  2 💤 ±0  0 ❌ ±0 
5 764 runs  ±0  5 762 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit 99bb507. ± Comparison against base commit 1506c2f.

♻️ This comment has been updated with latest results.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.23%. Comparing base (1506c2f) to head (99bb507).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11512      +/-   ##
==========================================
+ Coverage   51.21%   51.23%   +0.02%     
==========================================
  Files         699      699              
  Lines       44050    44050              
==========================================
+ Hits        22560    22570      +10     
+ Misses      19330    19325       -5     
+ Partials     2160     2155       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lakshmimsft lakshmimsft requested a deployment to external-contributor-approval March 26, 2026 00:20 — with GitHub Actions Waiting
Signed-off-by: lakshmimsft <ljavadekar@microsoft.com>
@lakshmimsft lakshmimsft force-pushed the lakshmimsft/upddebugfordockerpostgressel branch from cf3c4fa to 99bb507 Compare March 26, 2026 02:53
@lakshmimsft lakshmimsft temporarily deployed to external-contributor-approval March 26, 2026 02:53 — with GitHub Actions Inactive
@radius-functional-tests
Copy link
Copy Markdown

radius-functional-tests bot commented Mar 26, 2026

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository radius-project/radius
Commit ref 99bb507
Unique ID func39a8e87d65
Image tag pr-func39a8e87d65
  • gotestsum 1.13.0
  • KinD: v0.29.0
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func39a8e87d65
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func39a8e87d65
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func39a8e87d65
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func39a8e87d65
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func39a8e87d65
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

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