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

RW-12581 Remove user enabled check when redundant #4534

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

Conversation

Qi77Qi
Copy link
Collaborator

@Qi77Qi Qi77Qi commented May 13, 2024

When cloudContext is defined, we're already checking if a user has project reader permission, which also makes sure the user is active, so we don't need to check whether user is enabled in these cases.

Jira ticket: https://broadworkbench.atlassian.net/browse/[ticket_number]

Summary of changes

What

Why

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

authProvider.checkUserEnabled(
userInfo
) // when request doesn't have cloudContext defined, we check if user is enabled
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moving up the check if cloudContext is not defined; otherwise, remove this redundant check

@Qi77Qi Qi77Qi requested review from mlilynolting and a team May 13, 2024 15:27
val readerGoogleProjectIds: Set[ProjectSamResourceId],
val readerRuntimeIds: Set[SamResourceId],
val readerWorkspaceIds: Set[WorkspaceResourceSamResourceId]
final case class AuthorizedIds(ownerGoogleProjectIds: Set[ProjectSamResourceId],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

these vals are redundant

Copy link

codecov bot commented May 13, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 73.64%. Comparing base (2a1e544) to head (3ef3060).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4534      +/-   ##
===========================================
- Coverage    73.65%   73.64%   -0.02%     
===========================================
  Files          158      158              
  Lines        14699    14700       +1     
  Branches      1160     1119      -41     
===========================================
- Hits         10827    10826       -1     
- Misses        3872     3874       +2     
Files Coverage Δ
...leonardo/http/service/RuntimeV2ServiceInterp.scala 92.71% <ø> (ø)
...ench/leonardo/http/service/DiskServiceInterp.scala 90.50% <80.00%> (-0.50%) ⬇️
...h/leonardo/http/service/RuntimeServiceInterp.scala 87.41% <83.33%> (-0.15%) ⬇️

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 2a1e544...3ef3060. Read the comment docs.

Copy link
Contributor

@mlilynolting mlilynolting left a comment

Choose a reason for hiding this comment

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

This makes sense to me!

@yonghaoy
Copy link
Contributor

Change LG. But I throught all Terra services use the same proxy config, and the proxy will call SAM to check user ToS and enable status already. Why we need this change in Leo again ?

@Qi77Qi
Copy link
Collaborator Author

Qi77Qi commented May 13, 2024

@yonghaoy that's true...

@mlilynolting do you know why we added the explicit user enabled call in the first place?

@Qi77Qi
Copy link
Collaborator Author

Qi77Qi commented May 13, 2024

[info]   org.broadinstitute.dsde.workbench.StreamTimeoutError: AppCreationSpec: app terra-quality-93804962/automation-test-app-auymigcfz did not finish creating after 30 minutes

jenkins retest

@LizBaldo
Copy link
Collaborator

@Qi77Qi just FYI. Our integration tests do not run on jenkins anymore. You can retrigger via GHA instead

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