Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing context to api ingest pipelines #2137

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

mrodm
Copy link
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
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
Collaborator

💚 Build Succeeded

History

cc @mrodm

Copy link
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
3 checks passed
@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