-
Notifications
You must be signed in to change notification settings - Fork 233
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 retry for opensearch client creation in ISM Policy reconciler #805
Add retry for opensearch client creation in ISM Policy reconciler #805
Conversation
2. Remove extra whitespace in copy command in developing.md Signed-off-by: Nilushan Costa <[email protected]>
854e1dd
to
1eefddd
Compare
As part of this fix, I modified 2 files; |
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.
Hi @nilushancosta. Thanks for contributing this fix.
Not sure why there were changes in the CRD yamls, these should have already been done in the PR where the corresponding code change was introduced. No idea how that slipped through.
In the end, not your fault or problem, you did the copying correctly.
@@ -146,6 +146,7 @@ func (r *IsmPolicyReconciler) Reconcile() (retResult ctrl.Result, retErr error) | |||
if err != nil { | |||
reason := "error creating opensearch client" | |||
r.recorder.Event(r.instance, "Warning", opensearchError, reason) | |||
return ctrl.Result{Requeue: true, RequeueAfter: 30 * time.Second}, err |
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.
The correct way here is to set retResult
and retErr
as the defer logic will use that to set a corresponding status in kubernetes. Similar to how the blocks above do it.
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 feedback. I updated the PR
@nilushancosta On second thought, please remove all the crd yaml changes from the PR (from the chart and the config/crd/bases folder), we'll deal with that separately since the wrong field name ( |
2. Remove CRD changes Signed-off-by: Nilushan Costa <[email protected]>
d2da79d
to
283eb68
Compare
Updated the PR by removing them |
### Description Due to some oversight the timestampField from https://github.com/opensearch-project/opensearch-k8s-operator/blob/main/opensearch-operator/api/v1/opensearch_index_types.go#L14 was released as `timestamp_field` in the helm chart (https://github.com/opensearch-project/opensearch-k8s-operator/blob/v2.6.0/charts/opensearch-operator/files/opensearch.opster.io_opensearchindextemplates.yaml#L57). To prevent an incompatible renaming in the released CRDs this PR renames the field in the code to be consistent. ### Issues Resolved Originally discovered in #805 ### Check List - [x] Commits are signed per the DCO using --signoff - [x] Unittest added for the new/changed functionality and all unit tests are successful - [x] Customer-visible features documented - [x] No linter warnings (`make lint`) If CRDs are changed: - [-] CRD YAMLs updated (`make manifests`) and also copied into the helm chart - [-] Changes to CRDs documented 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). Signed-off-by: Sebastian Woehrl <[email protected]>
…#810) ### Description Due to some oversight the timestampField from https://github.com/opensearch-project/opensearch-k8s-operator/blob/main/opensearch-operator/api/v1/opensearch_index_types.go#L14 was released as `timestamp_field` in the helm chart (https://github.com/opensearch-project/opensearch-k8s-operator/blob/v2.6.0/charts/opensearch-operator/files/opensearch.opster.io_opensearchindextemplates.yaml#L57). To prevent an incompatible renaming in the released CRDs this PR renames the field in the code to be consistent. ### Issues Resolved Originally discovered in opensearch-project#805 ### Check List - [x] Commits are signed per the DCO using --signoff - [x] Unittest added for the new/changed functionality and all unit tests are successful - [x] Customer-visible features documented - [x] No linter warnings (`make lint`) If CRDs are changed: - [-] CRD YAMLs updated (`make manifests`) and also copied into the helm chart - [-] Changes to CRDs documented 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). Signed-off-by: Sebastian Woehrl <[email protected]> (cherry picked from commit f3455f9)
…ensearch-project#805) ### Description Add retry for opensearch client creation in ISM policy reconciler to fix panic Minor change - Remove extra whitespace in developing.md file ### Issues Resolved Resolves opensearch-project#801 ### Check List - [x] Commits are signed per the DCO using --signoff - [ ] Unittest added for the new/changed functionality and all unit tests are successful - [ ] Customer-visible features documented - [x] No linter warnings (`make lint`) If CRDs are changed: - [ ] CRD YAMLs updated (`make manifests`) and also copied into the helm chart - [ ] Changes to CRDs documented Please refer to the [PR guidelines](https://github.com/opensearch-project/opensearch-k8s-operator/blob/main/docs/developing.md#submitting-a-pr) before submitting this pull request. 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Nilushan Costa <[email protected]> (cherry picked from commit ea46394)
### Description Add retry for opensearch client creation in ISM policy reconciler to fix panic Minor change - Remove extra whitespace in developing.md file ### Issues Resolved Resolves #801 ### Check List - [x] Commits are signed per the DCO using --signoff - [ ] Unittest added for the new/changed functionality and all unit tests are successful - [ ] Customer-visible features documented - [x] No linter warnings (`make lint`) If CRDs are changed: - [ ] CRD YAMLs updated (`make manifests`) and also copied into the helm chart - [ ] Changes to CRDs documented Please refer to the [PR guidelines](https://github.com/opensearch-project/opensearch-k8s-operator/blob/main/docs/developing.md#submitting-a-pr) before submitting this pull request. 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Nilushan Costa <[email protected]> (cherry picked from commit ea46394)
### Description Due to some oversight the timestampField from https://github.com/opensearch-project/opensearch-k8s-operator/blob/main/opensearch-operator/api/v1/opensearch_index_types.go#L14 was released as `timestamp_field` in the helm chart (https://github.com/opensearch-project/opensearch-k8s-operator/blob/v2.6.0/charts/opensearch-operator/files/opensearch.opster.io_opensearchindextemplates.yaml#L57). To prevent an incompatible renaming in the released CRDs this PR renames the field in the code to be consistent. ### Issues Resolved Originally discovered in #805 ### Check List - [x] Commits are signed per the DCO using --signoff - [x] Unittest added for the new/changed functionality and all unit tests are successful - [x] Customer-visible features documented - [x] No linter warnings (`make lint`) If CRDs are changed: - [-] CRD YAMLs updated (`make manifests`) and also copied into the helm chart - [-] Changes to CRDs documented 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). Signed-off-by: Sebastian Woehrl <[email protected]> (cherry picked from commit f3455f9)
…ensearch-project#805) ### Description Add retry for opensearch client creation in ISM policy reconciler to fix panic Minor change - Remove extra whitespace in developing.md file ### Issues Resolved Resolves opensearch-project#801 ### Check List - [x] Commits are signed per the DCO using --signoff - [ ] Unittest added for the new/changed functionality and all unit tests are successful - [ ] Customer-visible features documented - [x] No linter warnings (`make lint`) If CRDs are changed: - [ ] CRD YAMLs updated (`make manifests`) and also copied into the helm chart - [ ] Changes to CRDs documented Please refer to the [PR guidelines](https://github.com/opensearch-project/opensearch-k8s-operator/blob/main/docs/developing.md#submitting-a-pr) before submitting this pull request. 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Nilushan Costa <[email protected]> (cherry picked from commit ea46394)
…#810) ### Description Due to some oversight the timestampField from https://github.com/opensearch-project/opensearch-k8s-operator/blob/main/opensearch-operator/api/v1/opensearch_index_types.go#L14 was released as `timestamp_field` in the helm chart (https://github.com/opensearch-project/opensearch-k8s-operator/blob/v2.6.0/charts/opensearch-operator/files/opensearch.opster.io_opensearchindextemplates.yaml#L57). To prevent an incompatible renaming in the released CRDs this PR renames the field in the code to be consistent. ### Issues Resolved Originally discovered in opensearch-project#805 ### Check List - [x] Commits are signed per the DCO using --signoff - [x] Unittest added for the new/changed functionality and all unit tests are successful - [x] Customer-visible features documented - [x] No linter warnings (`make lint`) If CRDs are changed: - [-] CRD YAMLs updated (`make manifests`) and also copied into the helm chart - [-] Changes to CRDs documented 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). Signed-off-by: Sebastian Woehrl <[email protected]> (cherry picked from commit f3455f9)
Description
Add retry for opensearch client creation in ISM policy reconciler to fix panic
Minor change - Remove extra whitespace in developing.md file
Issues Resolved
Resolves #801
Check List
make lint
)If CRDs are changed:
make manifests
) and also copied into the helm chartPlease refer to the PR guidelines before submitting this pull request.
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.