Merged
Conversation
…tation of ai message limit
There was a problem hiding this comment.
Pull Request Overview
This PR implements Week 8 backend enhancements focusing on Kubernetes autoscaling, logging improvements, and a new Normal QA feature. The changes enable horizontal pod autoscaling for microservices, standardize logging formats, and add RAG-based question answering capabilities.
Key changes:
- Added HorizontalPodAutoscaler configurations for all microservices (service-application, service-auth, service-genai, service-job)
- Implemented NormalQA RPC method with RAG integration for company-specific question answering
- Enhanced logging with JSON format across services and improved error handling
Reviewed Changes
Copilot reviewed 28 out of 33 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| helm/aihr/charts/*/templates/hpa.yaml | Added HPA templates for autoscaling based on CPU utilization |
| helm/aihr/charts/*/values.yaml | Added autoscaling configuration values |
| service-*/src/main/resources/logback.xml | Configured JSON logging with LogstashEncoder |
| service-genai/app/rag/retrieval.py | Implemented RAG pipeline for document retrieval and QA |
| service-genai/app/main.py | Added NormalQA endpoint and improved logging |
| service-application/src/main/java/de/tum/devops/application/service/ChatService.java | Enhanced chat service with fallback QA for completed interviews |
| proto/ai.proto | Added NormalQARequest message and NormalQA RPC method |
| k8s-install.sh | Updated JWT key handling to use PEM files |
Comments suppressed due to low confidence (1)
service-application/src/main/java/de/tum/devops/application/service/ChatService.java:42
- [nitpick] The variable name 'aiMessageLimit' is ambiguous. Consider renaming to 'maxAiMessagesPerSession' or 'aiMessageCountLimit' to clearly indicate it's a maximum count per session.
private final int aiMessageLimit = 2;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #45
Closes #46
Closes #47
Closes #48
Closes #49
Closes #51
This pull request introduces several updates across deployment workflows, Docker Compose configurations, Ansible scripts, and Helm charts to enhance deployment flexibility, security, and scalability. Key changes include improved input handling in workflows, better resource management with Helm, and updates to Ansible and Docker configurations for compatibility and security.
Workflow Enhancements
imageinput in theDeploy to AWSworkflow for custom image tags and adjusted logic to prioritize this input. (.github/workflows/deploy-aws.yml, [1] [2]docker-publish.ymlto include a newunit-testjob that runs tests before building and pushing images, ensuring code quality. (.github/workflows/docker-publish.yml, .github/workflows/docker-publish.ymlL8-R41)Security and Configuration Improvements
AWS_EC2_USERandSERVER_SSH_KEYin deployment workflows. (.github/workflows/deploy-aws.yml, [1] [2]OLLAMA_BASE_URL,OLLAMA_MODEL,OLLAMA_API_KEY) to the.envsetup for enhanced configuration management. (.github/workflows/deploy-aws.yml, .github/workflows/deploy-aws.ymlR64-R79)Ansible Updates
becomedirective for privilege escalation. (ansible/deploy.yml, ansible/deploy.ymlL11-R17)letsencrypt) and files (acme.json) instead of copying.envanddocker-compose.prod.yml. (ansible/deploy.yml, ansible/deploy.ymlL31-R41)hosts.inifile for AWS deployments. (ansible/hosts.ini.example, ansible/hosts.ini.exampleR1-R2)Docker Compose Adjustments
docker-compose.prod.deploy.ymlto use secure HTTPS endpoints for Traefik and removed unnecessary labels and ports for a cleaner configuration. (docker-compose.prod.deploy.yml, [1] [2]ai_dbdatabase instead of checking for a specific table. (docker-compose.prod.deploy.yml, [1];docker-compose.yml, [2]Helm Chart Enhancements
service-application,service-auth, andservice-genaideployments to ensure better resource allocation. (helm/aihr/charts/service-application/templates/deployment.yaml, [1];helm/aihr/charts/service-auth/templates/deployment.yaml, [2];helm/aihr/charts/service-genai/templates/deployment.yaml, [3]helm/aihr/charts/service-application/templates/hpa.yaml, [1];helm/aihr/charts/service-auth/templates/hpa.yaml, [2];helm/aihr/charts/service-genai/templates/hpa.yaml, [3]These changes collectively improve the deployment process, enhance security, and optimize resource utilization across the application stack.