mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 06:41:23 +00:00
[ty] Remove py-fuzzer skips for seeds that are no longer slow (#19906)
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / Fuzz for new ty panics (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / check playground (push) Blocked by required conditions
CI / benchmarks-instrumented (push) Blocked by required conditions
CI / benchmarks-walltime (push) Blocked by required conditions
[ty Playground] Release / publish (push) Waiting to run
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / Fuzz for new ty panics (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / check playground (push) Blocked by required conditions
CI / benchmarks-instrumented (push) Blocked by required conditions
CI / benchmarks-walltime (push) Blocked by required conditions
[ty Playground] Release / publish (push) Waiting to run
This commit is contained in:
parent
5a570c8e6d
commit
d324cedfc2
2 changed files with 18 additions and 9 deletions
20
.github/workflows/ci.yaml
vendored
20
.github/workflows/ci.yaml
vendored
|
@ -38,7 +38,8 @@ jobs:
|
||||||
fuzz: ${{ steps.check_fuzzer.outputs.changed }}
|
fuzz: ${{ steps.check_fuzzer.outputs.changed }}
|
||||||
# Flag that is set to "true" when code related to ty changes.
|
# Flag that is set to "true" when code related to ty changes.
|
||||||
ty: ${{ steps.check_ty.outputs.changed }}
|
ty: ${{ steps.check_ty.outputs.changed }}
|
||||||
|
# Flag that is set to "true" when code related to the py-fuzzer folder changes.
|
||||||
|
py-fuzzer: ${{ steps.check_py_fuzzer.outputs.changed }}
|
||||||
# Flag that is set to "true" when code related to the playground changes.
|
# Flag that is set to "true" when code related to the playground changes.
|
||||||
playground: ${{ steps.check_playground.outputs.changed }}
|
playground: ${{ steps.check_playground.outputs.changed }}
|
||||||
steps:
|
steps:
|
||||||
|
@ -68,7 +69,6 @@ jobs:
|
||||||
':crates/ruff_text_size/**' \
|
':crates/ruff_text_size/**' \
|
||||||
':crates/ruff_python_ast/**' \
|
':crates/ruff_python_ast/**' \
|
||||||
':crates/ruff_python_parser/**' \
|
':crates/ruff_python_parser/**' \
|
||||||
':python/py-fuzzer/**' \
|
|
||||||
':.github/workflows/ci.yaml' \
|
':.github/workflows/ci.yaml' \
|
||||||
; then
|
; then
|
||||||
echo "changed=false" >> "$GITHUB_OUTPUT"
|
echo "changed=false" >> "$GITHUB_OUTPUT"
|
||||||
|
@ -138,6 +138,18 @@ jobs:
|
||||||
echo "changed=true" >> "$GITHUB_OUTPUT"
|
echo "changed=true" >> "$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Check if the py-fuzzer code changed
|
||||||
|
id: check_py_fuzzer
|
||||||
|
env:
|
||||||
|
MERGE_BASE: ${{ steps.merge_base.outputs.sha }}
|
||||||
|
run: |
|
||||||
|
if git diff --quiet "${MERGE_BASE}...HEAD" -- 'python/py_fuzzer/**' \
|
||||||
|
; then
|
||||||
|
echo "changed=false" >> "$GITHUB_OUTPUT"
|
||||||
|
else
|
||||||
|
echo "changed=true" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Check if there was any code related change
|
- name: Check if there was any code related change
|
||||||
id: check_code
|
id: check_code
|
||||||
env:
|
env:
|
||||||
|
@ -443,7 +455,7 @@ jobs:
|
||||||
needs:
|
needs:
|
||||||
- cargo-test-linux
|
- cargo-test-linux
|
||||||
- determine_changes
|
- determine_changes
|
||||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && needs.determine_changes.outputs.parser == 'true' }}
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.parser == 'true' || needs.determine_changes.outputs.py-fuzzer == 'true') }}
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
env:
|
env:
|
||||||
FORCE_COLOR: 1
|
FORCE_COLOR: 1
|
||||||
|
@ -633,7 +645,7 @@ jobs:
|
||||||
- cargo-test-linux
|
- cargo-test-linux
|
||||||
- determine_changes
|
- determine_changes
|
||||||
# Only runs on pull requests, since that is the only we way we can find the base version for comparison.
|
# Only runs on pull requests, since that is the only we way we can find the base version for comparison.
|
||||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && github.event_name == 'pull_request' && needs.determine_changes.outputs.ty == 'true' }}
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && github.event_name == 'pull_request' && (needs.determine_changes.outputs.ty == 'true' || needs.determine_changes.outputs.py-fuzzer == 'true') }}
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
|
@ -152,16 +152,13 @@ class FuzzResult:
|
||||||
|
|
||||||
def fuzz_code(seed: Seed, args: ResolvedCliArgs) -> FuzzResult:
|
def fuzz_code(seed: Seed, args: ResolvedCliArgs) -> FuzzResult:
|
||||||
"""Return a `FuzzResult` instance describing the fuzzing result from this seed."""
|
"""Return a `FuzzResult` instance describing the fuzzing result from this seed."""
|
||||||
# TODO(carljm) remove once we debug the slowness of these seeds
|
|
||||||
skip_check = seed in {120, 160, 314, 335}
|
|
||||||
|
|
||||||
code = generate_random_code(seed)
|
code = generate_random_code(seed)
|
||||||
bug_found = False
|
bug_found = False
|
||||||
minimizer_callback: Callable[[str], bool] | None = None
|
minimizer_callback: Callable[[str], bool] | None = None
|
||||||
|
|
||||||
if args.baseline_executable_path is None:
|
if args.baseline_executable_path is None:
|
||||||
only_new_bugs = False
|
only_new_bugs = False
|
||||||
if not skip_check and contains_bug(
|
if contains_bug(
|
||||||
code, executable=args.executable, executable_path=args.test_executable_path
|
code, executable=args.executable, executable_path=args.test_executable_path
|
||||||
):
|
):
|
||||||
bug_found = True
|
bug_found = True
|
||||||
|
@ -172,7 +169,7 @@ def fuzz_code(seed: Seed, args: ResolvedCliArgs) -> FuzzResult:
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
only_new_bugs = True
|
only_new_bugs = True
|
||||||
if not skip_check and contains_new_bug(
|
if contains_new_bug(
|
||||||
code,
|
code,
|
||||||
executable=args.executable,
|
executable=args.executable,
|
||||||
test_executable_path=args.test_executable_path,
|
test_executable_path=args.test_executable_path,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue