Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous Release 1.14.0 #661

Merged
merged 17 commits into from
Aug 13, 2024
Merged

Continuous Release 1.14.0 #661

merged 17 commits into from
Aug 13, 2024

Commits on Jun 1, 2024

  1. Don't just mount spec folder, but complete app folder for tests (#…

    …648)
    
    * Don't just mount `spec` folder, but complete `app` folder for tests
    
    This is to ensure that local changes in the `app` folder are reflected
    in the Docker container such that newly written tests can be run through
    without having to rebuild the whole Docker image.
    
    * Exclude `public/` folder from mount
    
    Also see: https://stackoverflow.com/a/56361190/
    
    * Copy everything to `usr/src/app` for precompiling to work & fix `public/` folder mount
    
    Also see https://stackoverflow.com/a/37898591/
    Splines authored Jun 1, 2024
    Configuration menu
    Copy the full SHA
    0c841de View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2024

  1. Configuration menu
    Copy the full SHA
    ed867fb View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2024

  1. Get Cypress up and running again (with docker and interactive testing) (

    #652)
    
    * Setup X11 Cypress GUI forwarding
    
    Also see my StackOverflow question:
    https://stackoverflow.com/q/78639075
    
    * Delete unnecessary Cypress sample files
    
    * Simplify Cypress config setup
    
    * Use internal docker host port
    
    * Delete old cypress helper
    
    * Remove e2e configuration
    
    * Fix wrong network assignment in Docker
    
    * Add cypress ESLint plugin back
    
    * Copy up-to-date on-rails commands from GitHub
    
    See this file:
    https://github.com/shakacode/cypress-on-rails/blob/master/lib/generators/cypress_on_rails/templates/spec/cypress/support/on-rails.js
    
    * Init dummy submission cypress test
    
    * Clean up comments in cypress-interactive Dockerfile
    
    * Outsource cypress docker setup in separate file
    
    * Remove `run_tests.sh` file
    
    * Add `createUserAndLogin` cypress command
    
    Also updated the cypress user emails and passwords.
    
    * Name cypress users more creatively
    
    * Add own Cypress FactoryBot implementation
    
    * Move cypress controller to subfolder
    
    * Remove cypress-on-rails dependency
    
    Note that at this point, some cypress commands don't work yet.
    
    * Outsource js error parsing logic to its own file
    
    * Add database cleaner and user creator for cypress
    
    * Fix RuboCop errors and improve documentation
    
    * Remove unnecessary `Cypress::` specifier
    
    * Remove unnecessary `index.js` file
    
    * Improve documentation for FactoryBot
    
    * Start Cypress UI automatically with open browser
    
    * Add Cypress tests to GitHub Actions CI/CD
    
    * Pass ./cypress.yml file to docker & split lines
    
    * Disable existing cypress tests for now
    
    will bring them back in a subsequent PR
    
    * Rename submissions spec
    
    * Rename cypress route subjects
    
    * Don't clear entrypoint for cypress tests
    
    * Execute "cypress run" in entrypoint
    
    * Rename archived tests and exclude them from ESLint
    
    * Temporarily disable docker compose cache
    
    * Disable old migrations stemming from globalize gem
    
    Along side this, the schema was automatically updated and got rid of
    old translation tables originally created by the globalize gem.
    They were still in here as remnant of #609.
    
    * Add back docker compose cache to cypress workflow
    
    * Revert "Disable old migrations stemming from globalize gem"
    
    This reverts commit 88f369e.
    
    * Use `db:schema:load` instead of `db:migrate`
    
    See https://github.com/rails/rails/blob/d43ee2088118425e493766aeb20575e9ce7159d1/actionmailbox/test/dummy/db/schema.rb#L5-L9
    
    We also abort the script if it is called from the production
    environment. It's only intended for usage in the dev/test environment.
    For production, we have the respective master and worker entrypoints.
    
    * Wait for MaMpf before opening cypress UI
    Splines authored Jul 2, 2024
    Configuration menu
    Copy the full SHA
    6bde35d View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2024

  1. Don't use VSCode ESLint experimental flag anymore (#662)

    * Improve some VSCode settings
    
    * Remove custom Ruby LSP command
    Splines authored Jul 9, 2024
    Configuration menu
    Copy the full SHA
    e7d6053 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2024

  1. Disable Codecov patch/project checks in CI/CD (#664)

    * Update codecov status check settings
    
    * Modify random ruby lines for testing purposes
    
    * Disable project and patch Codecov reports
    
    * Fix path to codecov config file
    
    * Add "**/*" to codecov paths
    
    * Try out different syntax to disable project/patch
    
    * Revert to new codecov syntax
    
    * Try not to use relative path for codecov.yml
    
    * Try to put codecov config back to root folder
    
    * Add comment explaining situation
    
    * Revert "Modify random ruby lines for testing purposes"
    
    This reverts commit 23fffef.
    Splines authored Jul 10, 2024
    Configuration menu
    Copy the full SHA
    bf7c6dc View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2024

  1. Init just as command-line runner (#660)

    * Init basic justfiles
    
    * Improve docker and test commands
    
    * Add Just VSCode extension to workspace recommendations
    
    * Add npm script to install latest version of `just`
    
    * Don't print help message in list
    
    * Add more docker `just` commands
    
    * Add more "open in browser" commands
    
    * Improve just installation via yarn commands
    
    * Add newline at end of `.justfile`
    Splines authored Aug 1, 2024
    Configuration menu
    Copy the full SHA
    db3e5af View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2024

  1. Fix DB preseeding (#665)

    * Refactor db initialization file
    
    * Use `bundle exec`
    
    * Try db:migrate instead of db:schema:load
    
    * Run db:schema:load in tests
    
    * Perform SOLR indexing as last step and not in background
    
    * Allow up-reseed to also work when container is not stopped
    
    * Improve echo messages in initialize script
    
    * Fix spelling
    Splines authored Aug 2, 2024
    Configuration menu
    Copy the full SHA
    f5522ee View commit details
    Browse the repository at this point in the history
  2. Redesign media cards (#656)

    * Make lecture cards more reactive
    
    * Fix card header border radius & use blue border color
    
    * Add "hover to play" feature
    
    * Use bootstrap icons for buttons
    
    * Explicitly set footer background color
    
    * Clean up card footer
    
    * Use buttons for media card actions
    
    * Add interactive hover to other sections as well
    
    Also added a default empty screenshot
    
    * Improve media grid breakpoints
    
    * Add another horizontal line above card body
    
    * Import necessary bootstrap files in `media.scss`
    
    * Outline the buttons instead of filling them
    
    * Use auto phrasing for card word break
    
    * Let only lecture tags change color on hover
    
    * Improve styling of header end icons
    
    * Fix download button alignment
    
    * Revert locale logic change
    
    * Make default screenshot more subdued
    
    * Reflect media card changes for watchlist cards
    
    * Reuse medium card for watchlists
    
    * Adjust card header talk people icon
    
    * Wait for turbolinks:load (shining pointer)
    Splines authored Aug 2, 2024
    Configuration menu
    Copy the full SHA
    742ee15 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2024

  1. Add endpoint to skip validation in Cypress tests (#669)

    * Expose MaMpf to another port to avoid clashing with dev
    
    * Add an endpoint to skip validation when creating factory
    Splines authored Aug 12, 2024
    Configuration menu
    Copy the full SHA
    4a0e103 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2024

  1. Configuration menu
    Copy the full SHA
    232b207 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6012d2d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    948e7ca View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b2d587f View commit details
    Browse the repository at this point in the history
  5. Add annotations overview page & improve Cypress commands (#668)

    * Scaffold annotation overview page
    
    * Show all annotations in card list
    
    * Only show annotations of current user
    
    * Add links to annotations and fix empty comments
    
    * Fix annotation caching issue by fixing initialization
    
    This might fix #637
    
    * Open annotation automatically on link click
    
    * Group annotations by lecture
    
    * Fix accordion header class naming
    
    * Link to blog when no annotation is created yet
    
    * Delete unnecessary whitespace
    
    * Localize text in annotation overview
    
    * Refactor annotations overview controller
    
    * Init view to see students annotations as teacher/editor
    
    * Use existing methods to grab media
    
    * Improve description of student annotations
    
    * Use links to feedback player for shared annotations
    
    * Use same bootstrap button for "Create annotation"
    
    * Only show students annotations if current user is teacher or editor
    
    * Fix grammar mistake
    
    * Refactor annotations overview controller
    
    * Refactor accordion label assignment
    
    * Color cards shared by students according to category
    
    * Rename js file to "url_annotation_opener"
    
    * Clarify color choices in user-facing text
    
    * Get rid of turbolinks:load and apply directly
    
    This is to avoid caching issues.
    
    * Fix initial state of accordion buttons
    
    * Show medium title and date
    
    * Expose MaMpf to another port to avoid clashing with dev
    
    * Add an endpoint to skip validation when creating factory
    
    * Use local file system also in test environment
    
    * Enable reloading in cypress tests
    
    * Wrap value in `createUserAndLogin` (cypress)
    
    * Init annotations factory for usage in cypress tests
    
    * Customize title of lectures/lessons
    
    * Test appearance of annotation overview cards
    
    * Use parameterized tests and test timestamp
    
    * Add back missing index variable in test
    
    * Test annotation border color
    
    * Add factorybot to known words
    
    * Add i18n retrieval in Cypress tests
    
    * Test annotation sections & improve i18n controller
    
    * Test student annotation cards & more properties of cards
    
    * Move annotation section test to the top
    
    * Move "grouped by lecture" test up
    
    * Test rendering of math content
    
    * Move overview controller to existing annotation controller
    
    (it is now called "index")
    
    * Move annotation-retrieval to user model
    
    * Move annotation_open_link to helper
    
    * Make extraction method private in controller
    
    Also removed the TODO note regarding nil values
    
    * Remove TODO note as "Won't be done"
    
    * Remove unnecessary long url helper calling
    
    * Pass in medium instead of medium id
    
    * Fix spelling mistake in media helper
    
    * Use link_to Rails helper
    
    * Don't use custom route name for annotations overview
    
    It is now just the "index" and the route is called
    "/annotations"
    
    * Sort according to lecture.updated_at
    
    * Extract "annotations by lecture" retrieval to own method
    
    This is to avoid duplicated code.
    
    * Add comment explaining transform keys
    
    * Rename partial view to index_accordion
    
    * Extract border color to helper method
    
    * Open annotations with video in new tab
    
    * Add number of annotations in accordion header
    
    * Add default title to lecture factory with_title
    
    * Fix ordering in cypress tests & sort according to creation date
    
    * Fix cypress tests when anchor link opens new tab
    
    * Fix ordering in math content test
    
    * Fix ordering and new tab in feedback video test
    
    * Fix border color test order
    
    * Change default cypress viewport dimensions
    
    * Place :index ability in other code block
    
    * Use params instead of manually constructing url
    
    * Use URI helper to construct annotation id link
    
    * Use flat_map instead of map(...).flatten
    Splines authored Aug 13, 2024
    Configuration menu
    Copy the full SHA
    8e44e6f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    013cca2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6557bf4 View commit details
    Browse the repository at this point in the history
  8. Delete users that haven't logged in for too long (#647)

    * Add deletion_date to users in DB
    
    * Set deletion date in user cleaner
    
    * Remove old user cleaner code & add first unit test
    
    * Don't just mount `spec` folder, but complete `app` folder for tests
    
    This is to ensure that local changes in the `app` folder are reflected
    in the Docker container such that newly written tests can be run through
    without having to rebuild the whole Docker image.
    
    * Revert "Don't just mount `spec` folder, but complete `app` folder for tests"
    
    This reverts commit b3f3ec8.
    
    * Add more unit tests for UserCleaner
    
    * Improve tests for deletion of generic users only
    
    * Split test for deletion of users
    
    * Unset deletion date after successful user login
    
    * Implement un-setting the deletion date & add tests
    
    * Rewrite deletion unsetting to reuse existing method
    
    * Send initial warning mail about deletion in 40 days
    
    * Send additional warning mails when deletion date is near
    
    * Add schema comment pointing to UserCleaner
    
    * Test mail delivery
    
    * Add "!" to unsafe method
    
    * Use Rails logger to log info about deleted users
    
    * Move UserCleaner from models to workers
    
    * Setup user cleaner cron job to run daily
    
    * Improve user cleaner doc strings & refactor
    
    * Remove user ghost hash remnants
    
    * Avoid unnecessary `to_date` conversion
    
    * Improve comment for `after_authentication` hook
    
    * Fix wording in comment
    
    * Make better use of `let` RSpec keyword
    
    * Limit the number of users deleted in one run
    
    * Simplify unsetting deletion date logic
    
    * Define `active_users` to reduce SQL operations
    
    * Use `7.1` as Rails version specifier in migrations
    
    * Explicitly set `INACTIVE_USER_THRESHOLD` in tests
    
    * Make `MAX_DELETIONS_PER_RUN` an env variable
    
    * Don't send deletion warning mails to non-generic users
    
    * Send a final deletion mail once the user is deleted
    
    * Move user cleaner file back to models folder
    
    * Rename user cleaner files
    
    * Count users without last_sign_in_at date as inactive
    
    * Improve docstring for `inactive_users`
    
    * Shorten user cleaner comment in docker.env
    
    * Introduce `PRODUCTION_NAME` env variable
    
    * Don't run user cleaner for mampf-experimental/dev
    
    * Rewrite logic for when user cleaner is started
    
    * Fix rubocop "where range"
    
    * Try to use after instead of append_after
    
    * Revert "Try to use after instead of append_after"
    
    This reverts commit 90aa662.
    
    * Try to not use cached docker in CI/CD unit tests
    
    * Revert "Try to not use cached docker in CI/CD unit tests"
    
    This reverts commit 069032b.
    
    * Move transaction strategy to before each block
    
    * Use around each in database cleaner config
    
    * Use version 2.1.0 of database cleaner
    
    * Revert "Use version 2.1.0 of database cleaner"
    
    This reverts commit 6dfcd96.
    
    * Add missing require "rails_helper"
    
    * Try deletion strategy of database cleaner
    Splines authored Aug 13, 2024
    Configuration menu
    Copy the full SHA
    d0f8f44 View commit details
    Browse the repository at this point in the history