You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 91332e3
Browse filesBrowse the repository at this point in the historyBrowse files
roberttwang
committed
fix(deploy): apply artifact storage migration before startup
Copy file name to clipboardExpand all lines: docs/deployment.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -217,10 +217,15 @@ For an external MySQL deployment, review that migration and check column existen
217
217
| Required upgrade migrations |`009_bot_interactions_utf8mb4.sql`, `036_git_http_credentials.sql`, `041_native_sandbox_inline_assets.sql`| Follow each migration's timing and prerequisites. [Migrating existing GitHub credentials](#migrating-existing-github-credentials)|
218
218
| Optional backfills and rewrites of existing rows |`016_public_optional_repositories.sql`, `021_assistant_session_sources.sql`| Run them if the installation needs the converted rows |
219
219
220
-
For an existing database with `run_artifacts.content` defined as `TEXT`, apply
221
-
`migrations/042_run_artifacts_content_mediumtext.sql` before starting the upgraded
222
-
platform. It widens the column for the 1 MiB artifact contract and preserves
223
-
existing data, character set, collation and nullability. The script is safe to rerun.
220
+
Compose runs `migrations/042_run_artifacts_content_mediumtext.sql` before the
221
+
platform starts, including during `./start.sh pull`. The native development
222
+
script runs the same migration against its Compose database. It widens an existing
223
+
`run_artifacts.content` column from `TEXT` to `MEDIUMTEXT` for the 1 MiB artifact
224
+
contract and preserves existing data, character set, collation and nullability.
225
+
For a deployment using an external MySQL server and no Compose startup, run this
226
+
SQL file in the deployment's database upgrade step before starting the new binary.
227
+
If the Compose migration fails, review `docker compose --profile platform logs
228
+
artifact-migration`, resolve the database error and rerun the upgrade.
t.Fatalf("rejected write advanced the run or published an artifact: approval=%s artifacts=%d published=%t", run.Nodes["approval"].Status, len(run.Artifacts), artifactPublished(run))
t.Fatalf("rejected write advanced the run or published an artifact: approval=%s artifacts=%d plan published=%t", run.Nodes["approval"].Status, len(run.Artifacts), planPublished(run))
column=$(docker compose -f "$fixture/compose.yaml" --env-file "$fixture/.env"exec -T mysql \
68
+
sh -c 'MYSQL_PWD="$MYSQL_PASSWORD" exec mysql -NB -u loopforge loopforge' \
69
+
<<<'SELECT CONCAT_WS("/", DATA_TYPE, COLLATION_NAME, IS_NULLABLE) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = "run_artifacts" AND COLUMN_NAME = "content";')
0 commit comments