@@ -83,7 +83,7 @@ func NewClusterLogCommand(streams genericclioptions.IOStreams) *cobra.Command {
8383
8484 cmd := & cobra.Command {
8585 Use : "log (RAYCLUSTER | TYPE/NAME) [--out-dir DIR_PATH] [--node-type all|head|worker]" ,
86- Short : "Get ray cluster log" ,
86+ Short : "Get Ray cluster log" ,
8787 Long : logLong ,
8888 Example : logExample ,
8989 Aliases : []string {"logs" },
@@ -195,7 +195,7 @@ func (options *ClusterLogOptions) Run(ctx context.Context, factory cmdutil.Facto
195195 return fmt .Errorf ("failed to retrieve kubernetes client set: %w" , err )
196196 }
197197
198- // Retrieve raycluster name for the non raycluster type node
198+ // Retrieve RayCluster name for the non RayCluster type node
199199 var clusterName string
200200 switch options .ResourceType {
201201 case util .RayCluster :
@@ -245,13 +245,13 @@ func (options *ClusterLogOptions) Run(ctx context.Context, factory cmdutil.Facto
245245 if deleteOutputDir {
246246 os .Remove (options .outputDir )
247247 }
248- return fmt .Errorf ("No ray nodes found for resource %s" , clusterName )
248+ return fmt .Errorf ("No Ray nodes found for resource %s" , clusterName )
249249 }
250250
251- // Get a list of logs of the ray nodes.
251+ // Get a list of logs of the Ray nodes.
252252 var logList []* bytes.Buffer
253253 for _ , rayNode := range rayNodes .Items {
254- // Since the first container is always the ray container, we will retrieve the first container logs
254+ // Since the first container is always the Ray container, we will retrieve the first container logs
255255 containerName := rayNode .Spec .Containers [0 ].Name
256256 request := clientSet .KubernetesClient ().CoreV1 ().Pods (rayNode .Namespace ).GetLogs (rayNode .Name , & corev1.PodLogOptions {Container : containerName })
257257
@@ -271,7 +271,7 @@ func (options *ClusterLogOptions) Run(ctx context.Context, factory cmdutil.Facto
271271 logList = append (logList , buf )
272272 }
273273
274- // Pod file name format is name of the ray node
274+ // Pod file name format is name of the Ray node
275275 for ind , logList := range logList {
276276 curFilePath := filepath .Join (options .outputDir , rayNodes .Items [ind ].Name , "stdout.log" )
277277 dirPath := filepath .Join (options .outputDir , rayNodes .Items [ind ].Name )
@@ -336,7 +336,7 @@ func (dre *DefaultRemoteExecutor) CreateExecutor(restConfig *rest.Config, url *u
336336 return remotecommand .NewSPDYExecutor (restConfig , "POST" , url )
337337}
338338
339- // downloadRayLogFiles will use to the executor and retrieve the logs file from the inputted ray head
339+ // downloadRayLogFiles will use to the executor and retrieve the logs file from the inputted Ray head
340340func (options * ClusterLogOptions ) downloadRayLogFiles (ctx context.Context , exec remotecommand.Executor , rayNode corev1.Pod ) error {
341341 outreader , outStream := io .Pipe ()
342342 go func () {
@@ -356,7 +356,7 @@ func (options *ClusterLogOptions) downloadRayLogFiles(ctx context.Context, exec
356356 tarReader := tar .NewReader (outreader )
357357 header , err := tarReader .Next ()
358358 if err != nil && ! errors .Is (err , io .EOF ) {
359- return fmt .Errorf ("error will extracting head tar file for ray head %s: %w" , rayNode .Name , err )
359+ return fmt .Errorf ("error will extracting head tar file for Ray head %s: %w" , rayNode .Name , err )
360360 }
361361
362362 fmt .Fprintf (options .ioStreams .Out , "Downloading log for Ray Node %s\n " , rayNode .Name )
0 commit comments