Skip to content

pulumi lexicon: engine detection reads plywood's config and PULUMI_BACKEND_URL, not only Pulumi.yaml #4559

Closed

Description

@lex00

Ruling (maintainer, 2026-10-27)

chant's engine detection also reads plywood's config or the backend environment variable, so one place answers "which engine" for a stack.

Evidence (research, origin/main)

Three places decide the engine today, and they can disagree:

  • plunge reads the login state, PULUMI_BACKEND_URL, or backend.url in Pulumi.yaml (plunge site/src/content/docs/use/start.md:136-162, pkg/cmd/pulumi/auth/login.go:216).
  • chant reads only Pulumi.yaml backend.url (lexicons/pulumi/src/run.ts:62-72, lexicons/pulumi/src/member-engine.ts:22-24). PUL015 catches one direction of the mismatch.
  • plywood reads plywood.yml engine: and backend: (plywood site/src/content/docs/reference/config.md:25-26, guides/choose-an-engine.mdx:10).

A team that runs pulumi login plunge+s3://... and never sets backend.url gets plunge from the CLI, while chant sees stock Pulumi.

Work

  • Engine resolution in CI core takes, in order: a product-supplied engine and backend (plywood passes plywood.yml's engine and backend), PULUMI_BACKEND_URL from the job environment, then Pulumi.yaml backend.url.
  • pulumiMemberEngine (member-engine.ts) uses the resolved value instead of reading Pulumi.yaml alone.
  • Report the source of the decision in the plan output, like choudoufu's printed record store (choudoufu#2293).
  • PUL015 checks both directions against the resolved value. Not built (maintainer ruling, 2026-10-29): the reverse case can be a valid plunge setup

Placement

chant CI core resolves the engine, since the product config and the job environment are CI inputs. The pulumi lexicon consumes it. The research suggested member-engine.ts alone; settle the split in the PR, with plywood holding no detection logic.

Related: chant#4541, plywood#1, plywood#3, chant#4562.

Activity

  1. added
    area:ci
    on Oct 27, 2026
  2. lex00 commented on Oct 27, 2026

    @lex00
    ContributorAuthor

    Maintainer ruling: detection lives in the pulumi lexicon next to member-engine.ts (Pulumi.yaml, PULUMI_BACKEND_URL, plywood.yml). CI core asks the lexicon.

  3. changed the title [-]CI core: engine detection reads plywood's config and PULUMI_BACKEND_URL, not only Pulumi.yaml[/-] [+]pulumi lexicon: engine detection reads plywood's config and PULUMI_BACKEND_URL, not only Pulumi.yaml[/+] on Oct 27, 2026
  4. added
    epic:ci-products
    epic:plywood
    on Oct 27, 2026
  5. lex00 commented on Oct 27, 2026

    @lex00
    ContributorAuthor

    Merged to integration/ci-products at b765ccb (unit branch unit/cp-chant-4559).

    Per the ruling, detection sits in the pulumi lexicon next to member-engine.ts, and plywood holds no detection logic. pulumiMemberEngine(dir, configured?, opts?) in lexicons/pulumi/src/member-engine.ts now answers in this order:

    1. the member's config (configured, which is also where a product passes its engine)
    2. engine: in the nearest plywood.yml, searched from the member dir up to the repo root (.git); a plunge+ or plunge: backend: string there also means plunge
    3. PULUMI_BACKEND_URL in the job environment, when it starts with plunge+ or plunge:
    4. backend.url in Pulumi.yaml, as before
    5. pulumi

    The result gains source ("member-config", "plywood.yml", "PULUMI_BACKEND_URL", "Pulumi.yaml" or "default") next to because, so the plan output can print where the decision came from. opts.env and opts.plywoodRoot make it testable without touching the process environment. readPlywoodEngine and the new types are re-exported from run.ts. Only the module comment and the re-export line in run.ts changed; the allowlist is untouched (chant#4541 owns it).

    Files: lexicons/pulumi/src/member-engine.ts, member-engine.test.ts (new), run.ts (comment and re-export), run.test.ts (existing test updated for source), lint/post-synth/pul015.ts (comment). Tests are written, not run. The pulumi lexicon compiles under scripts/typecheck.ts; the only errors it reports are the unbuilt generated aws exports, unrelated to this unit.

    Still missing:

    • Printing source in the plan output (the chant#4541 plan step is the consumer).
    • PUL015 now sees plywood.yml and the environment through the same call, so the pulumi-configured-on-plunge direction is covered. The reverse (engine plunge with a stock backend) stays unreported, since plunge opens stock backends too.
    • Callers that pass member.engine still pass only the member config; a product passing its own engine and backend through the chant config is wired when plywood#5 lands.
  6. lex00 commented on Oct 29, 2026

    @lex00
    ContributorAuthor

    Close-out (2026-10-29)

    Merged to main: b765ccb (engine detection in the pulumi lexicon, per the maintainer ruling that detection lives next to member-engine.ts; unit commit 6af5d0d). pulumi-up (8fafa43, #4541) consumes it.

    Ticked: engine resolution order (member config, plywood.yml, PULUMI_BACKEND_URL, Pulumi.yaml, default), pulumiMemberEngine using the resolved value, and the source of the decision (source and because, carried as engineSource and engineBecause on the pulumi-up plan artifact).

    Left unticked: PUL015 checking both directions. On main PUL015 sees plywood.yml and the environment, so the pulumi-configured-on-plunge direction is covered. The reverse (engine plunge with a stock backend) is deliberately not reported, because plunge opens stock backends. Either that stays as the decision (then strike the item) or the reverse check gets built.

    Not closing until the maintainer decides on the PUL015 reverse direction.

  7. lex00 commented on Oct 29, 2026

    @lex00
    ContributorAuthor

    Landed in 4be5dff. PUL015 stays one-directional per the maintainer ruling; it now has tests for the plywood.yml, PULUMI_BACKEND_URL and Pulumi.yaml sources, and the docs state the one-way decision. Main CI is green.

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:ciepic:ci-productsepic:plywood

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions