app-services-cli icon indicating copy to clipboard operation
app-services-cli copied to clipboard

refactor: override fetch if instance exists

Open rkpattnaik780 opened this issue 3 years ago • 1 comments

Adresses #1522

Verification Steps

  1. Run Service Registry describe command in verbose mode:
rhoas service-registry describe -v
  1. It should call the endpoint api/serviceregistry_mgmt/v1/registries/<registry-id> only once.

Type of change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Documentation change
  • [X] Optimization

rkpattnaik780 avatar Oct 11 '22 07:10 rkpattnaik780

This is the most straight forward method to ensure CLI doesnt end up doing multiple requests, marking this PR as draft for initial discussions, will replicate to rest of the commands once we lock on an approach.

rkpattnaik780 avatar Oct 11 '22 07:10 rkpattnaik780