Skip to content

Seed an unconfirmed aircraft - #352

Open
oskarbarcz wants to merge 3 commits into
mainfrom
seed-unconfirmed-aircraft
Open

oskarbarcz wants to merge 3 commits into
mainfrom
seed-unconfirmed-aircraft

Conversation

@oskarbarcz

Copy link
Copy Markdown
Member

A fresh local stack had no unconfirmed aircraft, so the Unconfirmed badge and Confirm correctness (mypreflight/app#363) only showed after running a SimBrief import first. This seeds one.

The commit was written for #347, but it was pushed to that branch after #347 had merged, so it never reached main. It's cherry-picked here unchanged.

What changes

Checked

  • lint and test (1449) exit 0 on the final commit. The first unit run on the seed alone caught the two hold-coverage tests above.
  • test:functional passed all 1624 scenarios with the seed.
  • format: the whole repo is clean except its usual local .impeccable cache warning, a file git excludes and CI never sees.
  • prisma db push and the seed ran as part of the suite's reset.

Knowledge base: nothing to add, since #76 already describes aircraft from imports.

🤖 Generated with Claude Code

oskarbarcz and others added 3 commits November 18, 2026 12:22
Lufthansa gains D-AIXP, an A350-900 seeded the way a SimBrief import
creates one: unconfirmed, the operator's default livery, no SELCAL, base
or cabin. A fresh local stack now shows the unconfirmed state without
running an import first. Lufthansa's seeded fleet summary becomes nine
aircraft of types A339 and A359.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fleet coverage test asked every seeded type for curated hold data.
An import can add an aircraft of any type, and D-AIXP is seeded as one,
an A350-900 with no curated hold. It goes on its own list, next to the
degraded-path fixture, so the rest of the fleet is still checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

OpenTofu plan for infra

Commit b5cdea1 · Plan: 1 to add, 1 to change, 1 to destroy.

Show plan
 OpenTofu used the selected providers to generate the following execution
 plan. Resource actions are indicated with the following symbols:
!  ~ update in-place (current -> planned)
!-/+ destroy and then create replacement
 
 OpenTofu will perform the following actions:
 
   # aws_ecs_service.app will be updated in-place
!  ~ resource "aws_ecs_service" "app" {
         id                                 = "arn:aws:ecs:eu-central-1:805830022748:service/mypreflight/flight-tracker-api"
         name                               = "flight-tracker-api"
         tags                               = {}
!      ~ task_definition                    = "arn:aws:ecs:eu-central-1:805830022748:task-definition/flight-tracker-api:25" -> (known after apply)
         # (19 unchanged attributes hidden)
 
         # (4 unchanged blocks hidden)
     }
 
   # aws_ecs_task_definition.app must be replaced
!-/+ resource "aws_ecs_task_definition" "app" {
!      ~ arn                      = "arn:aws:ecs:eu-central-1:805830022748:task-definition/flight-tracker-api:25" -> (known after apply)
!      ~ arn_without_revision     = "arn:aws:ecs:eu-central-1:805830022748:task-definition/flight-tracker-api" -> (known after apply)
!      ~ container_definitions    = jsonencode(
!          ~ [
                 {
                     command                = [
                         "tunnel",
                         "--no-autoupdate",
                         "--metrics",
                         "localhost:20241",
                         "--grace-period",
                         "20s",
                         "run",
                     ]
                     dependsOn              = [
                         {
                             condition     = "HEALTHY"
                             containerName = "flight-tracker-api"
                         },
                     ]
                     environment            = []
                     essential              = true
                     healthCheck            = {
                         command     = [
                             "CMD",
                             "cloudflared",
                             "tunnel",
                             "--metrics",
                             "localhost:20241",
                             "ready",
                         ]
                         interval    = 5
                         retries     = 6
                         startPeriod = 10
                         timeout     = 2
                     }
                     image                  = "cloudflare/cloudflared@sha256:4955524aeaa379e154023d5a027c250f7b35041a2e7e950cf13f144bc9b9c5ba"
                     linuxParameters        = {
                         capabilities = {
                             add  = []
                             drop = [
                                 "ALL",
                             ]
                         }
                     }
                     logConfiguration       = {
                         logDriver = "awslogs"
                         options   = {
                             awslogs-group         = "/ecs/flight-tracker-api"
                             awslogs-region        = "eu-central-1"
                             awslogs-stream-prefix = "cloudflared"
                         }
                     }
                     mountPoints            = []
                     name                   = "cloudflared"
                     portMappings           = []
                     readonlyRootFilesystem = true
                     secrets                = [
                         {
                             name      = "TUNNEL_TOKEN"
                             valueFrom = "arn:aws:ssm:eu-central-1:805830022748:parameter/mypreflight/api/cloudflare-tunnel-token"
                         },
                     ]
                     systemControls         = []
                     volumesFrom            = []
                 },
!              ~ {
!                  ~ image                  = "ghcr.io/mypreflight/flight-tracker-api:3.91.0" -> "ghcr.io/mypreflight/flight-tracker-api:3.92.0"
                     name                   = "flight-tracker-api"
                     # (11 unchanged attributes hidden)
                 },
             ] # forces replacement
         )
!      ~ enable_fault_injection   = false -> (known after apply)
!      ~ id                       = "flight-tracker-api" -> (known after apply)
!      ~ revision                 = 25 -> (known after apply)
-      - tags                     = {} -> null
         # (11 unchanged attributes hidden)
 
-      - volume {
-          - configure_at_launch = false -> null
-          - name                = "tmp" -> null
         }
+      + volume {
+          + configure_at_launch = (known after apply)
+          + name                = "tmp"
         }
 
         # (1 unchanged block hidden)
     }
 
 Plan: 1 to add, 1 to change, 1 to destroy.
 
 Changes to Outputs:
!  ~ app_image        = "ghcr.io/mypreflight/flight-tracker-api:3.91.0" -> "ghcr.io/mypreflight/flight-tracker-api:3.92.0"

Workflow run

This branch has not been deployed

No deployments
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.

1 participant