-
Notifications
You must be signed in to change notification settings - Fork 185
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
Added an automated api update bot for opensearch-py #664
Added an automated api update bot for opensearch-py #664
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #664 +/- ##
=======================================
Coverage 72.14% 72.14%
=======================================
Files 89 89
Lines 7945 7945
=======================================
Hits 5732 5732
Misses 2213 2213 ☔ View full report in Codecov by Sentry. |
To install the opensearchpy-api-update-bot, the administrator must grant approval for the request. Failing tests are related to issue #653 @VachaShah please take a look. |
Signed-off-by: saimedhi <saimedhi@amazon.com>
9bb19a2
to
88a69c2
Compare
@VachaShah, shall we merge it? Is there any other way to test? |
You can test it on your fork (remove the github app token step since that is related to the org). It should work without it on your fork and you can post here the PR that is created from this workflow. |
@VachaShah, I followed workflow given in the issue #619 Example outcome PR: saimedhi#24 produced with this workflow. |
@@ -21,6 +22,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) | |||
### Fixed | |||
- Fix KeyError when scroll return no hits ([#616](https://github.com/opensearch-project/opensearch-py/pull/616)) | |||
- Fix reuse of `OpenSearch` using `Urllib3HttpConnection` and `AsyncOpenSearch` after calling `close` ([#639](https://github.com/opensearch-project/opensearch-py/pull/639)) | |||
### Automated API Update | |||
- Your contribution here. |
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.
Is this line Your contribution here
needed?
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.
Is this line
Your contribution here
needed?
Yes, to update changelog, find and replace is used. We can change the text if required.
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.
You could reuse the title line, then you don't need the misleading "Your contribution here.", "### Automated API Update". Maybe call it "Updated APIs" to match the other sections language?
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.
-
Trying to find a way to update only in ## [Unreleased] section.
-
If "### Updated APIs" is used for finding, it will be present in changelog at several places in future after next release.
-
Action
jacobtomlinson/gha-find-replace@v3
will not help if### Updated APIs
is present in several places.
- name: Update CHANGELOG
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "### Updated APIs"
replace: "### Updated APIs\n- Updated opensearch-py to reflect the latest OpenSearch API spec."
include: "**CHANGELOG.md"
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.
Makes sense. I think that action could use a "replace first occurrence" feature, I took a look at the project and started with adding some unit tests - jacobtomlinson/gha-find-replace#61. Will follow up with that feature if it gets merged.
@VachaShah, please take a look. This workflow is working in my main branch but opensearch-py tests are not running on the created PR. PR created: saimedhi#29 |
Signed-off-by: saimedhi <saimedhi@amazon.com>
0b65e61
to
d494e75
Compare
On my fork all the tests are passing. (screenshots from workflows) |
@saimedhi I think these tests are not appearing on your PR because the checks are running on the first commit but not on the second commit. Lets try one thing here: we can move the update changelog commit step to before creating the PR? So the PR would be created with both the commits. |
Signed-off-by: saimedhi <saimedhi@amazon.com>
Made the changes as suggested. |
if: ${{ steps.cpr.outputs.pull-request-number != '' }} | ||
with: | ||
find: "- Your contribution here." | ||
replace: "- Updated opensearch-py to reflect the latest OpenSearch API spec.\n- Your contribution here." |
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.
Let's change these messages to be something more specific? e.g. the commit of opensearch-api-specification that was used? This way we don't have a thousand PRs/commit messages that have the same title?
@VachaShah you good with this? |
…ct#664) * Added an automated api update bot for opensearch-py Signed-off-by: saimedhi <saimedhi@amazon.com> * Added an automated api update bot for opensearch-py Signed-off-by: saimedhi <saimedhi@amazon.com> * Added an automated api update bot for opensearch-py Signed-off-by: saimedhi <saimedhi@amazon.com> --------- Signed-off-by: saimedhi <saimedhi@amazon.com> Signed-off-by: AbitraryYu <nikkoyhc@gmail.com>
…ct#664) * Added an automated api update bot for opensearch-py Signed-off-by: saimedhi <saimedhi@amazon.com> * Added an automated api update bot for opensearch-py Signed-off-by: saimedhi <saimedhi@amazon.com> * Added an automated api update bot for opensearch-py Signed-off-by: saimedhi <saimedhi@amazon.com> --------- Signed-off-by: saimedhi <saimedhi@amazon.com>
Description
Added an automated api update bot for opensearch-py
Issues Resolved
Closes #619
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.
Signed-off-by: saimedhi saimedhi@amazon.com