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: API requests with single RM and recover from panic during unauthorized autocreate #9573

Open
wants to merge 11 commits into
base: wksp-namespace-binding
Choose a base branch
from

Conversation

amandavialva01
Copy link
Contributor

@amandavialva01 amandavialva01 commented Jun 26, 2024

Ticket

DET-10385, DET-10386

Description

This PR fixes the following issues:

  • API requests for single RM only work when the cluster name is specified in the request
  • Autocreate panic is not handled when attempted with OSS
  • Some lint issues after feature branch rebase with main
  • Autocreating namespace fails given workspace whose name doesn't match the accepted namespace regex pattern.

Test Plan

Spin up a single RM kubernetes EE cluster to execute the test plan.
To test API requests for single RM, run the following commands and make sure that they work:

  • det w create ws1 --auto-create-namesapce
  • det w create ws2 && det w bindings set ws2 --namespace default
  • det w create ws3 --namespace default
  • det w create ws4 && det w bindings set --auto-create-namespace

To test auto-create panic handled gracefully with an intuitive error message:

  • Kill your Kubernetes cluster (if it's EE) and spin up an OSS Kubernetes cluster (remove license.txt and public.txt from your determined directory).
  • Run det w create ws10 --auto-create-namespace and verify that we get an error saying that auto create is an EE-only feature
  • Run det w create ws11 && det w bindings set ws11 --auto-create-namespace and verify that we get an error saying that auto create is an EE-only feature

To test namespace auto-creation with workspaces whose names don't match the accepted namespace regex pattern, run
det w create name,of_workspacE --auto-create-namespace and verify that a Kubernetes namespace is successfully created

  • Run det w create ANOTHER,name,of_workspacE && det w bindings set ANOTHER,name,of_workspacE --auto-create-namespace and verify that a Kubernetes namespace is successfully created

Checklist

  • Changes have been manually QA'd
  • New features have been approved by the corresponding PM
  • User-facing API changes have the "User-facing API Change" label
  • Release notes have been added as a separate file under docs/release-notes/
    See Release Note for details.
  • Licenses have been included for new code which was copied and/or modified from any external code

@amandavialva01 amandavialva01 requested review from a team as code owners June 26, 2024 15:22
@cla-bot cla-bot bot added the cla-signed label Jun 26, 2024
@amandavialva01 amandavialva01 changed the base branch from main to wksp-namespace-binding June 26, 2024 15:22
@determined-ci determined-ci requested a review from a team June 26, 2024 15:22
Copy link

netlify bot commented Jun 26, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit 82011dc
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/667c323121ae3f0008b78e4b
😎 Deploy Preview https://deploy-preview-9573--determined-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.52%. Comparing base (c71d596) to head (86f8657).

Additional details and impacted files
@@                    Coverage Diff                     @@
##           wksp-namespace-binding    #9573      +/-   ##
==========================================================
- Coverage                   52.11%   43.52%   -8.60%     
==========================================================
  Files                         753      578     -175     
  Lines                      112830    99830   -13000     
  Branches                     2888     2888              
==========================================================
- Hits                        58806    43449   -15357     
- Misses                      53852    56209    +2357     
  Partials                      172      172              
Flag Coverage Δ
harness 37.76% <ø> (-25.76%) ⬇️
web 46.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 276 files with indirect coverage changes

Copy link
Member

@tara-det-ai tara-det-ai left a comment

Choose a reason for hiding this comment

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

LGTM

@salonig23 salonig23 force-pushed the wksp-namespace-binding branch 2 times, most recently from cd9b184 to 1ee0bbf Compare July 2, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants