Comments

jigish.addweb created an issue. See original summary.

jigish.addweb’s picture

Status: Active » Needs review
StatusFileSize
new56.98 KB
yas’s picture

@jigishaddweb

Thank you for adding the feature. Could you please refactor the following code?

FROM:

--- a/modules/cloud_service_providers/k8s/src/Service/K8sServiceMock.php
+++ b/modules/cloud_service_providers/k8s/src/Service/K8sServiceMock.php
@@ -610,4 +610,32 @@ class K8sServiceMock extends K8sService {
     return json_decode($this->config->get('k8s_mock_data'), TRUE)['deleteIngress'];
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getEndpoints(array $params = []) {
+    return json_decode($this->config->get('k8s_mock_data'), TRUE)['getEndpoints'];
+  }

TO:

+  public function getEndpoints(array $params = []) {
+    return json_decode($this->config->get('k8s_mock_data'), TRUE)['getEndpoints'] ?? [];
+  }
yas’s picture

Status: Needs review » Needs work
yas’s picture

yas’s picture

yas’s picture

@jigishaddweb

Based on the patch 3104511-4.patch, could you please respect the following code style?

FROM:

isset($a) ? $a : $b or !empty($a) ? $a : $b

TO:

$var ?? $b

Thanks

yas’s picture

@jigishaddweb

Could you please also follow the code based on the patch at 3104742-2.patch?

jigish.addweb’s picture

StatusFileSize
new56.72 KB

@yas
Thank you for reviewing the patch. I have updated the code as per your comment.
Please test the patch and let me know if need further changes.

jigish.addweb’s picture

Status: Needs work » Needs review
yas’s picture

Status: Needs review » Reviewed & tested by the community

@jigishaddweb

Thank you for the update. It looks good to me now. I'll merge the patch to 8.x-2.x and close this issue as Fixed.

  • yas committed 429ed63 on 8.x-2.x authored by jigish.addweb
    Issue #3103927 by jigish.addweb, yas: Manage K8s Endpoints
    
yas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.