Skip to content

config sub-command output hides secrets#4223

Merged
JohanMabille merged 2 commits into
mamba-org:mainfrom
Klaim:hide-secrets-always
Apr 7, 2026
Merged

config sub-command output hides secrets#4223
JohanMabille merged 2 commits into
mamba-org:mainfrom
Klaim:hide-secrets-always

Conversation

@Klaim

@Klaim Klaim commented Apr 3, 2026

Copy link
Copy Markdown
Member

Description

Output from the (micro) config ... subcommands are now filtered to hide secrets.

Partial fix for #4222
Needed to complete #4202

Type of Change

  • Bugfix
  • Feature / enhancement
  • CI / Documentation
  • Maintenance

Checklist

  • My code follows the general style and conventions of the codebase, ensuring consistency
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have run pre-commit run --all locally in the source folder and confirmed that there are no linter errors.
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes

@github-actions github-actions Bot added the release::bug_fixes For PRs fixing bugs label Apr 3, 2026
@codecov

codecov Bot commented Apr 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.65%. Comparing base (39702c7) to head (38e0239).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
libmamba/src/api/configuration.cpp 0.00% 4 Missing ⚠️
libmamba/src/api/config.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4223      +/-   ##
==========================================
- Coverage   53.65%   53.65%   -0.01%     
==========================================
  Files         239      239              
  Lines       29349    29352       +3     
  Branches     3122     3123       +1     
==========================================
+ Hits        15747    15748       +1     
- Misses      13599    13601       +2     
  Partials        3        3              

☔ 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.

@Klaim Klaim marked this pull request as ready for review April 3, 2026 13:52
{
// Note: this function is intended to get more complex with incoming changes and need to be
// isolated in preparation for these changes.
const std::string dump_text = hide_secrets(config.dump(dump_opts, std::move(dump_names)));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not calling hide_secrets inside the Congifuration::dump method instead? This would allow to continue using operator<< instead of requiring a new free function.

@Klaim Klaim Apr 7, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We could do that, although I was anticipating the need for a new function because of that pr that needs the fix from this pr.

But I can add it only in that pr if you prefer.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah ok, then no need to change anything, let's merge!

@JohanMabille JohanMabille merged commit db8deaf into mamba-org:main Apr 7, 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

release::bug_fixes For PRs fixing bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants