Skip to content

test(formatters): remove Hub download from test_read_yaml - #1194

Closed
planetf1 wants to merge 1 commit into
generative-computing:mainfrom
planetf1:fix/1193-pin-revision-in-test-read-yaml
Closed

planetf1 wants to merge 1 commit into
generative-computing:mainfrom
planetf1:fix/1193-pin-revision-in-test-read-yaml

Conversation

@planetf1

@planetf1 planetf1 commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Issue

Fixes #1193

Description

The Hub call at the end of test_read_yaml was out of scope for a test whose docstring says "verify that reading a model's YAML file from disk works". It made the test dependent on HuggingFace Hub availability and caused intermittent CI failures when the Hub ref-resolution API returned 429 — the Hub client couldn't fall back to a local cache because CI has no cached snapshot for the default revision="main" resolution.

Removing those lines makes the test purely disk-based, matching its stated purpose. The Hub download path is already exercised by the test_canned_input combo fixtures when Hub is accessible.

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code was added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Attribution

  • AI coding assistants used

Adding a new component, requirement, sampling strategy, or tool?

  • Component
  • Requirement
  • Sampling Strategy
  • Tool

The Hub download at the end of test_read_yaml is out of scope for a test
whose docstring says "verify that reading a model's YAML file from disk
works". It made the test dependent on HuggingFace Hub availability and
caused intermittent CI failures when the Hub ref-resolution API returned
429. The Hub path is already exercised by test_canned_input combo fixtures
when Hub is accessible.

Closes generative-computing#1193

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
@planetf1
planetf1 force-pushed the fix/1193-pin-revision-in-test-read-yaml branch from a4aafb7 to 4d076e1 Compare June 3, 2026 17:50
@planetf1 planetf1 changed the title test(formatters): pin revision SHA in test_read_yaml to prevent Hub 429 flakes test(formatters): remove Hub download from test_read_yaml Jun 3, 2026
@planetf1

planetf1 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Closing — fixing test_read_yaml alone doesn't improve CI health. When Hub returns 429 on /revision/main, the same error hits all combo fixtures that call _resolve_yaml(), producing 66+ errors regardless. The real fix is making _resolve_yaml() resilient to Hub failures (e.g. pytest.skip on LocalEntryNotFoundError) so the whole suite degrades gracefully when Hub is rate-limited rather than hard-erroring in fixture setup. Tracked in #1193.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_read_yaml flakes with HuggingFace Hub 429 in CI

1 participant