Skip to content

Consider deprecation warnings for node12/node16 runtimes in action.yml #276

@ericsciple

Description

@ericsciple

Summary

The language service currently accepts node12 and node16 as valid values for runs.using in action.yml files without any diagnostic. We should consider whether to show deprecation warnings for these runtimes.

Background

GitHub.com Runner Behavior

The latest GitHub Actions runner (github.com) silently upgrades deprecated Node runtimes:

Action declares Runner executes
node12 node20 (silent upgrade)
node16 node20 (silent upgrade)
node20 node20
node24 node24

The runner only bundles node20 (v20.19.6) and node24 (v24.12.0). Node 12 reached EOL in December 2022, and Node 16 reached EOL in September 2023.

Reference: actions/runner HandlerFactory.cs

if (string.Equals(nodeData.NodeVersion, "node12", ...) ||
    string.Equals(nodeData.NodeVersion, "node16", ...))
{
    nodeData.NodeVersion = Common.Constants.Runner.NodeMigration.Node20;
}

GHES Consideration

GitHub Enterprise Server (GHES) runs older runner versions that may still bundle node12 and node16. For example:

  • Older GHES versions ship with runners that natively support these runtimes
  • Actions targeting GHES compatibility may legitimately need to declare node12 or node16

The language service cannot determine which platform the user is targeting.

Options Considered

Option 1: No diagnostic (current behavior) ✅

Pros:

  • Works correctly for all platforms (github.com + GHES)
  • Matches runner's silent behavior on github.com
  • No false positives for GHES users

Cons:

  • Missed opportunity to guide github.com users toward migration
  • Users may not realize their action runs on a different Node version than declared

Option 2: Warning diagnostic

Pros:

  • Clearly communicates deprecation status
  • Encourages migration to supported runtimes

Cons:

  • False positive for GHES users who legitimately need node12/node16
  • More prominent than runner's actual behavior (silent upgrade)
  • No way to suppress without platform awareness

Option 3: Info diagnostic

Pros:

  • Less intrusive than warning
  • Still provides visibility

Cons:

  • Easily ignored
  • Same GHES false positive issue

Option 4: Platform-aware diagnostics (future)

Add a configuration option to specify the target platform:

{
  "github-actions.targetPlatform": "github.com" | "ghes-3.10" | "ghes-3.8" | "auto"
}

Pros:

  • Accurate diagnostics based on actual target
  • No false positives

Cons:

  • Requires new infrastructure
  • Additional complexity for users to configure
  • "auto" detection may not be feasible

Autocomplete Consideration

Should node12/node16 be hidden from autocomplete suggestions for runs.using?

Option Pros Cons
Show all Works for GHES; explains existing values May guide new authors toward deprecated runtimes
Hide deprecated Guides new authors correctly Confusing when editing existing actions; breaks GHES users
Show with deprecation tag Best of both worlds More complex to implement

Recommendation

For now: No change (Option 1)

The current behavior of accepting all values without diagnostics is correct given:

  1. GHES compatibility requirements
  2. Inability to detect target platform
  3. Consistency with runner's silent upgrade behavior

Future consideration:
If platform-aware configuration is added (Option 4), we could then enable deprecation warnings specifically for github.com targets while keeping them disabled for GHES.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions