Skip to content

fix: report this gem's own version to kitchen diagnose - #490

Merged
tas50 merged 1 commit into
mainfrom
fix/plugin-version-metadata
Aug 24, 2026
Merged

fix: report this gem's own version to kitchen diagnose#490
tas50 merged 1 commit into
mainfrom
fix/plugin-version-metadata

Conversation

@tas50

@tas50 tas50 commented Aug 23, 2026

Copy link
Copy Markdown
Member

kitchen diagnose is what bug reports are asked to include, and what it said about this plugin was wrong in both halves.

Before

driver:
  Docker:
    class: Kitchen::Driver::Docker
    version:            # nothing
    api_version:        # nothing
transport:
  Docker:
    class: Kitchen::Transport::Docker
    version: 4.1.1      # Test Kitchen's version, not kitchen-docker's
    api_version:

The transport declared plugin_version Kitchen::VERSION — that constant is Test Kitchen's version, so a diagnose from kitchen-docker 3.3.4 running under Test Kitchen 4.1.1 reported the transport as 4.1.1. The driver declared no version at all, and kitchen_transport_api_version was sitting there commented out.

Every plugin shipped with Test Kitchen declares both (kitchen_driver_api_version 2, kitchen_transport_api_version 1).

After

driver:
  Docker:
    class: Kitchen::Driver::Docker
    version: 3.3.4
    api_version: 2
transport:
  Docker:
    class: Kitchen::Transport::Docker
    version: 3.3.4
    api_version: 1

Risk

None to behaviour. Both values are diagnostic only — nothing in Test Kitchen branches on either; api_version is read exactly once, by Configurable.diagnose. This changes what is reported and nothing else.

Confirmation

Output above is real kitchen diagnose --all against Test Kitchen 4.1.1, before and after.

rake style clean; rspec 319 examples, 0 failures (6 new, including one pinning that the reported version is not Kitchen::VERSION).

`kitchen diagnose` is what a bug report is asked to include, and what it said
about this plugin was wrong in both halves:

    driver:
      Docker:
        version:            # nothing
        api_version:        # nothing
    transport:
      Docker:
        version: 4.1.1      # Test Kitchen's version, not kitchen-docker's
        api_version:

The transport declared `plugin_version Kitchen::VERSION`, which is Test
Kitchen's version constant, so a diagnose from kitchen-docker 3.3.4 running
under Test Kitchen 4.1.1 reported the transport as 4.1.1. The driver declared
no version at all, and `kitchen_transport_api_version` was commented out.

Both now declare this gem's version and the plugin API version they are
written against, as every plugin shipped with Test Kitchen does:

    driver:
      Docker:
        version: 3.3.4
        api_version: 2
    transport:
      Docker:
        version: 3.3.4
        api_version: 1

The values are diagnostic only -- nothing in Test Kitchen branches on them --
so this changes what is reported and nothing else.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tas50
tas50 force-pushed the fix/plugin-version-metadata branch from a07eac5 to cb7ce74 Compare August 23, 2026 19:44
@tas50
tas50 merged commit e28171d into main Aug 24, 2026
107 checks passed
@tas50
tas50 deleted the fix/plugin-version-metadata branch August 24, 2026 00:45
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