Project

General

Profile

Actions

Bug #18763

closed

remove unused rake tasks

Added by Ward Vandewege 5 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
03/14/2022
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release relationship:
Auto

Description

The api server codebase has a few rake tasks that seem superfluous:

  • delete_old_container_logs.rake
  • delete_old_job_logs.rake
  • replay_job_log.rake

Investigate if these are still needed, if not delete (and remove doc references)!

These two seem to be for one-time migrations mentioned in the upgrade docs. Double check.

  • manage_long_lived_tokens.rake
  • symbols.rake

Subtasks 1 (0 open1 closed)

Task #18820: Review 18763-rails-cleanupsResolvedWard Vandewege03/14/2022

Actions

Related issues

Related to Arvados - Feature #18863: [controller] add background job to clean up old container log recordsNew

Actions
Actions #1

Updated by Peter Amstutz 4 months ago

  • Target version changed from 2022-03-16 sprint to 2022-03-30 Sprint
Actions #2

Updated by Peter Amstutz 4 months ago

  • Target version changed from 2022-03-30 Sprint to 2022-03-16 sprint
Actions #3

Updated by Peter Amstutz 4 months ago

  • Assigned To set to Ward Vandewege
Actions #4

Updated by Ward Vandewege 4 months ago

  • Status changed from New to In Progress
Actions #5

Updated by Ward Vandewege 4 months ago

Remove

  • symbols.rake

This file defines "symbols:check" and "symbols:stringify", which were used to migrate pre-2.0 Arvados installations as documented at No longer stripping ‘:’ from strings in serialized database columns. We don't need to keep this task in the repo going forward.

  • delete_old_job_logs.rake

This file defines "db:delete_old_job_logs". The jobs API was only every used in on-prem installations, and it became read-only with the 2.0 release. This job is not referenced from anywhere in the codebase or documentation. Remove.

Need to keep:

  • delete_old_container_logs.rake

This file defines "db:delete_old_container_logs". This rake task is referenced in the configuration reference:

    Containers:
      Logging:
        # When you run the db:delete_old_container_logs task, it will find
        # containers that have been finished for at least this many seconds,
        # and delete their stdout, stderr, arv-mount, crunch-run, and
        # crunchstat logs from the logs table.
        MaxAge: 720h

We still need this rake task, but we should replace it with a background task in controller, see #18863.

  • manage_long_lived_tokens.rake

This file defines "db:check_long_lived_tokens" and "db:fix_long_lived_tokens" which are used to apply a new token lifetime policy to existing tokens, as documented at https://doc.arvados.org/admin/token-expiration-policy.html

  • replay_job_log.rake

This file defines "replay_job_log". It also includes lib/simulate_job_log.rb, which is not used anywhere else. This rake task is used in a workbench1 test, cf. test "live log charting from replayed log" in apps/workbench/test/integration/websockets_test.rb. We can remove this rake task when we finally retire workbench1. Ticket for that: #18862

Actions #8

Updated by Lucas Di Pentima 4 months ago

This LGTM, thanks!

Actions #9

Updated by Ward Vandewege 4 months ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Resolved

Applied in changeset arvados-private:commit:arvados|601093eb9061c559674721f329fbac6dac2077a2.

Actions #10

Updated by Ward Vandewege 4 months ago

  • Related to Feature #18863: [controller] add background job to clean up old container log records added
Actions #11

Updated by Peter Amstutz 3 months ago

  • Release set to 46
Actions

Also available in: Atom PDF