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

[CORE-182] Convert remaining runtime operations to new Sam permissions model #4820

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

marctalbott
Copy link
Member

@marctalbott marctalbott commented Jan 2, 2025

Jira ticket: https://broadworkbench.atlassian.net/browse/CORE-182

Summary of changes

What

  • Check single Sam action for each runtime operation
    • createRuntime requires google-project/launch-notebook-cluster for a v1 runtime and workspace/compute for a v2 runtime
    • deleteRuntime requires notebook-cluster/delete
    • getRuntime requires notebook-cluster/status
    • stopRuntime and startRuntime both require notebook-cluster/stop_start
    • updateRuntime requires notebook-cluster/modify
    • Connecting to a runtime requires notebook-cluster/connect

Why

  • Simplifies Leo permissions model and uses the Sam generated client instead of the handrolled one that's currently in use

Testing these changes

What to test

Who tested and where

  • This change is covered by automated tests
    • NB: Rerun automation tests on this PR by commenting jenkins retest or jenkins multi-test.
  • I validated this change
  • Primary reviewer validated this change
  • I validated this change in the dev environment

@marctalbott marctalbott marked this pull request as ready for review January 2, 2025 22:55
@marctalbott marctalbott requested a review from a team as a code owner January 2, 2025 22:55
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 97.22222% with 1 line in your changes missing coverage. Please review.

Project coverage is 74.61%. Comparing base (1030a2c) to head (811d04a).

Files with missing lines Patch % Lines
...dinstitute/dsde/workbench/leonardo/samModels.scala 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4820      +/-   ##
===========================================
- Coverage    74.63%   74.61%   -0.02%     
===========================================
  Files          165      166       +1     
  Lines        14850    14686     -164     
  Branches      1187     1194       +7     
===========================================
- Hits         11083    10958     -125     
+ Misses        3767     3728      -39     
Files with missing lines Coverage Δ
...ute/dsde/workbench/leonardo/dao/sam/SamUtils.scala 100.00% <100.00%> (ø)
...rkbench/leonardo/http/AppDependenciesBuilder.scala 97.87% <ø> (-0.02%) ⬇️
...rkbench/leonardo/http/GcpDependenciesBuilder.scala 73.44% <ø> (ø)
...workbench/leonardo/http/service/ProxyService.scala 73.42% <100.00%> (-0.57%) ⬇️
...h/leonardo/http/service/RuntimeServiceInterp.scala 91.68% <100.00%> (+3.11%) ⬆️
...leonardo/http/service/RuntimeV2ServiceInterp.scala 95.39% <100.00%> (+3.16%) ⬆️
...dinstitute/dsde/workbench/leonardo/samModels.scala 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1030a2c...811d04a. Read the comment docs.

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.

1 participant