Skip to content

[Refactor][kubectl-plugin] Rename filenames and variables based on kubectl repo #2295

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

Conversation

MortalHappiness
Copy link
Member

@MortalHappiness MortalHappiness commented Aug 9, 2024

Why are these changes needed?

This PR renames filenames and variables using the top command in the kubectl repo as a reference.

I find some variable naming will cause problem when implementing sub-commands of the kubectl ray cluster command. For example, because here

type ClusterOptions struct {
configFlags *genericclioptions.ConfigFlags
ioStreams *genericclioptions.IOStreams
args []string
AllNamespaces bool
}

the options struct is named ClusterOptions, if a new command kubectl ray cluster session needs to be implemented, it cannot use the name ClusterOptions because they both belong to the same package cluster. By renaming this to ClusterGetOptions, the session command can name its options as ClusterSessionOptions, which prevents the naming conflict and ensures consistent variable naming style.

Related issue number

N/A

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

@MortalHappiness
Copy link
Member Author

@kevin85421 @chiayi PTAL

…bectl repo

Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
@MortalHappiness MortalHappiness force-pushed the feature/kubectl-ray-cluster-get-refactor branch from c03818e to 33fca1a Compare August 9, 2024 17:20
@kevin85421 kevin85421 merged commit 5d2375b into ray-project:master Aug 31, 2024
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants