Skip to content

Add VSCode tutorial pipeline testing to CI #3737

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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

strickvl
Copy link
Contributor

@strickvl strickvl commented Jun 13, 2025

Adds a new CI workflow that tests all tutorial pipelines from the zenml-io/vscode-tutorial-extension repository to ensure ZenML core changes don't break user-facing tutorial examples.

This provides early detection of breaking changes that would affect the tutorial pipelines that users follow when learning ZenML.

View a successful run of these tests here: https://github.com/zenml-io/zenml/actions/runs/15637115894/job/44055030989. (This took just over 2 mins to run end-to-end).

Key Features

  • Standalone workflow: Can be called from ci-slow or run independently via GitHub Actions UI
  • Regression testing: Tests ZenML from current branch (not PyPI) for accurate testing
  • Comprehensive coverage: Runs all 10 tutorial pipelines with proper error handling
  • Resilient: Includes retry logic for network issues and timeout protection per pipeline
  • Well documented: Updates both tests/README.md and CLAUDE.md with testing strategy

Implementation Details

  • New workflow: .github/workflows/vscode-tutorial-pipelines-test.yml
  • Test script: scripts/test-tutorial-pipelines.sh with validation and reporting
  • CI integration: Added to ci-slow.yml as vscode-tutorial-pipelines-test job
  • Environment: Python 3.12 with UV package manager for fast dependency resolution
  • Error handling: Comprehensive validation of repo structure and meaningful failure reporting

Files Changed

  • .github/workflows/vscode-tutorial-pipelines-test.yml (new standalone workflow)
  • scripts/test-tutorial-pipelines.sh (new test execution script)
  • .github/workflows/ci-slow.yml (added job call)
  • tests/README.md (updated testing strategy documentation)
  • CLAUDE.md (updated CI documentation)

Test Plan

  • YAML syntax validation passes
  • Formatting with scripts/format.sh passes
  • Workflow includes proper error handling and resilience features
  • Script validates tutorial repository structure
  • Documentation accurately reflects new testing approach

The workflow will be triggered when the run-slow-ci label is applied to PRs, ensuring tutorial pipeline compatibility is verified before merging changes that could break user examples.

🤖 Generated with Claude Code

This commit adds a new CI workflow that tests all tutorial pipelines from the
zenml-io/vscode-tutorial-extension repository to ensure ZenML core changes
don't break user-facing tutorial examples.

Key features:
- Standalone workflow that can be called from ci-slow or run independently
- Tests ZenML from current branch (not PyPI) for accurate regression testing
- Runs all 10 tutorial pipelines with comprehensive error handling
- Includes retry logic for network resilience and timeout protection
- Updates documentation to reflect the new testing strategy

The workflow is triggered as part of slow CI when the 'run-slow-ci' label
is applied to PRs, providing early detection of breaking changes that would
affect tutorial examples.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copy link
Contributor

coderabbitai bot commented Jun 13, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@strickvl strickvl requested a review from Copilot June 13, 2025 14:30
@github-actions github-actions bot added internal To filter out internal PRs and issues enhancement New feature or request labels Jun 13, 2025
@strickvl strickvl added CI run-slow-ci and removed internal To filter out internal PRs and issues labels Jun 13, 2025
Copy link
Contributor

@Copilot 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

Adds a new CI workflow and supporting scripts to automatically test all tutorial pipelines from the VSCode tutorial extension against the current ZenML branch, ensuring user-facing examples don’t break.

  • Introduces a standalone GitHub Actions workflow (vscode-tutorial-pipelines-test.yml) for pipeline regression testing
  • Adds scripts/test-tutorial-pipelines.sh to discover, run, and report on each tutorial pipeline with timeouts and retries
  • Integrates the new workflow into the slow CI (ci-slow.yml) and updates documentation (tests/README.md, CLAUDE.md) to reflect the testing strategy

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/README.md Updated test strategy to include tutorial pipeline regression tests
scripts/test-tutorial-pipelines.sh New script to run and summarize all tutorial pipelines
CLAUDE.md Expanded CI documentation to mention tutorial pipeline testing
.github/workflows/vscode-tutorial-pipelines-test.yml New GH Actions workflow to clone the tutorial repo and run the test script
.github/workflows/ci-slow.yml Added a job to invoke the tutorial pipelines test workflow in slow CI
Comments suppressed due to low confidence (2)

.github/workflows/vscode-tutorial-pipelines-test.yml:64

  • The clone step hardcodes the develop branch of the tutorial repo; if the default branch changes (e.g., to main), this may fail. Consider using the default branch or making the branch name configurable.
if git clone --branch develop https://github.com/zenml-io/vscode-tutorial-extension.git tutorial-repo; then

CLAUDE.md:154

  • The indentation of this list item doesn't match the surrounding list (it lacks two leading spaces), which may break formatting. Align it with the other bullets under 'Continuous Integration'.
- Tutorial pipeline testing runs all VSCode tutorial examples against the current branch to catch breaking changes

Copy link
Contributor

github-actions bot commented Jun 13, 2025

Documentation Link Check Results

Absolute links check failed
There are broken absolute links in the documentation. See workflow logs for details
Relative links check passed
Last checked: 2025-06-20 06:14:19 UTC

strickvl and others added 2 commits June 13, 2025 16:34
The tutorial pipelines import from a utils.py file located at the root
of the tutorial repository. When running pipelines with
`python pipelines/subfolder/pipeline.py`, Python couldn't find the utils
module because the tutorial repo root wasn't in PYTHONPATH.

This fix:
- Sets PYTHONPATH to include the tutorial repository root when running pipelines
- Adds validation to warn if utils.py is missing from the expected location
- Should resolve the ModuleNotFoundError for utils imports

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Removes the -e flag from the bash script to prevent fail-fast behavior,
ensuring all tutorial pipelines are tested even if some fail. This provides
a complete picture of all issues in a single CI run.

Changes:
- Use `set -uo pipefail` instead of `set -euo pipefail`
- Maintains undefined variable checking (-u) and pipe error handling (-o pipefail)
- Allows script to continue testing all pipelines and report comprehensive results
- More efficient for CI debugging - no need to rerun multiple times

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@strickvl strickvl requested review from safoinme and bcdurak June 13, 2025 14:41
Copy link
Contributor

@bcdurak bcdurak left a comment

Choose a reason for hiding this comment

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

I have a general question about this. How do we version the changes in the tutorials?

If something breaks in ZenML, the tutorial will break. Let's say we fix it in the other repo, which will run it out-of-sync with the latest ZenML release for a while until we make the next release. Even when we release, the pipelines will be incompatible with earlier versions of ZenML. Do we have any precautions for it?

exit 1
fi
done
- name: Create virtual environment
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean that we are using a singular venv for all the pipelines? In that case, we would also have to merge all the requirements which might become an issue down the road.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, if any of the pipelines depend on previous runs, artifacts, etc., running everything on the same server might create unforeseen circumstances.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They're all separate pipelines. I mean, all these tutorial pipelines get run with the same env, one after another in the Codespace, so it shouldn't be a problem here.

@strickvl
Copy link
Contributor Author

I have a general question about this. How do we version the changes in the tutorials? If something breaks in ZenML, the tutorial will break. Let's say we fix it in the other repo, which will run it out-of-sync with the latest ZenML release for a while until we make the next release. Even when we release, the pipelines will be incompatible with earlier versions of ZenML. Do we have any precautions for it?

The main thing this is trying to ward against is someone making a breaking change in the ZenML core API and not realising that it's also broken the tutorial pipelines.

The way we version changes to the tutorial pipelines is that it has it's own repo and people can make changes / PRs there etc and fix / update to work with the latest versions of ZenML.

I don't think there's a problem with the pipelines being incompatible with earlier versions of ZenML. These tutorial pipelines will only ever be run with the latest release of ZenML. And any changes made to the tutorials repo won't be reflected in the Codespaces environment until someone rebuilds the extension + pushes a new Docker image.

But maybe @safoinme has some thoughts on this as well.

strickvl and others added 3 commits June 16, 2025 14:39
The PYTHONPATH variable might not be set in CI environments, causing
the script to fail with "unbound variable" error due to set -u flag.
Use parameter expansion to provide empty fallback.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@strickvl strickvl requested a review from bcdurak June 20, 2025 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI enhancement New feature or request run-slow-ci
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants