Skip to content

Handle GitHub Action Names with extra characters #72

@vorburger

Description

@vorburger

E.g. this failed due to:

Run bazel-contrib/[email protected]
Configure Bazel
Setup Bazelisk
Restore cache for bazelisk
Restore cache for disk-Build, Test & Deploy (CI)
  
  /home/runner/work/_actions/bazel-contrib/setup-bazel/0.[14](https://github.com/enola-dev/enola/actions/runs/13642687157/job/38135724347#step:9:15).0/dist/node_modules/@actions/cache/lib/cache.js:71
          throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`);
  ^
  ValidationError: Key Validation Error: setup-bazel-1-linux-disk-Build, Test & Deploy (CI)-5478129354fce37d2c7d5ab200e2f93e03c4aee6fabc88b08289fb8bf292d70d cannot contain commas.
      at checkKey (/home/runner/work/_actions/bazel-contrib/setup-bazel/0.14.0/dist/node_modules/@actions/cache/lib/cache.js:71:1)
      at /home/runner/work/_actions/bazel-contrib/setup-bazel/0.14.0/dist/node_modules/@actions/cache/lib/cache.js:203:1
      at Generator.next (<anonymous>)
      at /home/runner/work/_actions/bazel-contrib/setup-bazel/0.14.0/dist/node_modules/@actions/cache/lib/cache.js:31:1
      at new Promise (<anonymous>)
      at __webpack_modules__.5116.__awaiter (/home/runner/work/_actions/bazel-contrib/setup-bazel/0.14.0/dist/node_modules/@actions/cache/lib/cache.js:27:1)
      at restoreCacheV2 (/home/runner/work/_actions/bazel-contrib/setup-bazel/0.14.0/dist/node_modules/@actions/cache/lib/cache.js:192:1)
      at Object.<anonymous> (/home/runner/work/_actions/bazel-contrib/setup-bazel/0.14.0/dist/node_modules/@actions/cache/lib/cache.js:100:1)
      at Generator.next (<anonymous>)
      at /home/runner/work/_actions/bazel-contrib/setup-bazel/0.14.0/dist/node_modules/@actions/cache/lib/cache.js:31:1

I've realized that it's because of this change.

It's easily fixed (worked around), but in an ideal world, perhaps it would be more robust and handle GitHub Action names with extra characters?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions