Skip to content
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

Fix cvd name after cvd version update. #354

Closed
wants to merge 1 commit into from
Closed

Conversation

ser-io
Copy link
Member

@ser-io ser-io commented Aug 31, 2023

  • After bumping cvd version in commit#497d7f09eb161cb095fb66b8be104f6bd75412de returned cvd names changed from cvd-1 to 1, which breaks compatibility with names used in GET /devices API.

- After bumping `cvd` version in commit#497d7f09eb161cb095fb66b8be104f6bd75412de returned cvd names changed from `cvd-1` to `1`, which breaks compatibility with names used in `GET /devices` API.
@ser-io ser-io requested a review from jemoreira August 31, 2023 20:57
@@ -156,7 +155,7 @@ func (a *CreateCVDAction) launchWithCanonicalConfig(op apiv1.Operation) (*apiv1.
if err := cmd.Run(); err != nil {
return nil, operator.NewInternalError(ErrMsgLaunchCVDFailed, err)
}
fleet, err := cvdFleet(a.execContext, a.paths.CVDBin())
fleet, err := getCVDFleet(a.execContext, a.paths.CVDBin())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +154 to +160
func decodeCVDName(name string) (string, string, error) {
parts := strings.SplitN(name, "-", 2)
if len(parts) != 2 {
return "", "", errors.New("invalid <GROUP>-<NAME> format")
}
return parts[0], parts[1], nil
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't do this, the latest version of cvd already prints instance name, group name and webrtc device id separately.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, I'll abandon this PR in favor of using webrtc device id: #355

@ser-io ser-io closed this Sep 12, 2023
@ser-io ser-io deleted the cvdname branch September 12, 2023 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants