diff --git a/.github/workflows/manual-deploy.yml b/.github/workflows/manual-deploy.yml index 987db67a28..8b37f081b4 100644 --- a/.github/workflows/manual-deploy.yml +++ b/.github/workflows/manual-deploy.yml @@ -24,7 +24,7 @@ jobs: dockerfile: "packages/ai-bot/Dockerfile" deploy-ai-bot: - needs: [build-ai-bot, migrate-db] + needs: [build-ai-bot, post-migrate-db] name: Deploy ai-bot to AWS ECS uses: cardstack/gh-actions/.github/workflows/ecs-deploy.yml@main secrets: inherit @@ -34,6 +34,7 @@ jobs: cluster: ${{ inputs.environment }} service-name: "boxel-ai-bot-${{ inputs.environment }}" image: ${{ needs.build-ai-bot.outputs.image }} + wait-for-service-stability: false build-host: name: Build host @@ -100,10 +101,18 @@ jobs: cluster: ${{ inputs.environment }} service-name: "boxel-pg-migration-${{ inputs.environment }}" image: ${{ needs.build-pg-migration.outputs.image }} + wait-for-service-stability: false + + post-migrate-db: + name: Wait for db-migration + needs: [migrate-db] + runs-on: ubuntu-latest + steps: + - run: sleep 240 deploy-realm-server: name: Deploy realm server - needs: [build-realm-server, deploy-host, migrate-db] + needs: [build-realm-server, deploy-host, post-migrate-db] uses: cardstack/gh-actions/.github/workflows/ecs-deploy.yml@main secrets: inherit with: @@ -112,3 +121,4 @@ jobs: cluster: ${{ inputs.environment }} service-name: "boxel-realm-server-${{ inputs.environment }}" image: ${{ needs.build-realm-server.outputs.image }} + wait-for-service-stability: false diff --git a/packages/runtime-common/realm.ts b/packages/runtime-common/realm.ts index 8d9c6768ad..837429bafe 100644 --- a/packages/runtime-common/realm.ts +++ b/packages/runtime-common/realm.ts @@ -247,7 +247,6 @@ export class Realm { #router: Router; #log = logger('realm'); #perfLog = logger('perf'); - #startTime = Date.now(); #updateItems: UpdateItem[] = []; #flushUpdateEvents: Promise | undefined; #recentWrites: Map = new Map(); @@ -590,6 +589,7 @@ export class Realm { async #startup() { await Promise.resolve(); + let startTime = Date.now(); let isNewIndex = await this.#realmIndexUpdater.isNewIndex(); let promise = this.#realmIndexUpdater.run(); if (isNewIndex) { @@ -601,7 +601,7 @@ export class Realm { data: { type: 'full', realmURL: this.url }, }); this.#perfLog.debug( - `realm server startup in ${Date.now() - this.#startTime}ms`, + `realm server ${this.url} startup in ${Date.now() - startTime} ms`, ); }