-
Notifications
You must be signed in to change notification settings - Fork 385
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
[cmd diff] Run names with literal :
in them understood differently than store
and cmd runs
commands
#3535
Comments
/
in them unconditionally attempted as local directory
@whisperity The client thinks that you gave
|
@csordasmarton Ah, thank you. Then it seems local directories do indeed take priority! Would it be possible to implement some sort of an "escape" mechanism here, e.g. first match for Or should I just come up with a better run name generating logic, and add something to my documentation to discourage users from putting |
I think we can support escaping here, similar to this: >>> run_name="my/comple-run\: name:tag_version"
>>> list(map(lambda x: x.replace("\:", ":"), re.split(r"(?<!\\):", run_name)))
['my/comple-run: name', 'tag_version'] |
@csordasmarton Perfect! 😃 Will you have some time to add this small feature, or should I? |
If you have time, please create a PR for it. Also don't forget to add a test case for it 😊 |
/
in them unconditionally attempted as local directory:
in them understood differently than store
and cmd runs
commands
Describe the bug
If the run name is in some way "complex",
cmd diff
constantly reportsNo run names with the given pattern:
. However, the exact same format of run name is accepted bycmd results
(and alsostore
).The complex run-name in question looks like this:
my/complex-run: name
. (Auto-generated from Gituser/repository: branch
format.)CodeChecker version
612b726
To Reproduce
store --name simple-1
store --name simple-2
store --name "my/complex-run: name"
cmd results "my/complex-run: name"
works. ✔️cmd diff --new --basename "simple-1" --newname "simple-2"
works. ✔️cmd diff --new --basename "my/complex-run: name" --newname "simple-1"
doesn't work. ❌Expected behaviour
The run name is accepted, and before pattern-matching(?) or file system traversal, exact string match is done for the remote name. (In addition, if there are BOTH a local directory structure AND a remote run with the same pattern(?), a warning is emitted.)
System
Additional context
The issue appears both when diffing remote to local and remote to remote, and in both directions.
If I make a directory locally, and execute
diff
, it will pick the directory up as the local run. That is, if the following directory structure appears locally (even if empty) ...... then all the remote findings will be regarded as
--new
, and reported.I tried escaping most of the suspicious characters in the run name, i.e.
"my\/complex-run: name"
,"my\/complex\-run\:\ name"
, and various other combinations of escape, but had no luck.The exact error message is a bit misleading, I had to have the hunch to try making a directory, because the following relevant lines are printed, even with
--verbose debug
.It does not even say that it is trying to find local directory structures.
The text was updated successfully, but these errors were encountered: