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

[WX-1675] Add new 'GROUP_METRICS_ENTRY' table #7487

Merged
merged 13 commits into from
Aug 23, 2024
Merged

Conversation

salonishah11
Copy link
Contributor

@salonishah11 salonishah11 commented Aug 6, 2024

Description

Jira: https://broadworkbench.atlassian.net/browse/WX-1675

A table to track when a group or billing project last ran into Cloud Quota exhaustion

Release Notes Confirmation

CHANGELOG.md

  • I updated CHANGELOG.md in this PR
  • I assert that this change shouldn't be included in CHANGELOG.md because it doesn't impact community users

Terra Release Notes

  • I added a suggested release notes entry in this Jira ticket
  • I assert that this change doesn't need Jira release notes because it doesn't impact Terra users

@salonishah11 salonishah11 changed the title [SPS] Add new 'GROUP_METRICS_ENTRY' table [WX-1675] Add new 'GROUP_METRICS_ENTRY' table Aug 6, 2024
@salonishah11 salonishah11 marked this pull request as ready for review August 7, 2024 13:36
@salonishah11 salonishah11 requested a review from a team as a code owner August 7, 2024 13:36
override def * : ProvenShape[GroupMetricsEntry] = (groupId,
quotaExhaustionDetected,
groupMetricsEntryId.?
) <> ((GroupMetricsEntry.apply _).tupled, GroupMetricsEntry.unapply)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Question for reviewers - For default projection method *, I added .? at the end of groupMetricsEntryId since the ...Id columns in other EntryComponents also do that. As a result the groupMetricsEntryId in GroupMetricsEntry.scala is also marked as Optional[Long]. My understanding is that ? lifts a column to optional but I am not sure why an id column which is the primary key should be optional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussed in meeting, and added a comment explaining the reason in a998976.

Copy link
Collaborator

@aednichols aednichols left a comment

Choose a reason for hiding this comment

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

Nice!

CHANGELOG.md Outdated
@@ -2,6 +2,10 @@

## 88 Release Notes

### New table 'GROUP_METRICS_ENTRY'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Late-breaking comment I noticed while reorganizing the release notes... now that we have a decent amount of them, maybe we should group this and the index removal under a ### Database section.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I can do that 👍

@salonishah11 salonishah11 merged commit 42043d7 into develop Aug 23, 2024
37 checks passed
@salonishah11 salonishah11 deleted the sps_new_table branch August 23, 2024 17:01
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