Vue 3 migration: Terraform state page

Part of &23285.

This page shows Terraform state files. It has one entrypoint.

Entrypoints & apps

Entrypoint Vue apps mounted Page-specific components
app/assets/javascripts/pages/projects/terraform/index/index.js TerraformList, mounted with initVueApp from ~/terraform, using VueApollo 5, all in terraform/components

Risks

  • The app mounts with initVueApp, so the root element carries the data-gitlab-vue3-app marker. A silent fallback to Vue 2 is therefore detectable.
  • The page registers GlToast as a Vue plugin and sets custom Apollo cache normalisation through defaultDataIdFromObject. Plugin registration and cache identity both changed between Vue 2 and Vue 3. Check that toasts still appear, and that the list updates after a state file is locked or removed.

Tasks / MRs

  • MR 1: add the vue3_migrate_terraform flag definition and one vue3_migration.yml.
  • Render the Terraform state page with the flag on. Confirm the root element carries data-gitlab-vue3-app.
  • Lock a state file, then remove one. Check the toast appears and the list updates.
  • Write a Sentry query for this flag before ramping.
  • Ramp the flag as shown below.
  • Cleanup MR: move the yml to status: migrated and remove the flag.

Rollout

enable for gitlab-org (dogfood)
→ 10% → 50% → 100%, with a soak between steps
→ default_enabled: true → cleanup MR

Notes

  • Restart the Vite dev server after you add a vue3_migration.yml. Otherwise the entry map stays stale, the app never mounts, and no console error appears.
  • Local GDK runs Vue 2. Stub the flag off to check rendering in feature specs.