Skip to content

Remove all dev dependencies before provider yaml check #60662

Closed

Description

@potiuk

Currently scripts/in_container/run_provider_yaml_files_check.py walks through all provider "source" files and does some checks (like whether classes mentioned in provider.yaml files as hooks are actually hooks.

It is run inside breeze image as result of this pre-comit hook

- id: check-provider-yaml-valid
  name: Validate provider.yaml files
  entry: ../scripts/ci/prek/check_provider_yaml_files.py
  language: python
  files: ^.*/provider\.yaml$
  exclude: ^.*/.venv/.*$
  require_serial: true

We should make sure that when the script is run inside breeze CI docker files we run uv sync --no-dev.

Ideally we should do it separately for each provider before re-importing each provider, but that might take a long time and require spawning new interpreters for each provider.

If we do it "per provider" - this would also allow to automatically detect cases, where one provider has an optional cross-provider dependency where it's optionality is not handled properly.

Activity

  1. converted this from a draft issue on Jan 16, 2026
  2. added
    area:dev-env
    on Jan 16, 2026
  3. GauravFrontend commented on Jan 16, 2026

    @GauravFrontend

    I will start working on a PR for this!

  4. potiuk commented on Jan 16, 2026

    @potiuk
    MemberAuthor

    Feel free - just make sure that to understand it- there are number of moving parts there - such as calling CI image from whithin a prek hook and handlng single files versus "all files" there

  5. Fury0508 commented on Jan 17, 2026

    @Fury0508
    Contributor

    Hi! I've implemented a fix for this in PR #60728.

    The Problem

    The script imports jsonpath_ng at the top level, but it's a dev dependency. Simply adding uv sync --no-dev would cause an ImportError when the script tries to use it.

    My Solution

    1. Added a sync_dependencies_without_dev() function that runs:
       uv sync --no-dev --all-packages --no-python-downloads --no-managed-python

    This strips dev dependencies to create an environment closer to production, helping detect unhandled optional cross-provider dependencies. The script exits if this fails, ensuring validation doesn't run with dev dependencies still present.

    1. Converted the jsonpath_ng import to a lazy import inside check_providers_are_mentioned_in_issue_template() to avoid the ImportError after dev dependencies are removed.

    This approach ensures the validation always runs without dev dependencies while still allowing the script to access jsonpath_ng when needed for the issue template check.

  6. added a commit that references this issue on Jan 18, 2026
    f03e92a
  7. moved this from Ready to In progress in CI / DEV ENV planned workon Jan 21, 2026
  8. potiuk commented on Mar 2, 2026

    @potiuk
    MemberAuthor

    @GauravFrontend We are unassigning you from this issue as part of our updated assignment policy.

    This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.

    We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.

  9. Bhuvan-08 commented on Mar 9, 2026

    @Bhuvan-08

    Hi! I'd like to take a look at this issue.
    I noticed that there was a previous attempt in PR #60728 that introduces uv sync --no-dev before running the provider YAML checks.
    I'll review the existing implementation and CI scripts to see if there are remaining improvements needed or if the approach can be simplified.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:dev-envgood first issue

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions