Skip to content

Conversation

@m4dm4rtig4n
Copy link
Contributor

No description provided.

Clément VALENTIN and others added 23 commits December 14, 2025 01:14
- Add TYPE_CHECKING imports for SQLAlchemy forward references
- Fix SQLAlchemy boolean comparisons (use .is_(True) instead of == True)
- Fix SQLAlchemy None comparisons (use .is_(None) instead of == None)
- Remove unused imports and variables
- Remove f-strings without placeholders

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add TYPE_CHECKING imports for forward references
- Fix implicit Optional (str = None → str | None = None)
- Add missing return type annotations
- Use cast() for Any returns
- Fix SQLAlchemy ORM assignments with type ignore
- Fix variable reuse confusion (renamed result variables)
- Add assertions for None checks before returns
- Fix AsyncGenerator return type for database session

All 62 source files now pass mypy --ignore-missing-imports

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add pre-commit configuration with hooks for:
- ruff (lint + format) for backend Python code
- mypy type checking for backend
- eslint for frontend TypeScript/React
- tsc type checking for frontend

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The CI workflow uses `uv sync` which relies on [dependency-groups],
not [project.optional-dependencies]. Added mypy and cleaned up
duplicate dependencies.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The previous npx semantic-release command did not set GitHub Actions
outputs, causing Docker builds to be skipped. Using the official
action ensures new_release_published and new_release_version are
properly exposed.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The cycjimmy action uses its own semantic-release installation,
so additional plugins must be specified via extra_plugins input.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fix Chart.yaml: change postgresql.enabled to postgres.enabled condition
- Fix configmap.yaml: update redis references to valkey

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Replace CloudPirates Redis subchart with Valkey 0.13.0
- Update _helpers.tpl with valkey.* helpers
- Fix secret key to use 'password' (CloudPirates default)
- Update values.yaml for Valkey configuration

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add paths-ignore to release.yml to exclude helm/ changes
- Create helm-ci.yml for chart validation (lint + template) on PRs
- Refactor helm-release.yml with independent semantic-release
- Add .releaserc-helm.yaml for chart-specific versioning (helm-* tags)

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Change from paths-ignore to paths for explicit control:
- apps/** (backend + frontend code)
- package.json, package-lock.json
- .releaserc.yaml

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Change tag format from helm-X.X.X to helm/vX.X.X
- Remove @semantic-release/github plugin (tags only, no releases)
- Update workflow summaries to show new tag format

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The extends option tries to npm install the file path.
Instead, temporarily swap .releaserc.yaml with helm config.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Tags will now be helm/X.X.X instead of helm/vX.X.X

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Copilot AI review requested due to automatic review settings December 18, 2025 07:59
Copy link

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

This PR implements a migration from Redis to Valkey (a Redis-compatible fork) as the caching layer, adds comprehensive type annotations to resolve 204 mypy errors in the Python API, and separates CI/CD pipelines for application releases versus Helm chart releases. The migration is primarily a naming/reference update since Valkey maintains Redis protocol compatibility.

Key Changes:

  • Migrated from Redis subchart (v0.16.0) to Valkey subchart (v0.13.0) across Helm charts
  • Updated all documentation and configuration references from Redis to Valkey
  • Added type annotations throughout the Python API to achieve mypy compliance
  • Separated CI/CD workflows for apps and Helm chart with independent versioning

Reviewed changes

Copilot reviewed 62 out of 66 changed files in this pull request and generated no comments.

Show a summary per file
File Description
helm/myelectricaldata/values.yaml Migrated Redis configuration to Valkey with updated subchart references and PVC retention policies
helm/myelectricaldata/Chart.yaml Updated dependency from redis (0.16.0) to valkey (0.13.0) and fixed postgres condition
helm/myelectricaldata/templates/_helpers.tpl Renamed all Redis helper functions to Valkey equivalents
helm/myelectricaldata/templates/backend/backend-deployment.yaml Updated init containers and environment variables for Valkey
docker-compose.yml Changed service name from redis to valkey with valkey/valkey:8-alpine image
apps/api/src/utils/auth.py Added type annotations with cast() for JWT operations
apps/api/src/services/*.py Comprehensive type annotations across scheduler, RTE, rate limiter, and cache services
apps/api/src/routers/*.py Fixed mypy errors with type annotations, proper None checks, and assertion guards
apps/api/src/models/*.py Added TYPE_CHECKING imports to resolve circular dependency issues
.github/workflows/*.yml Separated release workflows for apps vs Helm chart with independent semantic versioning
docs/**/*.md Updated all documentation references from Redis to Valkey

Note: No issues were identified during this review. The migration is well-executed with consistent updates across all layers (Helm, Docker, API code, documentation, CI/CD). The type annotations follow Python best practices using cast(), TYPE_CHECKING, and proper optional handling. The Valkey migration maintains backward compatibility since it uses the Redis protocol.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@m4dm4rtig4n m4dm4rtig4n merged commit 92119f4 into main Dec 18, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants