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

[kubectl-plugin] update context error messages #2891

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

davidxia
Copy link
Contributor

@davidxia davidxia commented Feb 4, 2025

to tell user they can use --context to set the K8s context.

Signed-off-by: David Xia [email protected]

Checks

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

@davidxia davidxia force-pushed the patch16 branch 2 times, most recently from 4d98582 to 0d082fa Compare February 4, 2025 14:50
@davidxia davidxia marked this pull request as ready for review February 4, 2025 15:25
@MortalHappiness MortalHappiness self-assigned this Feb 4, 2025
kubectl-plugin/pkg/cmd/delete/delete_test.go Outdated Show resolved Hide resolved
kubectl-plugin/pkg/cmd/delete/delete_test.go Outdated Show resolved Hide resolved
Copy link
Member

@MortalHappiness MortalHappiness left a comment

Choose a reason for hiding this comment

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

LGTM

@kevin85421
Copy link
Member

@davidxia would you mind fixing the conflict? Thanks

to tell user they can use `--context` to set the K8s context.

Add tests

Signed-off-by: David Xia <[email protected]>
Co-authored-by: Chi-Sheng Liu <[email protected]>
@davidxia
Copy link
Contributor Author

davidxia commented Feb 5, 2025

@davidxia would you mind fixing the conflict? Thanks

yup, all fixed!


// CreateTempKubeConfigFile creates a temporary kubeconfig file with the given current context.
// This function should only be used in tests.
func CreateTempKubeConfigFile(t *testing.T, currentContext string) (string, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit (not blocking): Test-only functions usually live in _test.go files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gotcha, should I move this into kubeconfig_test.go in the same dir?

@andrewsykim andrewsykim merged commit 42d8325 into ray-project:master Feb 5, 2025
20 checks passed
@davidxia davidxia deleted the patch16 branch February 5, 2025 14:52
andrewsykim added a commit that referenced this pull request Feb 5, 2025
* [RayService] More envtests that follow the most common scenario in the RayService code path (#2880)

Signed-off-by: Rueian <[email protected]>

* [RayService] Remove outdated env tests (#2886)

Signed-off-by: kaihsun <[email protected]>

* [RayService] Refactor envtests (#2888)

* [docs][ray-operator] fix typo in Golang version (#2893)

Project uses Golang 1.22 not 1.20.

Signed-off-by: David Xia <[email protected]>

* [Fix][kubectl-plugin] Fix no context nil error SIGSEGV in tests (#2892)

Signed-off-by: Chi-Sheng Liu <[email protected]>

* [CI] Enable testifylint rule (#2896)

Signed-off-by: Chi-Sheng Liu <[email protected]>

* [CI] Enable `testifylint` `error-nil` rule (#2907)

* [kubectl-plugin][feat] support specifying number of head GPUs (#2895)

when creating a RayCluster with `kubectl ray create cluster NAME --head-gpu N`.
Similar to the `--worker-gpu` switch.

Signed-off-by: David Xia <[email protected]>

* Use webhook.CustomValidator instead of deprecated webhook.Validator. (#2803)

* Use webhook.CustomValidator instead of deprecated webhook.Validator.

* Move RayClusterWebhook to pkg/webhook/v1.

* [kubectl-plugin] update context error messages (#2891)

to tell user they can use `--context` to set the K8s context.

Add tests

Signed-off-by: David Xia <[email protected]>
Co-authored-by: Chi-Sheng Liu <[email protected]>

* update version for v1.3.0-rc.0 (#2885)

Signed-off-by: Andrew Sy Kim <[email protected]>

---------

Signed-off-by: Rueian <[email protected]>
Signed-off-by: kaihsun <[email protected]>
Signed-off-by: David Xia <[email protected]>
Signed-off-by: Chi-Sheng Liu <[email protected]>
Signed-off-by: Andrew Sy Kim <[email protected]>
Co-authored-by: Rueian <[email protected]>
Co-authored-by: Kai-Hsun Chen <[email protected]>
Co-authored-by: David Xia <[email protected]>
Co-authored-by: Chi-Sheng Liu <[email protected]>
Co-authored-by: David Xia <[email protected]>
Co-authored-by: Mykhailo Bobrovskyi <[email protected]>
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.

4 participants