Skip to content
Snippets Groups Projects

Drop the editor field from the workspaces table

Merged Daniyal Arshad requested to merge da-remove-editor-field-from-workspaces-table into master

Issue: Drop editor field in workspaces table as it is ... (#486301 - closed)

What does this MR do and why?

As a follow up to Add ignore rule for editor field, this MR drops the editor field from the workspaces table in the M+1 release.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Acceptance Criteria

  • Migration to drop editor column
  • Create follow up MR in release M+2 for removing the ignore rule

Follow up MR: Remove ignore rule for editor field on workspaces (!167825 - merged)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

This MR does not contain any UI changes

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  • Setup workspaces locally following this guide
  • Checkout this branch and run the migration bundle exec rails db:migrate in the terminal
  • Navigate to http://gdk.test:3000/-/remote_development/workspaces/ and create a new workspace
  • In rails console or any SQL client check that the new workspace has been created & that the editor field does not exist anymore
  • Make sure the workspace is correctly provisioned and has the Running status, open the workspace from the Preview url and test to make sure that the VS Code fork loads without issues
  • Optional: Run some commands in the terminal in the workspace to make sure everything is working
  • Finally terminate the workspace to ensure that it is stopped without any issues.
Edited by Daniyal Arshad

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 2 Warnings
    :warning: This MR has a Changelog commit for EE, but no code changes in ee/. Consider removing the EE: true trailer from your commits.
    :warning: You've made some app changes, but didn't add any tests.
    That's OK as long as you're refactoring existing code,
    but please consider adding any of the maintenancepipelines, maintenancerefactor, maintenanceworkflow, documentation, QA labels.

    Reviewer roulette

    Category Reviewer Maintainer
    database @abdwdd profile link current availability (UTC+5.5) @Quintasan profile link current availability (UTC+2)

    Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.

    If needed, you can retry the :repeat: danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

    Edited by Ghost User
  • Daniyal Arshad mentioned in merge request !167673 (merged)

    mentioned in merge request !167673 (merged)

  • Daniyal Arshad mentioned in merge request !167825 (merged)

    mentioned in merge request !167825 (merged)

  • mentioned in issue #486301 (closed)

  • Daniyal Arshad marked the checklist item Create follow up MR in release M+2 for removing the ignore rule as completed

    marked the checklist item Create follow up MR in release M+2 for removing the ignore rule as completed

  • Daniyal Arshad changed the description

    changed the description

  • Database migrations (on the main database)

    Migrations included in this change have been executed on gitlab.com data for testing purposes. For details, please see the migration testing pipeline (limited access).

    Migration Type Total runtime Result DB size change
    20241001185217 - RemoveWorkspacesEditorColumn Post deploy 4.4 s :white_check_mark: +0.00 B
    Runtime Histogram for all migrations
    Query Runtime Count
    0 seconds - 0.01 seconds 0
    0.01 seconds - 0.1 seconds 1
    0.1 seconds - 1 second 2
    1 second - 5 seconds 0
    5 seconds - 15 seconds 0
    15 seconds - 5 minutes 0
    5 minutes + 0

    Migration: 20241001185217 - RemoveWorkspacesEditorColumn

    • Type: Post deploy
    • Duration: 4.4 s
    • Database size change: +0.00 B
    Calls Total Time Max Time Mean Time Rows Query
    1 16.6 ms 16.6 ms 16.6 ms 0
    ALTER TABLE "workspaces" DROP COLUMN "editor"
    2 0.0 ms 0.0 ms 0.0 ms 2
    SELECT pg_backend_pid()
    Histogram for RemoveWorkspacesEditorColumn
    Query Runtime Count
    0 seconds - 0.01 seconds 0
    0.01 seconds - 0.1 seconds 1
    0.1 seconds - 1 second 2
    1 second - 5 seconds 0
    5 seconds - 15 seconds 0
    15 seconds - 5 minutes 0
    5 minutes + 0

    Other information

    Other migrations pending on GitLab.com
    Migration Type Total runtime Result DB size change
    20240926232010 - FinalizeBackfillApprovalGroupRulesProtectedBranchesGroupId Post deploy 6.0 s :white_check_mark: +0.00 B
    20240926232124 - FinalizeBackfillApprovalMergeRequestRulesProjectId Post deploy 4.8 s :white_check_mark: +0.00 B
    Clone details
    Clone ID Clone Created At Clone Data Timestamp Expected Removal Time
    database-testing-3750497-15542337-main 2024-10-01T20:23:16Z 2024-10-01T14:12:54Z 2024-10-02 08:33:10 +0000
    database-testing-3750497-15542337-ci 2024-10-01T20:23:16Z 2024-10-01T16:45:24Z 2024-10-02 08:33:10 +0000

    Job artifacts

    Database migrations (on the ci database)

    Migrations included in this change have been executed on gitlab.com data for testing purposes. For details, please see the migration testing pipeline (limited access).

    Migration Type Total runtime Result DB size change
    20241001185217 - RemoveWorkspacesEditorColumn Post deploy 6.6 s :white_check_mark: +0.00 B
    Runtime Histogram for all migrations
    Query Runtime Count
    0 seconds - 0.01 seconds 0
    0.01 seconds - 0.1 seconds 2
    0.1 seconds - 1 second 1
    1 second - 5 seconds 0
    5 seconds - 15 seconds 0
    15 seconds - 5 minutes 0
    5 minutes + 0

    Migration: 20241001185217 - RemoveWorkspacesEditorColumn

    • Type: Post deploy
    • Duration: 6.6 s
    • Database size change: +0.00 B
    Calls Total Time Max Time Mean Time Rows Query
    1 17.8 ms 17.8 ms 17.8 ms 0
    ALTER TABLE "workspaces" DROP COLUMN "editor"
    2 0.0 ms 0.0 ms 0.0 ms 2
    SELECT pg_backend_pid()
    Histogram for RemoveWorkspacesEditorColumn
    Query Runtime Count
    0 seconds - 0.01 seconds 0
    0.01 seconds - 0.1 seconds 2
    0.1 seconds - 1 second 1
    1 second - 5 seconds 0
    5 seconds - 15 seconds 0
    15 seconds - 5 minutes 0
    5 minutes + 0

    Other information

    Other migrations pending on GitLab.com
    Migration Type Total runtime Result DB size change
    20240926232010 - FinalizeBackfillApprovalGroupRulesProtectedBranchesGroupId Post deploy 6.9 s :white_check_mark: +0.00 B
    20240926232124 - FinalizeBackfillApprovalMergeRequestRulesProjectId Post deploy 6.3 s :white_check_mark: +0.00 B
    Clone details
    Clone ID Clone Created At Clone Data Timestamp Expected Removal Time
    database-testing-3750497-15542337-main 2024-10-01T20:23:16Z 2024-10-01T14:12:54Z 2024-10-02 08:33:10 +0000
    database-testing-3750497-15542337-ci 2024-10-01T20:23:16Z 2024-10-01T16:45:24Z 2024-10-02 08:33:10 +0000

    Job artifacts


    Brought to you by gitlab-org/database-team/gitlab-com-database-testing. Epic

    Edited by ****
  • Daniyal Arshad resolved all threads

    resolved all threads

  • Daniyal Arshad added 4215 commits

    added 4215 commits

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading