Skip to content

Handle pre/post-link/unlink scripts#4313

Merged
Hind-M merged 9 commits into
mamba-org:mainfrom
Hind-M:fix_link_4310
Jun 23, 2026
Merged

Handle pre/post-link/unlink scripts#4313
Hind-M merged 9 commits into
mamba-org:mainfrom
Hind-M:fix_link_4310

Conversation

@Hind-M

@Hind-M Hind-M commented Jun 11, 2026

Copy link
Copy Markdown
Member

Description

Fix #4310
Fix #3761

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 Jun 11, 2026
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.08%. Comparing base (041e86d) to head (f434523).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
libmamba/src/core/transaction.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4313      +/-   ##
==========================================
+ Coverage   54.58%   55.08%   +0.49%     
==========================================
  Files         240      240              
  Lines       30257    30282      +25     
  Branches     3234     3235       +1     
==========================================
+ Hits        16516    16680     +164     
+ Misses      13738    13599     -139     
  Partials        3        3              

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

@Hind-M Hind-M force-pushed the fix_link_4310 branch 2 times, most recently from accf79a to dc69ae7 Compare June 12, 2026 09:09
@Hind-M Hind-M marked this pull request as ready for review June 15, 2026 07:53
Comment thread libmamba/src/core/link.cpp Outdated
Comment thread libmamba/src/core/transaction.cpp
Comment thread libmamba/src/core/link.cpp

@jjerphan jjerphan left a comment

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.

Thank you.

I think that we might need to think of ways for users to opt-out of warnings (which will be annoying for them) and from this new behavior.

Comment thread libmamba/src/core/link.cpp
Comment thread libmamba/src/core/link.cpp
@Hind-M

Hind-M commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

I think that we might need to think of ways for users to opt-out of warnings (which will be annoying for them) and from this new behavior.

Yes I was thinking about that too as they do in Pixi, I think we can add a way to opt-out the scripts execution and in that case not print the warnings. I can do that in a follow-up PR.

@Hind-M Hind-M force-pushed the fix_link_4310 branch 2 times, most recently from 1e53c5a to 8988038 Compare June 17, 2026 07:56
@Hind-M Hind-M mentioned this pull request Jun 18, 2026
11 tasks
Comment thread libmamba/src/core/transaction.cpp Outdated

@Klaim Klaim left a comment

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.

LGTM, my comments are mostly minor improvements, notes and questions which answers probably wont change the validity.

Comment thread libmamba/tests/src/core/test_link_scripts.cpp
Comment thread libmamba/tests/src/core/test_link_scripts.cpp
Comment thread micromamba/tests/test_create.py
Comment thread libmamba/src/core/link.cpp
Comment thread libmamba/src/core/link.cpp
@Hind-M Hind-M merged commit a9f8e6b into mamba-org:main Jun 23, 2026
36 checks passed
@Hind-M Hind-M deleted the fix_link_4310 branch June 23, 2026 10:14
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.

Handle linking scripts correctly in mamba run_script not called for pre-unlink scripts

4 participants