BE: Add new workspace ports table
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
MR: Pending
Description
We want to introduce a new database table workspace_ports that will save data about ports that have been opened/closed by a user from within the workspace. We will use this data to determine which ports need to be exposed in k8s through a service by the gitlab-agent.
Acceptance Criteria
-
Migration to add new workspace_ports table -
Ask DB experts for viability of this data migration. See the conversation here for more context. -
Add ports for existing workspaces in the workspace_ports table (Migration/Add during reconcile) based on feedback. -
Add new WorkspacePort
model to the remote development module -
Associations for workspace
anduser
added -
Add validation to test presence of all non nullable fields -
Entry in db/docs created for the new workspace_ports table -
Spec factory added for workspace_ports -
Add model specs
Technical Requirement
- Fields for
workspace_ports
table:- workspace_id (int, fk, indexed)
- port_number (int, not null)
- port_type (smallint, not null, [0: 'default', 1: 'user_defined'])
Edited by 🤖 GitLab Bot 🤖