Skip to content

Conversation

@tommady
Copy link
Contributor

@tommady tommady commented May 18, 2025

close #825

tommady added 4 commits May 18, 2025 06:00
Signed-off-by: tommady <[email protected]>
Signed-off-by: tommady <[email protected]>
@marcospb19
Copy link
Member

marcospb19 commented Jun 28, 2025

Hey, apologies for the huge delay, I'm back from a break. This is marked as a draft, is it ready for review now? :)

@tommady
Copy link
Contributor Author

tommady commented Jun 28, 2025

Hey, apologies for the huge delay, I'm back from a break. This is marked as a draft, is it ready for review now? :)

Hey, I am sorry, I forgot this draft PR...
After reading my last work, I recall the problem I was trying to solve.

As you can see, the integration test changes,
I followed the issue, but the integration test cannot be reproduced when you undo the other changes I made.

I'll commit to identifying the problem if the words cannot be clearly understood.

@tommady
Copy link
Contributor Author

tommady commented Jun 28, 2025

ok, right now ignore the Clippy error, the updated test case passed...

test unpack_multiple_sources_into_the_same_destination_with_merge ... ok

And I am confused.

@marcospb19
Copy link
Member

Hah, did you expect it to fail but it's passing?

I triggered a re-run just in case 👀

@marcospb19
Copy link
Member

Do you get the same error when running locally? #798 (comment)

@tommady
Copy link
Contributor Author

tommady commented Jul 3, 2025

Do you get the same error when running locally? #798 (comment)

Yes, I can reproduce it locally, even:

  1. sudo
  2. under tmp folder

But the integration test cannot simulate this issue

@marcospb19
Copy link
Member

But the integration test cannot simulate this issue

@tommady I figured the tests don't cover this bug because the bug itself only happens when the --dir or -d flag is not present, and all the tests rely on this -d flag so that it doesn't pollute the current dir with test artifacts, but instead, write them to /tmp.

Unfortunately, due to the way cargo test runner works, we also can't use std::env::set_current_dir to avoid this.

So there are 2 ways forward I can think of:

  1. Not having tests that cover this specific bug when -d is not present.
  2. Accepting test artifacts to current folder.

I'm fine with 1 I guess, what do you think?

@tommady
Copy link
Contributor Author

tommady commented Jul 16, 2025

But the integration test cannot simulate this issue

@tommady I figured the tests don't cover this bug because the bug itself only happens when the --dir or -d flag is not present, and all the tests rely on this -d flag so that it doesn't pollute the current dir with test artifacts, but instead, write them to /tmp.

Unfortunately, due to the way cargo test runner works, we also can't use std::env::set_current_dir to avoid this.

So there are 2 ways forward I can think of:

  1. Not having tests that cover this specific bug when -d is not present.
  2. Accepting test artifacts to current folder.

I'm fine with 1 I guess, what do you think?

interesting.
anyway thanks for your explanation
now I see this issue more clearly, thanks!

I'll try to do the option 1
thanks.

@tommady tommady changed the title Fix Unpacking with merge flag failed Fix Unpacking with merge flag failed without --dir flag Jul 16, 2025
Signed-off-by: tommady <[email protected]>
@tommady tommady marked this pull request as ready for review July 16, 2025 11:59
@tommady
Copy link
Contributor Author

tommady commented Jul 24, 2025

hi @marcospb19
could you kindly do a review while you have time?
thanks.

Signed-off-by: tommady <[email protected]>
Copy link
Member

@marcospb19 marcospb19 left a comment

Choose a reason for hiding this comment

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

Great! Thanks for sticking to this, really appreciate it.

@marcospb19 marcospb19 merged commit aeb27cc into ouch-org:main Jul 27, 2025
16 checks passed
@tommady tommady deleted the close-issue-825 branch July 28, 2025 01:51
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.

Unpacking with merge flag failed without --dir flag

2 participants