Skip to content

tidy triagebot.toml trigger_files fails on jj git clone unchecked out submodules #139856

Open
@jieyouxu

Description

@jieyouxu

Summary

After jj git clone, tidy's triagebot.toml trigger_files path check can fail on paths pointing to or under unchecked out submodules as jj git clone doesn't currently create empty dirs for unchecked out submodules as jj's submodule support isn't complete yet.

Command used

$ jj git clone [email protected]:rust-lang/rust.git
$ ./x test tidy
Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.05s
Building stage0 tool tidy (x86_64-unknown-linux-gnu)
   Compiling tidy v0.1.0 (/home/wffl/prog/rust-r/src/tools/tidy)
    Finished `release` profile [optimized + debuginfo] target(s) in 1.81s
fmt check
fmt: checked 5937 modified files
hint: if this number seems too high, try running `git fetch origin master`
tidy check
tidy error: triagebot.toml [mentions.*] contains path 'src/tools/cargo' which doesn't exist
tidy error: triagebot.toml [mentions.*] contains path 'src/tools/enzyme' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/doc/book' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/doc/edition-guide' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/doc/embedded-book' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/doc/nomicon' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/doc/reference' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/doc/rust-by-example' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/llvm-project' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/tools/cargo' which doesn't exist
tidy error: triagebot.toml [autolabel.F-autodiff] contains trigger_files path 'src/tools/enzyme' which doesn't exist
some tidy checks failed
Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:00:05

Expected behaviour

Tidy should skip checks on paths within submodules if they are not checked out locally (but do full check in CI).

Actual behaviour

Fails locally on jj git clone.

Bootstrap configuration (bootstrap.toml)

Default

Operating system

Any

HEAD

f3344ef, or any commit after the tidy triagebot.toml trigger_files path check was introduced.

Additional context

These path checks in src/tools/tidy/src/triagebot.rs

if !full_path.exists() {
tidy_error!(
bad,
"triagebot.toml [mentions.*] contains path '{}' which doesn't exist",
clean_path
);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustA-tidyArea: The tidy toolC-external-bugCategory: issue that is caused by bugs in software beyond our controlT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions