Skip to content

Comments

fix(cloudflare): honor extended_metadata with api_token#730

Merged
Mzack9999 merged 1 commit intodevfrom
dwisiswant0/feat/cloudflare/honor-extended-metadata-with-api-token
Feb 5, 2026
Merged

fix(cloudflare): honor extended_metadata with api_token#730
Mzack9999 merged 1 commit intodevfrom
dwisiswant0/feat/cloudflare/honor-extended-metadata-with-api-token

Conversation

@dwisiswant0
Copy link
Member

@dwisiswant0 dwisiswant0 commented Feb 4, 2026

Keep extended metadata enabled for scoped-token
auth.

Closes #728

Summary by CodeRabbit

  • New Features

    • Added extended_metadata configuration option for Cloudflare provider to access enhanced metadata when needed.
  • Bug Fixes

    • Fixed metadata option handling consistency across API token and legacy authentication methods.
  • Refactor

    • Removed duplicate parsing code to streamline configuration processing.

Keep extended metadata enabled for scoped-token
auth.

Signed-off-by: Dwi Siswanto <[email protected]>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 4, 2026

Walkthrough

The Cloudflare provider is updated to parse the extended_metadata option once and propagate it to both the api_token and legacy api_key/api_email authentication paths, ensuring metadata is consistently emitted regardless of the authentication method used.

Changes

Cohort / File(s) Summary
Extended Metadata Auth Support
pkg/providers/cloudflare/cloudflare.go
Parses extended_metadata option once and passes it to Provider struct in both apiToken and legacy auth paths. Removes duplicate parsing logic from legacy path.
Dependency Updates
go.mod
Minor dependency version adjustments (7 lines added/removed).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A token scoped with care,
Now metadata everywhere!
Extended fields no longer missed,
In both auth paths—they persist! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main fix: enabling extended_metadata support for api_token authentication in Cloudflare provider.
Linked Issues check ✅ Passed The PR fully addresses issue #728 by implementing extended_metadata parsing and propagation for both api_token and api_key authentication paths, ensuring metadata is emitted regardless of auth method.
Out of Scope Changes check ✅ Passed All changes are scoped to the Cloudflare provider's extended_metadata handling, with only minor go.mod updates. No unrelated modifications are present.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dwisiswant0/feat/cloudflare/honor-extended-metadata-with-api-token

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

@dwisiswant0 dwisiswant0 requested a review from Mzack9999 February 4, 2026 18:51
@Mzack9999 Mzack9999 added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Feb 5, 2026
@Mzack9999 Mzack9999 merged commit eb14183 into dev Feb 5, 2026
9 checks passed
@Mzack9999 Mzack9999 deleted the dwisiswant0/feat/cloudflare/honor-extended-metadata-with-api-token branch February 5, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[issue] [cloudflare] extended_metadata ignored for api_token auth

2 participants