Skip to content

fix: Remove TapCapabilities.ACTIVATE_VERSION in favor of PluginCapabilities.ACTIVATE_VERSION#3658

Merged
edgarrmondragon merged 3 commits into
mainfrom
refactor/remove-TapCapabilities.ACTIVATE_VERSION
May 28, 2026
Merged

fix: Remove TapCapabilities.ACTIVATE_VERSION in favor of PluginCapabilities.ACTIVATE_VERSION#3658
edgarrmondragon merged 3 commits into
mainfrom
refactor/remove-TapCapabilities.ACTIVATE_VERSION

Conversation

@edgarrmondragon
Copy link
Copy Markdown
Collaborator

@edgarrmondragon edgarrmondragon commented May 28, 2026

SSIA

Summary by Sourcery

Replace tap-level ACTIVATE_VERSION capability with the plugin-level capability and ensure corresponding config is injected when enabled.

Bug Fixes:

  • Align ACTIVATE_VERSION handling with plugin capabilities to avoid relying on the deprecated tap capability.

Enhancements:

  • Automatically merge emit_activate_version configuration when the plugin declares the ACTIVATE_VERSION capability.

Tests:

  • Extend tap config injection test to cover the default emit_activate_version_messages setting.

Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
…abilities.ACTIVATE_VERSION`

Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
@edgarrmondragon edgarrmondragon self-assigned this May 28, 2026
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented May 28, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Replaces the deprecated tap-level ACTIVATE_VERSION capability with the plugin-level capability, ensuring taps that support ACTIVATE_VERSION automatically receive the correct config defaults and aligning capability declarations with the shared plugin capabilities model.

File-Level Changes

Change Details Files
Switch tap capability declaration from TapCapabilities.ACTIVATE_VERSION to PluginCapabilities.ACTIVATE_VERSION and wire it into builtin config injection.
  • Update the Tap class default capabilities set to use the plugin-level ACTIVATE_VERSION capability instead of the tap-specific one.
  • Extend append_builtin_config so that taps declaring PluginCapabilities.ACTIVATE_VERSION receive EMIT_ACTIVATE_VERSION_CONFIG merged into their JSONSchema, similar to existing batch support.
  • Adjust tests to expect the new emit_activate_version_messages default config value when tap config defaults are injected.
singer_sdk/tap_base.py
tests/core/test_jsonschema_helpers.py
Remove the deprecated ACTIVATE_VERSION entry from TapCapabilities in favor of the shared plugin capability.
  • Delete the ACTIVATE_VERSION constant from TapCapabilities to prevent further use of the deprecated tap-specific capability.
singer_sdk/helpers/capabilities.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@edgarrmondragon edgarrmondragon added this to the v0.55 milestone May 28, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.88%. Comparing base (210cb24) to head (7cc4eee).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3658      +/-   ##
==========================================
- Coverage   93.88%   93.88%   -0.01%     
==========================================
  Files          73       73              
  Lines        5954     5953       -1     
  Branches      731      731              
==========================================
- Hits         5590     5589       -1     
  Misses        270      270              
  Partials       94       94              
Flag Coverage Δ
core 82.63% <ø> (-0.01%) ⬇️
end-to-end 75.22% <ø> (-0.01%) ⬇️
optional-components 42.73% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Removing TapCapabilities.ACTIVATE_VERSION from the enum entirely may break existing taps that still reference it; consider keeping it as a deprecated alias that forwards to PluginCapabilities.ACTIVATE_VERSION to ease migration.
  • append_builtin_config is on PluginBase and now injects EMIT_ACTIVATE_VERSION_CONFIG for any plugin with PluginCapabilities.ACTIVATE_VERSION; double-check whether this should be limited to taps only (e.g., via class/type check) to avoid unintentionally adding this config to targets or other plugin types.
  • Wherever TapCapabilities.ACTIVATE_VERSION may be used in the codebase or templates (outside this diff), ensure they are consistently replaced with PluginCapabilities.ACTIVATE_VERSION to avoid capability mismatches at runtime.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Removing `TapCapabilities.ACTIVATE_VERSION` from the enum entirely may break existing taps that still reference it; consider keeping it as a deprecated alias that forwards to `PluginCapabilities.ACTIVATE_VERSION` to ease migration.
- `append_builtin_config` is on `PluginBase` and now injects `EMIT_ACTIVATE_VERSION_CONFIG` for any plugin with `PluginCapabilities.ACTIVATE_VERSION`; double-check whether this should be limited to taps only (e.g., via class/type check) to avoid unintentionally adding this config to targets or other plugin types.
- Wherever `TapCapabilities.ACTIVATE_VERSION` may be used in the codebase or templates (outside this diff), ensure they are consistently replaced with `PluginCapabilities.ACTIVATE_VERSION` to avoid capability mismatches at runtime.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 28, 2026

Merging this PR will not alter performance

✅ 8 untouched benchmarks


Comparing refactor/remove-TapCapabilities.ACTIVATE_VERSION (7cc4eee) with main (210cb24)

Open in CodSpeed

@edgarrmondragon edgarrmondragon merged commit 2895002 into main May 28, 2026
39 of 40 checks passed
@edgarrmondragon edgarrmondragon deleted the refactor/remove-TapCapabilities.ACTIVATE_VERSION branch May 28, 2026 22:53
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