Skip to content
Snippets Groups Projects
Verified Commit 37ce23db authored by Chad Woolley's avatar Chad Woolley :one: Committed by Enrique Alcántara
Browse files

Remote Development

- The initial release of the Remote Development feature
- !105783

Changelog: added

Skeleton stub for /internal/kubernetes/remote_dev/work endpoint

DISABLE auth, error handling, and change to GET

WIP - more tweaks

WIP - structure of request and response matches current agentk structure

make request and response structure match agent

setting up persistence and graphql api

add workspaces table and services, rename refactors, etc

send config_to_apply as a single yaml string

tweaks, user is current user and not passed in params, change migration

More tweaking migrations and workspace model

WIP - NOT WORKING YET - start implementing reconciliation logic

Add error handling to work around current_user bug

Starting to write spec for state_reconciliation_service

check in correct structure.sql (workspaces was missing name, etc)

Working unit test for reconciliation service

Fix linting errors so we can push without LEFTHOOK=0

Write basic state machine with tests

clean up rubymine warnings

Cleanup and refactor, extract core logic from service to Processor class

rename refactors to clear things up before adding more logic

Refactoring, translate phase into state

pull out shared context with configs to test drive processor

uncomment kubernetes.rb authenticate_gitlab_kas_request

update database schema

refactors, add tests for processor

fix rubocop errors

Fix ActiveRecord inverse_of associations

Handle receiving untracked workstations info from agent

Restructure spec contexts

Refactor spec and factories

- to be consistent with fixture workspace state

Add logic and tests for desired != actual state

Change args interface b/w service and processor

Attempt to set up EE model and associations correctly

Add minimial spec for grape API declaration

Extract actual info parser logic

Move services to EE

Move lib files under EE

Add debug logs, handle missing phase

Add exploratory testing helper scripts

Get to 100 percent coverage

Improve k8s watch script

Switch devworkspace config example to ttyd

Add running/failed states, vscode->ttyd

Remove state machine, add consts

Extract config generator, test coverage

Remove sleep from watch_rails_workspaces.sh

Handle case where no WS exist in k8s

Make scripts executable

Switch create_workspace script to ruby

Add spec for DesiredConfigGenerator

Fix scripts, and handling of namespace/version

Suppress false rubymine inspection errors

Add validation for states in model

Add support for storing URL

Make update test script do validation

Add basic graphql support - needs tests

Fix query_type_spec.rb

Update graphql docs

More GraphQL functionality - group association

Minimal UI to list workspaces

Fix navbar specs

Add polling for workspaces list

Regenerate locale/gitlab.pot

Add Starting as supported actual_state

Helper script to run specs

Move Workspace out of EE namespace

Move graphql classes out of EE namespace

Add devfile in create_workspace helper script

Fix rubocop linting error

Add editor field to Workspace

Move js app under correct directory

Change workspace URL to link

Fix rubocop failure

Pass editor in desired_config_generator.rb

Graphql create mutation, and other fixes

Minimal create form with hardcoded agent ID

Add clusterAgentId text field

Update queries, pots, and api index

Move services under Workspaces namespace

Rename fullPath to groupFullPath

Add TERMINATED state

Make desiredStates a dropdown

Agent field dropdown, other improvements

Add missing test coverage for graphql

Add update mutation and service

Create graphql update query, other query/schema cleanup

Order workspaces finder by ID

Add loading state, fix list query name

Fix list query, remove unneeded query type method

Update form working

UpdaTE pots

Support terminated state

Switch to source editor for devfile field

Rename var and fix spec

Add routes for vue to make reload work

Make list update instantly after add

Switch to graphql subscriptions

- For workspace list update, instead of Apollo polling

Fix local cyclic dependency classload errors

See https://docs.gitlab.com/ee/development/api_graphql_styleguide.html#testing-tips-and-tricks
and search 'cyclic'

Fix group_updated_spec copy-pasta error

Fix rubocop errors

Fix ee version of subscription_type_spec

Support Devfile in project, other cleanup

- Includes other cleanup/fixes for upstream
  remote_dev branch

Do not create Workspaces without devfiles

Fix migration

WIP - adding project support

Fix handling of devfile options radio

Devfile in project now working (*)

- (*) Not yet tested with full GA4K integration running

Fix some state-management bugs

Fix spec

Add index migration for project_id

Single migration and reset db script

Fix failing create mutation spec

- Change WorkspaceType#agent to #cluster_agent

Run gettext:regenerate

Clean up / add Workspace GraphQL associations

Improve workspace resolver and finder

Move branch_hooks_service to EE

Fix failing specs

Add coverage for create/update mutations

Add todo about detecting devfile changes

Support selective updates of workspace attributes

Update graphql docs for WorkspaceUpdateInput

Update layout to fix linting error

Fix linting error

Update db/structure.sql

Update scripts

Fix rubocop errors

Manually fix structure.sql

Simplify graphql type

- Thanks Paul

Add test coverage for model terminated? method

Remove unnecessary non-EE routes entry

Fixing failing graphql mutation specs

- See https://gitlab.slack.com/archives/C6MLS3XEU/p1677716828645539?thread_ts=1677710256.031839&cid=C6MLS3XEU

Fix Workspace factory associations

Remove feature specs from remote dev spec script

Make devfile and editor immutable

- Removes hook and worker for devfile in repo

Remove DWO dependency

Use devfile gem to create k8s resources instead of devworkspace resource.

Remove references to default namespace.

move labels and annotations to devfile gem. fix tests.

add size for the ephemeral volume. add editor components in the spec fixture.

add ingress class name while generating k8s resources

update editor image tag

Update gemfile to use git repository of devfile gem

Extract workspace url during config generation

add actual state calculator

add edge cases around deployment completion and workspace failure

Add nil default. Add specs for actual state calculator

Refactor devfile processing

Fix tests

Remove unrequired lines

Fix typo

Fix error with factory duplicate name

- See note in code, workspace factory was creating
  duplicated names for different workspaces, which
  failed validation when attempting to save them.

Move shared context file to ee dir

Update gemfile checksum

Add specs to convenience script

Fix rubocop complaints

Update gemfile

Update gemfile checksum

Add domain template

Update gemfile

Add trailing whitespace to yaml to fix tests

Add tests and fix typos

Fix failing CI pipeline

Remove fast_spec_helper from actual_state_calculator_spec.rb

- It's causing problems, see notes

Remove unreachable code

- to fix undercoverage failure

Fix create workspace script

Change agent domain suffix to localdev.me

Replace ttyd with webide

Support workspace ordering by updated_at

Fix spec that verifies finder behavior with id

Temporarily disable pagination

Re-enable pagination

Fix linting issues

Fix danger error

Temp dev workspace url fix

Remove all references of devworkspace

Use assertions that dont trigger dangerbot warning

Refactor shared context and devfile fixtures

Pass terminated flag in WorkspaceAgentInfo

Cleanup displayed state

Cleanup devfile fixtures more

Write a happy-path feature spec for rails regression coverage

Add wip e2e spec to verify workspace creation

Complete e2e spec to verify workspace creation

Refactor to extract reusable logic into a flow

Remove redundant log

Support cleanup of created workspaces in spec

Remove unnecessary todo

Add comment describing how to run the spec

Temporarily update kas version for verification

Quarantine the e2e spec

Update spec to use hardcoded devfile project

Fix minor linting issue

Update spec to create new devfile project

Use webide as the editor instead of vscode

Fix project reference

Fix linting issues

Fix the flakiness of the spec

Fix more linting issues

Fix issues from the static-analysis pipeline

Fix all lint issues (finally)

Update testcase description

Update with link to testcase

Revert changes to kas version

Fix quarantine type

Add --tag description to comment doc and move it

Archive devfile project during teardown

Add helper script and make the spec parameterizable

Increase retries to reduce flakiness

Fix comments for clarity

Add TODO to reduce duplication

Add tests for workspace url

Rename sent_to_agent_at field to responded_to_agent_at

Fix n+1 query problem in reconcile loop

Rewrite actual state calculator spec with fixtures

- TODO: some cases are failing and skipped.

Rewrite actual state calculator spec with fixtures

- TODO: some cases are failing and skipped.

Add more test coverage for reconciliation scenarios

- Missed these files in previous commit

Add workspace_updates_processor_reconciliation_scenarios_spec.rb to script

Remove unnecessary disable_ddl_transaction

Remove unnecessary ActiveSupport::Concern

Only allow webide as editor

Adds support to propogate Agent Configuration to rails

- New table and model called Remote Develelopment Agent
  Config
- Changes to the Agent config API to write to this table

Caw clean up service layer interfaces

Improve error handling if cluster agent has no remote dev config

Rename agent communication api fields

Introduce namespacing to domain layer

Split out migration foreign keys

Add failure for no components in the devfile

Add structured logging and some cleanup

Post-rebase integration fixes

Regenerate gitlab.pot
Remove commented code
Fix specs

Address review and danger feedback

Add Remote Development feature flag checks

Switch back to single global feature flag

Fix failing CE spec that is picking up EE-only graphql field

Add some explanatory comments on fields in reconcilation payloads

Fix failing workspace_spec.rb

Updates to workspaces table migration

Update structure.sql

Set arbitrary user id for all containers and init containers

Remove TODOs for authorization

Since these services are only called from internal endpoints relying
on the existing authentication is sufficient.

Contributes to: #409038

Remove unused scopes from workspace.rb

Refactor workspace model validation test

Update description to reflect validation being tested

Respond with devfile validation errors

Add more devfile validations

Make graphql workspace field definitions more appropriate

Update workspace metadata labels and annotations

Add arch standards link to service constructor TODOs

Delete unused scripts
parent ca21f541
No related branches found
No related tags found
No related merge requests found
Showing
with 261 additions and 0 deletions
......@@ -587,6 +587,9 @@ gem 'cvss-suite', '~> 3.0.1', require: 'cvss_suite'
# Work with RPM packages
gem 'arr-pm', '~> 0.0.12'
# Remote Development
gem 'devfile', '~> 0.0.15.pre.alpha1'
# Apple plist parsing
gem 'CFPropertyList', '~> 3.0.0'
gem 'app_store_connect'
......
......@@ -110,6 +110,9 @@
{"name":"deprecation_toolkit","version":"1.5.1","platform":"ruby","checksum":"a8a1ab1a19ae40ea12560b65010e099f3459ebde390b76621ef0c21c516a04ba"},
{"name":"derailed_benchmarks","version":"2.1.2","platform":"ruby","checksum":"eaadc6206ceeb5538ff8f5e04a0023d54ebdd95d04f33e8960fb95a5f189a14f"},
{"name":"descendants_tracker","version":"0.0.4","platform":"ruby","checksum":"e9c41dd4cfbb85829a9301ea7e7c48c2a03b26f09319db230e6479ccdc780897"},
{"name":"devfile","version":"0.0.15.pre.alpha1","platform":"arm64-darwin","checksum":"8e8234d552310925758dd5f214e1fc059ecc7255f8d692300d1adb955c370198"},
{"name":"devfile","version":"0.0.15.pre.alpha1","platform":"ruby","checksum":"69a058d9edb44efe2fb78769e531b324f3bd75b21d45be15d8b0335b691d093e"},
{"name":"devfile","version":"0.0.15.pre.alpha1","platform":"x86_64-linux","checksum":"460ddad57cc69a293661bb82ebc19ca44147201c74f78b36bb4861b402ecff24"},
{"name":"device_detector","version":"1.0.0","platform":"ruby","checksum":"b800fb3150b00c23e87b6768011808ac1771fffaae74c3238ebaf2b782947a7d"},
{"name":"devise","version":"4.8.1","platform":"ruby","checksum":"fdd48bbe79a89e7c1152236a70479842ede48bea4fa7f4f2d8da1f872559803e"},
{"name":"devise-two-factor","version":"4.0.2","platform":"ruby","checksum":"6548d2696ed090d27046f888f4fa7380f151e0f823902d46fd9b91e7d0cac511"},
......
......@@ -376,6 +376,7 @@ GEM
thor (>= 0.19, < 2)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
devfile (0.0.15.pre.alpha1)
device_detector (1.0.0)
devise (4.8.1)
bcrypt (~> 3.0)
......@@ -1713,6 +1714,7 @@ DEPENDENCIES
declarative_policy (~> 1.1.0)
deprecation_toolkit (~> 1.5.1)
derailed_benchmarks
devfile (~> 0.0.15.pre.alpha1)
device_detector
devise (~> 4.8.1)
devise-pbkdf2-encryptable (~> 0.0.0)!
......
......@@ -27,5 +27,6 @@ export const TYPENAME_USER = 'User';
export const TYPENAME_VULNERABILITIES_SCANNER = 'Vulnerabilities::Scanner';
export const TYPENAME_VULNERABILITY = 'Vulnerability';
export const TYPENAME_WORK_ITEM = 'WorkItem';
export const TYPE_CLUSTERS_AGENT = 'Clusters::Agent';
export const TYPE_USERS_SAVED_REPLY = 'Users::SavedReply';
export const TYPE_WORKSPACE = 'RemoteDevelopment::Workspace';
......@@ -175,3 +175,5 @@ def redacted_name
end
end
end
Types::UserInterface.prepend_mod
---
table_name: remote_development_agent_configs
classes:
- RemoteDevelopment::RemoteDevelopmentAgentConfig
feature_categories:
- remote_development
description: Remote Development Cluster Agent Configuration
introduced_by_url:
milestone:
gitlab_schema: gitlab_main
---
table_name: workspaces
classes:
- RemoteDevelopment::Workspace
feature_categories:
- remote_development
description: Remote Development Workspaces
introduced_by_url:
milestone:
gitlab_schema: gitlab_main
# frozen_string_literal: true
class CreateWorkspacesTable < Gitlab::Database::Migration[2.1]
def up
create_table :workspaces do |t|
t.timestamps_with_timezone null: false
# NOTE: All workspace foreign key references are currently `on_delete: :cascade`, because we have no support or
# testing around null values. However, in the future we may want to switch these to nullify, especially
# once we start introducing logging, metrics, billing, etc. around workspaces.
t.bigint :user_id, null: false, index: true
t.bigint :project_id, null: false, index: true
t.bigint :cluster_agent_id, null: false, index: true
t.datetime_with_timezone :desired_state_updated_at, null: false
t.datetime_with_timezone :responded_to_agent_at
t.integer :max_hours_before_termination, limit: 2, null: false
t.text :name, limit: 64, null: false, index: { unique: true }
t.text :namespace, limit: 64, null: false
t.text :desired_state, limit: 32, null: false
t.text :actual_state, limit: 32, null: false
t.text :editor, limit: 256, null: false
t.text :devfile_ref, limit: 256, null: false
t.text :devfile_path, limit: 2048, null: false
# NOTE: The limit on the devfile fields are arbitrary, and only added to avoid a rubocop
# Migration/AddLimitToTextColumns error. We expect the average devfile side to be small, perhaps ~0.5k for a
# devfile and ~2k for a processed_devfile, but to account for unexpected usage resulting in larger files,
# we have specified 65535, which allows for a YAML file with over 800 lines of an average 80-character
# length.
t.text :devfile, limit: 65535
t.text :processed_devfile, limit: 65535
t.text :url, limit: 1024, null: false
# NOTE: The resource version is currently backed by etcd's mod_revision.
# However, it's important to note that the application should not rely on the implementation details of
# the versioning system maintained by Kubernetes. We may change the implementation of resource version
# in the future, such as to change it to a timestamp or per-object counter.
# https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
# The limit of 64 is arbitrary.
t.text :deployment_resource_version, limit: 64
end
end
def down
drop_table :workspaces
end
end
# frozen_string_literal: true
class CreateWorkspacesUserForeignKey < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
def up
# NOTE: All workspace foreign key references are currently `on_delete: :cascade`, because we have no support or
# testing around null values. However, in the future we may want to switch these to nullify, especially
# once we start introducing logging, metrics, billing, etc. around workspaces.
add_concurrent_foreign_key :workspaces, :users, column: :user_id, on_delete: :cascade
end
def down
with_lock_retries do
remove_foreign_key :workspaces, column: :user_id
end
end
end
# frozen_string_literal: true
class CreateWorkspacesProjectForeignKey < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
def up
# NOTE: All workspace foreign key references are currently `on_delete: :cascade`, because we have no support or
# testing around null values. However, in the future we may want to switch these to nullify, especially
# once we start introducing logging, metrics, billing, etc. around workspaces.
add_concurrent_foreign_key :workspaces, :projects, column: :project_id, on_delete: :cascade
end
def down
with_lock_retries do
remove_foreign_key :workspaces, column: :project_id
end
end
end
# frozen_string_literal: true
class CreateWorkspacesClusterAgentForeignKey < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
def up
# NOTE: All workspace foreign key references are currently `on_delete: :cascade`, because we have no support or
# testing around null values. However, in the future we may want to switch these to nullify, especially
# once we start introducing logging, metrics, billing, etc. around workspaces.
add_concurrent_foreign_key :workspaces, :cluster_agents, column: :cluster_agent_id, on_delete: :cascade
end
def down
with_lock_retries do
remove_foreign_key :workspaces, column: :cluster_agent_id
end
end
end
# frozen_string_literal: true
class CreateRemoteDevelopmentAgentConfigsTable < Gitlab::Database::Migration[2.1]
def up
create_table :remote_development_agent_configs do |t|
t.timestamps_with_timezone null: false
t.bigint :cluster_agent_id, null: false, index: true
t.boolean :enabled, null: false
t.text :dns_zone, null: false, limit: 256
end
end
def down
drop_table :remote_development_agent_configs
end
end
# frozen_string_literal: true
class CreateRemoteDevelopmentAgentConfigAgentForeignKey < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
def up
add_concurrent_foreign_key :remote_development_agent_configs,
:cluster_agents, column: :cluster_agent_id, on_delete: :cascade
end
def down
with_lock_retries do
remove_foreign_key :remote_development_agent_configs, column: :cluster_agent_id
end
end
end
94810a223f2d37a673d690ba326577068c18d6353021a78a8f820cf8a95c756c
\ No newline at end of file
74a3b48267b16dcd9d3374b01604a0ae7f55dd35e681e3bf6bf5386ea4f6bdc3
\ No newline at end of file
bfa7df29a9f021b67db23127c6382161b131b77738f7a29dac5b64bc7431fd88
\ No newline at end of file
b2b2a169bb1d8581eec2706d03314d0675dcdf05b23b2787292b18ac1dfe7847
\ No newline at end of file
241ed02cdd479f06a5a4a817b2d27bfa970997167fbd67ddae1da8359830a2ea
\ No newline at end of file
08e0fd85bca9eff63f0fc5d1e34cca628ee191decddebcb90aaf98ce18f97147
\ No newline at end of file
......@@ -21837,6 +21837,25 @@ CREATE SEQUENCE releases_id_seq
 
ALTER SEQUENCE releases_id_seq OWNED BY releases.id;
 
CREATE TABLE remote_development_agent_configs (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
cluster_agent_id bigint NOT NULL,
enabled boolean NOT NULL,
dns_zone text NOT NULL,
CONSTRAINT check_9f5cd54d1c CHECK ((char_length(dns_zone) <= 256))
);
CREATE SEQUENCE remote_development_agent_configs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE remote_development_agent_configs_id_seq OWNED BY remote_development_agent_configs.id;
CREATE TABLE remote_mirrors (
id integer NOT NULL,
project_id integer,
......@@ -24614,6 +24633,49 @@ CREATE SEQUENCE work_item_widget_definitions_id_seq
 
ALTER SEQUENCE work_item_widget_definitions_id_seq OWNED BY work_item_widget_definitions.id;
 
CREATE TABLE workspaces (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
user_id bigint NOT NULL,
project_id bigint NOT NULL,
cluster_agent_id bigint NOT NULL,
desired_state_updated_at timestamp with time zone NOT NULL,
responded_to_agent_at timestamp with time zone,
max_hours_before_termination smallint NOT NULL,
name text NOT NULL,
namespace text NOT NULL,
desired_state text NOT NULL,
actual_state text NOT NULL,
editor text NOT NULL,
devfile_ref text NOT NULL,
devfile_path text NOT NULL,
devfile text,
processed_devfile text,
url text NOT NULL,
deployment_resource_version text,
CONSTRAINT check_15543fb0fa CHECK ((char_length(name) <= 64)),
CONSTRAINT check_157d5f955c CHECK ((char_length(namespace) <= 64)),
CONSTRAINT check_2b401b0034 CHECK ((char_length(deployment_resource_version) <= 64)),
CONSTRAINT check_77d1a2ff50 CHECK ((char_length(processed_devfile) <= 65535)),
CONSTRAINT check_8e363ee3ad CHECK ((char_length(devfile_ref) <= 256)),
CONSTRAINT check_8e4db5ffc2 CHECK ((char_length(actual_state) <= 32)),
CONSTRAINT check_9e42558c35 CHECK ((char_length(url) <= 1024)),
CONSTRAINT check_b70eddcbc1 CHECK ((char_length(desired_state) <= 32)),
CONSTRAINT check_d7ed376e49 CHECK ((char_length(editor) <= 256)),
CONSTRAINT check_dc58d56169 CHECK ((char_length(devfile_path) <= 2048)),
CONSTRAINT check_eb32879a3d CHECK ((char_length(devfile) <= 65535))
);
CREATE SEQUENCE workspaces_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE workspaces_id_seq OWNED BY workspaces.id;
CREATE TABLE x509_certificates (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
......@@ -25619,6 +25681,8 @@ ALTER TABLE ONLY release_links ALTER COLUMN id SET DEFAULT nextval('release_link
 
ALTER TABLE ONLY releases ALTER COLUMN id SET DEFAULT nextval('releases_id_seq'::regclass);
 
ALTER TABLE ONLY remote_development_agent_configs ALTER COLUMN id SET DEFAULT nextval('remote_development_agent_configs_id_seq'::regclass);
ALTER TABLE ONLY remote_mirrors ALTER COLUMN id SET DEFAULT nextval('remote_mirrors_id_seq'::regclass);
 
ALTER TABLE ONLY required_code_owners_sections ALTER COLUMN id SET DEFAULT nextval('required_code_owners_sections_id_seq'::regclass);
......@@ -25859,6 +25923,8 @@ ALTER TABLE ONLY work_item_types ALTER COLUMN id SET DEFAULT nextval('work_item_
 
ALTER TABLE ONLY work_item_widget_definitions ALTER COLUMN id SET DEFAULT nextval('work_item_widget_definitions_id_seq'::regclass);
 
ALTER TABLE ONLY workspaces ALTER COLUMN id SET DEFAULT nextval('workspaces_id_seq'::regclass);
ALTER TABLE ONLY x509_certificates ALTER COLUMN id SET DEFAULT nextval('x509_certificates_id_seq'::regclass);
 
ALTER TABLE ONLY x509_commit_signatures ALTER COLUMN id SET DEFAULT nextval('x509_commit_signatures_id_seq'::regclass);
......@@ -28003,6 +28069,9 @@ ALTER TABLE releases
ALTER TABLE ONLY releases
ADD CONSTRAINT releases_pkey PRIMARY KEY (id);
 
ALTER TABLE ONLY remote_development_agent_configs
ADD CONSTRAINT remote_development_agent_configs_pkey PRIMARY KEY (id);
ALTER TABLE ONLY remote_mirrors
ADD CONSTRAINT remote_mirrors_pkey PRIMARY KEY (id);
 
......@@ -28414,6 +28483,9 @@ ALTER TABLE ONLY work_item_types
ALTER TABLE ONLY work_item_widget_definitions
ADD CONSTRAINT work_item_widget_definitions_pkey PRIMARY KEY (id);
 
ALTER TABLE ONLY workspaces
ADD CONSTRAINT workspaces_pkey PRIMARY KEY (id);
ALTER TABLE ONLY x509_certificates
ADD CONSTRAINT x509_certificates_pkey PRIMARY KEY (id);
 
......@@ -32223,6 +32295,8 @@ CREATE UNIQUE INDEX index_releases_on_project_tag_unique ON releases USING btree
 
CREATE INDEX index_releases_on_released_at ON releases USING btree (released_at);
 
CREATE INDEX index_remote_development_agent_configs_on_cluster_agent_id ON remote_development_agent_configs USING btree (cluster_agent_id);
CREATE INDEX index_remote_mirrors_on_last_successful_update_at ON remote_mirrors USING btree (last_successful_update_at);
 
CREATE INDEX index_remote_mirrors_on_project_id ON remote_mirrors USING btree (project_id);
......@@ -33027,6 +33101,14 @@ CREATE UNIQUE INDEX index_work_item_widget_definitions_on_namespace_type_and_nam
 
CREATE INDEX index_work_item_widget_definitions_on_work_item_type_id ON work_item_widget_definitions USING btree (work_item_type_id);
 
CREATE INDEX index_workspaces_on_cluster_agent_id ON workspaces USING btree (cluster_agent_id);
CREATE UNIQUE INDEX index_workspaces_on_name ON workspaces USING btree (name);
CREATE INDEX index_workspaces_on_project_id ON workspaces USING btree (project_id);
CREATE INDEX index_workspaces_on_user_id ON workspaces USING btree (user_id);
CREATE INDEX index_x509_certificates_on_subject_key_identifier ON x509_certificates USING btree (subject_key_identifier);
 
CREATE INDEX index_x509_certificates_on_x509_issuer_id ON x509_certificates USING btree (x509_issuer_id);
......@@ -34657,6 +34739,9 @@ ALTER TABLE ONLY user_interacted_projects
ALTER TABLE ONLY merge_request_assignment_events
ADD CONSTRAINT fk_08f7602bfd FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
 
ALTER TABLE ONLY remote_development_agent_configs
ADD CONSTRAINT fk_0a3c0ada56 FOREIGN KEY (cluster_agent_id) REFERENCES cluster_agents(id) ON DELETE CASCADE;
ALTER TABLE ONLY dast_sites
ADD CONSTRAINT fk_0a57f2271b FOREIGN KEY (dast_site_validation_id) REFERENCES dast_site_validations(id) ON DELETE SET NULL;
 
......@@ -35344,6 +35429,9 @@ ALTER TABLE ONLY resource_link_events
ALTER TABLE ONLY metrics_users_starred_dashboards
ADD CONSTRAINT fk_bd6ae32fac FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
 
ALTER TABLE ONLY workspaces
ADD CONSTRAINT fk_bdb0b31131 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
ALTER TABLE ONLY project_compliance_framework_settings
ADD CONSTRAINT fk_be413374a9 FOREIGN KEY (framework_id) REFERENCES compliance_management_frameworks(id) ON DELETE CASCADE;
 
......@@ -35488,6 +35576,9 @@ ALTER TABLE ONLY web_hooks
ALTER TABLE ONLY security_scans
ADD CONSTRAINT fk_dbc89265b9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
 
ALTER TABLE ONLY workspaces
ADD CONSTRAINT fk_dc7c316be1 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
ALTER TABLE ONLY epics
ADD CONSTRAINT fk_dccd3f98fc FOREIGN KEY (assignee_id) REFERENCES users(id) ON DELETE SET NULL;
 
......@@ -35593,6 +35684,9 @@ ALTER TABLE ONLY user_project_callouts
ALTER TABLE ONLY approval_merge_request_rules
ADD CONSTRAINT fk_f726c79756 FOREIGN KEY (scan_result_policy_id) REFERENCES scan_result_policies(id) ON DELETE CASCADE;
 
ALTER TABLE ONLY workspaces
ADD CONSTRAINT fk_f78aeddc77 FOREIGN KEY (cluster_agent_id) REFERENCES cluster_agents(id) ON DELETE CASCADE;
ALTER TABLE ONLY cluster_agents
ADD CONSTRAINT fk_f7d43dee13 FOREIGN KEY (created_by_user_id) REFERENCES users(id) ON DELETE SET NULL;
 
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment