Skip to content

object: omit DSNs from SQL initialization errors - #7929

Merged
jiefenghuang merged 3 commits into
mainfrom
fix/sql-storage-error-redaction
Nov 27, 2026
Merged

jiefenghuang merged 3 commits into
mainfrom
fix/sql-storage-error-redaction

Conversation

@myangitzh

@myangitzh myangitzh commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem

SQL object storage initialization errors can print connection strings that contain credentials.

Change

Keep the driver and underlying error when opening SQL storage fails. For PostgreSQL URL parsing failures, keep the parse reason and omit the connection string and any quoted input.

Validation

  • The object storage suite passed with local regression cases loaded through a Go test overlay.
  • With Docker-backed MySQL 8.4 and PostgreSQL 16, juicefs format succeeded with valid settings. Invalid settings still reported their cause, and neither stdout nor stderr contained the test passwords.

@myangitzh
myangitzh requested a review from zxh326 as a code owner November 27, 2026 03:05
@codecov

codecov Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.72%. Comparing base (0d98d56) to head (6c8c67c).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
pkg/object/sql.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #7929       +/-   ##
===========================================
+ Coverage   42.86%   59.72%   +16.86%     
===========================================
  Files         196      196               
  Lines       64965    65154      +189     
===========================================
+ Hits        27845    38913    +11068     
+ Misses      33913    22499    -11414     
- Partials     3207     3742      +535     

☔ View full report in Codecov by Harness.
📢 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.

@jiefenghuang
jiefenghuang merged commit e375c60 into main Nov 27, 2026
6 checks passed
@jiefenghuang
jiefenghuang deleted the fix/sql-storage-error-redaction branch November 27, 2026 08:05
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