Skip to content

SW-8251 Port terraware-web CI workflow to Buildkite#5545

Open
constanzauanini wants to merge 6 commits intomainfrom
constanza/SW-8251
Open

SW-8251 Port terraware-web CI workflow to Buildkite#5545
constanzauanini wants to merge 6 commits intomainfrom
constanza/SW-8251

Conversation

@constanzauanini
Copy link
Copy Markdown
Contributor

I did this with Claude and based on @sgrimm server pr

@constanzauanini constanzauanini requested a review from a team as a code owner April 2, 2026 14:25
Copy link
Copy Markdown
Contributor

@sgrimm sgrimm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems pretty close. My original terraware-server PR got a few things wrong that I've since fixed, so some of my comments are about those things.

.buildkite/scripts/install-deps.sh --node --tools

echo "--- :vercel: Install Vercel CLI"
npm install -g vercel
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the -g here so we don't install this on the host, just in the repo's node_modules?

Comment on lines +26 to +29
buildkite-agent annotate \
--style info \
--context vercel-preview \
"Vercel preview: [${preview_url}](${preview_url})"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

case "$arg" in
--node) install_node ;;
--tools) install_jq && install_yq && install_rsync ;;
--playwright-deps) install_playwright_system_deps ;;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename this to --playwright so it's more consistent with the other arguments.

- *shallow-clone
- cache#v1.10.0:
<<: *cache-node-modules-args
manifest: 'yarn.lock'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably makes sense to move this up to cache-node-modules-args.

save:
- file
- branch
force: true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you shouldn't need force here or on the item below this. I had it in my original terraware-server Buildkite PR but later I removed it because it was causing unnecessary cache updates.

Comment on lines +49 to +50
path: '.cache/ms-playwright'
manifest: 'yarn.lock'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could create a cache-playwright-args anchor and move these there so they don't need to be repeated below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove this, it is only needed for e2e tests

- cache#v1.10.0: &promote-cache
<<: *cache-node-modules-args
save: 'pipeline'
force: true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for force here if you add the manifest to cache-node-modules-args.

Comment on lines +208 to +212
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(numBatches === 1 ? strings.BATCHES_SINGULAR : strings.BATCHES_PLURAL) as any,
totalWithdrawn,
totalWithdrawn === 1 ? strings.SEEDLINGS_SINGULAR : (strings.SEEDLINGS_PLURAL as any)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(totalWithdrawn === 1 ? strings.SEEDLINGS_SINGULAR : strings.SEEDLINGS_PLURAL) as any
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These seem unrelated to the Buildkite build.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This made the linter step fail, that's why I added, not sure how it was not failing before

Comment on lines +106 to +112
- label: ':amazon-ecs: Deploy to ECS'
key: 'deploy'
depends_on: 'promote-caches'
if: "build.branch == 'main' || build.tag =~ /^v[0-9]+\\.[0-9]+/"
plugins:
- *shallow-clone
command: .buildkite/scripts/deploy-ecs.sh
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical dependency chain bug: The deploy step depends on promote-caches, but promote-caches only runs on the main branch (line 95). However, deploy is configured to run on both main branch AND version tags (line 109). When deploying from a version tag like v1.2.3, the promote-caches step will be skipped because it's not on the main branch, causing the deploy step to be blocked waiting for a dependency that will never execute.

Fix:

- label: ':amazon-ecs: Deploy to ECS'
  key: 'deploy'
  depends_on: 'docker'  # Change from 'promote-caches' to 'docker'
  if: "build.branch == 'main' || build.tag =~ /^v[0-9]+\\.[0-9]+/"
  plugins:
    - *shallow-clone
  command: .buildkite/scripts/deploy-ecs.sh

Or add conditional dependency handling if Buildkite supports it.

Suggested change
- label: ':amazon-ecs: Deploy to ECS'
key: 'deploy'
depends_on: 'promote-caches'
if: "build.branch == 'main' || build.tag =~ /^v[0-9]+\\.[0-9]+/"
plugins:
- *shallow-clone
command: .buildkite/scripts/deploy-ecs.sh
- label: ':amazon-ecs: Deploy to ECS'
key: 'deploy'
depends_on: 'docker'
if: "build.branch == 'main' || build.tag =~ /^v[0-9]+\\.[0-9]+/"
plugins:
- *shallow-clone
command: .buildkite/scripts/deploy-ecs.sh

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants