Skip to content

Add missing context to api ingest pipelines#2137

Merged
mrodm merged 3 commits intoelastic:mainfrom
mrodm:add-missing-context-ingest-api-pipelines
Oct 2, 2024
Merged

Add missing context to api ingest pipelines#2137
mrodm merged 3 commits intoelastic:mainfrom
mrodm:add-missing-context-ingest-api-pipelines

Conversation

@mrodm
Copy link
Copy Markdown
Contributor

@mrodm mrodm commented Oct 1, 2024

Add missing context variables to the ingest GetPipelines API queries.

References:

type IngestPutPipeline func(id string, body io.Reader, o ...func(*IngestPutPipelineRequest)) (*Response, error)
type IngestGetPipeline func(o ...func(*IngestGetPipelineRequest)) (*Response, error)

How to test locally

elastic-package stack up -v -d

# test some packages
cd test/packages/parallel/nginx
elastic-package test pipeline -v

cd ../aws
elastic-package test pipeline -v

elastic-package stack down -v

@mrodm mrodm self-assigned this Oct 1, 2024
Comment on lines -287 to -289
r, err := api.Ingest.GetPipeline(func(request *elasticsearch.IngestGetPipelineRequest) {
request.PipelineID = pipeline.Name
})
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This can be replaced by

// WithPipelineID - comma separated list of pipeline ids. wildcards supported.
func (f IngestGetPipeline) WithPipelineID(v string) func(*IngestGetPipelineRequest) {
    return func(r *IngestGetPipelineRequest) {
        r.PipelineID = v
    }
}

@mrodm mrodm marked this pull request as ready for review October 1, 2024 14:22
@mrodm mrodm requested a review from a team October 1, 2024 14:23
@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @mrodm

Copy link
Copy Markdown
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

👍

@mrodm mrodm merged commit 7ba245a into elastic:main Oct 2, 2024
@mrodm mrodm deleted the add-missing-context-ingest-api-pipelines branch October 2, 2024 16:46
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.

3 participants