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

[refactor] Check whether UpgradeStrategy is nil and UpgradeStrategy.Type is valid in a single if statement #2710

Closed
1 of 2 tasks
kevin85421 opened this issue Jan 3, 2025 · 2 comments · Fixed by #2711
Closed
1 of 2 tasks
Assignees
Labels
1.3.0 enhancement New feature or request good first issue Good for newcomers

Comments

@kevin85421
Copy link
Member

kevin85421 commented Jan 3, 2025

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

#2678 (comment)

change

if rayService.Spec.UpgradeStrategy == nil {
  return nil
}

// check UpgradeStrategy.Type

to

if rayService.Spec.UpgradeStrategy != nil {
  // check UpgradeStrategy.Type 
}

or

if rayService.Spec.UpgradeStrategy != nil && (check UpgradeStrategy.Type ){
  ...
}

Use case

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@kevin85421 kevin85421 added enhancement New feature or request triage 1.3.0 good first issue Good for newcomers and removed triage labels Jan 3, 2025
@kevin85421
Copy link
Member Author

This is a fairly simple change. It would be great if the PR could be reviewed this week.

@hcc429
Copy link
Contributor

hcc429 commented Jan 3, 2025

May I take this? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.3.0 enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants