Skip to content

Conversation

ReshmaRamaiah10
Copy link

https://github.com/oncokb/oncokb-pipeline/issues/829

When a change is made, a uuid is added to the review object with a value of true. This indicates that a review is required. Once the change is reviewed, the uuid’s value is set to null, which triggers the removal of the UUID from the review object.

However, if the change is reverted before being reviewed, isChangeReverted is set to true.
[uuid]: !isChangeReverted results in uuid: false, which prevents the UUID from being removed, causing the system to still show that a review is required.

Fix: If isChangeReverted is true, the uuid is set to null
[uuid]: !isChangeReverted ? true : null

@ReshmaRamaiah10 ReshmaRamaiah10 requested a review from bprize15 July 31, 2025 15:44
...colorOptions,
hideLeftBorder: colorOptions.hideLeftBorder ?? false,
Copy link
Author

Choose a reason for hiding this comment

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

John suggested the change because:

  1. We already check if colorOptions is undefined
  2. moving hideLeftBorder logic under ...colorOptions ensures its overridden with the correct value

const newKeys = currentKeys.filter(x => !listItemKeys.includes(x));

// Only update if newKeys differ from addedListItemKeys
const sameLength = newKeys.length === addedListItemKeys.length;
Copy link

Choose a reason for hiding this comment

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

Think this is from the other PR

Copy link
Author

Choose a reason for hiding this comment

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

Yes! I created this PR before it was approved/merged. Hope it doesn't create any issues

@@ -98,7 +98,9 @@ export class FirebaseGeneReviewService {
const { hugoSymbol } = parseFirebaseGenePath(firebasePath) ?? {};

let updateObject = this.getGeneUpdateObject(updateValue, updatedReview!, firebasePath, uuid!);
const metaUpdateObject = this.firebaseMetaService.getUpdateObject(hugoSymbol!, isGermline, { [uuid!]: !isChangeReverted });
const metaUpdateObject = this.firebaseMetaService.getUpdateObject(hugoSymbol!, isGermline, {
Copy link

Choose a reason for hiding this comment

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

Makes sense to me, but would you mind just checking with Calvin? Feels like setting !isChangeReverted and never expecting the value to be false is a weird oversight. Figuring Calvin may have had a use case in mind

Copy link
Contributor

Choose a reason for hiding this comment

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

We can go ahead with this change. If a change was reverted, we do want to remove the uuid from the meta collection because it no longer needs review. Fine with this change

@@ -98,7 +98,9 @@ export class FirebaseGeneReviewService {
const { hugoSymbol } = parseFirebaseGenePath(firebasePath) ?? {};

let updateObject = this.getGeneUpdateObject(updateValue, updatedReview!, firebasePath, uuid!);
const metaUpdateObject = this.firebaseMetaService.getUpdateObject(hugoSymbol!, isGermline, { [uuid!]: !isChangeReverted });
const metaUpdateObject = this.firebaseMetaService.getUpdateObject(hugoSymbol!, isGermline, {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can go ahead with this change. If a change was reverted, we do want to remove the uuid from the meta collection because it no longer needs review. Fine with this change

@@ -98,7 +98,9 @@ export class FirebaseGeneReviewService {
const { hugoSymbol } = parseFirebaseGenePath(firebasePath) ?? {};

let updateObject = this.getGeneUpdateObject(updateValue, updatedReview!, firebasePath, uuid!);
const metaUpdateObject = this.firebaseMetaService.getUpdateObject(hugoSymbol!, isGermline, { [uuid!]: !isChangeReverted });
const metaUpdateObject = this.firebaseMetaService.getUpdateObject(hugoSymbol!, isGermline, {
[uuid!]: !isChangeReverted ? true : null,
Copy link
Contributor

Choose a reason for hiding this comment

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

We should really check if uuid is undefined/null and then generate one if it does not exist instead of using [uuid!], this will cause null: true to be inserted.

Copy link
Author

@ReshmaRamaiah10 ReshmaRamaiah10 Aug 13, 2025

Choose a reason for hiding this comment

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

Is if (uuid != null) enough? I think I’ve seen null: true used somewhere before, not sure if it was from legacy platform.

Choose a reason for hiding this comment

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

I made an issue for this. I think we can merge this if we're unsure how the UUID is becoming null.
I want to see if we can make an alert in datadog.
https://github.com/oncokb/oncokb-pipeline/issues/860

@jfkonecn jfkonecn requested a review from bprize15 August 13, 2025 18:51
@jfkonecn jfkonecn merged commit c009293 into oncokb:rc Aug 18, 2025
2 checks passed
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