Fix/orion change detector subproject path normalization#2038
Conversation
Signed-off-by: jackieismpc <jackieismpc@gmail.com>
Signed-off-by: jackieismpc <jackieismpc@gmail.com>
Signed-off-by: jackieismpc <jackieismpc@gmail.com>
Signed-off-by: jackieismpc <jackieismpc@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c7ed15251f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
orion/src/buck_controller.rs
Outdated
| if raw_path == repo_prefix || raw_path.starts_with(&format!("{repo_prefix}/")) { | ||
| return ProjectRelativePath::new(raw_path); | ||
| } | ||
|
|
||
| ProjectRelativePath::new(&format!("{repo_prefix}/{raw_path}")) |
There was a problem hiding this comment.
Preserve non-subproject paths during normalization
When repo_prefix is set, this branch unconditionally rewrites any path not already under that prefix to "{repo_prefix}/{raw_path}". That breaks commits containing monorepo-relative changes outside the selected subproject (for example, shared code like common/lib.rs while building jupiter/callisto), because the rewritten path no longer points to the real changed file and target discovery can miss required rebuilds. Since upstream change lists are monorepo-relative and not guaranteed to be pre-filtered to the repo prefix, this should not blindly prefix every non-matching path.
Useful? React with 👍 / 👎.
Signed-off-by: jackieismpc <jackieismpc@gmail.com>
Signed-off-by: jackieismpc <jackieismpc@gmail.com>
b3bac43
#2037
1.新增了测试以覆盖changes路径检测
2.对路径做了兼容性修复