Skip to content

Write the launch config object (spawn:config) so spawn-ts can move past spored 0.149.0 (spawn v0.150.0, spawn#1359) #110

Closed

Description

@scttfrdmn

Follow-up to #108. The parity PR resolves #108 by pinning spawn-ts's bootstrap and spored to spawn v0.149.0 (SPAWN_BOOTSTRAP_VERSION), the newest spored that reads the hook settings spawn-ts writes as tags. That is permanent and correct, but it freezes spawn-ts instances on spored 0.149.0: no later spored fix reaches them.

To move past 0.149.0, spawn-ts has to write the launch config object that spawn#1359 / PR spore-host/spawn#1420 introduce (unmerged; targets v0.150.0):

  • The 8 settings spawn-ts writes that move are spawn:spot-webhook-url, webhook-correlation, webhook-timeout, notify-url, notify-platform, notify-command, active-processes and active-ports. idle-cpu moves too; spawn-ts writes it, and spored v0.150.0+ ignores the hook tags spawn-ts writes (webhooks, notify, active ports/processes) #108 does not list it.
  • Object format: canonical JSON {"schema":1,"settings":{...}}, keys sorted, no HTML escaping, no trailing newline. It is named by the tag spawn:config=<sha256>. A launch that sets none of the settings has no object and no tag.
  • Transport: user-data seed, not S3. spored v0.150.0 reads /etc/spawn/launch-config.json first and uses it only if it hashes to the instance's own spawn:config (pkg/launchconfig Load). The Go bootstrap already seeds it that way for detached sweep members (echo <base64> | base64 -d > /etc/spawn/launch-config.json; chmod 600, before the body). So a browser can deliver the object with no S3 write. That avoids three problems: a CORS configuration the staging bucket does not have, EnsureStagingBucket's bucket-setup calls, and an instance-role grant that a caller-supplied profile may lack.

Done when spawn v0.150.0 is tagged: re-generate the body and fixtures with scripts/gen-go-fixtures.sh 0.150.0, move the pin, and write the object.

Known gap with the seed-only transport: a persistent-Spot replacement boots without the cache and fetches from S3. spawn-ts makes only one-time Spot requests (the parity PR refuses a Spot launch that would need a stop), so it has no replacements.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: awsenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions