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

Make PRs changing pyproject.toml neutral for breeze tests #37314

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 15 additions & 12 deletions dev/breeze/tests/test_selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
ALL_DOCS_SELECTED_FOR_BUILD = ""
ALL_PROVIDERS_AFFECTED = ""

# commit that is neutral - allows to keep pyproject.toml-changing PRS neutral for unit tests
NEUTRAL_COMMIT = "938f0c1f3cc4cbe867123ee8aa9f290f9f18100a"


def escape_ansi_colors(line):
return ANSI_COLORS_MATCHER.sub("", line)
Expand Down Expand Up @@ -587,7 +590,7 @@ def test_expected_output_pull_request_main(
):
stderr = SelectiveChecks(
files=files,
commit_ref="HEAD",
commit_ref=NEUTRAL_COMMIT,
github_event=GithubEvents.PULL_REQUEST,
pr_labels=(),
default_branch="main",
Expand Down Expand Up @@ -687,7 +690,7 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
stderr = SelectiveChecks(
files=files,
github_event=GithubEvents.PULL_REQUEST,
commit_ref="HEAD",
commit_ref=NEUTRAL_COMMIT,
default_branch="main",
)
assert_outputs_are_printed(expected_outputs, str(stderr))
Expand Down Expand Up @@ -819,7 +822,7 @@ def test_expected_output_full_tests_needed(
):
stderr = SelectiveChecks(
files=files,
commit_ref="HEAD",
commit_ref=NEUTRAL_COMMIT,
github_event=GithubEvents.PULL_REQUEST,
pr_labels=pr_labels,
default_branch=default_branch,
Expand Down Expand Up @@ -942,7 +945,7 @@ def test_expected_output_pull_request_v2_7(
):
stderr = SelectiveChecks(
files=files,
commit_ref="HEAD",
commit_ref=NEUTRAL_COMMIT,
github_event=GithubEvents.PULL_REQUEST,
pr_labels=(),
default_branch="v2-7-stable",
Expand Down Expand Up @@ -1110,7 +1113,7 @@ def test_expected_output_pull_request_target(
):
stderr = SelectiveChecks(
files=files,
commit_ref="HEAD",
commit_ref=NEUTRAL_COMMIT,
github_event=GithubEvents.PULL_REQUEST_TARGET,
pr_labels=(),
default_branch="main",
Expand Down Expand Up @@ -1199,7 +1202,7 @@ def test_expected_output_push(
):
stderr = SelectiveChecks(
files=files,
commit_ref="HEAD",
commit_ref=NEUTRAL_COMMIT,
github_event=GithubEvents.PUSH,
pr_labels=pr_labels,
default_branch=default_branch,
Expand Down Expand Up @@ -1436,7 +1439,7 @@ def test_upgrade_to_newer_dependencies(
def test_docs_filter(files: tuple[str, ...], expected_outputs: dict[str, str]):
stderr = SelectiveChecks(
files=files,
commit_ref="HEAD",
commit_ref=NEUTRAL_COMMIT,
github_event=GithubEvents.PULL_REQUEST,
pr_labels=(),
default_branch="main",
Expand All @@ -1461,7 +1464,7 @@ def test_docs_filter(files: tuple[str, ...], expected_outputs: dict[str, str]):
def test_helm_tests_trigger_ci_build(files: tuple[str, ...], expected_outputs: dict[str, str]):
stderr = SelectiveChecks(
files=files,
commit_ref="HEAD",
commit_ref=NEUTRAL_COMMIT,
github_event=GithubEvents.PULL_REQUEST,
pr_labels=(),
default_branch="main",
Expand Down Expand Up @@ -1708,7 +1711,7 @@ def test_has_migrations(files: tuple[str, ...], has_migrations: bool):
stderr = str(
SelectiveChecks(
files=files,
commit_ref="HEAD",
commit_ref=NEUTRAL_COMMIT,
github_event=GithubEvents.PULL_REQUEST,
default_branch="main",
)
Expand Down Expand Up @@ -1742,7 +1745,7 @@ def test_has_migrations(files: tuple[str, ...], has_migrations: bool):
def test_provider_compatibility_checks(labels: tuple[str, ...], expected_outputs: dict[str, str]):
stderr = SelectiveChecks(
files=(),
commit_ref="HEAD",
commit_ref=NEUTRAL_COMMIT,
github_event=GithubEvents.PULL_REQUEST,
pr_labels=labels,
default_branch="main",
Expand Down Expand Up @@ -1830,7 +1833,7 @@ def test_mypy_matches(
):
stderr = SelectiveChecks(
files=files,
commit_ref="HEAD",
commit_ref=NEUTRAL_COMMIT,
default_branch=default_branch,
github_event=GithubEvents.PULL_REQUEST,
pr_labels=pr_labels,
Expand Down Expand Up @@ -1878,7 +1881,7 @@ def test_pr_labels(
):
stderr = SelectiveChecks(
files=files,
commit_ref="HEAD",
commit_ref=NEUTRAL_COMMIT,
default_branch="main",
github_actor=github_actor,
github_event=GithubEvents.PULL_REQUEST,
Expand Down