Skip to content

bug: http output is unsupported on latest master despite being documented and implemented previously #1230

Closed

Description

@strawgate

Summary

On the latest origin/master, output.type: http fails during sink construction with type Http not yet supported.

This affects both:

  • a single http output
  • multi-output pipelines that include http

Minimal repro config

input:
  type: generator
output:
  type: http
  endpoint: http://127.0.0.1:9000

Reproduction

git fetch origin
git switch --detach origin/master
cargo build -p logfwd
./target/debug/logfwd --config config.yaml --validate

Actual behavior

Validation fails with:

error: pipeline 'default': sink construction error: output 'output_0': type Http not yet supported
error: 1 error(s) during validation

Additional repro: fanout

This also fails in outputs: fanout configs, for example:

pipelines:
  test:
    inputs:
      - type: generator
    outputs:
      - type: http
        endpoint: http://127.0.0.1:9000
      - type: null

Controls

Other sink types still validate on the same commit, for example:

  • stdout
  • tcp
  • otlp
  • null

Why this looks like a real bug

Pipeline::from_config now routes outputs through build_sink_factory(), but build_sink_factory() has no OutputType::Http arm, so http falls through to the generic type {:?} not yet supported error.

Affected files

  • crates/logfwd/src/pipeline.rs
  • crates/logfwd-output/src/lib.rs

Affected commit

Observed on origin/master at eeb7bd6779f27361e01b3ce6d2d72e4d82cfd431.

Activity

  1. changed the title [-]bug: multi-output pipelines reject http sinks on latest master with type Http not yet supported[/-] [+]bug: http output is unsupported on latest master despite being documented and implemented previously[/+] on Apr 5, 2026
  2. github-actions commented on Apr 5, 2026

    @github-actions
    Contributor

    tl;dr: Outcome A — Ready for implementation: http is accepted by config but rejected in sink construction because build_sink_factory() has no OutputType::Http arm, so both single-output and fanout pipelines fail with type Http not yet supported.

    Recommendation

    Implement Http in the async sink-factory path (not config-only changes): add an OutputType::Http arm in crates/logfwd-output/src/lib.rs build_sink_factory(...) and wire it to a real async HTTP sink factory.

    Findings

    • crates/logfwd-output/src/lib.rs:521 — current signature:
      • pub fn build_sink_factory(name: &str, cfg: &OutputConfig, stats: Arc(ComponentStats)) -> Result(Arc(dyn SinkFactory), OutputError)
    • crates/logfwd-output/src/lib.rs:665-668 — fallback error path emits type {:?} not yet supported (this is where Http lands).
    • crates/logfwd-output/src/lib.rs:957-971 — unit test test_build_sink_factory_http_not_yet_supported codifies current failure.
    • crates/logfwd/src/pipeline.rs:320-344 — both single output and multi-output fanout call build_sink_factory(...), so both fail the same way.
    • crates/logfwd-config/src/lib.rs:749-755 — config validation treats OutputType::Http as endpoint-based output (accepted at config stage).
    • crates/logfwd/tests/it/integration.rs:231-234 — HTTP integration test is ignored as unimplemented.
    • History confirms this regression state on master:
      • eeb7bd6 ([WIP] Delete OutputSink and all backwards compat cruft (#1155)) is HEAD and removed active HTTP sink path.
      • 454fe1e updated tests to keep HTTP unimplemented behavior.
    Verification
    $ cargo run -p logfwd -- --config /tmp/gh-aw/agent/issue1230-http.yaml --validate
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.61s
    Running `target/debug/logfwd --config /tmp/gh-aw/agent/issue1230-http.yaml --validate`
    error: pipeline 'default': sink construction error: output 'output_0': type Http not yet supported
    error: 1 error(s) during validation
    $ cargo test -p logfwd-output test_build_sink_factory_http_not_yet_supported
    running 1 test
    test tests::test_build_sink_factory_http_not_yet_supported ... ok
    Detailed Action Plan (mechanical)
    1. Add Http factory wiring

      • File: crates/logfwd-output/src/lib.rs (inside build_sink_factory, near other OutputType::* arms).
      • Change: add explicit OutputType::Http => { ... } arm that:
        • requires cfg.endpoint (same style as OTLP/Loki/Elasticsearch arms),
        • maps cfg.compression to existing Compression enum (zstd/none; reject unsupported values with OutputError::Construction),
        • reuses build_auth_headers(cfg.auth.as_ref()),
        • returns Arc(dyn SinkFactory) for HTTP sink.
    2. Provide async HTTP sink factory implementation

      • Files: crates/logfwd-output/src/json_lines.rs, crates/logfwd-output/src/lib.rs exports.
      • Change: add JsonLinesSinkFactory (or equivalent) implementing SinkFactory and creating an async-capable sink that posts newline-delimited JSON over HTTP.
      • Keep semantics consistent with existing sink result model (SendResult) and output stats accounting.
    3. Update unit tests for new expected behavior

      • File: crates/logfwd-output/src/lib.rs tests.
      • Replace test_build_sink_factory_http_not_yet_supported with success-path test:
        • OutputType::Http + valid endpoint => build_sink_factory(...) returns Ok(factory).
      • Add negative tests for invalid/missing endpoint and unsupported compression values.
    4. Enable pipeline-level coverage for fanout

      • File: crates/logfwd/src/pipeline.rs tests.
      • Add/adjust test to build config with outputs: [stdout, http] and assert pipeline construction succeeds.
    5. Unignore integration once sink is wired

      • File: crates/logfwd/tests/it/integration.rs.
      • Unignore test_http_output_sends_to_server and keep/assert full line-delivery checks.
    6. Verification commands

      • cargo test -p logfwd-output test_build_sink_factory_http
      • cargo test -p logfwd --test it test_http_output_sends_to_server
      • cargo test -p logfwd pipeline
      • just ci
    Related Items
    Type Link Relevance
    Issue #1230 Current bug report
    PR (closed) #1155 (eeb7bd6) Removed old output compatibility path; current regression state
    PR (closed) #1000 Prior async HTTP attempt (not merged)
    PR (closed) #1149 (454fe1e) Updated tests to keep HTTP path unimplemented
    File crates/logfwd-output/src/lib.rs:521,665-668,957-971 Missing Http arm + guard test
    File crates/logfwd/src/pipeline.rs:320-344 Single + fanout both depend on sink factory
    File crates/logfwd-config/src/lib.rs:749-755 Config currently accepts http
    File crates/logfwd/tests/it/integration.rs:231-234 HTTP integration test currently ignored

    Open PRs in area: none verified as currently open for this exact regression.

    Note

    🔒 Integrity filtering filtered 6 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: Issue Triage

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

  3. strawgate commented on Apr 6, 2026

    @strawgate
    OwnerAuthor

    Double-check pass on April 6, 2026: this is actively in flight in PR #1319.

    That PR restores OutputType::Http wiring in build_sink_factory() and moves the JSON-lines HTTP sink back onto the async sink path used by both single-output and fanout pipelines. I’m leaving this open until #1319 merges, but it should track that PR rather than sit as unowned backlog work.

  4. strawgate commented on Apr 6, 2026

    @strawgate
    OwnerAuthor

    Planning note from the 2026-04-06 output/config pass: this issue is intentionally no longer bundled into #1272. The fanout delivery bugs (#1232 / #1233) are one execution seam; whether http output should be restored as a supported product surface is a separate decision, especially once #1444 makes the docs reflect the canonical support matrix.

  5. strawgate commented on Apr 6, 2026

    @strawgate
    OwnerAuthor

    Follow-up planning note: the separation from #1272 is about execution shape, not lack of ownership. #1230 already has an active PR path called out in the tracker; #1272 is now just the sibling fanout-contract batch (#1232 / #1233).

  6. strawgate commented on Apr 8, 2026

    @strawgate
    OwnerAuthor

    Resolved by PR #1568. HTTP output is now wired in sink factory ( -> ) and validates correctly.

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

    bugSomething isn't workingcomponent:output/httpGeneric HTTP / JSON lines output

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions