aspect-build / aspect-build/rules_lint
[Bug]: Running `format_test` cannot remove timeout/size warnings.
- Dominant language
- Starlark
- Stars
- 154
- Forks
- 125
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 20
Description
### What happened?
When I execute this command, this warning is always prompted. Even adding timeout/size cannot eliminate it.
```bash
bazel test //tools/build_defs/format:format_test --test_output=errors
Another command (pid=208261) is running. Waiting for it to complete on the server (server_pid=133468)...
INFO: Invocation ID: bd2d69ae-9f30-4f7e-9054-308516f71a85
INFO: Analyzed target //tools/build_defs/format:format_test_JavaScript_with_prettier (0 packages loaded, 3 targets configured).
INFO: Found 1 test target...
Target //tools/build_defs/format:format_test_JavaScript_with_prettier up-to-date:
bazel-bin/tools/build_defs/format/format_test_JavaScript_with_prettier
INFO: Elapsed time: 5.367s, Critical Path: 1.10s
INFO: 2 processes: 2 local.
INFO: Build completed successfully, 2 total actions
//tools/build_defs/format:format_test_JavaScript_with_prettier PASSED in 1.1s
WARNING: //tools/build_defs/format:format_test_JavaScript_with_prettier: Test execution time (1.1s excluding execution overhead) outside of range for MODERATE tests. Consider setting timeout="short" or size="small".
Executed 1 out of 1 test: 1 test passes.
```
### Version
Development (host) and target OS/architectures: ubunto
Output of `bazel --version`: 6.5.0
Version of the Aspect rules, or other relevant rules from your
`WORKSPACE` or `MODULE.bazel` file:
Language(s) and/or frameworks involved:
```python
load(
"@aspect_rules_lint//format:defs.bzl",
"format_multirun",
"format_test",
)
load("@npm//:prettier/package_json.bzl", prettier = "bin")
package(default_visibility = ["//:__subpackages__"])
prettier.prettier_binary(
name = "prettier",
# Include this js_library and its dependencies in the runfiles
# (runtime dependencies)
data = ["//:prettierrc"],
# Allow the binary to be run outside bazel
env = {"BAZEL_BINDIR": "."},
fixed_args = [
# `require` statements in the config file will be
# resolved relative to its location. Therefore, to
# make it hermetic, prettier must be pointed at the
# copy of the config file in the runfiles folder
# rather than the one in the source folder.
"--config=\"$$JS_BINARY__RUNFILES\"/$(rlocationpath //:prettierrc)",
# default log level is "log" which spams on success
# https://prettier.io/docs/en/cli.html#--log-level
"--log-level=warn",
# Ignore symbolic link files because Prettier 3.x explicitly
# refuses to format paths that are symbolic links. This behavior
# change was introduced to prevent potential issues with path
# handling. For more details, see:
# https://github.com/prettier/prettier/issues/15843
"--no-error-on-unmatched-pattern",
],
)
format_multirun(
name = "format",
css = ":prettier",
html = ":prettier",
javascript = ":prettier",
visibility = ["//:__pkg__"],
)
format_test(
name = "format_test",
size = "small",
timeout = "short",
javascript = ":prettier",
no_sandbox = True,
workspace = "//:WORKSPACE",
)
```
### How to reproduce
```shell
ditto
```
### Any other information?
ditto
Contributor guide
Assessment
This issue has not been assessed yet.