observability-cli icon indicating copy to clipboard operation
observability-cli copied to clipboard

[POA-752] Mark old commands as deprecated

Open mudit-postman opened this issue 1 year ago • 1 comments

  • Marked old commands as deprecated, they will not show in help text now
  • might be removed for ec2 and kube
  • will be removed for daemon and nginx

mudit-postman avatar Feb 23 '24 07:02 mudit-postman

Do we need to make these commands, unusable? Error out like, apispec https://github.com/akitasoftware/akita-cli/blob/ee18ae86fbe2d48b4483575eda7080205e5ef731/cmd/internal/apispec/cmd.go#L17

We can keep code as it is, just error out these commands.

mudit-postman avatar Feb 23 '24 07:02 mudit-postman

This can go as-is.

But thinking on this some more, how about if we removed the "will be removed" commands altogether, but leave their supporting code? Maybe also give the same treatment to commands that are already errors. I'm hoping this would be an easy blast-away-code operation. If you need to do surgery/refactoring of any kind to achieve this, then let's just go with what is here.

@liujed, removed old deprecated commands from root Cobra Command and moved them under the legacy folder, but have kept their related code. https://github.com/akitasoftware/akita-cli/pull/253/commits/8c192ea43470319b99f1f6ef8578e6cbd7206d93, https://github.com/akitasoftware/akita-cli/pull/253/commits/ffd8b474c21831e12bab7d015a84caf6e19ab98c

mudit-postman avatar Feb 26 '24 05:02 mudit-postman