Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThis PR updates many pinned tooling and extension versions, adjusts generated-file exclusion patterns from openapi_codegen to generated/open_api (and variants), and refreshes the devcontainer context hash and installer version constants. Changes
Sequence Diagram(s)(The changes are version/config updates and path adjustments; no new control flow or runtime interactions were introduced, so no sequence diagram is necessary.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🔇 Additional comments (4)
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. Comment |
There was a problem hiding this comment.
Pull Request Overview
This PR updates the configuration for better Kiota code generation support by standardizing the path for generated OpenAPI code from openapi_codegen to generated/open_api. The PR also bumps several dependency versions, most notably pyright (which required removing the deprecated reportShadowedImports configuration).
Key changes:
- Updates ignore paths across configuration files from
**/openapi_codegento**/generated/open[-_]apito support both underscore and hyphen variants - Bumps pyright from v1.1.406 to v1.1.407 and removes deprecated
reportShadowedImportssetting - Updates various dependency versions (uv, copier, pnpm, pulumi, boto3, pydantic, and multiple frontend packages)
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pyrightconfig.json | Updates OpenAPI codegen path pattern and removes deprecated reportShadowedImports setting |
| pyproject.toml | Bumps pyright version to 1.1.407 |
| extensions/context.py | Updates version numbers for tooling and dependencies used in template generation |
| .pre-commit-config.yaml | Updates OpenAPI path exclusion pattern across multiple hooks and bumps ruff/pylint versions |
| .devcontainer/install-ci-tooling.py | Updates UV_VERSION and COPIER_VERSION constants |
| .devcontainer/devcontainer.json | Updates devcontainer context hash |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .*/vendor_files/.*| | ||
| .*tests/.*/__snapshots__/.*| | ||
| .*/openapi_codegen/.*| | ||
| .*/generated/open[-_]api/.*| |
There was a problem hiding this comment.
[nitpick] The regex pattern .*/generated/open[-_]api/.* allows both hyphen and underscore variants (open-api and open_api). This flexibility could lead to inconsistent directory naming across projects. Consider documenting which variant should be used as the standard, or enforce a single pattern to maintain consistency.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (6)
.devcontainer/devcontainer.json(1 hunks).devcontainer/install-ci-tooling.py(1 hunks).pre-commit-config.yaml(9 hunks)extensions/context.py(3 hunks)pyproject.toml(1 hunks)pyrightconfig.json(1 hunks)
🔇 Additional comments (7)
.devcontainer/devcontainer.json (1)
64-64: LGTM!The devcontainer context hash update is auto-generated by the pre-commit hook and reflects the changes in this PR.
pyproject.toml (1)
11-11: LGTM!The pyright version bump to 1.1.407 aligns with the configuration changes in
pyrightconfig.jsonand is consistent with the PR objectives..devcontainer/install-ci-tooling.py (1)
8-9: LGTM!The version bumps for UV and Copier are straightforward updates that align with the corresponding changes in
extensions/context.py.extensions/context.py (1)
14-96: LGTM!The version updates across multiple dependencies and tools are well-coordinated with the changes in other configuration files. These context values are used for templating and align with the PR's objective of updating tooling versions.
.pre-commit-config.yaml (2)
62-62: Path pattern updates are consistent within this file.The updated regex pattern
.*/generated/open[-_]api/.*is consistently applied across all pre-commit hooks. The pattern correctly matches bothopen_apiandopen-apinaming conventions using the character class[-_].However, note that
pyrightconfig.jsonuses a glob pattern that only matches the underscore variant. See the comment on that file for details.Also applies to: 74-74, 91-91, 105-105, 132-132, 255-255, 265-265, 272-272, 284-284, 300-300
246-246: LGTM!The version updates for ruff (v0.14.2) and pylint (v4.0.2) are routine maintenance updates.
Also applies to: 276-276
pyrightconfig.json (1)
1-110: Verification confirmed:reportShadowedImportsremoval is accurate.The setting was removed from pyright and included in recent pyright releases. The change to remove it from pyrightconfig.json is correct and justified.
| "**/vendor_files", | ||
| "**/graphql_codegen", | ||
| "**/openapi_codegen", | ||
| "**/generated/open_api", |
There was a problem hiding this comment.
🧩 Analysis chain
Verify path pattern consistency across configuration files.
The glob pattern here uses **/generated/open_api (underscore only), but .pre-commit-config.yaml uses the regex pattern .*/generated/open[-_]api/.* (underscore OR hyphen). This inconsistency could result in files being excluded in pre-commit hooks but still analyzed by pyright, or vice versa.
Ensure the naming convention is consistent, or if both open_api and open-api are valid generated paths, update this glob pattern to match both.
Run the following script to check if both naming conventions exist in the codebase:
🏁 Script executed:
#!/bin/bash
# Description: Check for both generated/open_api and generated/open-api paths
# Search for directories matching either pattern
fd -t d -g "**/generated/open_api"
fd -t d -g "**/generated/open-api"Length of output: 0
🏁 Script executed:
#!/bin/bash
# Description: Inspect actual config files and check for generated directories
echo "=== pyrightconfig.json ==="
cat pyrightconfig.json
echo -e "\n=== .pre-commit-config.yaml (search for generated pattern) ==="
grep -n "generated" .pre-commit-config.yaml || echo "No matches"
echo -e "\n=== Search for any generated directories ==="
fd -t d "generated" || echo "No generated directories found"
echo -e "\n=== Search for open_api or open-api anywhere ==="
rg -i "open.?api" --type-list | head -5
rg -i "open.?api" -l || echo "No matches"Length of output: 5243
🌐 Web query:
pyrightconfig.json exclude glob pattern syntax documentation
💡 Result:
Summary: pyrightconfig.json exclude entries use filesystem glob patterns (wildcards) similar to gitignore-style/glob syntax: * matches any characters except '/', ** matches zero-or-more path components (recursive), ? matches one character, character classes ([a-z]) work, and patterns are anchored to the config-file/project root unless you prefix with **/. Exclude entries override include; Pyright auto-excludes common folders (node_modules, pycache, venv, .git) by default. See Pyright docs/examples and config discussion for details. [1][2][3]
Quick examples
- "**/pycache" — exclude any pycache directory anywhere. [1]
- ".venv" or "/.venv/" — exclude virtualenv. [1][2]
- "src/experimental" — exclude that path relative to project root (not every directory named experimental). Use "**/experimental" to match any nested directory named experimental. [1][2]
- Exclude overrides include (an excluded file in an included dir is not type-checked). [3]
Sources
- Pyright sample config & patterns in docs (pyrightconfig.json examples). [1]
- Pyright configuration reference (pyrightconfig.json behavior and defaults). [2]
- Pyright GitHub discussion / docs clarifying exclude overrides and LSP behavior. [3]
Update glob pattern to match both open_api and open-api naming conventions.
The pattern **/generated/open_api only excludes paths with underscore, but .pre-commit-config.yaml uses regex patterns that match both underscore and hyphen (open[-_]api). Update line 14 to **/generated/open[_-]api using glob character class syntax to ensure consistent exclusion behavior across both configuration files.
🤖 Prompt for AI Agents
In pyrightconfig.json around line 14, the exclude glob "**/generated/open_api"
only matches underscore and misses "open-api"; update the pattern to use a
character class matching both separators (open[_-]api) so it excludes both
generated/open_api and generated/open-api paths consistently with other configs;
replace the existing glob entry with the new pattern and save the file.
Why is this change necessary?
Better usage of Kiota downstream for codegen
How does this change address the issue?
Updates the pre-commit ignore paths
What side effects does this change have?
None
How is this change tested?
Downstream repos
Other
Bumps pyright, which required removing reportShadowedImports (since it was deprecated/removed)
Summary by CodeRabbit