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

[Bug] Avoid assigning an entry to a map that is nil #1715

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

kevin85421
Copy link
Member

@kevin85421 kevin85421 commented Dec 5, 2023

Why are these changes needed?

  • Create a Kubernetes cluster, and create a namespace n1.

  • Deploy the operator with the following changes in values.yaml.

    # KubeRay operator values.yaml
    image:
      repository: kuberay/operator
      tag: nightly
    crNamespacedRbacEnable: true
    singleNamespaceInstall: true
    watchNamespace:
      - n1
  • We will get the following error message by running kubectl logs ${KUBERAY_POD} caused by this line.
    Screen Shot 2023-12-05 at 11 07 02 AM

  • Solution: Initialize the map before the assignment.

Related issue number

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(
  • Create a Kubernetes cluster, and create a namespace n1.
  • Build the image with this PR, and deploy the operator with the following changes in values.yaml.
    # KubeRay operator values.yaml
    image:
      repository: controller
      tag: latest
    crNamespacedRbacEnable: true
    singleNamespaceInstall: true
    watchNamespace:
      - n1
  • Check the operator's log
    Screen Shot 2023-12-05 at 2 25 48 PM

@kevin85421 kevin85421 marked this pull request as ready for review December 5, 2023 22:26
Copy link
Contributor

@architkulkarni architkulkarni left a comment

Choose a reason for hiding this comment

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

Good catch

@kevin85421 kevin85421 merged commit cceb7a5 into ray-project:master Dec 6, 2023
25 checks passed
blublinsky pushed a commit to blublinsky/kuberay that referenced this pull request Dec 6, 2023
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.

None yet

2 participants