Skip to content

Setup steps after enable can still leave the cluster set up without the GitHub side #3806

Open

Description

@dawsontoth

After the fix for #3609, harper preview setup settles every GitHub-side precondition it can read before it calls enable_previews. Three steps still run after that call and can fail, leaving the cluster side enabled without the rest. A rerun finishes each, since enable keeps matching records and each later step only creates.

  • Starter workflow write. bin/previewSetup.ts writes the starter workflow with wx after the enable and the seal. A file that appears in those round trips (EEXIST), or a full or unwritable disk (ENOSPC, EACCES), throws a raw fs error, and setupGithubVariable never runs.

  • Credential seal. If set_secret or grant_secret fails after the enable, the preview policy stays enabled with no credential for a private repository.

  • harper deploy setup. setupGithubActions in bin/deploySetupGithubActions.ts creates the role, user and trust policy before it reads the HARPER_CLI_TARGET variable, so it can still end with the cluster set up while the variable names another cluster. It could take the same preflight as preview setup (assertGithubVariableSettable).

  • A conflicting policy written elsewhere. harper deploy setup rechecks for a conflicting trust policy just before it writes, which cannot exclude one written on another node in that window. The exchange still refuses the pair.

Review-Deferral: 737c2735e1ed9b58 severity=nit category=concurrency
Review-Deferral: 896d930be2d699b9 severity=minor category=reliability
Review-Deferral: f46216e3a31e0ddb severity=minor category=reliability
Review-Deferral: 79f811d7a4ffc374 severity=nit category=reliability

Part of #3042.

🤖 Generated with Claude Code

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

    No labels
    No labels

    Type

    Fields

    Priority

    P3

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions