Skip to content

[Deprecation] HTTP X-Deprecation Endpoint Wrapper #213

Description

@silug

Summary

The HTTP layer contains a helper for adding X-Deprecation headers to deprecated endpoints, but no active in-repo uses were found.

Why This Is Soft / Inferred

This appears to be legacy deprecation infrastructure rather than an actively used endpoint behavior.

Evidence

  • src/puppetlabs/puppetdb/http.clj:249 defines deprecated-app that logs warning and sets X-Deprecation header.
  • rg search across src, test, and puppet found no call sites of deprecated-app.
  • Puppet terminus code still consumes x-deprecation response headers (puppet/lib/puppet/util/puppetdb.rb:134).

Proposed Plan

  • OpenVoxDB 9:
    • Confirm whether any runtime route still uses this behavior externally.
    • If unused, remove helper and related dead code.
  • If still needed:
    • Keep helper but document which endpoints emit X-Deprecation and retirement timeline.

Compatibility / Risk

  • Low risk if truly unused.
  • Medium risk if external tooling depends on undocumented deprecated endpoint headers.

Implementation Notes

  • Audit route composition and middleware injection for any dynamic use.
  • Coordinate with termini expectations if header emission policy changes.

Acceptance Criteria

  • Dead deprecation-header scaffolding is removed or clearly documented and intentionally retained.
  • Termini behavior remains coherent with server header policy.

Suggested Tests

  • Route-level response header tests for endpoints that should emit deprecation warnings (if any).
  • Negative tests ensuring no unintended X-Deprecation headers.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    deprecationThis issue pertains to an item/topic which has been deprecated

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions