Skip to content

fix E2E space tests#485

Open
abidlabs wants to merge 5 commits intomainfrom
ci/e2e-spaces-faster-timeouts
Open

fix E2E space tests#485
abidlabs wants to merge 5 commits intomainfrom
ci/e2e-spaces-faster-timeouts

Conversation

@abidlabs
Copy link
Copy Markdown
Member

@abidlabs abidlabs commented Apr 10, 2026

Short description

Hardens tests/e2e-spaces/test_sync_and_freeze.py so CI and local runs do not hit invalid Hub ids or wrong-org buckets:

  • Hub-safe suffixes: ephemeral static/frozen Space names use secrets.token_hex(8) instead of token_urlsafe, so repo ids never contain -- or .. (which the Hub rejects).
  • Consistent namespace: new ephemeral Spaces are created as {namespace}/trackio-test-static-… and …-frozen-… where namespace comes from TEST_SPACE_ID when it is qualified (org/name), or from utils._get_default_namespace() (token / whoami) when TEST_SPACE_ID is an unqualified repo name—matching preprocess_space_and_dataset_ids behavior.

AI Disclosure

  • I used AI to help draft the test edits and PR description; changes were reviewed locally.
  • I did not use AI

Type of Change

  • Bug fix
  • New feature (non-breaking)
  • New feature (breaking change)
  • Documentation update
  • Test improvements

Related Issues

Closes: n/a (e2e reliability)

Testing and linting

  • ruff check tests/e2e-spaces/ and ruff format tests/e2e-spaces/
  • Spaces e2e still requires TEST_SPACE_ID and Hub auth (HF_TOKEN or CLI login).

- Remove test_config_persisted_on_spaces
- Shorten polling/timeouts in conftest and metrics restart tests
- Tighten _predict_run_summary and system-metrics waits
- Namespaced ephemeral static/frozen Space IDs under TEST_SPACE_ID org
- Reduce force_sync sleep before freeze

Made-with: Cursor
@gradio-pr-bot
Copy link
Copy Markdown
Contributor

gradio-pr-bot commented Apr 10, 2026

🪼 branch checks and previews

Name Status URL
🦄 Changes detected! Details

@gradio-pr-bot
Copy link
Copy Markdown
Contributor

🦄 no changes detected

This Pull Request does not include changes to any packages.

__No changes detected. __



‼️ Changeset not approved. Ensure the version bump is appropriate for all packages before approving.

  • Maintainers can approve the changeset by checking this checkbox.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can create the changelog file directly.

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

HuggingFaceDocBuilderDev commented Apr 10, 2026

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview

Install Trackio from this PR (includes built frontend)

pip install "https://huggingface.co/buckets/trackio/trackio-wheels/resolve/71e10acb95fa6b0989bea63bd6cee889993f87a1/trackio-0.21.2-py3-none-any.whl"

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Replace 32x1000 parallel stress with 4x50 smoke; reduce burst 2000 -> 400.
Tighter polling in parallel verification loop.

Made-with: Cursor
Removing concurrent runs avoids Space contention; 120 logs caps /get_metric_values payload.

Made-with: Cursor
@abidlabs abidlabs changed the title ci: faster e2e Spaces tests (timeouts, namespace fix) fix(e2e-spaces): valid Hub repo ids and namespace for ephemeral sync tests Apr 10, 2026
@abidlabs abidlabs changed the title fix(e2e-spaces): valid Hub repo ids and namespace for ephemeral sync tests fix E2E space tests Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants