Skip to content

gen-docs pins usage snippets to @v2 and crashes on workflows with undocumented inputs #153

Open

Description

@swibrow

What

docs/.scripts/gen_docs/bin/index.js:13 hardcodes currentMajorVersion = 'v2', but the umbrella major is v4 (latest tag v4.3.2). Every generated Usage block in docs/workflows/*.md tells consumers to pin @v2, which does not contain any workflow added since v2 was cut.

The generator also fails on two workflows, so their docs cannot be regenerated:

  • aws-rds-snapshot.yaml: Cannot read properties of null (reading 'replace'). Input source_snapshot_identifier has no description.
  • service-pipeline.yaml: Cannot read properties of undefined (reading 'replace'). Secrets slack_bot_token and app_private_key have no description.

Why it matters

Following the docs for a new workflow gives a ref where that workflow does not exist. This already happened: a consumer pinned a new workflow to @v2 based on the docs convention.

Suggested fix

  • Bump currentMajorVersion to v4, or derive it from the latest v<major> tag, and regenerate all docs. Consider whether the snippets should show the per-workflow tag (<workflow>-v0) now that Renovate migrates callers to those.
  • Add descriptions to the three inputs and secrets above, or make the generator tolerate a missing description.

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions