Skip to content

feat(gem-check): add --list flag to pass gem names for list check#370

Draft
sanghanan wants to merge 1 commit into
chainguard-dev:mainfrom
sanghanan:feat/gem-check/add-list-flag
Draft

feat(gem-check): add --list flag to pass gem names for list check#370
sanghanan wants to merge 1 commit into
chainguard-dev:mainfrom
sanghanan:feat/gem-check/add-list-flag

Conversation

@sanghanan

@sanghanan sanghanan commented May 14, 2026

Copy link
Copy Markdown
Member

gem-check derives the gem list -i target from the apk package name (stripping ruby[0-9.]+-). This assumes a 1:1 mapping between apk name and gem name, which is not true for packages that bundle multiple gems.

Example: ruby3.2-kube-logging-operator-fluentd-outputs is a collection of fluentd output plugin gems. The apk name is not itself a gem, so the list check fails:

  FAIL[gem-check]: Failed listing gem [kube-logging-operator-fluentd-outputs]
  PASS[gem-check]: Success requiring gem [fluent/plugin/out_oss]

To fix this, we add a --list flag to gem-check:

  • --list foo / --list "foo bar" — check named gem(s) instead of the package-derived guess
  • --list none — skip the list check entirely
  • omitted/empty — current auto-detect behavior (so it won't break anything)

We could do something like:

- uses: test/tw/gem-check
  with:
    list: |
      fluent-plugin-oss
      fluent-plugin-foo
    require: |
      fluent/plugin/out_oss
      fluent/plugin/out_foo

@sanghanan sanghanan marked this pull request as ready for review May 14, 2026 13:48
@sanghanan sanghanan changed the title feat(gem-check): add --list flag feat(gem-check): add --list flag to pass gem names for list check May 14, 2026
@sanghanan sanghanan marked this pull request as draft May 22, 2026 23:25
@sanghanan sanghanan marked this pull request as ready for review May 26, 2026 13:54
@sanghanan sanghanan marked this pull request as draft May 26, 2026 13:56
@sanghanan

Copy link
Copy Markdown
Member Author

(moving this to draft, skip none shouldnt be an option)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant