Skip to content

Add http config template to prefect and remove redundant custom_headers option - #25259

Open
lucia-sb wants to merge 2 commits into
masterfrom
lucia-sb/prefect-http-template
Open

lucia-sb wants to merge 2 commits into
masterfrom
lucia-sb/prefect-http-template

Conversation

@lucia-sb

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds the standard http configuration template (init_config/http and instances/http) to the prefect integration's spec, giving it the usual set of HTTP options (tls_verify, auth_type, timeout, proxy, headers/extra_headers, etc.). Also removes the integration's bespoke custom_headers instance option and the manual merge of it into self.http.options['headers'] in check.py, since the standard headers/extra_headers options from the template now cover that use case and the base RequestsWrapper merges them automatically.

Motivation

The prefect integration makes HTTP calls to the Prefect API but never included the standard HTTP configuration template, so users had no way to configure TLS verification, authentication, proxying, or timeouts — only a one-off custom_headers option for headers. This PR brings prefect in line with other HTTP-based integrations by adopting the standard template, and replaces custom_headers with the standard headers/extra_headers options it provides, so there is a single, consistent way to configure headers across integrations.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add qa/required if this PR needs QA validation, or qa/skip-qa if it does not. Exactly one of the two is required.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

🤖 Generated with Claude Code

…rs option

The prefect integration makes HTTP requests but never exposed the standard
HTTP configuration options (TLS verification, auth, proxy, timeout, headers)
that the http template provides. Add init_config/http and instances/http
templates so users get the full set of standard options.

This also removes the bespoke custom_headers instance option, which is now
redundant with the standard headers/extra_headers options the http template
provides, and drops the manual merge of custom_headers into self.http.options
in check.py since RequestsWrapper already merges headers/extra_headers
automatically.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@lucia-sb lucia-sb added the qa/required QA is required for this PR and will generate a QA card label Sep 17, 2026
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Major version bump
The changelog type changed or removed was used in this Pull Request, so the next release will bump major version. Please make sure this is a breaking change, or use the fixed or added type instead.

@dd-octo-sts

dd-octo-sts Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

✅ Dispatcher tests · passed

Dispatcher beta: informational only

Dispatcher is running alongside existing CI while we validate it. You can ignore this report and its statuses. Existing CI remains the merge signal.

  2/2 jobs
✅ 2 passed · ❌ 0 failed

Batches

BatchStateJobsWorkflow
batch-01✅ passed2/2run 35204500808
Dispatcher finished on e070621GitHub Run.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 17, 2026

Copy link
Copy Markdown

evalya-impact-summary

evalya impact analysis
Impact analysis: 0 selected, 0 skipped (of 0 test tasks)
Publish tasks:   2 (always emitted)
Diff (7 files):
  prefect/assets/configuration/spec.yaml
  prefect/changelog.d/25259.changed
  prefect/datadog_checks/prefect/check.py
  prefect/datadog_checks/prefect/config_models/defaults.py
  prefect/datadog_checks/prefect/config_models/instance.py
  prefect/datadog_checks/prefect/config_models/shared.py
  prefect/datadog_checks/prefect/data/conf.yaml.example

Debug a specific task: evalya plan impact --path <path> --task <task>

Learn more about CI impact filtering

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Tests  Code Coverage

All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 88.16% (-0.95%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: fa860c0 | Docs | View more details | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Disk usage change

Commit 61dda1a compared against e070621.

Uncompressed

linux-aarch64 linux-x86_64 macos-aarch64 macos-x86_64 windows-x86_64
🔺 +16.35 KiB 🔺 +16.35 KiB 🔺 +16.35 KiB 🔺 +16.35 KiB 🔺 +16.35 KiB
Details
Name Version Type linux-aarch64 linux-x86_64 macos-aarch64 macos-x86_64 windows-x86_64
prefect 1.2.0 Integration 🔺 +16.35 KiB 🔺 +16.35 KiB 🔺 +16.35 KiB 🔺 +16.35 KiB 🔺 +16.35 KiB

Compressed

linux-aarch64 linux-x86_64 macos-aarch64 macos-x86_64 windows-x86_64
🔺 +3.97 KiB 🔺 +3.97 KiB 🔺 +3.97 KiB 🔺 +3.97 KiB 🔺 +3.97 KiB
Details
Name Version Type linux-aarch64 linux-x86_64 macos-aarch64 macos-x86_64 windows-x86_64
prefect 1.2.0 Integration 🔺 +3.97 KiB 🔺 +3.97 KiB 🔺 +3.97 KiB 🔺 +3.97 KiB 🔺 +3.97 KiB

@lucia-sb
lucia-sb marked this pull request as ready for review September 18, 2026 08:43
@lucia-sb
lucia-sb requested review from a team as code owners September 18, 2026 08:43
@dd-octo-sts

dd-octo-sts Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Validation Report

All 21 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and code coverage settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
qa-label Validate the pull request declares whether it needs QA for the next Agent release
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants