Skip to content

GH-50041: [CI][Python] Make test_string_to_tzinfo_pytz_fallback more robust for platforms supporting lower case tz names#50042

Merged
raulcd merged 1 commit into
apache:mainfrom
jorisvandenbossche:gh-50041-fixup-zoneinfo-fallback-test
May 26, 2026
Merged

GH-50041: [CI][Python] Make test_string_to_tzinfo_pytz_fallback more robust for platforms supporting lower case tz names#50042
raulcd merged 1 commit into
apache:mainfrom
jorisvandenbossche:gh-50041-fixup-zoneinfo-fallback-test

Conversation

@jorisvandenbossche
Copy link
Copy Markdown
Member

@jorisvandenbossche jorisvandenbossche commented May 26, 2026

Rationale for this change

Fix failing test on CI as reported in #50041, for a test added in #49694

What changes are included in this PR?

The test relies on the lower case "europe/brussels" time zone name not being recognized by zoneinfo (and it generally is by pytz). But apparently on some platforms, zoneinfo does accept this. Updating the test to first test this, and thus skip the test dynamically.

… more robust for platforms supporting lower case tz names
Copilot AI review requested due to automatic review settings May 26, 2026 09:56
@github-actions github-actions Bot added the awaiting committer review Awaiting committer review label May 26, 2026
@github-actions
Copy link
Copy Markdown

⚠️ GitHub issue #50041 has been automatically assigned in GitHub to PR creator.

@jorisvandenbossche
Copy link
Copy Markdown
Member Author

@github-actions crossbow submit -g verify-rc-source

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a flaky test by dynamically skipping test_string_to_tzinfo_pytz_fallback on platforms where zoneinfo recognizes lower-case timezone names (e.g., Windows in some configurations), instead of only skipping on macOS.

Changes:

  • Removed the static sys.platform == 'darwin' skip marker.
  • Added a runtime probe that attempts zoneinfo.ZoneInfo("europe/brussels") and skips the test if it succeeds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown

Revision: 3679dfb

Submitted crossbow builds: ursacomputing/crossbow @ actions-0d37d07d55

Task Status
verify-rc-source-cpp-linux-almalinux-10-amd64 GitHub Actions
verify-rc-source-cpp-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-cpp-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-cpp-linux-ubuntu-24.04-amd64 GitHub Actions
verify-rc-source-cpp-macos-amd64 GitHub Actions
verify-rc-source-cpp-macos-arm64 GitHub Actions
verify-rc-source-cpp-macos-conda-amd64 GitHub Actions
verify-rc-source-integration-linux-almalinux-10-amd64 GitHub Actions
verify-rc-source-integration-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-integration-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-integration-linux-ubuntu-24.04-amd64 GitHub Actions
verify-rc-source-integration-macos-amd64 GitHub Actions
verify-rc-source-integration-macos-arm64 GitHub Actions
verify-rc-source-integration-macos-conda-amd64 GitHub Actions
verify-rc-source-python-linux-almalinux-10-amd64 GitHub Actions
verify-rc-source-python-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-python-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-python-linux-ubuntu-24.04-amd64 GitHub Actions
verify-rc-source-python-macos-amd64 GitHub Actions
verify-rc-source-python-macos-arm64 GitHub Actions
verify-rc-source-python-macos-conda-amd64 GitHub Actions
verify-rc-source-ruby-linux-almalinux-10-amd64 GitHub Actions
verify-rc-source-ruby-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-ruby-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-ruby-linux-ubuntu-24.04-amd64 GitHub Actions
verify-rc-source-ruby-macos-amd64 GitHub Actions
verify-rc-source-ruby-macos-arm64 GitHub Actions
verify-rc-source-windows GitHub Actions

Copy link
Copy Markdown
Member

@AlenkaF AlenkaF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jorisvandenbossche
Copy link
Copy Markdown
Member Author

@raulcd the verify-rc-source-windows is failing here, but for other reasons? (and I assume the python tests have not yet run there, to be able to validate this PR fixes the failure)

@raulcd
Copy link
Copy Markdown
Member

raulcd commented May 26, 2026

@raulcd the verify-rc-source-windows is failing here, but for other reasons? (and I assume the python tests have not yet run there, to be able to validate this PR fixes the failure)

Yes, the failing test has not run yet. I am unsure why but it is timing out. I am re-running just to validate it wasn't a transient issue. If it fails again we can temporarily increase the timeout to validate test passes and I can investigate the timing issues independently.

Copy link
Copy Markdown
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@raulcd
Copy link
Copy Markdown
Member

raulcd commented May 26, 2026

This was successful on retry, I am merging

@raulcd raulcd merged commit 50eb001 into apache:main May 26, 2026
16 of 17 checks passed
@raulcd raulcd removed the awaiting committer review Awaiting committer review label May 26, 2026
@github-actions github-actions Bot added the awaiting merge Awaiting merge label May 26, 2026
@conbench-apache-arrow
Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 50eb001.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants