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-53] Refactor storage cost estimate to use Rawls #1486

Merged
merged 5 commits into from
Nov 8, 2024
Merged

Conversation

trholdridge
Copy link
Contributor

@trholdridge trholdridge commented Nov 7, 2024

Rawls now supports getting workspace bucket location, so Orchestration doesn't have to directly request this information from Google, which was causing incorrect behavior around requester pays. This change modifies the storage cost estimate API so that it uses Rawls to get bucket location (for rate calculations). It also adds an optional userProject query parameter so that a reader may use the API to get a storage cost estimate on a requester pays workspace if they provide a project to bill.

For UI users, this will fix the error in getting estimated cost on requester pays workspaces for writers and owners. It won't look any different for readers, because the UI hides estimated cost from readers in the first place.


Have you read CONTRIBUTING.md lately? If not, do that first.

I, the developer opening this PR, do solemnly pinky swear that:

  • I've followed the instructions if I've made any changes to the API, especially if they're breaking changes
  • I've updated the FISMA documentation if I've made any security-related changes, including auth, encryption, or auditing

In all cases:

  • Get two thumbsworth of review and PO signoff if necessary
  • Verify all tests go green
  • Squash and merge. Make sure your branch deletes; GitHub should do this for you.
  • Test this change deployed correctly and works on dev environment after deployment

@@ -39,7 +38,5 @@ trait GoogleServicesDAO extends ReportsSubsystemStatus {

def publishMessages(fullyQualifiedTopic: String, messages: Seq[String]): Future[Unit]

def getBucket(bucketName: String, petKey: String): Option[Bucket]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can just leave this + its implementations if that is better. It is not used anywhere else in orch which is why I deleted it.

@trholdridge trholdridge marked this pull request as ready for review November 7, 2024 17:59
@trholdridge trholdridge requested a review from a team as a code owner November 7, 2024 17:59
@trholdridge trholdridge requested review from davidangb and marctalbott and removed request for a team November 7, 2024 17:59
Copy link
Contributor

@davidangb davidangb left a comment

Choose a reason for hiding this comment

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

I didn't test it myself, but this looks great - thank you for all the cleanup!

@trholdridge trholdridge merged commit f3be77b into develop Nov 8, 2024
13 checks passed
@trholdridge trholdridge deleted the CORE-53-2 branch November 8, 2024 14:21
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.

3 participants