Skip to content

E2524. Reimplement student_review_controller.rb#197

Open
Kii4ka wants to merge 47 commits intoexpertiza:mainfrom
Kii4ka:main
Open

E2524. Reimplement student_review_controller.rb#197
Kii4ka wants to merge 47 commits intoexpertiza:mainfrom
Kii4ka:main

Conversation

@Kii4ka
Copy link

@Kii4ka Kii4ka commented Apr 22, 2025

This pull request introduces several changes across multiple areas, including infrastructure setup, CI/CD improvements, controller and service additions, and configuration updates. Below is a summary of the most significant changes, grouped by theme:

Infrastructure and Configuration Updates:

  • Added a .dockerignore file to exclude unnecessary files and directories from Docker builds, improving efficiency.
  • Updated config/database.yml, config/database.yml.backup, and config/database.yml.local to include database credentials (username, password, and host) and removed the socket configuration. [1] [2] [3]
  • Modified config/application.rb to conditionally set the cache store to either Redis or memory, based on the presence of the CACHE_STORE environment variable.

CI/CD Workflow Enhancements:

  • Updated .github/workflows/main.yml to include a MySQL readiness check before running database setup, ensuring the database is fully operational.
  • Improved the code coverage report formatting step to handle missing coverage files gracefully and added a check for the CC_TEST_REPORTER_ID secret before uploading coverage reports. [1] [2]

New Controller and Service for Reviews:

  • Added a new Api::V1::StudentReviewController to handle student review-related actions, including authorization, service initialization, and error handling.
  • Introduced a StudentReviewService to encapsulate the business logic for managing student reviews, such as loading participant data, calculating review progress, and handling bidding redirection.

Localization and Authorization Improvements:

  • Added a set_locale method in ApplicationController to dynamically set the locale based on request parameters or the Accept-Language header.
  • Included a new route for student_review/list in config/routes.rb to support the newly added controller action.

Miscellaneous Updates:

  • Updated docker-compose.yml to change the MySQL user to root, aligning with the database configuration changes.
  • Adjusted the Gemfile to make simplecov_json_formatter optional by setting require: false.

Kii4ka and others added 30 commits April 18, 2025 15:23
Created StudentReviewService and removed MetareviewResponseMap from controller
simplify ( action_allowed? )
 wait for the MySQL service to be fully ready before proceeding with database setup

add:
- name: Wait for MySQL to be ready
        run: |
          while ! nc -z localhost 3306; do
            echo "Waiting for MySQL..."
            sleep 3
          done
          echo "MySQL is ready."
Updated workflow
To test actions
@github-actions
Copy link

github-actions bot commented May 22, 2025

Danger has errored

[!] Invalid Dangerfile file: invalid byte sequence in UTF-8

 #  from Dangerfile:20
 #  -------------------------------------------
 #  todo_fixme = (git.modified_files + git.added_files).any? do |file|
 >    File.exist?(file) && safe_read(file).match?(/\b(TODO|FIXME)\b/i)
 #  end
 #  -------------------------------------------

Generated by 🚫 Danger

@github-actions
Copy link

🚨 RSpec Tests Report

All tests passed.

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

🚨 RSpec Tests Report

All tests 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.

4 participants