Skip to content
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

[Bug]: Running format_test cannot remove timeout/size warnings. #455

Open
polaris-dxz opened this issue Dec 26, 2024 · 0 comments
Open

[Bug]: Running format_test cannot remove timeout/size warnings. #455

polaris-dxz opened this issue Dec 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@polaris-dxz
Copy link

What happened?

When I execute this command, this warning is always prompted. Even adding timeout/size cannot eliminate it.

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:

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

ditto

Any other information?

ditto

@polaris-dxz polaris-dxz added the bug Something isn't working label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant