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
All threads resolved!

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

  • 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

  • Daniyal Arshad marked this merge request as ready

    marked this merge request as ready

  • Daniyal Arshad changed the description

    changed the description

  • Daniyal Arshad requested review from @mwoolf

    requested review from @mwoolf

  • Max Woolf
  • Max Woolf requested changes

    requested changes

  • added 1 commit

    • c44465b7 - Add limit constraint to editor field on down method

    Compare with previous version

  • added databasereviewed label and removed databasereview pending label

  • Max Woolf requested review from @Quintasan and removed review request for @mwoolf

    requested review from @Quintasan and removed review request for @mwoolf

  • Michał Zając changed title from Drop the editor feild from the workspaces table to Drop the editor field from the workspaces table

    changed title from Drop the editor feild from the workspaces table to Drop the editor field from the workspaces table

  • Michał Zając approved this merge request

    approved this merge request

  • added databaseapproved label and removed databasereviewed label

  • Michał Zając resolved all threads

    resolved all threads

  • Before you set this MR to auto-merge

    This merge request will progress on pipeline tiers until it reaches the last tier: pipelinetier-3. We will trigger a new pipeline for each transition to a higher tier.

    Before you set this MR to auto-merge, please check the following:

    • You are the last maintainer of this merge request
    • The latest pipeline for this merge request is pipelinetier-3 (You can find which tier it is in the pipeline name)
    • This pipeline is recent enough (created in the last 8 hours)

    If all the criteria above apply, please set auto-merge for this merge request.

    See pipeline tiers and merging a merge request for more details.

  • Michał Zając enabled automatic add to merge train when checks pass

    enabled automatic add to merge train when checks pass

  • E2E Test Result Summary

    allure-report-publisher generated test report!

    e2e-test-on-gdk: :white_check_mark: test report for c44465b7

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Package     | 17     | 0      | 18      | 0     | 35    | ✅     |
    | Plan        | 76     | 0      | 0       | 0     | 76    | ✅     |
    | Verify      | 45     | 0      | 2       | 0     | 47    | ✅     |
    | Govern      | 75     | 0      | 3       | 0     | 78    | ✅     |
    | Create      | 129    | 0      | 19      | 0     | 148   | ✅     |
    | Manage      | 1      | 0      | 1       | 0     | 2     | ✅     |
    | Monitor     | 8      | 0      | 0       | 0     | 8     | ✅     |
    | Analytics   | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Data Stores | 33     | 0      | 1       | 0     | 34    | ✅     |
    | Secure      | 4      | 0      | 0       | 0     | 4     | ✅     |
    | Release     | 5      | 0      | 0       | 0     | 5     | ✅     |
    | Fulfillment | 2      | 0      | 0       | 0     | 2     | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 397    | 0      | 44      | 0     | 441   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+

    e2e-test-on-cng: :white_check_mark: test report for c44465b7

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Create      | 139    | 0      | 21      | 17    | 160   | ✅     |
    | Data Stores | 33     | 0      | 10      | 0     | 43    | ✅     |
    | Plan        | 86     | 0      | 8       | 12    | 94    | ✅     |
    | Verify      | 50     | 0      | 15      | 10    | 65    | ✅     |
    | Monitor     | 8      | 0      | 12      | 0     | 20    | ✅     |
    | Manage      | 1      | 0      | 9       | 0     | 10    | ✅     |
    | Govern      | 79     | 0      | 11      | 8     | 90    | ✅     |
    | ModelOps    | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Secure      | 1      | 0      | 5       | 0     | 6     | ✅     |
    | Package     | 24     | 0      | 14      | 0     | 38    | ✅     |
    | Configure   | 0      | 0      | 3       | 0     | 3     | ➖     |
    | Ai-powered  | 0      | 0      | 2       | 0     | 2     | ➖     |
    | Release     | 5      | 0      | 1       | 0     | 6     | ✅     |
    | Fulfillment | 2      | 0      | 7       | 0     | 9     | ✅     |
    | Analytics   | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Growth      | 0      | 0      | 2       | 0     | 2     | ➖     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 430    | 0      | 121     | 47    | 551   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+

    e2e-test-on-omnibus: :white_check_mark: test report for c44465b7

    expand test summary
    +---------------------------------------------------------------------+
    |                           suites summary                            |
    +----------------+--------+--------+---------+-------+-------+--------+
    |                | passed | failed | skipped | flaky | total | result |
    +----------------+--------+--------+---------+-------+-------+--------+
    | Manage         | 27     | 0      | 18      | 6     | 45    | ✅     |
    | Govern         | 104    | 0      | 10      | 0     | 114   | ✅     |
    | Verify         | 50     | 0      | 15      | 0     | 65    | ✅     |
    | Create         | 558    | 0      | 81      | 0     | 639   | ✅     |
    | Monitor        | 12     | 0      | 13      | 0     | 25    | ✅     |
    | GitLab Metrics | 2      | 0      | 1       | 0     | 3     | ✅     |
    | Data Stores    | 46     | 0      | 11      | 0     | 57    | ✅     |
    | Systems        | 6      | 0      | 1       | 0     | 7     | ✅     |
    | Plan           | 83     | 0      | 8       | 0     | 91    | ✅     |
    | Package        | 32     | 0      | 13      | 0     | 45    | ✅     |
    | Fulfillment    | 4      | 0      | 7       | 0     | 11    | ✅     |
    | Analytics      | 3      | 0      | 0       | 0     | 3     | ✅     |
    | Configure      | 1      | 0      | 3       | 0     | 4     | ✅     |
    | Secure         | 4      | 0      | 3       | 0     | 7     | ✅     |
    | Release        | 5      | 0      | 1       | 0     | 6     | ✅     |
    | Ai-powered     | 1      | 0      | 2       | 1     | 3     | ✅     |
    | ModelOps       | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Growth         | 0      | 0      | 2       | 0     | 2     | ➖     |
    +----------------+--------+--------+---------+-------+-------+--------+
    | Total          | 938    | 0      | 190     | 7     | 1128  | ✅     |
    +----------------+--------+--------+---------+-------+-------+--------+
  • @Quintasan can we please merge this? All the checks have passed now :slight_smile:

  • Michał Zając bypassed reviews on this merge request

    bypassed reviews on this merge request

  • :tools: Generated by gitlab_quality-test_tooling.


    :snail: Slow tests detected in this merge request. These slow tests might be related to this merge request's changes.

    Click to expand
    Job File Name Duration Expected duration
    #8190692882 spec/lib/gitlab/database/decomposition/migrate_spec.rb#L103 Gitlab::Database::Decomposition::Migrate#process! when the checks pass copies main database to ci database 31.51 s < 27.12 s
  • A deleted user added rspec:slow test detected label
  • Michał Zając mentioned in commit 394503b7

    mentioned in commit 394503b7

  • Hello @daniyalAD :wave:

    The database team is looking for ways to improve the database review process and we would love your help!

    If you'd be open to someone on the database team reaching out to you for a chat, or if you'd like to leave some feedback asynchronously, just post a reply to this comment mentioning:

    @gitlab-org/database-team

    And someone will be by shortly!

    Thanks for your help! :heart:

    This message was generated automatically. You're welcome to improve it.

  • added workflowstaging label and removed workflowcanary label

  • column editor not extracted to warehouse; no impact

  • Please register or sign in to reply
    Loading