-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File system mapping doesn't apply #2894
Comments
Do you have |
I didn’t have it at first, but after your response, I created it, which was verified with the following command:
However, I’m still getting the same error when running mirrord inside VSCode:
The mapping functionality of mirrord is really useful for testing projects. For example, it helps me test projects that contain relative paths. Also, I have another question: |
I think you understood the mapping feature wrong - mapping is used to replace paths - i.e if you'd like |
Sorry, You may got me wrong. I also expected this completely but seeing your response about existing file in remote, made me confused. So mapping should occur regardless of existing file. But as you can see in output, the error message still contains old path and hence we can conclude mapping is not working correctly. Actually I expect to see following output at least:
This way, I can make sure that mapping is working correctly. Am I correct? |
No - the path replacement happens in the libc level, meaning that your application won't even know that the path was replaced - hence it'd think it actually read from the original path. |
Ah, OK. I didn't imagine such low level replacement👌 I tested some patterns recently:
All of them works successfully except followings:
These two files doesn't exists on pod but all other files exist on pod. So I conclude that replacement occurs only after checking for existence.
By this assumption, besides existing To make sure this behavior, I performed following test too:
If this is expected behavior of |
The mapping feature happens before we decide whether to do a local access or a remote access. |
I expected that too and I prefer to see mappings applied before all other operations and checkings. OK. I'll give you full overview over the problem. Repeat following steps to reproduce the problem: Correct Workflow
Here is my code:
Beautiful! It's working correctly. ProblemNow I continue to reproduce the bug.
And that is the bug. What is expected behavior? I expect to see following output again:
More informationHere is my
Please let me know if you need any other information |
Thank you! I've prioritized it - will update once we get working on it. |
Hi @aviramha, I’ve encountered another issue related to mapping. I decided to mention it here rather than opening a new issue, as I believe both issues may have the same root cause. However, if you feel this should be treated as a separate problem, please let me know, and I’ll open a new issue for it. The problem is that the mapping feature doesn’t seem to support relative paths. If mapping truly happens before any other operations, then we should be able to map relative paths as well. This would be extremely useful, especially when debugging a program that uses relative paths—I can’t convert all relative paths to absolute paths easily. I’ll try to clarify the issue further below. Absolute Paths Mapping
Let's see output:
Amazing! It's working. ProblemHere we continue to produce problem.
And here is output:
Which indicates mapping didn't work. What is expected behavior? Since
Let me know if you need more information. |
Hey, |
Hey, In new version, it seems another problem is introduced too! Now I'm not able to map some paths like |
Can you share the more information about the regression? |
BTW regarding relative mapping - that's not supported - that's a known issue that we haven't prioritised yet. (in general, we don't apply any fs logic to relative paths, since it's trickier than absolute paths.) |
The reproduction steps are the same as before, so please refer to this message for a complete overview of problem. for a complete overview of the problem.
I completely understand your reasoning, and it makes sense. I’d like to suggest adding a note in the relevant documentation about the limitations of mapping relative paths. This could help users avoid potential confusion when working with this feature. |
Bug Description
I struggled with different mappings by
feature.fs.mapping
to see it in action but it don't take effect.According to documentation:
And in other hand:
An example is provided by documentation too:
Steps to Reproduce
Backtrace
No response
mirrord layer logs
No response
mirrord intproxy logs
No response
mirrord agent logs
No response
mirrord config
mirrord CLI version
No response
mirrord-agent version
No response
mirrord-operator version (if relevant)
No response
plugin kind and version (if relevant)
No response
Your operating system and version
6.1.111-1-MANJARO
Local process
/usr/bin/cat: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=f279ce1a7add04b3f8b3f16e4fb89ecbc5d88dfb, for GNU/Linux 4.4.0, stripped
Local process version
ls (GNU coreutils) 9.5
Additional Info
Please let me know if any other information is required.
No response
The text was updated successfully, but these errors were encountered: