Skip to content

Set context support for http task#38

Merged
prasadlohakpure merged 2 commits intomainfrom
set_ctx_http
Feb 11, 2026
Merged

Set context support for http task#38
prasadlohakpure merged 2 commits intomainfrom
set_ctx_http

Conversation

@prasadlohakpure
Copy link
Contributor

Description

Set context support for http task

This pull request introduces a small change to the HTTP task pipeline by ensuring that the Base struct is properly initialised when creating a new httpCore instance from input data.

Why:

  • Ensures the Base struct (including Name, Type, and Context) is initialised when creating a new httpCore instance in http.go (newFromInput).
  • This extends support for setting context whenever a request is constructed and invoked incoming incoming record.

Testing:

Tested using /test/pipelines/context_test.yaml

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • I have added tests to cover my changes.

Copilot AI review requested due to automatic review settings February 10, 2026 09:52
@prasadlohakpure prasadlohakpure requested a review from a team as a code owner February 10, 2026 09:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Ensures HTTP tasks constructed from incoming records preserve task-level Base configuration (notably Context) so configured context keys can be set on records emitted by dynamically-built HTTP requests.

Changes:

  • Initialize httpCore.Base when creating per-record httpCore instances in newFromInput.
  • Extend the context pipeline test YAML to validate context setting on an HTTP task driven by upstream data.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
internal/pkg/pipeline/task/http/http.go Initializes Base for per-record httpCore instances so context can be applied when sending output records.
test/pipelines/context_test.yaml Adds an HTTP task context key (number_of_posts) and validates it downstream.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@prasadlohakpure prasadlohakpure merged commit 043428f into main Feb 11, 2026
12 checks passed
@prasadlohakpure prasadlohakpure deleted the set_ctx_http branch February 11, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants