Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines how owner identities are managed, specifically for Kubernetes clusters. It introduces Kubernetes-aware logic to correctly identify cluster owners based on their context and prevents certain owner identity warnings and updates that are not applicable to Kubernetes environments. This ensures more accurate and appropriate handling of cluster ownership within the Kubernetes ecosystem. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors user identity management to include specific handling for Kubernetes clusters. It introduces a new method get_user_identity_from_context_name in sky/clouds/kubernetes.py to fetch user identities from Kubernetes contexts, which is then utilized during cluster provisioning. The changes also adjust the _check_owner_identity_with_record function to conditionally skip certain owner identity warnings and updates for Kubernetes. A key piece of feedback suggests replacing the assert False for control flow in get_user_identity_from_context_name with a ValueError exception to prevent unexpected behavior if assertions are disabled, and to update the corresponding docstring.
|
/quicktest-core --kubernetes |
|
/smoke-test --kubernetes |
| # showing the warning above again. | ||
| global_user_state.set_owner_identity_for_cluster( | ||
| cluster_name, identity) | ||
| if not is_k8s_cloud: |
There was a problem hiding this comment.
Could you add a comment here on why we skip this if is_k8s_cloud?
Testing methodology:
sky launch -c test --infra k8s/Bsky exec test -- echo hiFails on current master, works on this PR.
Tested (run the relevant ones):
bash format.sh/smoke-test(CI) orpytest tests/test_smoke.py(local)/smoke-test -k test_name(CI) orpytest tests/test_smoke.py::test_name(local)/quicktest-core(CI) orpytest tests/smoke_tests/test_backward_compat.py(local)