Skip to content

azureeventhub: remove deprecated processor v1 implementation#49772

Open
zmoog wants to merge 24 commits intoelastic:mainfrom
zmoog:feature/remove-azureeventhub-processor-v1
Open

azureeventhub: remove deprecated processor v1 implementation#49772
zmoog wants to merge 24 commits intoelastic:mainfrom
zmoog:feature/remove-azureeventhub-processor-v1

Conversation

@zmoog
Copy link
Copy Markdown
Contributor

@zmoog zmoog commented Mar 30, 2026

Summary

  • Remove the deprecated Azure Event Hub processor v1 implementation and all related code (v1 input, tracer, file persister tests, integration tests)
  • When processor_version: "v1" is configured, log a deprecation warning and fall back to v2 instead of erroring
  • Update documentation, dependency cleanup (go.mod, NOTICE.txt, dependabot.yml)

TODO

  • Clean up config validation: remove empty validation stubs, drop "V2" suffixes and "(processor v2 only)" comments
  • Update misleading "available versions: v1, v2" error message

Test plan

  • Verify processor_version: "v2" (default) works unchanged
  • Verify processor_version: "v1" logs deprecation warning and falls back to v2
  • Verify invalid processor_version values are rejected
  • Run existing integration tests

🤖 Generated with Claude Code

zmoog and others added 16 commits March 25, 2026 21:00
Design for removing the deprecated processor v1 from the azure-eventhub
input in Filebeat, as tracked in elastic/ingest-dev#5424.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add docs/reference/filebeat/filebeat-input-azure-eventhub.md to the
files affected list, covering removal of the v1 example section,
updating section headings, intro paragraph, and storage_account_key
description.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
11-task plan covering: file deletion, input.go routing update,
config simplification, test updates, documentation, and dependency cleanup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Prevent worktree contents from being tracked.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove v1_input.go, v1_input_test.go, file_persister_test.go,
tracer.go, and azureeventhub_integration_test.go.

These files implement the deprecated processor v1 using the
azure-event-hubs-go/v3 SDK which Microsoft no longer supports.
…on warning

- Remove go-autorest and devigned/tab imports
- Remove environments map (only used by v1)
- Remove tab.Register tracing call (v1-only)
- Replace processor version switch with warning + always v2
- Add TODO for FIPS exclusion investigation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove processor v1 validation paths from:
- validateStorageAccountAuthForConnectionString
- validateStorageAccountAuthForClientSecret
- validateStorageAccountConfig
- checkUnsupportedParams

Update field comments to reflect v1 removal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Convert v1 connection string tests to v2 config.
Remove v1-specific client_secret and connection_string test cases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace eventHubInputV1 and legacy eventhub.Event usage with
messageDecoder.Decode() to test the same metrics behavior
without depending on the deleted v1 types.
Remove TestGetAzureEnvironment, TestProcessEvents, commented-out
TestNewInputDone, and defaultTestConfig. Clean up deprecated SDK imports.
Add TestCreateWithProcessorV1FallsBackToV2 to verify the deprecation
warning path. Keep fakeClient for use by metrics_test.go.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This constant was only used by the deleted v1 processor.
- Remove v1 example section from reference docs
- Remove '(processor v2)' suffixes from section headings
- Update intro paragraph to reference modern SDK
- Remove tracing paragraph (tracer removed with v1)
- Update storage_account_key description
- Update README migration testing instructions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Clean up Go module dependencies after removing processor v1
and its deprecated Azure SDK imports.

Removed direct dependencies:
- github.com/Azure/azure-event-hubs-go/v3
- github.com/Azure/azure-storage-blob-go
- github.com/devigned/tab

Note: go-autorest remains as a transitive dependency of other
Beats packages.
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Mar 30, 2026
@botelastic
Copy link
Copy Markdown

botelastic bot commented Mar 30, 2026

This pull request doesn't have a Team:<team> label.

@github-actions
Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@mergify mergify bot assigned zmoog Mar 30, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 30, 2026

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @zmoog? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

TL;DR

Buildkite failed in x-pack/filebeat: Run check/update because repo state becomes dirty during make -C x-pack/filebeat check update: x-pack/filebeat/input/azureeventhub/input_test.go is being rewritten by the update/check pipeline.

Remediation

  • On the PR branch, run make -C x-pack/filebeat update (or mage -d x-pack/filebeat update) and commit the resulting change to x-pack/filebeat/input/azureeventhub/input_test.go.
  • Re-run make -C x-pack/filebeat check update locally to confirm check-no-changes passes before re-triggering CI.
Investigation details

Root Cause

check-no-changes detected generated/normalized file drift after the update step. The failing step explicitly reports a modified file:

  • x-pack/filebeat/input/azureeventhub/input_test.go

This is a configuration/generated-artifact drift failure (not an infra outage): CI is enforcing that update-generated edits are committed.

Evidence

Verification

  • Reproduced the same target locally (make -C x-pack/filebeat check update) and confirmed the failure mode is in the same check/update gate.
  • Ran make -C x-pack/filebeat update locally to validate the prescribed remediation path.

Follow-up

If the file still flips after commit, pin and compare local/CI Go+mage versions used for update, then regenerate with the same toolchain as CI.

Note

🔒 Integrity filtering filtered 2 items

Integrity filtering activated and filtered the following items during workflow execution.
This happens when a tool call accesses a resource that does not meet the required integrity or secrecy level of the workflow.


What is this? | From workflow: PR Buildkite Detective

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@zmoog zmoog marked this pull request as ready for review March 30, 2026 22:54
@zmoog zmoog requested review from a team as code owners March 30, 2026 22:54
@zmoog zmoog requested review from belimawr and rdner March 30, 2026 22:54
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

📝 Walkthrough

Walkthrough

This pull request removes the Azure Event Hub Processor v1 implementation and consolidates on v2. Changes include: deletion of v1-specific code files (v1_input.go, tracer.go, related tests), removal of associated Go module dependencies from go.mod, and updates to input registration and configuration validation. Configuration fields storage_account_key and resource_manager_endpoint are deprecated in favor of storage_account_connection_string and authority_host. Documentation and tests are updated to reflect v2 as the supported processor version. Backward compatibility is maintained: v1 configurations are accepted and automatically upgraded to v2 with a deprecation warning.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
x-pack/filebeat/input/azureeventhub/config.go (1)

387-423: ⚠️ Potential issue | 🟠 Major

Preserve sovereign-cloud behavior for resource_manager_endpoint during v1 fallback.

Line 406 now derives the auto-generated storage connection string only from authority_host. That means an existing v1 config that only sets deprecated resource_manager_endpoint for Gov/China/Germany will validate, be upgraded to v2, and then get a public-cloud storage endpoint (core.windows.net). The downstream effect is broken checkpoint/container access after startup, which defeats the PR’s backward-compat path for those configs. Please either translate resource_manager_endpoint into the matching storage suffix here or reject that deprecated combination instead of silently accepting it.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@x-pack/filebeat/input/azureeventhub/config.go` around lines 387 - 423, The
auto-generation in validateStorageAccountConfig currently always calls
getStorageEndpointSuffix(conf.AuthorityHost) which causes v1 configs that only
set the deprecated resource_manager_endpoint/OverrideEnvironment to get a
public-cloud suffix; update validateStorageAccountConfig to detect the
deprecated resource_manager_endpoint/OverrideEnvironment when conf.AuthorityHost
is empty and either (a) translate that resource_manager_endpoint value into the
corresponding storage endpoint suffix (and pass that into
getStorageEndpointSuffix or a new translator) before building
conf.SAConnectionString, or (b) if translation is not possible, reject the
combination by returning an error that instructs the user to provide
storage_account_connection_string or an explicit authority_host; reference
validateStorageAccountConfig, getStorageEndpointSuffix, conf.AuthorityHost and
the deprecated resource_manager_endpoint/OverrideEnvironment in the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@x-pack/filebeat/input/azureeventhub/config.go`:
- Around line 387-423: The auto-generation in validateStorageAccountConfig
currently always calls getStorageEndpointSuffix(conf.AuthorityHost) which causes
v1 configs that only set the deprecated
resource_manager_endpoint/OverrideEnvironment to get a public-cloud suffix;
update validateStorageAccountConfig to detect the deprecated
resource_manager_endpoint/OverrideEnvironment when conf.AuthorityHost is empty
and either (a) translate that resource_manager_endpoint value into the
corresponding storage endpoint suffix (and pass that into
getStorageEndpointSuffix or a new translator) before building
conf.SAConnectionString, or (b) if translation is not possible, reject the
combination by returning an error that instructs the user to provide
storage_account_connection_string or an explicit authority_host; reference
validateStorageAccountConfig, getStorageEndpointSuffix, conf.AuthorityHost and
the deprecated resource_manager_endpoint/OverrideEnvironment in the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 12792d50-af3e-41ea-83d0-176d69aa1db0

📥 Commits

Reviewing files that changed from the base of the PR and between 2d10f57 and a8c66cc.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (19)
  • .github/dependabot.yml
  • .gitignore
  • NOTICE.txt
  • changelog/fragments/1774907084-remove-azureeventhub-processor-v1.yaml
  • docs/reference/filebeat/filebeat-input-azure-eventhub.md
  • go.mod
  • x-pack/filebeat/include/list.go
  • x-pack/filebeat/input/azureeventhub/README.md
  • x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go
  • x-pack/filebeat/input/azureeventhub/client_secret.go
  • x-pack/filebeat/input/azureeventhub/config.go
  • x-pack/filebeat/input/azureeventhub/config_test.go
  • x-pack/filebeat/input/azureeventhub/file_persister_test.go
  • x-pack/filebeat/input/azureeventhub/input.go
  • x-pack/filebeat/input/azureeventhub/input_test.go
  • x-pack/filebeat/input/azureeventhub/metrics_test.go
  • x-pack/filebeat/input/azureeventhub/tracer.go
  • x-pack/filebeat/input/azureeventhub/v1_input.go
  • x-pack/filebeat/input/azureeventhub/v1_input_test.go
💤 Files with no reviewable changes (9)
  • x-pack/filebeat/include/list.go
  • .github/dependabot.yml
  • x-pack/filebeat/input/azureeventhub/tracer.go
  • x-pack/filebeat/input/azureeventhub/v1_input.go
  • x-pack/filebeat/input/azureeventhub/input_test.go
  • x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go
  • go.mod
  • x-pack/filebeat/input/azureeventhub/v1_input_test.go
  • x-pack/filebeat/input/azureeventhub/file_persister_test.go

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

Labels

needs_team Indicates that the issue/PR needs a Team:* label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant