-
Notifications
You must be signed in to change notification settings - Fork 80
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
renamed put pipeline to create ingest pipeline #399
Conversation
Ok I would like to talk more about this in our meeting, but I think I understand where I went wrong with how your test cases work. |
@maddox05 Nice! To fix the unittests, you just need to update lines 2248's and 2265's error messages in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick changes! Just left a comment on how to quickly fix the unittests
…ate-ingest-pipeline
could not find how [opensearch.ingest.put_pipeline.return_value = as_future()] uses put_pipeline so I changed it to [opensearch.ingest.create_ingest_pipeline.return_value = as_future()], as well as fixing the test cases naming. |
@maddox05 This line is included in the unittests but it's referring to the opensearchpy library's The following line occurs twice in runner_test.py:
This is what's causing the unittests to fail. The test is expecting an error message that includes "put-pipeline" but it's getting an error message that includes "create-ingest-pipeline". In order to fix the unittests, we just need to replace "put-pipeline" in the error message above to "create-ingest-pipeline". |
|
||
@mock.patch("opensearchpy.OpenSearch") | ||
@run_async | ||
async def test_param_id_mandatory(self, opensearch): | ||
opensearch.ingest.put_pipeline.return_value = as_future() | ||
opensearch.ingest.create_ingest_pipeline.return_value = as_future() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We won't want to change these because this is an opensearchpy function call. We're only changing occurrences of "put-pipeline" in OSB. Let me know if you have more questions about this and we can discuss this on a call or during office hours.
@@ -1101,7 +1101,7 @@ async def __call__(self, opensearch, params): | |||
) | |||
|
|||
def __repr__(self, *args, **kwargs): | |||
return "put-pipeline" | |||
return opensearch.ingest.put_pipeline.return_value = as_future() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should change this line back as it might be impacting the CI runs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why thats left, thought I changed all of them. will change today, sorry about that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries!
…oject#399)" This reverts commit e73664a.
Description
I have renamed the fields put-pipeline and all according names to create ingest pipeline.
Issues Resolved
Solves issue #366
Testing
No testing should be needed for renamed variables/classes.
Looked over by me and others to make sure 100% I got the name correct ( will be looked over again in PR )
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.