sourcegraph/internal/database
Erik Seliger d04e821ceb
Experiment: Natively run SSBC in docker (#44034)
This adds an experimental code path that I will use to test a docker-only execution mode for server-side batch changes. This code path is never executed for customers until we make the switch when we deem it ready. This will allow me to dogfood this while it's not available to customer instances yet.

Ultimately, the goal of this is to make executors simply be "the job runner platform through a generic interface". Today, this depends on src-cli to do a good bunch of the work. This is a blocker for going full docker-based with executors, which will ultimately be a requirement on the road to k8s-based executors.

As this removes the dependency on src-cli, nothing but the job interface and API endpoints tie executor and Sourcegraph instance together. Ultimately, this will allow us to support larger version spans between the two (pending executors going GA and being feature-complete).

Known issues/limitations:

Steps skipped in between steps that run don't work yet
Skipping steps dynamically is inefficient as we cannot tell the executor to skip a step IF X, so we replace the script by exit 0
It is unclear if all variants of file mounts still work. Basic cases do work. Files used to be read-only in src-cli, they aren't now, but content is still reset in between steps.
The assumption that everything operates in /work is broken here, because we need to use what executors give us to persist out-of-repo state in between containers (like the step result from the previous step)
It is unclear if workspace mounts work
Cache keys are not correctly computed if using workspace mounts - the metadataretriever is nil
We still use log outputs to transfer the AfterStepResults to the Sourcegraph instance, this should finally become an artifact instead. Then, we don't have to rely on the execution_log_entires anymore and can theoretically prune those after some time. This column is currently growing indefinitely.
It depends on tee being available in the docker images to capture the cmd.stdout/cmd.stderr properly for template variable rendering
Env-vars are not rendered in their evaluated form post-execution
File permissions are unclear and might be similarly broken to how they are now - or even worse
Disclaimer: It's not feature complete today! But it is also not hitting any default code paths either. As development on this goes on, we can eventually remove the feature flag and run the new job format on all instances. This PR handles fallback of rendering old records correctly in the UI already.
2022-11-10 00:20:43 +01:00
..
basestore basestore: Add NewCallbackScanner (#43651) 2022-10-31 12:39:50 +00:00
batch db: add NewInserterWithConflict (#42800) 2022-10-13 10:08:56 -04:00
connections sg hacking hour: reduce log output from migrations in tests (#40023) 2022-08-05 19:16:34 +02:00
dbcache Simplify ListIndexableRepos (#43325) 2022-11-04 12:41:44 +01:00
dbconn dbconn: Modify query text to tag source, other metadata (#42588) 2022-10-13 12:34:37 +00:00
dbtest dbtest: skip if -short specified (#43532) 2022-10-27 11:48:16 +02:00
dbutil chore: move all NullxxxColumn functions to dbutil package (#42882) 2022-10-13 11:27:10 +01:00
locker dbconn: Modify query text to tag source, other metadata (#42588) 2022-10-13 12:34:37 +00:00
migration migrator: Do not print drift error unconditionally (#44176) 2022-11-09 21:43:53 +00:00
postgresdsn postgresdsn: add a test case for search_path (#40731) 2022-08-23 11:54:15 +00:00
access_tokens_test.go Add security events for access token deletions (#43680) 2022-11-03 09:54:27 +00:00
access_tokens.go Add security events for access token deletions (#43680) 2022-11-03 09:54:27 +00:00
authenticator_test.go Standardize database encryption (#40050) 2022-08-08 20:29:09 +00:00
authenticator.go encryption: Lazily decrypt batch_changes_site_credentials (#40228) 2022-08-15 15:58:13 +00:00
authz.go admin-analytics: add user administration backend API endpoints (#39926) 2022-08-05 17:18:21 +06:00
bitbucket_project_permissions_test.go dbconn: Modify query text to tag source, other metadata (#42588) 2022-10-13 12:34:37 +00:00
bitbucket_project_permissions.go dbconn: Modify query text to tag source, other metadata (#42588) 2022-10-13 12:34:37 +00:00
CODENOTIFY chore: clean up some Codenotify for Joe (#42334) 2022-09-30 00:28:58 +00:00
conf_test.go Revive #42039 (#43168) 2022-10-19 17:57:01 +02:00
conf.go Revive #42039 (#43168) 2022-10-19 17:57:01 +02:00
database_test.go database: fix wrong assertions in nested-transactions test (#40012) 2022-08-05 14:38:37 +00:00
database.go Add zoekt_repos table, populate it in worker, add endpoint for Zoekt to update (#43289) 2022-10-27 14:07:19 +02:00
dbstore_db_test.go Remove dbtesting package (#28426) 2021-12-02 08:24:03 -07:00
doc.go db: rename internal/db package to internal/database (#17607) 2021-01-25 20:24:15 +04:00
encryption_tables.go executors: Implement stores for secrets (#43257) 2022-10-24 23:44:15 +02:00
encryption_test.go Standardize database encryption (#40050) 2022-08-08 20:29:09 +00:00
encryption_utils.go Standardize database encryption (#40050) 2022-08-08 20:29:09 +00:00
encryption.go Standardize database encryption (#40050) 2022-08-08 20:29:09 +00:00
err_test.go all: use any instead of interface{} (#35102) 2022-05-09 10:59:39 +02:00
event_logs_test.go sg: fix lint issues for urls and shell (#43248) 2022-10-20 23:46:48 +02:00
event_logs.go dbconn: Modify query text to tag source, other metadata (#42588) 2022-10-13 12:34:37 +00:00
executor_secret_access_logs_test.go executors: Implement stores for secrets (#43257) 2022-10-24 23:44:15 +02:00
executor_secret_access_logs.go executors: Implement stores for secrets (#43257) 2022-10-24 23:44:15 +02:00
executor_secrets_test.go executors: Implement stores for secrets (#43257) 2022-10-24 23:44:15 +02:00
executor_secrets.go Enable use of executor secrets for SSBC (#43940) 2022-11-07 20:26:41 +01:00
executors_test.go executors: Undo service-ification for now (#43001) 2022-10-14 19:00:57 +01:00
executors.go executors: Undo service-ification for now (#43001) 2022-10-14 19:00:57 +01:00
external_accounts_test.go go + golangci: update to go to 1.19.3 and golanci to 1.50.1 (#43747) 2022-11-02 15:08:25 +02:00
external_accounts.go dbconn: Modify query text to tag source, other metadata (#42588) 2022-10-13 12:34:37 +00:00
external_services_test.go repos: Persist running repo counts during external service sync. (#42933) 2022-10-17 07:55:03 +00:00
external_services.go repos: Persist running repo counts during external service sync. (#42933) 2022-10-17 07:55:03 +00:00
feature_flags_test.go logging(gitstart): migrate internal/database to lib/log (#36466) 2022-06-20 23:04:01 +00:00
feature_flags.go Enable adding overrides for rollout feature flags (#37312) 2022-06-16 18:01:40 +05:30
gen.go sg migration: Remove schemadoc (#35905) 2022-05-24 16:19:19 +00:00
gen.sh migration: Improve drift schema fetching (#37043) 2022-06-27 16:06:42 -05:00
github_app_helper.go internal/database/github_app_helper.go: Indent code (#43999) 2022-11-07 17:39:09 +05:30
gitserver_localclone_jobs_test.go logging(gitstart): migrate internal/database to lib/log (#36466) 2022-06-20 23:04:01 +00:00
gitserver_localclone_jobs.go dbconn: Modify query text to tag source, other metadata (#42588) 2022-10-13 12:34:37 +00:00
gitserver_repos_test.go repos: consolidate test helpers (#40483) 2022-08-17 14:33:31 +00:00
gitserver_repos.go Fix missing return err statement (#44126) 2022-11-09 01:26:46 +01:00
global_state_test.go global state: Rewrite store (#38781) 2022-07-15 09:56:53 -05:00
global_state.go dbconn: Modify query text to tag source, other metadata (#42588) 2022-10-13 12:34:37 +00:00
helpers.go db: rename internal/db package to internal/database (#17607) 2021-01-25 20:24:15 +04:00
main_test.go deps: upgrade github.com/sourcegraph/log (#41058) 2022-09-01 08:01:59 -07:00
mockerr.go db: rename internal/db package to internal/database (#17607) 2021-01-25 20:24:15 +04:00
mocks_temp.go Simplify ListIndexableRepos (#43325) 2022-11-04 12:41:44 +01:00
namespaces_test.go logging(gitstart): migrate internal/database to lib/log (#36466) 2022-06-20 23:04:01 +00:00
namespaces.go dbconn: Modify query text to tag source, other metadata (#42588) 2022-10-13 12:34:37 +00:00
oauth_token_helper_test.go Add refreshable token interface for GitHub and GitLab (#42629) 2022-10-17 16:30:37 +02:00
oauth_token_helper.go Add refreshable token interface for GitHub and GitLab (#42629) 2022-10-17 16:30:37 +02:00
org_invitations_test.go logging(gitstart): migrate internal/database to lib/log (#36466) 2022-06-20 23:04:01 +00:00
org_invitations.go DB Backend: embed dbutil.DB in TransactableHandle (#37165) 2022-06-14 17:45:10 +00:00
org_members_db_test.go logging(gitstart): migrate internal/database to lib/log (#36466) 2022-06-20 23:04:01 +00:00
org_members.go DB Backend: embed dbutil.DB in TransactableHandle (#37165) 2022-06-14 17:45:10 +00:00
org_stats_test.go logging(gitstart): migrate internal/database to lib/log (#36466) 2022-06-20 23:04:01 +00:00
org_stats.go DB Backend: embed dbutil.DB in TransactableHandle (#37165) 2022-06-14 17:45:10 +00:00
orgs_test.go Update username constraint to allow underscores (#41723) 2022-09-26 09:00:25 +00:00
orgs.go DB Backend: embed dbutil.DB in TransactableHandle (#37165) 2022-06-14 17:45:10 +00:00
phabricator_test.go Add tests for our Phabricator store (#41570) 2022-09-19 11:26:37 +02:00
phabricator.go Add tests for our Phabricator store (#41570) 2022-09-19 11:26:37 +02:00
repo_kvps_test.go Search backend: add support for arbitrary repo key-value pairs (#40112) 2022-08-11 15:17:33 +00:00
repo_kvps.go Search backend: add support for arbitrary repo key-value pairs (#40112) 2022-08-11 15:17:33 +00:00
repo_statistics_test.go repo stats tables: fix migration to only update function (#41038) 2022-08-30 13:23:00 +02:00
repo_statistics.go dbconn: Modify query text to tag source, other metadata (#42588) 2022-10-13 12:34:37 +00:00
repos_perm_test.go Simplify authzQuery (#43798) 2022-11-07 14:39:37 +02:00
repos_perm.go Simplify authzQuery (#43798) 2022-11-07 14:39:37 +02:00
repos_test.go Simplify ListIndexableRepos (#43325) 2022-11-04 12:41:44 +01:00
repos.go perf: Better optimize ListSourcegraphDotComIndexableRepos (#44129) 2022-11-09 14:46:33 +00:00
saved_searches_test.go logging(gitstart): migrate internal/database to lib/log (#36466) 2022-06-20 23:04:01 +00:00
saved_searches.go DB Backend: embed dbutil.DB in TransactableHandle (#37165) 2022-06-14 17:45:10 +00:00
schema.codeinsights.json insights: extend insight series API for timeout alerts (#43452) 2022-11-09 10:56:02 -07:00
schema.codeinsights.md insights: extend insight series API for timeout alerts (#43452) 2022-11-09 10:56:02 -07:00
schema.codeintel.json codeintel: Create background job to reconcile abandoned uploads (#43443) 2022-10-31 13:21:28 -05:00
schema.codeintel.md codeintel: Create background job to reconcile abandoned uploads (#43443) 2022-10-31 13:21:28 -05:00
schema.json Experiment: Natively run SSBC in docker (#44034) 2022-11-10 00:20:43 +01:00
schema.md Experiment: Natively run SSBC in docker (#44034) 2022-11-10 00:20:43 +01:00
search_contexts_test.go logging(gitstart): migrate internal/database to lib/log (#36466) 2022-06-20 23:04:01 +00:00
search_contexts.go dbconn: Modify query text to tag source, other metadata (#42588) 2022-10-13 12:34:37 +00:00
security_event_logs_test.go Add GitHub/GitLab logins (fail/success) to security events (#43886) 2022-11-07 15:16:49 -04:00
security_event_logs.go Add GitHub/GitLab logins (fail/success) to security events (#43886) 2022-11-07 15:16:49 -04:00
settings_test.go Revive #42039 (#43168) 2022-10-19 17:57:01 +02:00
settings.go Revive #42039 (#43168) 2022-10-19 17:57:01 +02:00
sub_repo_perms_store_test.go authz: Rename RepoIdSupported to RepoIDSupported (#43556) 2022-10-27 17:51:15 +02:00
sub_repo_perms_store.go authz: Rename RepoIdSupported to RepoIDSupported (#43556) 2022-10-27 17:51:15 +02:00
survey_responses_test.go NPS Survey: Update use cases to be a free-form field (#38387) 2022-07-08 14:13:42 +01:00
survey_responses.go NPS Survey: Update use cases to be a free-form field (#38387) 2022-07-08 14:13:42 +01:00
temporary_settings_test.go logging(gitstart): migrate internal/database to lib/log (#36466) 2022-06-20 23:04:01 +00:00
temporary_settings.go database: remove dbutil-based constructors (#36210) 2022-05-30 23:48:20 +00:00
test_util.go Standardize database encryption (#40050) 2022-08-08 20:29:09 +00:00
testing.go all: use any instead of interface{} (#35102) 2022-05-09 10:59:39 +02:00
user_credentials_test.go encryption: Lazily decrypt user_credentials (#40177) 2022-08-15 14:47:23 +00:00
user_credentials.go dbconn: Modify query text to tag source, other metadata (#42588) 2022-10-13 12:34:37 +00:00
user_emails_test.go logging(gitstart): migrate internal/database to lib/log (#36466) 2022-06-20 23:04:01 +00:00
user_emails.go Finish some deprecations and remove more unused routes (#39304) 2022-07-25 11:30:38 +00:00
user_public_repos_test.go logging(gitstart): migrate internal/database to lib/log (#36466) 2022-06-20 23:04:01 +00:00
user_public_repos.go database: remove dbutil-based constructors (#36449) 2022-06-02 14:46:50 +00:00
users_builtin_auth_test.go logging(gitstart): migrate internal/database to lib/log (#36466) 2022-06-20 23:04:01 +00:00
users_test.go flake: Disable Users_Delete in internal/database (#42906) 2022-10-12 22:23:36 +00:00
users.go auth: periodically clean up expired SOAP users (#43853) 2022-11-09 21:33:56 +08:00
webhook_logs_test.go Add webhook logging to new webhooks handler (#43446) 2022-10-27 09:58:37 -06:00
webhook_logs.go Add webhook logging to new webhooks handler (#43446) 2022-10-27 09:58:37 -06:00
webhooks_test.go Have dedicated CodeHostBaseURL type (#43354) 2022-10-25 10:01:16 +02:00
webhooks.go Have dedicated CodeHostBaseURL type (#43354) 2022-10-25 10:01:16 +02:00
zoekt_repos_test.go Add zoekt_repos table, populate it in worker, add endpoint for Zoekt to update (#43289) 2022-10-27 14:07:19 +02:00
zoekt_repos.go Add zoekt_repos table, populate it in worker, add endpoint for Zoekt to update (#43289) 2022-10-27 14:07:19 +02:00