Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis update revises dependency versions, corrects package names, and improves configuration for formatting, linting, and CI tooling across multiple files and templates. It introduces new options for AWS SSM plugin installation, updates pre-commit and Dependabot rules, and refines workflow and documentation steps. Several configuration files are replaced or updated for accuracy and maintainability. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SetupScript
participant OS
participant AWS_SSM_Plugin
User->>SetupScript: Run install-ci-tooling.py [--install-ssm-plugin]
SetupScript->>OS: Check platform
alt If not Windows and --install-ssm-plugin set
SetupScript->>OS: Create temp dir
SetupScript->>OS: Download SSM plugin .deb
SetupScript->>OS: Install via dpkg
SetupScript->>AWS_SSM_Plugin: Verify installation
else If Windows and --install-ssm-plugin set
SetupScript->>User: Raise NotImplementedError
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Pull Request Overview
This PR updates various dependencies and configurations across the project template, moving from older package versions to newer ones and fixing some package naming inconsistencies. It also introduces new configuration files and enhances CI functionality.
- Updates multiple tool versions including UV, PNPM, Copier, Pyright, Pytest, and various other dependencies
- Fixes package name from
copier-templates-extensionstocopier-template-extensions - Adds new SSM plugin installation capability and enhanced pre-commit exclusions
Reviewed Changes
Copilot reviewed 22 out of 25 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| template/ruff.toml | Adds new ignore rules for TC006 and SIM114 |
| template/pyproject.toml.jinja | Changes pyright from pinned to range version |
| template/biome.jsonc | New configuration file replacing biome.json |
| template/biome.json | Removed old configuration file |
| template/.pre-commit-config.yaml | Updates tool versions and adds exclusions |
| template/.github/workflows/pulumi-aws.yml | Adds mutex suffix configuration |
| template/.github/dependabot.yml.jinja | Removes patch-level updates |
| template/.devcontainer/manual-setup-deps.py | Fixes logical expression for skip_check_lock |
| template/.devcontainer/install-ci-tooling.py.jinja | Adds SSM plugin installation and updates versions |
| extensions/context.py | Updates package name and version numbers |
| copier.yml | Updates package reference |
| Multiple other files | Version bumps and configuration updates |
Comments suppressed due to low confidence (1)
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.github/dependabot.yml (1)
15-17: Consider removing redundant boto3 patch ignore rule.The specific boto3 patch ignore rule is now redundant since the global ignore rule on lines 12-14 already covers patch updates for all dependencies, including boto3.
Consider removing this specific rule to simplify the configuration:
- - dependency-name: "boto3" # boto3 gets patch updates way too frequently and they're usually not important - update-types: - - "version-update:semver-patch"biome.jsonc (1)
1-16: Disabling the Biome formatter / linter globally may hide real issuesBoth
"formatter.enabled": falseand"linter.enabled": falseswitch Biome off for the whole repo. Given the large reliance on pre-commit quality gates elsewhere, this could let defects or inconsistent styling slip through unnoticed.Consider one of:
- "formatter": { "enabled": false }, - "linter": { "enabled": false }, + // Keep Biome on, but restrict to folders that are currently noise-free + "formatter": { "enabled": true }, + "linter": { "enabled": true }, + "files": { + "includes": ["src/**", "scripts/**"], + "excludes": ["**/*.css", "template/**"] + },or remove the Biome pre-commit hook entirely if you do not intend to use it.
At minimum, document in
README.mdwhy Biome is disabled to avoid confusion for future contributors.extensions/context.py (1)
12-80: Consider refactoring the hook method to reduce complexity.The
hookmethod contains 61 statements, exceeding the recommended limit of 50. Consider extracting version assignments into separate methods or using a data structure to improve maintainability.@override def hook(self, context: dict[Any, Any]) -> dict[Any, Any]: + self._update_python_versions(context) + self._update_javascript_versions(context) + self._update_github_actions_versions(context) + self._update_docker_versions(context) + return context + +def _update_python_versions(self, context: dict[Any, Any]) -> None: context["uv_version"] = "0.8.3" - context["pnpm_version"] = "10.14.0" - context["pre_commit_version"] = "4.2.0" # ... other python-related versions + +def _update_javascript_versions(self, context: dict[Any, Any]) -> None: + context["pnpm_version"] = "10.14.0" # ... other javascript-related versions - return context
📜 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 (24)
.copier-answers.yml(1 hunks).devcontainer/devcontainer.json(1 hunks).devcontainer/install-ci-tooling.py(4 hunks).devcontainer/manual-setup-deps.py(1 hunks).github/dependabot.yml(1 hunks).github/workflows/pre-commit.yaml(1 hunks).pre-commit-config.yaml(4 hunks)README.md(1 hunks)biome.json(0 hunks)biome.jsonc(1 hunks)copier.yml(1 hunks)extensions/context.py(2 hunks)pyproject.toml(1 hunks)ruff.toml(1 hunks)template/.devcontainer/install-ci-tooling.py.jinja(4 hunks)template/.devcontainer/manual-setup-deps.py(1 hunks)template/.github/dependabot.yml.jinja(1 hunks)template/.github/workflows/pre-commit.yaml(1 hunks)template/.github/workflows/pulumi-aws.yml(3 hunks)template/.pre-commit-config.yaml(4 hunks)template/biome.json(0 hunks)template/biome.jsonc(1 hunks)template/pyproject.toml.jinja(1 hunks)template/ruff.toml(1 hunks)
💤 Files with no reviewable changes (2)
- biome.json
- template/biome.json
🧰 Additional context used
🪛 Ruff (0.12.2)
.devcontainer/install-ci-tooling.py
127-127: subprocess call: check for execution of untrusted input
(S603)
128-133: Starting a process with a partial executable path
(S607)
136-136: subprocess call: check for execution of untrusted input
(S603)
137-137: Starting a process with a partial executable path
(S607)
141-141: Starting a process with a partial executable path
(S607)
extensions/context.py
1-1: File extensions/context.py is part of an implicit namespace package. Add an __init__.py.
(INP001)
12-12: Too many statements (61 > 50)
(PLR0915)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: lint-matrix (ubuntu-24.04, 3.13.2, --data-file tests/copier_data/data2.yaml)
- GitHub Check: lint-matrix (ubuntu-24.04, 3.12.7, --data-file tests/copier_data/data1.yaml)
- GitHub Check: lint-matrix (ubuntu-24.04, 3.13.2, --data-file tests/copier_data/data1.yaml)
- GitHub Check: lint-matrix (ubuntu-24.04, 3.12.7, --data-file tests/copier_data/data2.yaml)
🔇 Additional comments (35)
template/.github/dependabot.yml.jinja (1)
27-28: LGTM! Dependency policy tightened to reduce update noise.The removal of "patch" updates from the dev-dependencies group aligns with the overall policy shift to focus on minor version updates and security patches only. This should reduce the frequency of automated dependency updates while maintaining security coverage.
.github/dependabot.yml (2)
12-14: LGTM! Global patch update ignore policy implemented.The new global ignore rule effectively prevents patch-level updates for all dependencies except security updates, which aligns with the goal of reducing update noise while maintaining security coverage.
27-31: LGTM! Dependency groups restricted to minor updates only.Both production and development dependency groups are now limited to minor updates, which is consistent with the template configuration and the overall policy to reduce patch update noise.
template/.github/workflows/pre-commit.yaml (1)
42-42: Step-name typo fixed – looks goodOnly the redundant space in the step title was removed. No functional impact, thanks for the tidy-up.
.copier-answers.yml (1)
2-2: Confirm tagv0.0.60exists in the upstream templateThe
_commitpin guards against future breaking changes. Please double-check thatv0.0.60is published and not a draft / pre-release to avoid clone failures in freshcopierruns..devcontainer/devcontainer.json (1)
64-64: Hash update acknowledgedThe context hash is auto-managed; nothing else changed. ✅
.github/workflows/pre-commit.yaml (1)
42-42: Consistent step naming – good catchSame one-space cleanup as in the template file; keeps parity between template & actual workflow.
template/ruff.toml (1)
64-65: LGTM! Well-documented linting rule suppressions.The additions of TC006 and SIM114 to the ignore list are justified with clear explanations. TC006 prevents IDE confusion during refactoring, and SIM114 maintains better coverage checking accuracy.
README.md (1)
13-14: Improved setup process with better dependency management.The change from
uv lockto using the manual setup script with--optionally-check-lockprovides more sophisticated dependency handling. Adding the explicitgit add .step ensures all generated files are properly staged for commit.ruff.toml (1)
64-65: LGTM! Consistent with template configuration.The addition of TC006 and SIM114 rules mirrors the template changes, maintaining consistency between base and template configurations. The documented rationale for these suppressions is sound.
template/.devcontainer/manual-setup-deps.py (1)
61-64: Enhanced flag logic for flexible lock file handling.The updated logic properly implements mutual exclusivity between
--skip-check-lockand--optionally-check-lockflags while allowing the derivedskip_check_lockvariable to be set by either option. This provides more flexible dependency management during setup..devcontainer/manual-setup-deps.py (1)
61-64: LGTM! Consistent flag handling improvements.The changes mirror those in the template version, implementing the same enhanced mutual exclusivity logic between
--skip-check-lockand--optionally-check-lockflags. This consistency ensures reliable behavior across template instantiations.template/pyproject.toml.jinja (1)
14-14: LGTM! Improved dependency flexibility.Changing from exact version pinning (
==) to minimum version (>=) for pyright is a good improvement. This allows the template to benefit from future patch updates while maintaining the minimum version requirement, and removes the previous strict pin that was in place due to a bug in version 1.1.401.template/biome.jsonc (1)
1-16: LGTM! Well-structured biome configuration.The configuration properly disables both formatter and linter while setting up sensible file inclusion patterns. The exclusions are practical:
- Self-excluding biome.jsonc files prevents circular processing
- Excluding CSS files due to excessive false positives is a reasonable workaround
The JSONC format with comments improves maintainability by documenting the reasoning behind exclusions.
pyproject.toml (3)
9-11: LGTM! Routine version updates.The version bumps for pytest (8.3.5→8.4.1) and pytest-cov (6.1.1→6.2.1) are incremental updates that should provide bug fixes and improvements.
12-12: Good improvement to pyright versioning.Changing from fixed version 1.1.400 to minimum version 1.1.403 provides better flexibility while ensuring the minimum required version is met. This aligns with the similar change in the template file.
13-14: LGTM! Version updates and package name correction.The copier version bump (9.7.1→9.8.0) and the correction of the package name from
copier-templates-extensionstocopier-template-extensions(with version update to 0.3.2) fixes what appears to have been a naming inconsistency across the project.copier.yml (1)
141-143: LGTM! Package name consistency fix.The corrections from
copier-templates-extensionstocopier-template-extensionsin both the URL comment and Python module reference ensure consistency with the corrected package name used throughout the project. This aligns with the fixes in pyproject.toml and other configuration files..devcontainer/install-ci-tooling.py (5)
7-8: LGTM! New imports for enhanced functionality.The addition of
tempfileandpathlib.Pathimports supports the new SSM plugin installation feature with proper temporary directory management.
10-16: LGTM! Version updates and new feature flag.The version bumps for UV (0.8.3), PNPM (10.14.0), COPIER (9.8.0), and COPIER_TEMPLATE_EXTENSIONS (0.3.2) are consistent with updates across the project. The new
INSTALL_SSM_PLUGIN_BY_DEFAULTflag provides a sensible default for the new feature.
33-38: LGTM! Well-designed command line argument.The new
--install-ssm-pluginargument is properly structured with a clear help message and uses the configurable default value.
81-81: LGTM! Package name correction.The fix from
copier-templates-extensionstocopier-template-extensionsmaintains consistency with the corrected package name used throughout the project.
120-143: SSM plugin version (1.2.707.0) availability confirmed
The HTTP HEAD request to the pinned URL returned “HTTP/1.1 200 OK,” so the specified version is still accessible and can safely remain pinned.template/.github/workflows/pulumi-aws.yml (3)
74-78: LGTM! Enhanced mutex control granularity.The addition of
ADDITIONAL_MUTEX_SUFFIXparameter provides finer control over concurrency in Pulumi deployments, allowing more specific locking beyond just the stack name.
80-82: LGTM! Flexible secret management for non-enterprise environments.The
iac-github-api-tokenssecret and corresponding environment variable provide a good fallback for environments that don't use AWS Secrets Manager, enhancing deployment flexibility.Also applies to: 96-97
112-112: LGTM! Mutex key properly incorporates the additional suffix.The mutex branch name correctly includes the new
ADDITIONAL_MUTEX_SUFFIXparameter, maintaining consistency with the enhanced locking mechanism.extensions/context.py (2)
5-5: LGTM! Import package name corrected.The import statement has been correctly updated from
copier_templates_extensionstocopier_template_extensions, aligning with the proper package name used throughout the codebase.
13-47: LGTM! Version updates appear consistent.The dependency version updates look reasonable and align with the PR's objective of pulling in upstream template changes. The addition of new version keys (
dot_env_cli_version,playwright_version,nginx_image_version) and the Alpine image bump to 3.21 are appropriate.Also applies to: 74-75
.pre-commit-config.yaml (2)
45-45: LGTM! Hook versions updated appropriately.The version updates for
typos(v1.34.0),biome-check(v2.1.1), andruff(v0.12.3) are reasonable maintenance updates that should provide bug fixes and improvements.Also applies to: 93-93, 225-225
48-54: LGTM! Exclusion patterns refined for generated and minified files.The expanded exclusion patterns appropriately skip processing of:
- Minified files (
.min.js,.min.css,.umd.js)- Generated files (
schema.graphql,pyrightconfig.json)- Snapshot directories and
biome.jsoncconfigurationThis prevents unnecessary processing of files that shouldn't be modified by these hooks.
Also applies to: 87-87, 100-101, 116-126
template/.pre-commit-config.yaml (1)
45-54: LGTM! Template pre-commit configuration updated consistently.The changes mirror those in the main
.pre-commit-config.yaml, ensuring consistency between the template and the base repository. The version updates and refined exclusion patterns are appropriate.Also applies to: 87-87, 93-102, 116-127, 225-225
template/.devcontainer/install-ci-tooling.py.jinja (4)
10-15: LGTM! Jinja templating improves version management.Using Jinja templating for version variables allows centralized version management through the context system, improving maintainability.
16-16: LGTM! Conditional SSM plugin installation with user control.The conditional default behavior based on template context and the explicit command-line flag provide good flexibility for users who need AWS SSM port forwarding capabilities.
Also applies to: 33-38
81-81: LGTM! Package name corrected.The package name has been correctly updated from
copier-templates-extensionstocopier-template-extensions, aligning with the proper package name.
120-143: LGTM! SSM plugin installation implemented securely.The SSM plugin installation follows AWS documentation best practices:
- Downloads from official AWS S3 URL
- Uses a pinned version (1.2.707.0) for reproducibility
- Uses temporary directory for cleanup
- Appropriately raises NotImplementedError for Windows
- Verifies installation with version check
The implementation is secure and follows good practices.
Pull in upstream template changes
Summary by CodeRabbit
New Features
Bug Fixes
Chores
Refactor