Skip to content

fix(examples): wait before quickstart preview#2167

Merged
qin-ctx merged 1 commit into
volcengine:mainfrom
lazyayuan:fix/quickstart-wait-before-preview
May 21, 2026
Merged

fix(examples): wait before quickstart preview#2167
qin-ctx merged 1 commit into
volcengine:mainfrom
lazyayuan:fix/quickstart-wait-before-preview

Conversation

@lazyayuan
Copy link
Copy Markdown
Contributor

Description

Fix the quickstart example so it waits for resource processing before inspecting the imported resource. Previously, the example could print an empty directory structure and skip Content preview because add_resource() returned before the resource tree was ready.

Related Issue

N/A

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Updated examples/quick_start.py to call add_resource(..., wait=True) before listing and previewing the resource.
  • Updated English and Chinese quickstart docs to match the corrected execution order and expected output.
  • Added regression assertions to the quickstart lite integration test to ensure the example prints a non-empty directory structure and Content preview.

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Local verification:

  • python -m py_compile examples/quick_start.py tests/integration/test_quick_start_lite.py
  • git diff --check

Could not run the full quickstart lite test locally because the current environment is missing test/runtime dependencies such as loguru, pytest_asyncio, and ruff.

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

N/A

Additional Notes

This change keeps the quickstart flow deterministic for first-time users by waiting for resource processing before calling ls(), glob(), and read().

@github-actions
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🏅 Score: 95
🧪 PR contains tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ No major issues detected

@github-actions
Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

@qin-ctx qin-ctx merged commit a27c18e into volcengine:main May 21, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenViking project May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants